03-16-2006 05:18 PM
03-16-2006 05:26 PM
The only way to trigger a front panel event from the block diagram is with the Value(Signaling) property of the control. So any place you're currently writing to a control in your code via its terminal or a local variable, you'll need to replace with the Value(Signaling) property for that control if you want an event to fire whenever that control value changes.
I didn't have a chance to look at your VI, so I can't offer any other suggestions as to how you would implement your desired behavior.
-D
03-16-2006 05:29 PM
03-16-2006 05:41 PM
03-16-2006 06:38 PM
Hi Paul,
You can use User Events to generate an event programmatically whenever your triggers go true. These too get captured by the Events Structure. Lookup "User Events" in the Online Help.
Alternatively, you may want to consider using Notifiers or Queues. You basically would Queue-up your triggers in the main loop and then take care of them in the other loop.
Now, after looking at your VI, I am wondering why would you even need the second loop. As it stands, it appears you are using this second loop (with the Event structure) only to display the values. And since you're using local variables anyways, you can display these values from the main loop itself -- from inside the True/False Case structure. Unless of course you're planning other things to do in this second loop.
In any case, take a look at Queues, and the examples on Queues. I feel they're a better solution to your situation.
Hope this helps.
Regards,
-Khalid
03-16-2006 07:07 PM
03-17-2006 02:14 AM - edited 03-17-2006 02:14 AM
Hi Paul,
As a personal exercise, I modified your VI to accomplish the task, without the need for User Events or even the second loop. As you will see in the attached VI, I have used Shift-registers to accomplish this. Just another way of skinning the cat, I guess.
Hope this gives you more ideas.
Regards,
-Khalid
Message Edited by Khalid on 03-17-2006 02:17 AM