LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I build this array?

I have a vi that generates two time intervals in ms. One interval is between the time a light turns on and button 1 is released (time 1). The other interval is the time between the same release and the press of button 2 (time 2).

The vi loops through the light flashing/button press sequence until the number of set trials equals
the number of correct trials.

I want to build an array that records time 1 and time 2 for each trial. Something like this

0.1200 1.3123
0.2400 1.8979
0.3423 2.4567

etc.

The way I've got it, the array ends up being just time 1 and time 2 from the last trial.

0.3423 2.4567

How do I set this up to do what I want.

My vi is attached.
0 Kudos
Message 1 of 4
(2,647 Views)
You need a 2D array, so on the front panel indicator right click on it and select "add dimension" then you need to "build" the new results into the array. (see attached image)
0 Kudos
Message 2 of 4
(2,636 Views)
If you only need the array at the end of the run, simply wire your 1D array to the right loop boundary, right-click on the tunnel and select "Enable Indexing". Now create an indicator to the right of it. It will be a 2D array of all trials.
0 Kudos
Message 3 of 4
(2,629 Views)
Hope this help!

Cheers!
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
0 Kudos
Message 4 of 4
(2,616 Views)