BECKHOFF CX9020 User Manual
Page 33
Commissioning
In the eSUPS_ImmediateShutdown mode a QuickShutdown is executed immediately without saving data.
In the eSUPS_CheckPowerStatus mode only a check is performed as to whether a power failure has
occurred. If this is the case, the module only switches back to the PowerOK state after the expiry of
tRecoverTime (10s).
Independent of the mode and thus independent of the saving or the shutting down of the controller, the UPS
switches the main board off after the capacitors have discharged, even if the voltage has returned in the
meantime.
Attention
Caution when using files:
If other applications or the PLC keep other files open or write to them, this can lead to faulty
files if the UPS switches off the controller.
If the EWF is used, the TwinCAT\Boot folder must be located on an unprotected partition (see in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Beckhoff\TwinCAT\System\BootPrjPath).
If the FBWF is used, must the TwinCAT\Boot folder must be excluded from the protection (see Beckhoff
FBWF Manager, Exclusion Settings).
FUNCTION_BLOCK FB_S_UPS_CX9020_U900
VAR_INPUT
VAR_INPUT
sNetID : T_AmsNetId := ''; (* '' = local netid *)
iPLCPort : UINT := AMSPORT_R0_PLC_RTS1; (* PLC Runtime System for writing persistent data *)
iUPSPort : UINT := 16#4A8; (* Port for reading Power State of UPS, dafault 16#4A8 *)
tTimeout : TIME := DEFAULT_ADS_TIMEOUT; (* ADS Timeout *)
eUpsMode : E_S_UPS_Mode := eSUPS_WrPersistData_Shutdown; (* UPS mode (w/wo writing persistent
data, w/wo shutdown) *)
ePersistentMode : E_PersistentMode := SPDM_2PASS; (* mode for writing persistent data *)
tRecoverTime : TIME := T#10s; (* ON time to recover from short power failure in mode
CX9020
33
Version 1.1