1-second UPS (persistent variables)
CX51x0
72
Version: 2.8
8.3
FB_S_UPS_CX51x0
NOTE
Loss of data
If other applications or the PLC keep further files open or write to them, file errors may occur if the 1-second
UPS switches off the controller.
In the case of the CX51x0 the function block FB_S_UPS_CX51x0 is used to control the 1-second UPS from
the PLC. If possible, use the default values of the FB_S_UPS_CX51x0 and call the function block cyclically
in the PLC.
The 1-second UPS can be used only for a few seconds in the event of a power failure in order, to save
persistent data. The data must be saved in the fast “persistent mode” “SPDM_2PASS”, even though this can
lead to real-time violations. Make sure you configure adequate router memory for saving the persistent data.
Irrespective of the mode and irrespective of whether data were saved or the quick shutdown was executed,
the 1-second UPS switches off the mainboard after the discharging of the capacitors.
Function block modes
A QuickShutdown is performed automatically in the eSUPS_WrPersistData_Shutdown mode (standard
setting) after the storage of the persistent data.
In the eSUPS_WrPersistData_NoShutdown mode only the persistent data are saved, no QuickShutdown is
performed.
In eSUPS_ImmediateShutdown mode a quick shutdown 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 function block only switches back to the PowerOK state after the expiry of
tRecoverTime (10s).
VAR_INPUT
VAR_INPUT
sNetID : T_AmsNetId:= ''; (* '' = local netid *)
iPLCPort : UINT := 0; (* PLC Runtime System for writing persistent data *)
iUPSPort : UINT := 16#588; (* Port for reading Power State of UPS *)
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 eSUPS_Wr
PersistData_NoShutdown/eSUPS_CheckPowerStatus *)
END_VAR
sNetID
: AmsNetID of the controller (type: T_AmsNetID)
iPLCPort
: Port number of the PLC runtime system (851 for the first PLC runtime system, 852 for the second
PLC runtime system, …). If no port number is specified, iPLCPort is 0. The function block then automatically
determines the port of the PLC runtime system.
iUPSPort
: Port number through which the UPS status is read. The default value is 16#588
tTimeout
: Timeout for writing of the persistent data or the quick shutdown.
Содержание 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: ......