Switched Dual Channel

In a switched dual channel communications setup, the outstations communicate with the ClearSCADA server via one of two Direct Channels. The outstations are grouped into a Switched Outstation Set and they all use the same direct channel at any given time. Both direct channels are associated with the Switched Outstation Set (see Defining Channel Settings for a Switched Set). The Set’s configuration Form is used to specify which channel is deemed to be the ‘Preferred Line’ (channel).

The channel that the ClearSCADA server uses to communicate with the outstations depends on:

Channel State

If ClearSCADA deems that the channel being used by the outstations has failed, providing that the other channel:

or:

ClearSCADA will automatically switch all of the outstations onto that other channel, to help ensure that communications and data retrieval continue. With Switched Outstation Sets, you can specify the number of outstations that ClearSCADA is to detect as failed before automatic switching occurs. However, should ClearSCADA detect that the currently used channel has failed, it will switch the outstations to the other channel regardless of the number of outstations that it has detected as failed on the current channel.

If the other channel was last reported to be in a failed state when used by the outstations and the channel that the outstations are currently using is reported as failed or is taken out of service, no automatic switching will occur. Instead, you need to use the Switch Line pick action to switch the outstations to the other channel. For more information, see below.

If the channel that the outstations are using is taken out of service, ClearSCADA will automatically switch all of the outstations onto the other channel, providing that the other channel is In Service. This will occur regardless of the number of outstations that ClearSCADA has detected as failed on the current channel.

Outstation Set Configuration

You configure a Switched Outstation Set so that one direct channel is preferred to another (see Defining Channel Settings for a Switched Set). The ClearSCADA server attempts to use the preferred channel first.

Outstation State

If the number of failed outstations in the Outstation Set exceeds a defined limit (as specified on the Outstation Set’s Form), ClearSCADA automatically switches communications to the alternate channel. The exception to this is if the other channel was in a failed state when last used by the outstations in the set. In such a situation, you need to use the Switch Line pick action to switch the outstations to the other channel. You might want to consider incorporating the Switch Line pick action into, for example, a Structured Text Program that runs in the background and checks the state of several ‘nominated’ outstations—for more information, see below.

Any action that causes the outstations to use a particular channel

For example, an operator action, such as a Switch Line pick action to instruct the ClearSCADA server to use an alternate channel, or a Schedule that instructs the ClearSCADA server to switch between the available channels on a regular basis. (Scheduled switching allows you to check that both channels are in working order. We recommend that you set up Scheduled switching on your system to periodically check that both channels continue to remain fully functional (see Using Schedules to Automate Regular Functions).)

Communications via a ‘Healthy’ direct channel can be reported as failed when one or more outstations are disconnected, cables are damaged, there is signal interference, or the communications equipment is damaged or faulty. By switching channels, the ClearSCADA server may be able to establish communications and avoid the detected problems.

Outstations that use switched dual channels are expected to communicate with ClearSCADA via the ‘preferred’ channel whenever that channel is healthy.

Should ClearSCADA determine that the preferred channel has failed, it will switch the outstations to the other (‘backup’) channel (providing that channel is deemed to be healthy). You should then investigate the failure of the ‘preferred’ channel and, if possible, rectify the problem. Once rectified, use the Switch Line pick action to switch the outstations back to using the preferred channel.

Alternatively, you could use Structured Text to produce a program that periodically checks whether ClearSCADA has detected that one or more nominated outstations have failed and if so:

For an example program, see Switched Dual Channel.

Example 1 - An Example Switched Dual Channel Setup

Four Direct outstations are configured to communicate in a switched dual channel setup. They are associated with a Switched Outstation Set. The outstation set’s configuration specifies that the outstations communicate via Channel A or Channel B.


The ClearSCADA server attempts to establish communications with the outstations via Channel A. The channel is ‘Healthy’ but the ClearSCADA server cannot establish communications with the first outstation as there is signal interference. The ClearSCADA server switches to the alternate channel (Channel B) and requests data from each outstation.

All of the outstations communicate via Channel B as the switched dual channel setup only allows the outstations to communicate via one of the two channels.

Example 2 - Use an ST Program to Switch Channels Automatically

Four Direct outstations are associated with a Switched Outstation Set and communicate in a switched dual channel setup. The outstations in the set use Channel A as the preferred communications channel.

ClearSCADA detects that the line specified as Channel A has failed. ClearSCADA switches outstation communications to the ‘backup’ channel, Channel B.

A Structured Text program continuously runs in the background. The program monitors the state of two ‘nominated’ outstations on the switched set (outstations 1 and 2). Once ClearSCADA has detected that Channel A has failed, the Structured Text program periodically attempts to ‘toggle’ between the channels.

Engineers investigate the reported failure of Channel A and rectify the problem.

The next time that the Structured Text program attempts to ‘toggle’ between the channels, it detects that Channel A has recovered and uses the set’s Switch Line pick action to switch the outstations back to communicate via that channel.

The syntax used for the Structured Text program is based on the following:

PROGRAM AutoSwitchToChannelA

METHOD

SwitchedLine AT %M(.Switched Set.SwitchLine):DINT;

END_METHOD

VAR

RTU1state AT %M(.Outstation 1.State):BYTE;

RTU2state AT %M(.Outstation 2.State):BYTE;

END_VAR

VAR

RTU1Failed : BOOL;

RTU2Failed : BOOL;

TOGGLE : DINT :=0;

END_VAR

RTU1Failed := RTU1state = 3 OR RTU1state = 12;

RTU2Failed := RTU2state = 3 OR RTU2state = 12;

IF RTU1Failed AND RTU2Failed THEN

SwitchedLine(TOGGLE);

END_IF;

END_PROGRAM

where:

‘.Switched Set’ is the name and path of the outstation set
‘.Outstation n’ is the name and path of each nominated outstation

The program checks whether both outstations are in the Failed state (3), or in the Healthy, A Failed state (12) and if so, uses the set’s SwitchLine method to toggle the lines.

Further Information

Structured Text programs and the syntax that ClearSCADA supports: see the ClearSCADA Guide to Logic.

ClearSCADA naming conventions and the arguments that particular database fields and methods support: see the Database Schema.


Disclaimer

ClearSCADA 2017 R3