Acquiring of starting parameters of the program

GETSTARTUPFLAGS

The function returns value indicating the circumstances of the program start.

OutputType Description
UDINTnumerical status; result of the system settings check

After the program starts, the getstartupflags function returns a number indicating which process preceded the start. The status indicates if this is the first launch of program after start of runtime (power on, warm restart, cold restart), start of program with on-line changes or start of program as after a cold restart. The output variable ⇒ indicates the program start result.

Bit of output variableDescription
0 First program start after start of runtime (typically, after power-on)
1 Program start with requested On-line changes
2 Cold start

The bits may be combined, e.g. value of 5 (bits 0 and 2, which is 1 + 4 = 5) means the first program start after power-on, and cold start. Application example The status value at the output indicates the conditions under which the program has been started. It is possible to read in the application if the start was caused by an unexpected power failure or by some of the controlled restarts. According to this, different technology control strategies can be chosen from.

  • © Energocentrum Plus, s.r.o. 2017 - 2022