04-26-2011 09:31 AM
I understand that using the producer/consumer will enable me to handle user interaction a lot better. However, I choose the state machine due to simplicity and close to 0 user interaction during run time (I just have 1 abort boolean). In my state machines, there are some subvi that also contain state machine.
04-26-2011 11:04 AM
I hope I undrestood right your question.
It's simple. The property node is using the reference and not the value.
- For the first boolean indicator you are passing to the While Loop the value. The value remains the same during the loop, no matter what you change.
- For the second boolean indicator you are passing the reference. The Refrence remains constant BUT the Value of the Refrenced Control has changed. And you read the Value of a Refrenced controll. I know that's not accurate but in this case is pretty much the same as with pointers in C.
Paul
04-26-2011 11:07 AM
@PaulieQ wrote:
I hope I undrestood right your question.
It's simple. The property node is using the reference and not the value.
- For the first boolean indicator you are passing to the While Loop the value. The value remains the same during the loop, no matter what you change.
- For the second boolean indicator you are passing the reference. The Refrence remains constant BUT the Value of the Refrenced Control has changed. And you read the Value of a Refrenced controll. I know that's not accurate but in this case is pretty much the same as with pointers in C.
Paul
As someone mentioned earlier it also depends on the mechanical action of the control/button. If it latches (such as latch until read) the property node will always read the same value because the control value is not unpdated until the latch condition is met.