07-18-2012 03:16 PM
Hellow,
I am building a programme, in which I applied a case structure. About every 2-3 seconds its status will turns into "true", and there will be a value output. My problem is: how to keep this output value unchanged (hold that value) when the status turns back to"false"? and then change again when next true status come?
Its kind of ergent, hope someone could help. Thanks a lot!
P.S. The progrmme is build using Control and Simulation tooltik (ie in the control and simulation loop)
Best Regards,
Floyd
07-18-2012 03:20 PM - edited 07-18-2012 03:21 PM
Post a VI or a portion of the VI image so we can better help. Thanks! 🙂
07-18-2012 03:23 PM
What are you doing with the "value"?
If it is just an indicator, place the indicator inside the case structure so it only updates in one of the cases.
If you need the updated wire value elsewhere, keep it in a shift register between iterations and wire it across in the FALSE case.
07-18-2012 03:31 PM - edited 07-18-2012 03:32 PM
My first thought was shift register. As Altenbach stated, the False case just passes the value straight through.
07-18-2012 05:49 PM
another example, the "false" case statement has an indicator...
10-03-2012 09:05 AM
Wouldn't it be easier to use a Feedback node instead of a shif register? It's basically the same thing as far as I understand.
Cheers, L
10-03-2012 09:17 AM
@LukaAmbrozic wrote:
Wouldn't it be easier to use a Feedback node instead of a shif register? It's basically the same thing as far as I understand.
Cheers, L
Easier? Not really. It kind of depends on the situation. In general, the shift register is easier to understand.