Promotic

onAppSignal - event of the PmaRoot object

Description:
The event is triggered after starting the program PmSignal.exe.
Parameters:
pMe(Object) Reference to the PmaRoot object where the event rises.
pEvent(Object) Reference to the object describing detailed information about the specific event.
pEvent.Param - (String) [for reading] Parameter passed to the program PmSignal.exe
Note:

PmSignal.exe program

Some programs can start another program on certain event.
It goes, for example, about programs for the UPS (backup power source) that can start another program on warning when the power in the backup source is running out.
But which program to start so that the PROMOTIC application which is just running on the computer, would be told about it?
This problem is just solved by the PmSignal.exe program.

PmSignal.exe program is determined for the interception (indication) of another application event. For example:
- Messages from the UPS station (backup power source). If the power of the backup station is running out a defined action can be triggered. It is usually launching a specific program.
- Detection of the batch *.bat file termination. Calling the PmSignal.exe program at the end of this batch is sufficient enough.


You can start the PmSignal.exe program also with one text parameter. For example "C:\Promotic\Tools\PmSignal\PmSignal.exe xy".
This parameter (in this case xy) is then passed into the onAppSignal event as the pEvent.Param parameter.

After starting this program, the onAppSignal event is triggered in the PROMOTIC application. Then you can implement required actions in this event.

The program PmSignal.exe must be started on the same computer where the PROMOTIC application runs.
In the case of using the PmSignal.exe program, only one PROMOTIC application can run on the computer.
PmSignal.exe program is located in the \Promotic\Tools\PmSignal folder.
Example:
JavaScriptVBScriptSelect and copy to clipboard

switch (pEvent.Param)
{
case "ups":
Pm.AppStop(1);
break;
case "battery":
pMe.Pm("/Alarm").ActivateNew("battery" + Pm.Time, "alarm0", "Battery", "Warning - Battery low", "UPS - Battery");
break;
}
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.