ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Taking out the last array

hi everyone,


         I am trying to get  the reading from a laser displacement sensor every 100ms. the output from the sensor is scalar and i put append all the value into a single array. And I run this whole process twice and store the final array output into a file. The out array is actual two dimension. However, I only want the last dimention of the array since it covers the previous values. I do not know how to do it in labview. Can anyone help me with that.

For my lack of better wording. I attach the VI and the output format that I am getting. I also indicate the array that I want in the picture. Thanks again.


zhi

Download All
0 Kudos
Message 1 of 5
(3,065 Views)
You use Index Array to peel off columns. In the case of wanting the last column, if you don't know how many columns, you do this:



However, that said, your VI seems to be missing a few things:
  • You have a fixed iteration count of 3.
  • You have no timing.
Also,
  • You do not need to use the Feedback node. Use autoindexing.


Message Edited by smercurio_fc on 06-02-2008 05:26 PM
0 Kudos
Message 2 of 5
(3,059 Views)
thanks for your help, it helps.
0 Kudos
Message 3 of 5
(3,055 Views)
I have no idea why you would even create a 2D array, since you get one scalar value per iteration. All you need is a single loop and the 1D array coming out is the collection of all readings.
 


Message Edited by altenbach on 06-02-2008 10:55 PM
0 Kudos
Message 4 of 5
(3,023 Views)

@altenbach wrote:
I have no idea why you would even create a 2D array, ...

I was also wondering the same thing, but I assumed the VI wasn't completed, hence my hint to the poster about some things "missing" from the VI.
0 Kudos
Message 5 of 5
(3,005 Views)