Notes on the documentation
18
CX50x0 - Hardware Documentation
FUNCTION_BLOCK FB_S_UPS
The function block FB_S_Ups can be used on PCs with Seconds UPS, to communicate from the PLC with the UPS.
The FB_S_Ups can be used to save persistent data and to QuickShutdown the PC in case of a power failure. The
INPUTs of the FB_S_UPS should be used with the default values.
Attention
Data loss
The Seconds UPS is only capable of holding the voltage for a few seconds. This is just
enough time to save the persistent data. The used persistent saving mode must be
"SPDM_2PASS", even though if this could causes realtime problems. The router memory
must be big enough in order to save the persistent data!
Mode eSUPS_WrPersistData_Shutdown (default setting): The persistenten data are written and a QuickShutdown is
automatically performed.
Mode eSUPS_WrPersistData_NoShutdown: Only the persistenten data are written, a QuickShutdown will not be
performed.
Mode eSUPS_ImmediateShutdown: a QuickShutdown is immediatelly performed.
Mode eSUPS_CheckPowerStatus: only the powerfailure will be detected, no action is performed. In case of the
powerfailure the FB waits until the tRecoverTime (10s) has expired before it goes back to the PowerOK state.
The UPS will switch off the main board after the capacitors have been discharged, independent of the mode and
therefore independent of the writing of the persistent data and of the QuickShutdown, even if the power supply is
restored.
The capacity of the UPS is to small to hold the system alive during longer power outages. The saving of the
persistent data has to be done to the Compact Flash, since a hard disk cannot be operated if the UPS supplies the
voltage. After the saving of the persistent data a QuickShutdown will be executed.
Attention
Attention if files are modified:
If other applications or the PLC are keeping files open or write to files during a power
failure, then these files can get corrupted, since the QuickShutdown immediately reboots
the PC.
Attention
Attention if using Windows XP embedded:
The EWF (Enhanced Write Filter) or the FBWF (File Based Write Filter) has to be activated
in order to ensure the validity of the Windows XP embedded files on systems with a
Seconds UPS.
In case of the EWF the TwinCAT\Boot folder needs to be located on a not protected partition (see in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Beckhoff\TwinCAT\System\BootPrjPath).
In case of the FBWF the TwinCAT\Boot folder needs to be excluded from the protection (see Beckhoff FBWF
Manager, Exclusion Settings).