12-03-2006 11:31 AM - edited 12-03-2006 11:31 AM
Message Edited by pro111 on 12-03-2006 11:33 AM
Message Edited by pro111 on 12-03-2006 11:33 AM
12-03-2006 12:42 PM - edited 12-03-2006 12:42 PM
Message Edited by pro111 on 12-03-2006 12:42 PM
12-03-2006 02:07 PM
It's allowed but it's pretty bad style to use gloabal variables and a sequence structure alone or together. To run two functions in parallel, the simplest mcthod is to have two different while loops. As long as there is no data dependendy (wires connecting the output of one to the input of the other) they will be completely independent. If you need to pass data from one to the other, one good technique is a queue. Also, instead of a sequence structure, you should look at using state machine. A sequence structure doesn't give you any flexibility. There are shipping examples and design templates avialable for both queues and state machines.
Since you didn't attach your program, there's no way of telling why you are seeing a delay. At the very least, attach an image of the block diagram.
12-03-2006 03:25 PM
12-03-2006 03:33 PM
12-03-2006 03:54 PM
12-03-2006 04:33 PM
It seems that you are not using an NI DAQ board. My only suggestion would be run the VI without the sequence structure to see how long the initialize and setup of the daq board takes.
Also, as mentioned by both me and altenbach in a different post, you might want to rethink the use of the seqeunce structure and use a state machine. You would have more flexibility and a better error handling mechanism. And, your wait statement in frame three can occur either before or after the rest of the code in the frame. If you are trying to pause before going to frame 4, it may or may not happen that way. There is no way to do it reliably with this code. Why don't you use the delay statement. It has error in/error out connections that allow you to control dataflow (hence execution order).