07-15-2015 05:42 PM
How do you control the order of operations inside a LabView “VI”?
07-15-2015 05:45 PM
07-15-2015 06:00 PM
07-15-2015 06:27 PM
07-15-2015 06:40 PM
Using the flat sequence structure when a component, like timers or other "free standing" ones that don't have error clusters to force data flow.
07-15-2015 06:54 PM
@kiwi77 wrote:
How do you control the order of operations inside a LabView “VI”?
You got some good advice already, but let me emphasize that for the vast majority of operations the order does not matter and is sufficiently determined by dataflow alone. Heavy handedly adding error wires everywhere causes excessive serialization and leaves no leeway for the compiler to optimize the code for parallel execution of code that can be independent.
Order of operations is important for IO operations, and here the error wire is sufficient to enforce order. On a higher level, order is enforced by proper code architecture, such as state machines.
(A typical beginner mistake is the excessive use of local variables, which breaks data dependency and the natural order of execution, which them must be restored by excessive use of sequence structures. Two wrongs don't make a right!)
07-15-2015 07:13 PM
@LV_Pro wrote:
Using the flat sequence structure when a component, like timers or other "free standing" ones that don't have error clusters to force data flow.
In this case, you could use use a case structure and wire the error into that. In the case of the error, the wait is meaningless. You bypass the wait. In the no error case, it operates the same as the FSS. You gain functionality by changing from FSS to case structure.