From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Slow sampling rate => slow button response time

(Disclaimer: I am a labview novice)

 

I am writing a VI that acquires data from 2 sources - one via serial communication (VISA) and one via DAQmx (simple voltage measurement).

 

Currently, our sampling rate is 0.2 Hz (one sample per 5 seconds), which I am setting using Time Delay.vi within block structures (see screenshot).  The data is being recorded satisfactorily, however when I press any button, such as the clear button (clears chart history), the stop button, or the record button (starts/stops writing to measurement file, not shown in screenshot), the button state change does not register until the next sample is recorded.  The result is a delay of up to five seconds for any action I take.  This is a minor inconvenience, but we would like to change our sample rate to 1/60 Hz, which will lead to up to a 60 second delay before any actions taken are registered.

 

Block diagram attached.  I have removed all but the key functionality of the program in order to make it more readable.  Does anyone have any suggestions on how to fix this problem?  Any advice or suggestions are welcome, as I am new to Labview.

 

Thank you very much.  Screenshot attached.

0 Kudos
Message 1 of 2
(3,778 Views)
One option for you is to put your user feedback (Clear Chart...) into a parallel loop that holds an event structure.  When the user triggers an event, by pressing a button in this case, that even will execute immediately.  Look in the LabVIEW help for info on Event Structures, it is well documented there.
0 Kudos
Message 2 of 2
(3,769 Views)