BECKHOFF CX51x0 User Manual
Page 23
Seconds UPS
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
eSUPS_WrPersistData_NoShutdown/eSUPS_CheckPowerStatus *)
END_VAR
E_S_UPS_Mode
sNetID : AmsNetID of the controller.
iPLCPort : Port number of the PLC runtime system (AMSPORT_R0_PLC_RTS1 = 801,
AMSPORT_R0_PLC_RTS2 = 811, AMSPORT_R0_PLC_RTS3 = 821, AMSPORT_R0_PLC_RTS4 = 831).
iUPSPort : Port number via which the UPS status is read (standard value is 16#4A8).
tTimeout : Timeout for the execution of the QuickShutdown.
eUpsMode : The eUpsMode defines whether persistent data are to be written and whether a
QuickShutdown is to be performed.
Standard value is eSUPS_WrPersistData_Shutdown, i.e. with writing of the persistent data and then
QuickShutdown. See E_S_UPS_Mode.
ePersistentMode : Mode for the writing of the persistent data. Standard value is SPDM_2PASS.
tRecoverTime : Time after which the UPS reverts to the PowerOK status in the case of UPS modes without
shutdown.
The tRecoverTime must be somewhat longer than the maximum holding time of the UPS, since the UPS
switches off even when the voltage returns.
VAR_OUTPUT
VAR_OUTPUT
bPowerFailDetect : BOOL; (* TRUE while powerfailure is detected *)
eState : E_S_UPS_State; (* current ups state *)
END_VAR
E_S_UPS_State
bPowerFailDetect : True during the power failure; False if the supply voltage is present.
eState : Internal state of the function block, for values see E_S_UPS_State.
VAR_GLOBAL
VAR_GLOBAL
eGlobalSUpsState : E_S_UPS_State; (* current ups state *)
END_VAR
E_S_UPS_State
eGlobalUpsState : Internal state of the function block as a global copy of the VAR_OUTPUT eState; for
values see E_S_UPS_State.
Prerequisites
Development environment
Target plat
form
Hardware
PLC libraries to include
TwinCAT v2.11R3 Build 2047 or higher
TwinCAT 3.1 Build 4018 or higher
PC (i386)
Seconds UPS
TcSUPS_CX51x0.Lib
CX51x0
23
Version 1.0