The PLC
Operating Manual XCx 300 / 500 / 540 Version 09/08
103
9.2.3
PLC starting behaviour after power supply is switched on
The PLC starting behaviour is set with the lockswitch on the XCx.
The following options are available:
PROG PLC stop
WARM PLC warm start to IEC 61131-3
COLD PLC cold start to IEC 61131-3
9.3
System Variables
System variables provide information about the status of the system,
for example about forced variables, CPU performance, etc. These
variables have fixed memory addresses and can be used by the PLC
program to obtain the corresponding information.
All the system variables in the following table are already declared in
the Global_Variables area of the Global_Variables worksheet.
System variables
Name
Data
type
Log.
addr.
(byte)
Log.
addr.
(bit)
Description
PLCMODE_ON
BOOL
0
0
TRUE := current PLC state is ON
PLCMODE_RUN
BOOL
0
1
TRUE := current PLC state is RUN
PLCMODE_STOP
BOOL
0
2
TRUE := current PLC state is STOP
PLCMODE_HALT
BOOL
0
3
TRUE := current PLC state is HALT
PLCDEBUG_BPSET
BOOL
1
4
TRUE := one or more breakpoints have
been set
PLCDEBUG_FORCE
BOOL
2
0
TRUE := one or more variables have
been forced
PLCDEBUG_POWERFLOW BOOL
2
3
TRUE := powerflow active
PLC_TICKS_PER_SEC
INT
44
-
Number of system ticks per second, used
by the PLC as the basis for the system
time. This value determines the time
resolution of the PLC for time delay
function blocks like TON, TOF and TP,
and the shortest cycle time for the
DEFAULT task and cyclical tasks.
PLC_SYS_TICK_CNT
DINT
52
-
Number of counted PLC system ticks
As well as these system variables, other variables are also defined,
containing information on the system.
The type definitions of the variables can be found in the PLC_Types
section of the SchleicherLib library.