Programming
CX8190
49
Version: 1.5
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 *)
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.
tTimeout
: Timeout for writing of the persistent data or the quick shutdown.
eUpsMode
: Defines whether persistent data are to be written and whether a quick shutdown is to be
executed. The default value is eSUPS_WrPersistData_Shutdown, i.e. a quick shutdown is executed
automatically once the persistent data have been saved. (Type: E_S_UPS_Mode)
ePersistentMode
: Mode for the writing of the persistent data. Default value is SPDM_2PASS.
tRecoverTime
: Time after which the UPS returns to PowerOK state in UPS modes without quick shutdown.
The tRecoverTime must be greater than the maximum charging time of the UPS, otherwise the UPS may
discharge too much in the event of short, consecutive power failures, which could result in the charge being
insufficient for storing the persistent data.
VAR_OUTPUT
VAR_OUTPUT
bPowerFailDetect : BOOL; (* TRUE while powerfailure is detected *)
eState : E_S_UPS_State := eSUPS_PowerOK; (* current ups state *)
END_VAR
bPowerFailDetect
: TRUE during power failure. FALSE if the supply voltage is present.
eState
: Internal state of the function block (type: E_S_UPS_State)
VAR_GLOBAL
VAR_GLOBAL
eGlobalSUpsState : E_S_UPS_State; (*current ups state*)
END_VAR
eGlobalSUpsState
: Internal state of the function block as global copy of VAR_OUTPUT
eState
: For values see E_S_UPS_State
Requirements
Development environ-
ment
Target platform
Hardware
PLC libraries to include
TwinCAT v3.1
CX81xx
Seconds UPS
Tc2_SUPS
Summary of Contents for CX8190
Page 1: ...Manual EN CX8190 Embedded PC with Ethernet 11 8 2021 Version 1 5...
Page 2: ......
Page 71: ......