Fb_S_Ups - Beckhoff CX50 0 Series Hardware Documentation

Embedded-pc
Hide thumbs Also See for CX50 0 Series:
Table of Contents

Advertisement

1-second UPS (persistent data)
5.3

FB_S_UPS

Loss of data
The 1-second UPS switches the mainboard off as soon as the capacitors have discharged.
If other applications or the PLC are keeping other data open or are writing to them, data may be
corrupted or lost.
In the case of the CX50x0 the function block FB_S_UPS is used to control the 1-second UPS from the PLC.
If possible, use the standard values of the FB_S_UPS and call the function block cyclically in the PLC.
The function block has various modes that control the behavior of the Embedded PC when the 1-second
UPS is triggered:
Table 8: Block modes.
Mode
eSUPS_WrPersistData_Shutdown
eSUPS_WrPersistData_NoShutdown
eSUPS_ImmediateShutdown
eSUPS_CheckPowerStatus
Regardless of the mode and therefore irrespective of whether data were saved or quick shutdown was
performed, the 1-second UPS switches off the mainboard after discharging of the capacitors, even if the
voltage has returned in the meantime.
No quick shutdown may be executed with Windows CE/WEC7, as otherwise Windows CE/WEC7 will restart
immediately after the persistent data have been saved. This can lead to problems with the persistent data.
Select exclusively the mode eSUPS_WrPersistData_NoShutdown with Windows CE/WEC7 in order to save
persistent data without error.
VAR_INPUT
VAR_INPUT
    sNetID          : T_AmsNetId:= '';     (* '' = local netid *)
    iPLCPort        : UINT := 0; (* 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
eSUPS_WrPersistData_NoShutdown/eSUPS_CheckPowerStatus *)
END_VAR
sNetID: AmsNetId of the controller. (Type: T_AmsNetId)
iPLCPort: Port number of the PLC runtime system.
iUPSPort: Port number via which the UPS status is read (standard value is 16#4A8).
66
Function
Writing of the persistent data, followed by
quick shutdown.
Only writing of the persistent data (no
quick shutdown)
Quick shutdown only (no writing of
persistent data)
Monitoring only (neither writing of the
persistent data nor quick shutdown); data
handling is entirely up to the user.
Version: 1.9
CX50x0

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents