How to output times of foreach
i want to output the times of c:foreach, for example
<c:forEach items="unitList" var="element" >
<!--how can i out put times-->
</c:forEach>
like
for(int i=0;i<len;i++)
array=1;
i want to output i, in c:foreach, how to do it ,thank you very much!
You use the varStatus attribute to define a variable which stores the info for you.
Among other things, it provides a index (0 based) and a count (1 based) track of which item you are at in the list.
<c:forEach items="unitList" var="element" varStatus="status">
<c:out value="Index: ${status.index}. Count: ${status.count}"/>
</c:forEach> would produce:
Index: 0 Count: 1
Index: 1 Count: 2
Index: 2 Count: 3
...
Similar Messages
-
How to output data when converting labview vi into matlab mex functions
Hi,
I am a fairly new user to labview and am currently working on labview
7.1. I have created a labview vi which can extract data from ni daq
6070e in real time. The problem is that this code has to be converted
so that it can be used with matlab.in order to do that i am using math
interactive tool kit which converts the labview code into mex files
which can then be used in matlab. Unfortunately i have not been able to
figure out how to output this data so that it can be processed in
matlab easily. i cannot afford any loss of information and all the
output must happen in real time. the o/p must take place after the fft
has been done. i am attaching the vi for convenience.There are 10
broken wires ,and this is the place where i want the o/p to be
generated.
Also do let me know if this vi can be further improved.
Regards
Attachments:
RT_loop2ver4_working.zip 642 KBManuj,
You seem to have misunderstood the way in which LabVIEW processes data. The code that you have produced will run in exactly the same way without the need for the case structure.
The code does not actually run the data from the previous case. It is merely processing data from the previous loop iteration, regardless of the case. If you were to remove the case structure, leaving only one copy of the code intact, and remove the toggle switch you have produced, or used the shift register which, I assure you would have worked, then you will have exactly the same functionality.
I have attached an example that uses the shift register to toggle cases, but also iterates that the case structure is not needed by using the same feedback node (and code) without a toggle switch or case structure.
Hope this helps you optimize your code
Regards
AdamB
Applications Engineer
National Instruments UK
Applications Engineering Team Leader | National Instruments | UK & Ireland
Attachments:
CASE_NO-CASE_Example.vi 24 KB -
Hi,
Can someone tell me how to output sample and convert clocks to PFI lines of E-Series DAQ (DAQPad-6015)?
Thank you very much.
JackJohn --
Windows is not an option for me. I like your idea of using a counter output -- it may be helpful as I am getting ramped up, but my application will eventually require both timer outputs.
I have a legacy C application written for Macintosh, and I am in the process of moving it onto OS X. So my options are to use DAQmx Base, or write an in-kernel driver. I actually have already done the latter for 6024/6025 E-series boards (for another company); for this client I was hoping to use the DAQmx Base to allow an easy transition to M-series boards, without the cost of writing and supporting a low-level driver.
The specific task I am doing is relatively straightforward. I record 2 channels of AI for a short period (usually about 250 ms.) and during this time I drive 2 external digital signals. Right now, I use the 2 timer outputs, which allows precise synchronization with the output and AI sampling.
I appreciate your comments, and thanks in advance for any additional suggestions you can lob my way.
--spg
Scott Gillespie
Applied Brain, Inc.
scott gillespie
applied brain, inc. -
How to display time difference in a single cell separately.
Hi All,
I have an issue where you have to calculate the Start time and End Time , Start Date and End Date for a particular Work item number
For eg ;
WI_ID WI_CD WI_CT
000001312610 02/09/2009 09:48:4 02/09/2009 09:48:9
000001312610 02/09/2009 09:54:4 02/09/2009 09:54:9
000001312610 02/09/2009 09:54:5 02/09/2009 09:54:9
000001312610 02/09/2009 10:07:0 02/09/2009 10:07:9
000001312610 02/09/2009 10:07:0 02/09/2009 10:07:9
000001312610 02/09/2009 10:16:5 02/09/2009 10:16:9
000001312610 02/09/2009 10:16:7 02/09/2009 10:16:9
Similarly I get the Endtime and ENd dayfrom other table for same work item.so my output should have the result as ,So my requirement here is
in the it should show the display in a single cell .as, 5secs, 5 secs,4 secs,9secs,4 secs,2 secs
for each work item.
Can any body help me on this issue.
Any pionters for this are much helpful forme.
Thanks
RohiniHi Kewin,
Its not the question of concatenation, that can be handled later.
But my issue is how to calculate time difference for each single step -
How can be time implimenting in Square Wave Point By Point .vi
i want to use "Square Wave Point By Point .vi" but i can not understand how to put time value.
Hello,
I understand you wanted to use the mentioned vi. So the thing is the inputs that you can see are not compulsory or required inputs. Those are recommended inputs which you can use if you have a requirement in your application. So in thise vi as you know the duty cycle will define the time a square wave remains high versus low over one period. Morever the output of the square wave will be as follows:
square wave = amplitude × square (p)
where
square(p) = 1 if [ (360. frequency. time + phase)mod(360)] is < [360. duty cycle(100%) / 100]
and -1 for other cases.
So from this equation you can work on your application and decide if you need any time input at all or not.
Hope this helps.
Cheers..!! -
How to measure time in labview?
Hello,
I am using PCI-DAS card for Analog Input and Digital Output.
In the Analog Input for the voltage measurement labview takes near
about 1 second.But i want to reduce that time...means it has to take
one reading only in some miliseconds and there is no loops nothing
complicated just simple functions r there and as i run the vi it shows
one voltage reading.
I dont know how to reduce time period in this case.
And another thing is that i am saying this 1 second as per my
watch.but i want Labview itself shows the total time taken for the
execution.
Anybody knows about it please mail me and post the answer.
Thanking You
Safdar...In general AI, attached example should work (i.e. 6025E).
This is however, an example for your reference only.
Best regards
ian
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010
依恩与LabVIEW
LVVILIB.blogspot.com
Attachments:
example_AI_20041110.vi 51 KB -
How come every time i try to download a app it says Your apple id has been disabled. I already reset my pass word and it keeps saying the same message?
Apple - Support - iTunes - Contact Us
-
How much recording time on my iphone 4 voice memo?
How much recording time on iphone4 voice memo?
I would suggest that it depends on how much free space you have on the phone. I have done voice memos of over an hour before, and have read of other users reporting larger ones. I do not believe there is any documented source of what size you can do.
-
How to output sound to RCA cables?
I give up! I can't for the life of me figure out how to output the sound from my Macbook to play on my stereo or TV which use RCA cable hook-ups.
I got the VID ADPT MINI-DVI TO VIDEO ADAPTER-GEN but that only adapts the video, not the sound. Do I have to get some kind of optical to analog adapter?This would do the trick, although you can probably find something at Radio Shack for less.
http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore.woa/wa/RSLID?mco=FFB 21895&fnode=home/shopipod/ipod_accessories/cablesdocks&nplm=TN779LL/A
I got an iPod kit with a power supply, extra dock, and a Monster Cable (yeah I think they're overhyped) mini jack to RCA connector.
There are a bunch of ways you can do this. If you've already got long enough RCA cables, these would do the trick:
http://www.radioshack.com/product/index.jsp?productId=2103710
Or if you have a short distance, maybe something like this (doesn't say how long it is):
http://www.radioshack.com/product/index.jsp?productId=2427991
There are more attractive versions of this type of adapter. Radio Shack shows at least a dozen from different companies. -
How GET Output to Excel with Oracle9i Report using OC4J
how GET Output to Excel with Oracle9i Report using OC4J.
I FINISHED THE SETPS CONCIDERING THE JSP CODE NEEDED TO GET THE EXCEL OUTPUT ON LOCAL MACHINE.
I NEED TO PUBLISH THIS REPORT THROUGH APPLICATION SERVER.
THE QUESTION IS:
1- HOW TO START AN OC4J INSTANCE FROM ORACLE 9I DS FOR THIS REPORT?
2- WHERE (PATH) TO PUBLISH THE REPORT ON THE APPLICATION SERVER?
3- WHAT IS THE DEFAULT URL TO RUN THIS REPORT AND WHERE TO PUT IT?
4- HOW TO MAKE MAPPING FOR DIRECOTRY PATH TO TRANSLATED AS URL FOR THIS REPORT?
5- IF ANY ONE CAN GIVE ME THE FULL CODE TO RUN AND CALL SIMPLE JSP REPORT TO BE VIED IN INTERNET EXPLORER.
THANK YOUHi,
I can't answer to all your questions, however I can tell you that:
2) The directory where to put the report file is specifiend in a file named
<serverName>.conf
in the sourceDire property
<property name="sourceDir" value="/directory/dove/mettere/i/report"/>
that you can find under ORACLE_HOME/reports/conf
3) The URL is
http://<server IAS address>:<port number>/<jsp file path>/<repName>.jsp?server=<report server name>&userid=<user>/<pwd>@<DB conn string>[&<param>=<valore>[&...]]
5) In IE you have only to set the previous URL in the address bar.
Hope this helps you
Bye
Raffy -
How planned delivery time effects delivery creation?
Dear All,
Some time before, while placing order thro' CRM, we came across a typical error (hard error).
"date (11/12/2011) lies afterthe end of validity calendar".
we could not place order in CRM but in SAP we could create save the order despite of same error but soft. However system didn't allow to create delivery for same order & same error message populated"
Later it was found that it is because for material " Planned Deliv. Time maintained for say "X "days in material master MRP2 view" & was corrected.
How planned delivery time effects delivery creation?
For material even though planned delivery time was maintained as say for 500 days, sales order requested delivery date & delivery date in order schedule line got determined as order date (Considering avaliability of funds & material).
i.e order date/req. delivery date/delivery date in schedule line are same as date on which order is placed.
Regards
Suhas WHi,
Extended your factory calender in SCA3.
Regards, -
How to send timer job email to "assigned to" feild value in a task list?
Hi All,
How to send timer job email to "assigned to" field value in a task list if due date is after two days from now?Create a SharePoint Designer Workflow and use "pause until date" option when an new item is created/update.
Using Server Object model, I believe you can create the timer job from item event receiver.
--Cheers -
Is there a way to view how much charging time is left when charging iPod?
Is there a way to view how much charging time is left when charging our iPods (without having to disconnect and play a song to see the little battery icon)? The iBooks tell us the percentage and approximate time left to full charge. This would be a great feature for iPods as well, right? How can we suggest such a feature to the Mac techs for the next update?
5th Generation iPod, iBook G4 Mac OS X (10.3.9)determining an ipods estimated remaining battery life is difficult because it doesnt know how long the backlight will stay on, how many times you change a songs, etc.
those are all variables that change the amount of battery -
Where can I find a video that tells me how to set time on photos to 1 second each?
where can I find a video that tells me how to set time on photos to 1 second each? Where can I find a video that tells me how to add black space to the sides of all photos so that they display completely instead of only showing the center (which shows peoples' crotches but cuts off their heads- great huh?)? Would like to import whole folders of photos, set each to 1 second, have each display completely without distorting to fill. and "play" the timeline as I build it so that I can see if its working before putting in 2000 pics?
Hello Cain,
You can see the Domestic Outbound Scenario (DOT) for how to use incompatibility scenario.
You can find the Customizing guides at SAP Support Poratl.
Regards
Nitesh -
How to transfer time machine back up to new hard drive
How to transfer time machine back up to new hard drive?
You may like to take a look at this thread... https://discussions.apple.com/thread/4207670?start=0&tstart=0
Maybe you are looking for
-
Get a List of Invoice Name Field
Due that our one time sales process not being done the standard way, our invoices allow to change the name of the sold to party. Now we need a list of sold to party name with Invoice number. Is there some report where I could get it? Thank you and Ha
-
i wanted to backup my phone to icloud cause me and my brother will switch phones and i dont want to lose all my stuff. but now it seems that my icloud has some problems, cause even after deleting many photos and videos, and turn it off sync for apps
-
Can't restore from Time Machine backup error message
My hard drive on my Macbook failed a few days ago. Just makes a clanking noise and won't boot up etc... I installed a new drive, formatted it, and selected restore from Time Machine backup from the installer screen. It started restoring from my backu
-
Adobe Captivate 7 Installing Problem
I purchased the Adobe Captivate 7 software on Feb 4 through Adobe website. As there were some issues on my computer yesterday, I uninstalled Captivate 7. But today, when I tried to download the software again and reinstall it, it did not work. After
-
Hello, I have a problem to import java.util.regex.Pattern / java.util.regex.Matcher Where I can find the all the java classes in the XI? How can I know that all the classes where imported? Regards Elad