From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
In my main VI, I call a sub-VI that will flush the receive buffer of serial port, write a command to the serial port, and wait for 120 ms. The main vi will then begin the reading process of the serial port.
I ran the profile performance and memory tool on it to see if the sub-VI will really run for at least 120 ms. What I got back was that it only took 0.0 ms to run the vi.
I have attached an image on what the sub-vi looks like.
you only get back processor time. Even a vi containing only a wait function with 200ms delay gives back ~0.5ms average time. The wait function doesn't hog the processor!
One note: create constants by right-clicking the terminal -> 'create constant'. This way you avoid those coercion dots as can be seen on your wait function...
Best regards, GerdW
using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Additional side tip: You can use the "Time Delay" function to give you a function with error in/error out that you can wire directly into your stream without using the sequence frame.