LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add delay between 'write' and 'read'

I am using scope and LabVIEW 7.1
Everytime after I 'write' some commands to scope, I'd like to delay for a while before I use 'read' to get data from scope. How to do that? I always got trouble becuase the 'write' is not finished yet and 'read' has already started.

TBird
0 Kudos
Message 1 of 3
(2,706 Views)
How are you communicating with your device? Do the write and read VIs have an input for connecting the reference for the device you're talking to? If so, simply take the output from the write VI (reference and error) and wire those into the read VI. As a basic principal of LV and of dataflow programming, this will cause the read VI to run only after the write VI has completed running. If this doesn't help you, you can artificially create a wait period by using a sequence structure and having a frame with the Wait VI between the write frame and the read frame, but this method is less recommended. If this didn't help you, I suggest you post your code, or at least a picture of this section of the code.

___________________
Try to take over the world!
0 Kudos
Message 2 of 3
(2,696 Views)
Hello Thunderbird,

it seems you don't use a proper "data flow"...
When you write/read data to/from scope the used vi's should have an error cluster input/output. If you connect those then the read operation cannot occure before the write command operation. To include a delay between them you can use a sequence with a "Wait (ms)" where you tunnel through the error cluster. Or write your own subvi which includes a "wait (ms)" and the error cluster connections, then you don't need a sequence at all.

Hope this helps,
GerdW
Best regards,
GerdW


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