Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The DoReact method generates actions for the reactions of the system objects. It The method sends the action reaction to the specified object. The action reaction is transferred directly to the kernel where on which the object belongsis registered, and not to the whole entire system. The action In the DoReact method, the reaction is specified using by the MsgObject object.

Method call syntaxSyntax for method invocation:

Code Block
languagejavascript
 function DoReact(msgevent : MsgObject)

Method arguments:

  1. msgevent

...

  1. is a required argument.

...

  1. It specifies the reaction sent to the specified object.

...

  1. Possible values:

...

  1. the MsgObject objects created earlier in the script.
Info
titleNote

Two types of system messages are available in the Axxon PSIM system: events and actionsreactions. The events usually contain some information and are used as notifications sent to all Axxon PSIM kernels connected to each other during the system setup architecture configuration. The actions reactions are the control commands sent to specific objects. An action A reaction is transmitted only to the kernel where on which the related required object belongsis registered, and not to the whole entire system.The  The DoReactStr and DoReact methods are used to generate actionsreactions. The NotifyEventStr and NotifyEvent methods are used to generate events.

Usage examples

ProblemExample. When Relay relay 1 closes, close Relays relays 2 and 3. When Relay relay 1 opens, open Relay relay 2.

Code Block
languagejavascript
 if (Event.SourceType == "GRELE" && Event.SourceId == "1")
{
 var msgevent = Event.Clone();
 if(Event.Action == "ON")
 {
 msgevent.SourceId = "2";
 DoReact(msgevent);
 msgevent.SourceId = "3";
 DoReact(msgevent);
 }
 if(Event.Action == "OFF")
 {
 msgevent.SourceId = "2";
 DoReact(msgevent);
 }
}