01-14-2015 03:57 AM
Hi,
I would like to to be able control on LED indicator using event structure.
I'm using with read serial block, and scan string. when it's recognized the string its should change the LED state each time.
Please let me know if it's possible and how can i exec that?
Please find attached VI file.
For example i would like that when the string "Door opened!" will appear its should change the state of the LED.
Thanks for any help,
Solved! Go to Solution.
01-14-2015 07:21 AM
That is not what an Event Structure is used for. An Event Structure is used for capturing GUI events, like a user presses a button or changes the value of a control.
If you just want the value to toggle, use a shift register to hold the current value. If you detect the right string, toggle it (using the NOT function).
01-14-2015 01:28 PM
Thanks crossrulz for your reply.
I tried to implement with ashift register like you suggested but with no luck.
Could you please elaborate if i need to use with case block and inside its should be the shift register?
If it's possible could you please provide an example for this?
Thanks,
01-14-2015 05:45 PM
Post your code so we can help you fix it. 🙂
01-15-2015 03:01 AM
I already fixed that issue following your suggestion using a shift register.
Thanks,
01-15-2015 08:28 AM
Excellent!