davidcli
-
Posts
2 -
Joined
-
Last visited
Posts posted by davidcli
-
-
In the SMO Editor Tool, there is a "Create New Event" button with a satellite icon (top right).
The official description for a Public Event states the following:
QuoteUse this to make the SMO publish an event to which external components can register (i.e. new temperature value)
For Private Events:
QuoteUse this to communicate internally whitin the SMO class
For Public Methods:
QuoteUse this to communicate into the SMO process from an external source
Public methods are for the SMO to broadcast some sort of data or some sort of event. Example; data from a voltage reading in the double datatype could be continuously read and broadcasted (You physically route the data wire into the Public Method which generates a user event). An external SMO can subscribe to the user event in their own user event handler and do something with the data. The event isn't limited to just values. Maybe the pressure for a boiler trips a threshold. In this case, an "over-pressure event" can be triggered by sending the corresponding Public Event, and you don't really need to send any value (it defaults to a Boolean control). You could make use of it though by having the threshold trigger the event and send a True. And when it comes back down it triggers a False. But note, in this case the event is not broadcasted continuously.
I haven't used Private Events as much as Public Events and Public Methods. But in theory the Private Event would be able to change the internal state of the state machine from within itself. From what I've read, it is best practice to prevent external VIs from modifying the state of a state machine directly, maybe this mechanism allows for that. I am more used to Queued Message Handler structure, so what I would do to modify the state machine internally is by modifying the string queue itself.
Would be nice for someone from JKI to explain Private Events and the intention :]
Aborting SMO
in JKI State Machine Objects (SMO)
Posted
Have you tried using the SMO.lvclass:Stop.vi and then SMO.lvclass:Destroy.vi?