1-second UPS (persistent variables)
CX51x0
74
Version: 2.8
in Mode eSUPS_ImmediateShutdown: QuickShutdown is active
eSUPS_WaitForRecover:
in mode eSUPS_WrPersistData_NoShutdown: Wait for the reestablishment of the power supply
in mode eSUPS_CheckPowerStatus: Wait for the reestablishment of the power supply
eSUPS_WaitForPowerOFF:
in mode eSUPS_WrPersistData_Shutdown: Wait for switching off of the PC by the UPS
in mode eSUPS_ImmediateShutdown: Wait for switching off of the PC by the UPS
8.5
Checking the validity of the variables
For TwinCAT 2 the implicit structure Systeminfotype.bootDataFlags can be read in order to determine the
validity of the persistent data (see:
).
For TwinCAT 3 the implicit variables PlcAppSystemInfo.BootDataLoaded and
PlcAppSystemInfo.OldBootData are available for determining the validity of the persistent data (see:
PlcAppSystemInfo).
8.5.1
SYSTEMINFOTYPE
TYPE SYSTEMINFOTYPE
STRUCT
runTimeNo :BYTE;
projectName :STRING(32);
numberOfTasks :BYTE;
onlineChangeCount :UINT;
bootDataFlags :BYTE;
systemStateFlags :WORD;
END_STRUCT
END_TYPE
runTimeNo:
specifies the number of the runtime system (1..4).
projectName:
project name as STRING.
numberOfTasks:
number of tasks contained in the runtime system (max. 4).
onlineChangeCount:
number of online changes since the last complete download.
bootDataFlags:
State of the boot data (RETAIN and PERSISTENT) after loading. The upper four bits
indicate the state of the persistent data, while the lower four bits indicate the state of the retain data.
Bit number
Description
0
RETAIN variables: LOADED (without error)
1
RETAIN variables: INVALID (the back-up copy was loaded, since no valid data was present)
2
RETAIN variables: REQUESTED (RETAIN variables should be loaded, a setting in TwinCAT
System Control)
3
reserved
4
PERSISTENT variables: LOADED (without error)
5
PERSISTENT variables: INVALID (the back-up copy was loaded, since no valid data was
present)
6
reserved
7
reserved
systemStateFlags
: Reserved.
When shutting TwinCAT down the PERSISTENT and RETAIN data is written into two files on the hard disk.
The path can be specified in TwinCAT System Control by means of the TwinCAT system properties (PLC
tab). The standard setting is "<Drive>:\TwinCAT\Boot". The files all have a fixed name with fixed extensions:
Содержание CX51x0
Страница 1: ...Manual EN CX51x0 Embedded PC 11 8 2021 Version 2 8...
Страница 2: ......
Страница 5: ...Table of contents CX51x0 5 Version 2 8 List of figures 93...
Страница 6: ...Table of contents CX51x0 6 Version 2 8...
Страница 87: ...Technical data CX51x0 87 Version 2 8 2 Transport and storage 13...
Страница 94: ......