08-10-2010 12:01 PM - edited 08-10-2010 12:01 PM
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
08-10-2010 12:15 PM
08-10-2010 12:29 PM
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
08-10-2010 12:37 PM
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.
08-10-2010 01:18 PM
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
08-10-2010 01:38 PM
Try this change. It gets the size of the array to use with the Quotient and Remainder to keep cycling through the array.
08-11-2010 10:34 AM
That got it working, thanks for the assistance.![]()
dpjkw