LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating an Array that holds a specific range of values.

Is there an easy way to create a 1D array that simply has the numbers 0 through 1023 held in it?
0 Kudos
Message 1 of 5
(3,255 Views)
Yes, simply use a FOR loop with n=1024 and autoindex the loop counter at the right loop boundary. (See attached image).
Message 2 of 5
(3,255 Views)
That's exactly what I'm looking for. But does 6.1 have an autoindex array?
0 Kudos
Message 3 of 5
(3,255 Views)
Actually.... let me be a bit more specific on what I am trying to do. I am trying to take History data from a waveform chart and correlate the sample number to the time using a conversion factor of 625uS per sample. Then I want to redisplay this data on a separate chart with the time scale as opposed to the sample scale.
0 Kudos
Message 4 of 5
(3,255 Views)
In this case you don't need to generate any array at all. Just use a waveform graph (not chart or x-y) and do one of the following:

(1) If this value remains fixed during the program execution, just ring-click on the graph and select x-scale..formatting and enter you x0 and dx. dx would be 635e-6. On the right, change the formatting ot e.g. engineering notation as needed.

(2) If you need programmatic control over this, create a property node for the graph (right-click..create..property node), set it the "change all to read" and select property "Xscale..offset and multiplier...multiplier". Now wire your the increment/point (625e-6) to the multiplier terminal.
0 Kudos
Message 5 of 5
(3,255 Views)