Get Startup Flags

Acquiring of starting parameters of the program

Function name



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


Output Type Description
=> UDINT numerical 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 variable Description
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.