From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From 11:00 PM CDT Friday, Nov 8 - 2:30 PM CDT Saturday, Nov 9, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
12-03-2014 10:31 AM
I have a serial device which accepts non-blocking commands. This is, if you send a command that takes 1 minute, while this happens, you can send more commands and they will be executed. Once a command is done, it sends back a code that relates to that command, so you know it is finished.
I have a VI which tries to communicate with this serial device (see attachment). It does work, but it blocks the execution until a command is finished. So I can send commands one by one, but not in parallel, or in a delayed non-block way. The problem is the while loop which waits until the device outputs something.
I need to do something similar, but non blocking. The VI should be able to send several commands while others are executed.
This subVI is controlled from a main VI, which is just a State Machine with a few states, where each state is some action which is sent to this subVI, and then to the serial device.
12-03-2014 10:33 AM
Use another loop that does nothing but read from the serial port. Report the data to whoever needs it with a Queue.
12-03-2014 10:48 AM
I see, the problem is that with the way I have done the main VI, if I put a while true loop there, it would block my main VI in that point forever (see attachment). (the subVI from the first message is the green homemade icon here)
I am learning labview, so I am more than willing to change it if necessary.