07-24-2010 08:36 PM
@dbaechtel wrote:
I don't want to have to poll the value of my Global EStop boolean value in order to detect that it has changed.
Why not? If you have such a large and complicated system, polling a global a few times per second is peanuts in the grand scheme of things. Place a tiny while loop in parallel to the rest of your code that polls the global, and if triggered, fires a signaling value property node, triggering a stop event in all event structures.
Still, I have the nagging suspicion that you are trying to paint yourself into a corner by fixating on a solution that will seem silly once you are more familiar with dataflow programming. I have the feeling that you have some serious misconceptions about event structures and dataflow in general
Can you show us some code so we get a better feel of the situation?
07-24-2010 08:42 PM
I already have a State Machine with an Event structure already setup to control the system. I don't want to add polling to make it work if I don't have to.
This is the best description of the functionality that I need:
"Is there any boolean flag or variable in the system (hopefully more than one) that can be set (and reset) by anywhere in the application, any VI, at any time; that can be detected as an event in a Event Structure?"
07-24-2010 09:16 PM
Can you use a Val(sgnl) on any Control or just stop?
What function is used to execute val(sgnl) ?
07-24-2010 09:35 PM
The png I posted is a snippet and is code. Drag it to a block diagram.
The value(signaling) property is the way to programattically fire a value change event. It is not limited to a stop button.
07-24-2010 09:54 PM
Define a user event as shown in the attached example, and create a corresponding global variable.
Use this global anywhere to generate an event.
07-24-2010 10:07 PM
Just what I needed.
THANKS.
07-24-2010 10:15 PM
How do I drag your code out of GMail and into LabVIEW?
I cn not seem to find a way to do it.
07-24-2010 10:20 PM - edited 07-24-2010 10:22 PM
Direct dragging the snippet to the block diagram should work. Don't know how Gmail works, but you should have somewhere two files named "Generate Global event.png" and "Global event management.png".
Anyway, I have attached the vis.
07-24-2010 10:21 PM
Missing code for Global eveny.vi.
Can you include it as well?
07-24-2010 10:32 PM
dbaechtel a écrit :
Missing code for Global eveny.vi.
Can you include it as well?
Global event.vi is just THE global. No missing code here ! 😮 😉