Jump to content

davidcli

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by davidcli

  1. 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:

    Quote

    Use this to make the SMO publish an event to which external components can register (i.e. new temperature value)

    For Private Events:

    Quote

    Use this to communicate internally whitin the SMO class

    For Public Methods:

    Quote

    Use 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 :]

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.