Beckhoff CX8110 Manual page 52

Embedded pc with ethercat
Hide thumbs Also See for CX8110:
Table of Contents

Advertisement

Programming
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
TwinCAT v3.1
52
Target platform
CX81xx
Version: 1.4
Hardware
Seconds UPS
PLC libraries to include
Tc2_SUPS
CX8110

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx8180

Table of Contents