LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Compare every second a real time value with a row of a spreadsheet

Solved!
Go to solution

Hello everybody,

 

I'm using Labview 2016 at my University for a car-related project.

I'm using a Garmin GPS antenna, and I modified the stock instrument driver VI (http://sine.ni.com/apps/utf8/niid_web_display.download_page?p_id_guid=5201D2122EDD6393E0440003BA7CCD...) to record time, longitude, latitude and speed in a file in different columns. Then I plot the recorded speed profile (speed-time) and the actual speed on the same graph, in order to try to repeat the route with the same speed profile. Since the acquisition time of the antenna is 1Hz, I would try to build two Indicators that turn on when the actual speed is 1.1 and 0.9 times the recorded value respectively, in order to let the driver be warned about the excessive high\low speed he's driving.
So, the problem is: I want to compare the actual speed value  with the corresponding number of row of the recorded data, e.g.: the time elapsed from the "run" is 5 seconds, I want to compare the actual speed with the 5th row of my recorded data. I want that the comparison lasts 1 second, in order to let the indicators be ready for the next comparison.


Huge thanks,

Mattia

0 Kudos
Message 1 of 3
(2,390 Views)
Solution
Accepted by topic author matt89le

To answer just the way you asked: take elapsed time value, round down to integer and use this value as index into your table...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(2,352 Views)

Thanks for replying. I get it, but I can't figure out how to improve my code. Can you take a look into my VI and see what it's been done wrong? Thanks

0 Kudos
Message 3 of 3
(2,349 Views)