onAppStopEnd - event of the PmaRoot object

The event is triggered after halting the application (after onAppStopBegin event). Pma objects have already been deleted thus it isn't possible to use their properties and methods in the event algorithm. The algorithm of this event is the last executed algorithm of the application.
pMe(Object) Reference to the PmaRoot object where the event rises.
pEvent(Object) Reference to object describing detailed information about the specific event.
The pEvent parameter is not used here because this event does not need any additional information.
Application termination can be disabled by "PmaRoot > Permissions > AppStop" permission.
Dump INFO system status to file. This functionality is integrated into the preconfiguration for creating new applications since version 9.0.16.
Created the Application_RtStop.log file can then be viewed in the development environment in the menu " > Open application file > Application_RtStop.log".
JavaScriptVBScriptSelect and copy to clipboard

var sFile = "#app:" + Pm.AppName + "_RtStop.log";
var sInfo = "AppStop: " + Pm.FormatDate(Pm.Time, 1) + "\n" + "\n";
sInfo += "-----------------------------------\n" + "Errors\n";
Pm.FileTextWrite(sFile, sInfo, "charset:utf-8;");

Pm.InfoWriteToFile("Errors", "$all", sFile, "");

sInfo = "-----------------------------------\n" + "Debug\n";
Pm.FileTextWrite(sFile, sInfo, "mode:add;");

Pm.InfoWriteToFile("Debug", "$all", sFile, "");

sInfo = "-----------------------------------\n" + "AppStopDone";
Pm.FileTextWrite(sFile, sInfo, "mode:add;");
Repeated launch of this application by the utility RunLater:
JavaScriptVBScriptSelect and copy to clipboard

Pm.ShellExecute("", "c:/Promotic/Tools/RunLater/RunLater", "/t=10 /f=C:/Promotic/Pm9001600/Bin32/PromoticRt32.exe /p=" + Pm.AppFullName + ".pra", "", 1);

Pm9.00.16: The PROMOTIC system now, in this event, preconfigures the saving of the INFO system status (the content of the Errors and Debug items) into the Application_RtStop.log file.
This file can then be viewed in the development environment in the menu " > Open application file".
PROMOTIC 9.0.17 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice