LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Advice on recording data at a different interval than sensors are being polled.

I have a VI designed to bring in data from two sensors, pass that information through some calculations to display on the UI while it is in parallel record the sensor data to a txt file.

My issue is that I want the program to continue polling the sensors at a rate of every second but I only want to record data points every 5 minutes. The way the program is laid out, if I insert a timer into the the recording section of the program, the entire program updates the UI every 5 minutes as well.

It is important that the user in this case has the updated information on the UI to know what to set the equipment at that’s being measured but we don’t have the file space to collect data every second for the full length of the test.

I can’t provide a screen shot of the current program due to computer access limitations.

0 Kudos
Message 1 of 3
(1,042 Views)

Nothing prevents you from polling at the current rate and have the saving inside a case structure that activates every 5 minutes.

0 Kudos
Message 2 of 3
(1,036 Views)

We would have to see your code but what you want to do is rather simple when using a proper program architecture.

 

Personally I am a fan of the State Machine. It is really easy to have a "Read sensors" followed by "Display sensors" state that runs every second and a "save data" state that runs every 5 minutes, or whenever...

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 3
(977 Views)