AreaRegister (FUN) ¶ FUNCTION AreaRegister : BOOL Register a memory area as redundant area. Called automatically for areas selected in the redundancy configuration editor, in the registered area page. Other areas can be registered before program start using this function. To do so, in task configuration, register a function to event DownloadDone. Example code: FUNCTION FDownloadDone : DWORD VAR_IN_OUT EventPrm: CmpApp.EVTPARAM_CmpApp; END_VAR AreaRegister(ADR(first), ADR(last) - ADR(a), RDCY.AREA_TYPE.AREA_PASSIVE); InOut: Scope Name Type Comment Return AreaRegister BOOL Input pArea POINTER TO BYTE Start address of area udiSize UDINT Size of area eType AREA_TYPE Redundancy area type
GetConnectionState (FUN) ¶ FUNCTION GetConnectionState : BOOL In standalone state: Returns TRUE if other plc can be connected and answers to redundancy messages. There is a chance that a call to Syncrnonize() will succeed. InOut: Scope Name Type Return GetConnectionState BOOL
GetPlcIdent (FUN) ¶ FUNCTION GetPlcIdent : PLC_IDENT Returns the identification of the PLC, independent from active or passive state. InOut: Scope Name Type Return GetPlcIdent PLC_IDENT
GetRedundancyState (FUN) ¶ FUNCTION GetRedundancyState : BOOL Get current redundancy state information InOut: Scope Name Type Comment Return GetRedundancyState BOOL Input pState POINTER TO RedundancyState Redundancy state information
GetSyncInformation (FUN) ¶ FUNCTION GetSyncInformation : RTS_IEC_RESULT Fills structure SYNC_INFO with information about the redundancy synchronizsation status. InOut: Scope Name Type Return GetSyncInformation RTS_IEC_RESULT Input pSyncInfo POINTER TO SYNC_INFO
IsAddressInArea (FUN) ¶ FUNCTION IsAddressInArea : BOOL It checks if a generic memory address belongs to a registered memory area. InOut: Scope Name Type Comment Return IsAddressInArea BOOL Input pAddress POINTER TO BYTE Address to check Output eType AREA_TYPE Redundancy area type where the address belong to pArea POINTER TO BYTE Start address of area udiSize UDINT Size of area
RedundancySynchronizeData (FUN) ¶ FUNCTION RedundancySynchronizeData : BOOL Synchronze global data once. This includes the areas registered in redundancy. Can be called from active or standby controller. InOut: Scope Name Type Return RedundancySynchronizeData BOOL
SwitchToActive (FUN) ¶ FUNCTION SwitchToActive : BOOL Switches a plc to redundancy state RS_CYCLE_ACTIVE. Can be called in state RS_SIMULATION and RS_CYCLE_STANDBY. In state RS_SIMULATION, plc will become RS_CYCLE_ACTIVE (if second plc is running) or RS_CYCLE_STANDALONE (if second plc is not running). In state RS_CYCLE_STANDBY, plc will become RS_CYCLE_ACTIVE. State change is not performed immediately. A commend send to other plc in next StartCycle or EndCycle. InOut: Scope Name Type Return SwitchToActive BOOL
SwitchToSimulation (FUN) ¶ FUNCTION SwitchToSimulation : BOOL Switches a plc to redundancy state RS_SIMULATION. Can be called in state RS_CYCLE_STANDBY, RS_CYCLE_ACTIVE and RS_CYCLE_STANDALONE InOut: Scope Name Type Return SwitchToSimulation BOOL
SwitchToStandalone (FUN) ¶ FUNCTION SwitchToStandalone : BOOL Switches a plc to redundancy state RS_CYCLE_STANDALONE. Can be called in state RS_SIMULATION_START and RS_CYCLE_STANDBY. In state RS_SIMULATION_START, if application is not loaded: state is set and application is loaded and started. In state RS_CYCLE_STANDBY, with next StartCycle or EndCycle, command is sent to other PLC to switch to RS_SIMULATION. Then, own state is changed. InOut: Scope Name Type Return SwitchToStandalone BOOL