Programming
CX8190
47
Version: 1.5
Configuration of the 1-second UPS
• Declare important data such as counter values in the PLC as VAR PERSISTENT. Then call the
function block FB_S_UPS_CX81xx cyclically in TwinCAT with the fastest task in order to control the 1-
second UPS (see:
).
• Select the mode in the function block in order to specify what should happen in the case of a power
failure. Specify, for example, whether persistent data are saved and a quick shutdown is executed
(see:
• You can then check the validity of the variables and monitor whether the persistent variables are
loaded without error (see:
Sample project:
https://infosys.beckhoff.com/content/1033/CX8190_HW/Resources/pro/1937303563.pro.
Saving and loading persistent data
The persistent data are saved in the Port_85x.bootdata file on the memory card. On starting the PLC the
Port_85x.bootdata file is loaded from the memory card, backed up there as Port_85x.bootdata_old (backup)
and then deleted.
Another current Port_85x.bootdata file is not written until the system is shut down or the 1-second UPS is
activated.
If no Port_85x.bootdata file exists when starting the Embedded PC, the persistent data are invalid and will be
deleted (standard setting). The reason for this is that the 1-second UPS was activated before the TwinCAT
PLC was started during startup of the Embedded PC. In this case no persistent data were saved, since the
system was unable to ensure sufficient buffer time for saving the data.
Always call the function block from the PLC and always use the fastest task to do so. In the case of a power
failure Beckhoff recommends not calling the rest of the application in order to ensure that sufficient time
remains for writing the data.
IF NOT FB_S_UPS_CX81xx.bPowerFailDetect THEN
;//Call programs and function blocks
END_IF
The rest of the application influences the CPU load and the CPU load in turn affects the period during which
the persistent data are written.
Loading a backup of the persistent data
A registry setting can be used to determine whether the backup file is deleted or used. The backup file is
used by default (setting 0):
[HKEY_LOCAL_MACHINE\SOFTWARE\Beckhoff\TwinCAT\Plc]"ClearInvalidPersistentData"= 0
If the backup file is to be deleted, the value of "ClearInvalidPersistentData" in the registry must be set to 1.
It is also possible in TwinCAT to specify on the left in the tree view under
PLC > CX8190
whether the backup
file is to be used or not.
Summary of Contents for CX8190
Page 1: ...Manual EN CX8190 Embedded PC with Ethernet 11 8 2021 Version 1 5...
Page 2: ......
Page 71: ......