0% found this document useful (0 votes)
46 views17 pages

IPAlias Redundancy

Uploaded by

Anurag Kaushik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views17 pages

IPAlias Redundancy

Uploaded by

Anurag Kaushik
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

IPAliasRedundancy

IEC 61131 Library for ACSELERATOR RTAC® Projects

SEL Automation Controllers


Table of Contents

Section 1: IPAliasRedundancy
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Supported Firmware Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Release Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

IPAliasRedundancy Instruction Manual Date Code 20180928


RTAC LIBRARY

IPAliasRedundancy

Introduction
This library provides functionality to manage an additional IP alias (a second IP address)
added to a specified interface on an SEL Real-Time Automation Controller (RTAC). The
function blocks in this library are designed to work in a redundancy scheme by using an IP
alias to be shared between two RTAC units. The two RTAC units will communicate with
each other via the logic in this library to decide when the IP alias should and should not be
active on the specified interface. The primary IP address for interfaces on the RTAC are
still configured via the web interface.
The two RTACs managing the IP alias communicate via an Ethernet or serial connection.
The library only supports the use of one or the other connection type (do not use both
simultaneously). If the RTACs communicate via Ethernet, it is recommended that a separate
interface than the managed interface is used for communications. (This is not an absolute
requirement—the two RTACs can communicate via the same interface that is being man-
aged—see Frequently Asked Questions on page 4 for details.) Information between the two
RTACs is updated at least once a second regardless of which connection is used.
The redundancy logic operates in two modes. The first is a primary-primary mode, in which
the detection of a failover condition causes the IP alias to activate on the inactive unit. In
this mode, the previously inactive unit will become the primary unit. If the previous primary
unit becomes available again, it will be the inactive unit and must wait for a condition to
occur in which the IP alias will become active. The second mode is a primary-backup mode,
in which the backup unit is designated on the function block. In this mode, if the primary
unit is no longer available, the backup unit will activate the IP alias. When the primary unit
is available again and reestablishes communication to the backup unit, the IP alias on the
backup unit will be deactivated and that IP alias will be returned to the primary unit.
The function blocks in this library offer a maintenance mode in which the unit will no longer
participate in the IP alias redundancy logic. If the IP alias is currently active on the unit
when maintenance mode is activated, it will be transferred to the other unit. Maintenance
mode persists through project settings changes and power cycles. This mode allows for
configuration changes or testing to be performed without affecting communication on the
other unit participating in the redundancy scheme.
The following conditions will cause the IP address to activate on the standby unit:
ä Managed Ethernet interface loss of link

Date Code 20180928 Instruction Manual IPAliasRedundancy


4 IPAliasRedundancy
Introduction

ä Loss of communication between RTACs (note that a unit with a broken communica-
tions cable looks the same to the standby unit as a unit that has lost power)
ä Maintenance mode is activated

Frequently Asked Questions


Where do I configure the IP alias?
The IP alias is configured as an input on the function block. The IP alias cannot be added
through the web interface or any other settings mechanism. If the user wishes to add other
IP aliases for other functionality, refer to the ACSELERATOR RTAC® SEL-5033 Instruction
Manual for information about the IEC 61131 functions that manage IP aliases.

How long does the IP alias last?


The IP alias in this configuration is managed by the library. If it is detected that both RTAC
units have the alias active, one unit will deactivate its alias. IP aliases do not last through
power cycles, so when the RTAC first starts up it will negotiate with the second RTAC about
which unit should activate the IP alias (provided it is able to communicate with the other
RTAC). The IP alias will remain through project send. If maintenance mode is activated,
the IP alias will be deactivated on the RTAC unit.

Is the interface on which the alias is being managed turned on and


off?
No, the interface with a managed IP alias will always maintain a link connection. The
Ethernet port will have more than one IP address active when the alias is active. The IP
address that is configured via the RTAC webpage will always be active.

Can the managed IP alias interface be the same interface used to


communicate with the other RTAC unit?
Yes, the same interface can be used to both manage an IP alias and communicate with the
redundant RTAC. However, SEL recommends using a separate interface to communicate
with the redundant RTAC to increase the robustness of the redundancy scheme.

Can the IP alias logic work with different RTAC hardware variants
such as the SEL-3530 and SEL-3555?
Yes, the interface control logic will work between any two RTACs of any hardware combina-
tions. This includes any combination of RTAC hardware variants including the SEL-2240
Axion.

IPAliasRedundancy Instruction Manual Date Code 20180928


IPAliasRedundancy 5
Introduction

Why does RtacEthernetCommsGood not assert?


If you have trouble establishing the Ethernet link between the two RTACs, check the
following:
ä Confirm both RTACs are configured in the same subnet.
ä Confirm both RTACs are connected to the network.
ä Confirm IP addresses configured on the interface Control blocks.
ä Confirm that the setting “LocalAPPort” matches the port number in the Ethernet
Listening access point that was added to the RTAC configuration.

Why does RtacSerialCommsGood not assert?


If you have trouble establishing serial communications between two RTACs, check the
following:
ä Confirm that the LocalSerialPort setting does not conflict with any other configured
serial ports in the RTAC configuration. If there is a conflict, error messages are not
generated as they are for other serial port conflicts.
ä Confirm that the cable connections are secure.
ä Confirm that the cable is wired correctly. Reference each RTAC hardware instruction
manual to ensure the pinout is correct. The connection is designed to use RS-232.
The user is not responsible for configuring any additional parameters other than the
physical serial port connections.

Why is my project unstable when I am trying to use a serial


connection?
If the LocalSerialPort setting is configured to a port number that does not exist on the
hardware being used, the RTAC will not run correctly.

Why does IPAliasActive not activate or deactivate exactly at the


time specified by the input CommStatusTimeout?
The library will detect failover conditions based on the CommStatusTimeout input. Once
the specified time-out has occurred, the library will take the actions to activate or deactivate
the IP alias. This involves reading system diagnostics and changing IP addresses with the
operating system. These actions do not occur as quickly as contact I/O or other protocol
operations. I/O and protocol actions usually occur in hundreds of milliseconds or less.
Making changes to IP addresses on the RTAC will fluctuate between approximately one
and five seconds. System updates for IP address link status occur on a five-second interval.
For CommStatusTimeout inputs that are less than five seconds, there will be some variation
(as much as 5 seconds) in the time that the IP alias actions occur. For CommStatusTimeout
inputs that are greater than five seconds, the variation should be less than one second in
most cases. Task cycle time, system burden, and processing power will all affect the end
failover time in small amounts. To obtain a failover time as close as possible to the specified

Date Code 20180928 Instruction Manual IPAliasRedundancy


6 IPAliasRedundancy
Supported Firmware Versions

CommStatusTimeout value, make sure the CPU burden percentage is less than 80 percent.
The failover functionality for IP address redundancy is intended for SCADA and HMI
redundancy-type applications. This library is not intended for applications that require
high-accuracy IP alias failover in less than two seconds.

How will other devices reach the IP alias if it is in a different


subnetwork from the primary IP alias on the controlled interface?
If the IP alias is not in the same subnetwork as the primary IP address, you can add a static
route in the RTAC web interface on the Static Routes page to allow traffic to reach your IP
alias. Refer to the ACSELERATOR RTAC Instruction Manual for more information.

Special Considerations
ä Copying function blocks from this library causes unwanted behavior. This means the
following:
1. The assignment operator “:=” must not be used on any function block from
this library; consider assigning pointers to the objects instead.

// This is bad and in most cases will provide a compiler


error such as:
// "C0328: Assignment not allowed for type
class_IpAliasRedundancyObject"
myIpAliasRedundancyObject := otherIpAliasRedundancyObject;

// This is fine
someVariable := myIpAliasRedundancyObject.value;
// As is this
pt_myIpAliasRedundancyObject :=
ADR(myIpAliasRedundancyObject);

2. Function blocks from this library must never be VAR_INPUT or VAR_-


OUTPUT members in function blocks, functions, or methods. Place them in
the VAR_IN_OUT section or use pointers instead.
ä Function blocks in this library have memory allocated inside them. As such, they
should only be created in environments of permanent scope (e.g., programs, global
variable lists, or VAR_STAT sections).
ä The two RTACs managing the IP alias can communicate with each other through use
of either an Ethernet or a serial connection. These connections are not designed to be
used simultaneously. Doing so may cause undesired behavior.

Supported Firmware Versions


You can use this library on any device configured using ACSELERATOR RTAC® SEL-5033
Software with firmware version R140 or higher.
Versions 3.5.0.3 and older can be used on RTAC firmware version R140 and higher.

IPAliasRedundancy Instruction Manual Date Code 20180928


IPAliasRedundancy 7
Function Blocks

Function Blocks
This library provides two function blocks. Both function blocks provide the same redundancy
functionality. The InterfaceControlWithSerialCheck function block allows for the same
redundancy configuration to be applied to two RTACs, and the logic will identify which
IP address and behavior should be associated with which RTAC based upon the supplied
RTAC serial numbers.

fb_InterfaceControl (Function Block)


This function block is designed to control the IP alias on a given interface on the RTAC
unit. It will communicate with another function block on a separate RTAC unit to determine
which RTAC unit should have the active IP alias. Each function block must have unique
parameters to ensure communications on each project configuration.
This function block works together with an access point. When using this function block,
add an Ethernet incoming (listens for connections) access point. The network connection
type will be Raw TCP and the local port number setting needs to match the LocalAPPort
setting on the function block.

Inputs
Name IEC 61131 Type Description
ControlledInterface enum_interface_ID Interface that will be managed with Con-
trolledIPAlias
ControlledIPAlias STRING(18) IP address and CIDR value that will be man-
aged on the ControlledInterface pin
Backup BOOL If TRUE, the unit will operate in backup mode.
If FALSE, the unit will operate in primary
mode.
RemoteRtacIP STRING(15) IP address of remote RTAC
RemoteRtacPort UINT Port number of the other RTAC. This setting
needs to match the LocalAPPort setting on the
remote RTAC
LocalAPPort UINT Port number for RTAC-to-RTAC communica-
tions on the unit. This setting needs to match
the listening access point that is configured.
LocalClientConnectPort UINT Port number for the RTAC to use to create a
TCP connection to the remote RTAC (29459
by default)
LocalSerialPort UINT The communications port that will be used to
communicate with the other RTAC
CommStatusTimeout TIME The amount of time for which the RTAC will
activate the IP alias when RTAC-to-RTAC com-
munications is lost. This setting has a range of
500 ms to 1 hour.
EnterMaintenanceMode BOOL This pin on a rising edge will activate main-
tenance mode. When the unit is in mainte-
nance mode, it will not participate in redun-
dancy logic.

Date Code 20180928 Instruction Manual IPAliasRedundancy


8 IPAliasRedundancy
Function Blocks

Inputs
Name IEC 61131 Type Description
ExitMaintenanceMode BOOL This pin on a rising edge will remove the unit
from maintenance mode and allow the unit to
participate in managing the IP alias
InterfaceLinkStatus SPS Connect to the system tags Ethernet link status,
which shows the current value of the managed
interface

Outputs
Name IEC 61131 Type Description
IPAliasActive BOOL This pin shows if the IP address that is as-
signed on “ControlledIPAlias” is active on
the RTAC unit
MaintenanceMode BOOL This pin shows if the unit is currently in main-
tenance mode. If the unit is in maintenance
mode, the RTAC will not participate in re-
dundancy logic. Maintenance mode persists
through power cycle and settings changes on
the unit. Once the unit is set to exit main-
tenance mode it will participate in the re-
dundancy scheme of the “ControlledInter-
faceIP”.
RtacEthernetCommsGood BOOL If both RTAC connections are communicat-
ing via the Ethernet connection, this pin will
be set to TRUE
RtacSerialCommsGood BOOL If both RTAC connections are communicat-
ing via the serial connection, this pin will be
set to TRUE
InvalidInputPin STRING Lists an incorrectly configured input pin

fb_InterfaceControlWithSerialCheck (Function Block)


This function block is designed to control the IP alias on a given interface on the RTAC
unit. It will communicate with another function block on a separate RTAC unit to determine
which RTAC unit should have the active IP alias. Each function block will have the exact
same configuration and the logic will associate functionality for each RTAC unit based on
the serial numbers of each RTAC unit as inputs to the logic.
This function block works together with an access point. When using this function block,
add an Ethernet incoming (listens for connections) access point. The network connection
type will be Raw TCP and the local port number setting must match the LocalAPPort setting
on the function block.

IPAliasRedundancy Instruction Manual Date Code 20180928


IPAliasRedundancy 9
Function Blocks

Inputs
Name IEC 61131 Type Description
ControlledInterface enum_interface_ID The interface that will be managed with the
ControlledIPAlias
ControlledIPAlias String(18) The IP address and CIDR value that will be
managed by the Controlled_Interface pin
SerialNumber String(80) The serial number of the unit on which redun-
dancy logic will operate
Backup BOOL If this is true, the unit will operate in backup
mode. If false, the unit will operate in primary
mode.
RemoteRtacIP STRING(15) IP address of the remote RTAC
RemoteRtacPort UINT Port number of the remote RTAC. This setting
must match the LocalAPPort setting on the
remote RTAC.
LocalAPPort UINT Port number for RTAC-to-RTAC communica-
tion on the unit. This setting must match the
listening access point
LocalClientConnectPort UINT Port number for the RTAC to use to create a
TCP connection to the remote RTAC (23459
by default)
LocalSerialPort UINT Communications port that will be used to com-
municate with the other RTAC
CommStatusTimeout TIME Time without remote RTAC communications
or link status before activating IP alias. Range
of 500 ms to 1 hour. Default is 5 seconds.
EnterMaintenanceMode BOOL A rising edge will activate maintenance mode
ExitMaintenanceMode BOOL A rising edge will remove the unit from main-
tenance mode
InterfaceLinkStatus SPS Connect to the system tags Ethernet link status,
which shows the current value of the managed
interface

Outputs
Name IEC 61131 Type Description
IPAliasActive BOOL This pin shows if the IP address that is as-
signed on “ControlledIPAlias” is active on
the RTAC unit
MaintenanceMode BOOL This pin shows if the unit is currently in main-
tenance mode. If the unit is in maintenance
mode, the RTAC will not participate in re-
dundancy logic. Maintenance mode persists
through power cycle and settings change on
the unit. Once the unit is set to exit main-
tenance mode, it will participate in the re-
dundancy scheme of the “ControlledInter-
faceIP”.
RtacEthernetCommsGood BOOL If both RTAC connections are communicat-
ing via the Ethernet connection, this pin will
be set to TRUE

Date Code 20180928 Instruction Manual IPAliasRedundancy


10 IPAliasRedundancy
Examples

Outputs
Name IEC 61131 Type Description
RtacSerialCommsGood BOOL If both RTAC connections are communicat-
ing via the serial connection, this pin will be
set to TRUE
SerialNumberMismatch BOOL If the assigned and actual serial numbers do
not match, this pin will be TRUE. Redun-
dancy logic will only function if this value
is FALSE .
ProjectIDMismatch BOOL If the project IDs between the two RTAC
units do not match, this output will be TRUE.
The value of this pin is retained through
power cycles and will only compare if Eth-
ernet or serial communication is active be-
tween the two RTAC units
InvalidInputPin STRING Lists an incorrectly configured input pin

Examples
These examples demonstrate the capabilities of this library. Do not mistake them as sugges-
tions or recommendations from SEL.
Implement the best practices of your organization when using these libraries. As the user of
this library, you are responsible for ensuring correct implementation and verifying that the
project using these libraries performs as expected.

Using Interface Control to Manage an IP Alias


Objective
A user would like to use a single IP address between two RTACs for a client to seamlessly
communicate with redundant data concentrators. This example will demonstrate how to
configure two RTACs to share one IP address.

Assumptions
This example assumes the following:
ä The IP alias and its associated subnet do not overlap with any other configured subnets
on any Ethernet interface or other IP aliases.
ä The client will communicate with the RTAC on Ethernet Port 2.
ä Both RTACs will communicate with each other on Ethernet Port 1.
ä Both RTACs have IP addresses in the same subnet on Ethernet Port 1.
ä Ethernet Port 1 on each RTAC will be connected directly to the other RTAC or through
a switch.

IPAliasRedundancy Instruction Manual Date Code 20180928


IPAliasRedundancy 11
Examples

ä Each RTAC configuration includes an Ethernet Listening, Raw TCP access point that
matches the LocalAPPort setting on the interface control function block.
ä Each RTAC collects data from the other RTAC through serial ports or an Ethernet
port.
ä Any supported server protocol can be used to send data to the client via the IP alias.
ä If a serial connection is used, an RS-232 compatible cable that matches the wiring
diagram according to each connected serial port (as listed in the specific RTAC
hardware instruction manual) is used.

Solution
RTAC Project 1
The user creates an Ethernet listening access point as shown in Figure 1.

Figure 1 Ethernet Listening Access Point

The user creates a program as shown in Code Snippet 1:

Code Snippet 1 prg_InterfaceControlRTAC1


PROGRAM prg_InterfaceControlRTAC1
VAR
Port1Control : fb_InterfaceControl;
END_VAR

Port1Control(
ControlledInterface := Eth_02,
ControlledIPAlias := '10.55.55.55/24',
Backup := FALSE,
RemoteRtacIP := '192.168.25.8',
RemoteRTACPort := 3000,
LocalAPPort := 7500,
LocalClientConnectPort := 8788,
LocalSerialPort := 1,
CommStatusTimeout := T#5S,
InterfaceLinkStatus := SystemTags.Eth_02_Link
);

Figure 2 presents the same logic as Code Snippet 1 shown in CFC rather than an ST program.

Date Code 20180928 Instruction Manual IPAliasRedundancy


12 IPAliasRedundancy
Examples

Figure 2 Interface Control in CFC

RTAC Project 2
The user creates an Ethernet listening access point as shown in Figure 3.

Figure 3 Ethernet Listening Access Point

The user creates a program as shown in Code Snippet 2:

Code Snippet 2 prg_InterfaceControlRTAC2


PROGRAM prg_InterfaceControlRTAC2
VAR
Port1Control : fb_InterfaceControl;
END_VAR

Port1Control(
ControlledInterface := Eth_02,
ControlledIPAlias := '10.55.55.55/24',
Backup := FALSE,
RemoteRtacIP := '192.168.25.7',
RemoteRTACPort := 7500,
LocalAPPort := 3000,
LocalClientConnectPort := 8788,
LocalSerialPort := 1,
CommStatusTimeout := T#5S,
InterfaceLinkStatus := SystemTags.Eth_02_Link
);

Figure 4 presents the same logic as Code Snippet 2 shown in CFC rather than an ST program.

IPAliasRedundancy Instruction Manual Date Code 20180928


IPAliasRedundancy 13
Examples

Figure 4 Interface Control in CFC

Using Interface Control With the Same Configuration on


Two RTACs
Objective
A user would like to use the exact same RTAC configuration on two RTAC units to provide
redundancy. This examples shows how to use InterfaceControlWithSerialCheck, which
includes additional functionality to verify the serial number of the RTAC that the logic
executes on and to verify that the ProjectID matches between the two RTACs. Even though
two function blocks are defined in the RTAC project, only one function block will manage
the IP alias (provided that the configured serial number matches the serial number of the
RTAC unit).
This example also provides the same functionality as the previous example for managing an
IP alias.

Assumptions
This example assumes the following:
ä The IP alias and its associated subnet mask do not overlap with any other configured
subnets on any Ethernet interface or other IP aliases.
ä The client will communicate with the RTAC on Ethernet Port 2.
ä Both RTACs will communicate with each other on Ethernet Port 1.
ä Both RTACs have IP addresses in the same subnet on Ethernet Port 1.
ä Ethernet port 1 on each RTAC will be connected directly to the other RTAC or through
a switch.
ä Each RTAC configuration includes an Ethernet Listening of Raw TCP access point
that matches the LocalAPPort setting on the interface control function block.

Date Code 20180928 Instruction Manual IPAliasRedundancy


14 IPAliasRedundancy
Examples

ä Each RTAC collects data from the other RTAC through serial ports or an Ethernet
port.
ä Any supported server protocol can be used to send data to the client via the IP alias.
ä If a serial connection is used, then an RS-232 compatible cable that matches the
wiring diagram according to each connected serial port (as listed in the specific RTAC
hardware instruction manual) is used.

Solution
In each RTAC configuration, create one access point of type Ethernet incoming listening
that matches the settings of the LocalAPPort setting on each function block.

Figure 5 Ethernet Listening Access Point for PortControlRTAC1

Figure 6 Ethernet Listening Access Point for PortControlRTAC2

The user creates a program as shown in Code Snippet 3:

Code Snippet 3 prgInterfaceControlWithSerialCheck


PROGRAM prg_InterfaceControlWithSerialCheck
VAR
PortControlRTAC1 : fb_InterfaceControlWithSerialCheck;
PortControlRTAC2 : fb_InterfaceControlWithSerialCheck;
END_VAR

IPAliasRedundancy Instruction Manual Date Code 20180928


IPAliasRedundancy 15
Examples

Code Snippet 3 prgInterfaceControlWithSerialCheck (Continued)


PortControlRTAC1(
ControlledInterface := Eth_02,
ControlledIPAlias := '10.55.55.55/24',
SerialNumber := '1122440328',
Backup := FALSE,
RemoteRtacIP := '192.168.25.8',
RemoteRTACPort := 3000,
LocalAPPort := 7500,
LocalClientConnectPort := 8788,
LocalSerialPort := 1,
CommStatusTimeout := T#5S,
InterfaceLinkStatus := SystemTags.Eth_02_Link
);

PortControlRTAC2(
ControlledInterface := Eth_02,
ControlledIPAlias := '10.55.55.55/24',
SerialNumber := '1122680283',
Backup := FALSE,
RemoteRtacIP := '192.168.25.7',
RemoteRTACPort := 7500,
LocalAPPort := 3000,
LocalClientConnectPort := 8788,
LocalSerialPort := 1,
CommStatusTimeout := T#5S,
InterfaceLinkStatus := SystemTags.Eth_02_Link
);

Figure 7 presents the same logic as Code Snippet 3 shown in CFC rather than an ST program.

Date Code 20180928 Instruction Manual IPAliasRedundancy


16 IPAliasRedundancy
Examples

Figure 7 InterfaceControlWithSerialCheck in CFC

IPAliasRedundancy Instruction Manual Date Code 20180928


IPAliasRedundancy 17
Release Notes

Release Notes

Version Summary of Revisions Date Code


3.5.1.0 ä Allows new versions of ACSELERATOR RTAC to compile projects 20180921
for previous firmware versions without SEL IEC types “Cannot
convert” messages.
ä Must be used with R143 firmware or later.
3.5.0.3 ä Initial release. 20180427

Date Code 20180928 Instruction Manual IPAliasRedundancy

You might also like