LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Streaming data from CSV

I'm new to labview and am unable to determine the correct way to perform the following function

 

I have a CSV file that has about 8000 data points (1D), that were captured as a Voltage every 25ms.

I want to turn around and simulate the device I captured the data from.

I am able to import the CSV using the "read from spreadsheet"

I have set up a LOOP that repeats every 25ms (the same as capture rate), and I have the code to feed to the output device.

I'm missing the code that extracts one cell (element) from the array I imported so it can be feed it to the output and then increment to the next cell (element) on the next loop.

I've tried the index array but it does not seem to work 

 

Thanks for the assistance.

dpjkw

0 Kudos
Message 1 of 7
(3,543 Views)

hi  dpjkw,

  please attach your csv file and explain a bit clear....

 

 

 

 

 

 

thanks and regards,

srikrishnaNF

Regards,
Srikrishna


0 Kudos
Message 2 of 7
(3,534 Views)

 have attached the csv file and my crude beginning of the .vi file.  I currently have a sine wave feeding the analog output device which works.  I wish to replace the sinewave function with the data in the CSV.  Every 25 ms the output should be updated with the data in the next cell. I'm bacically simulating a waveform that was captured from a device in the field, I wish to simulate it in the office for testing some PLC code

I am using a LabJack U3 for the I/O.

 

 

Thanks,

dpjkw

0 Kudos
Message 3 of 7
(3,525 Views)

That file does not have a Read From Spreadsheet so it's impossible to say what you are doing incorrectly. I would hope that you are using the 2D (all rows) output. If you do that, then the index array function will work. You could also just feed it to a for loop.

0 Kudos
Message 4 of 7
(3,516 Views)

Here is it with the "read Spreadsheet" section and the other refrenced .vi files. I know part of my problem is how to index the count.

 

Thanks,

dpjkw

 

0 Kudos
Message 5 of 7
(3,506 Views)

Try this change. It gets the size of the array to use with the Quotient and Remainder to keep cycling through the array.

0 Kudos
Message 6 of 7
(3,498 Views)

That got it working,  thanks for the assistance.Smiley Happy

 

dpjkw

 

0 Kudos
Message 7 of 7
(3,466 Views)