04-11-2016 11:20 AM
Hi I have measured data using an OBD device and have downloaded the log files as a .csv which I have attatched below. I am trying to read the 7th column of data (RPM) and display it on a waveform chart, reading it row by row to simulate real-time driving data. The interval between readings I am trying to achieve is 500 ms as that is the time interval of readings on the spreadsheet. I am trying to terminate both loops when RPM is zero as this will occur when the car is turned off. I have attatched the relevant section of my program below. Any suggestions would be greatly appreciated.
Thanks
Michael
Solved! Go to Solution.
04-11-2016 01:06 PM
There are two errors in your Block Diagram. First, while you read the entire 2D array in all at once (which is fine), you are doing a clumsy (forgive my language) job of programming doing a Row at a Time. Once you discard the first row of Headers, you have the perfect substrate for a For Loop, which is made to process elements (rows) of an array, one at a time, using its Indexing tunnel.
The second error is forgetting about Data Flow. The For Loop I mentioned, or the While loop you are using, produces points one at a time, and does it at 2Hz thanks to your 500msec Wait. You want to give each point to your Chart, but the Chart is outside the loop, which means it doesn't get any points until the loop is done.
Here's an Easy Question -- where should you place the Waveform Chart Indicators? [Hint -- I just said that "outside the loop is wrong"].
Bob Schor
04-11-2016 02:13 PM
Thanks Bob appreciate the help. I managed to get it sorted. I am new to labVIEW, a bit of a case of speaking before thinking.