Establishment Phase
With some advanced drivers, the Establishment Phase scan differs to that documented within this section. Where this phase differs on a particular driver, any differences are explained in the driver-specific documentation.
When the ClearSCADA server has not been in communications with a direct outstation—for example, at system start-up, or when communications recover after previously being detected as having failed—the driver performs an Establishment Phase Scan, rather than the usual Primary Normal Phase scan.
The operations performed during an Establishment Phase Scan vary depending on the type of outstation, but may include:
- Setting the outstation’s clock
- Retrieving general information about the outstation
- Retrieving current data from each of the points on the outstation.
With an Establishment Phase scan, or a Primary Phase scan, the driver checks for point changes. Following an Establishment Phase scan, the current data for each of the points on the outstation is updated in ClearSCADA. This is regardless of whether the data has changed since the server was last in communication with the outstation.
Following a Primary Phase scan, ClearSCADA typically only updates the data of those points that are genuinely deemed to have changed since the last data retrieval (for instance, points for which the value has changed significantly, or for which there has been a change of state).
The driver-specific documentation indicates if the update procedure differs from that mentioned here.
This initial establishment sequence indicates that the ClearSCADA server has been out of contact with the outstation for so long that the validity of the data held by the server for that outstation is suspect.
An Establishment Phase scan is typically performed only when one of the following conditions occur:
- The server, a driver, channel, set, or outstation has become Active (In Service) after previously being inactive (not In Service). For example, when a new outstation has just been added to the system and is now ‘live’.
- A direct outstation has been out of communications with the server and communications are restored. The server attempts to restore communications on the next scan, after a user-definable period of time has elapsed since the last attempt. Specify this time period using the Reestablishment Interval field on the Form(s) for the Channel(s) that the outstation is to use (see Establish Communications with Failed Outstations).
- A Reset Outstation command is issued from the server.
The Establishment Phase replaces the Primary Normal Phase, and is followed by a Secondary Normal Phase, during which logged data is extracted from the outstation (see Scanning Process).
Properties that you specify on the Scan Parameters tab of each Channel Form determine how many times the server attempts to establish communications with a direct outstation before it deems that outstation to have failed, and thereafter how often it attempts to re-establish communications with that outstation.
A driver scans four outstations that are using a particular direct channel to communicate with the server. The outstations have outstation addresses of 3 to 6.
The channel via which ClearSCADA communicates with the outstations includes this configuration:
Comms Retries: 3
Transactions Attempts: 2
The driver tries to contact an outstation that has an address of 4, but receives no reply from the outstation. It tries to contact the outstation again. There is still no reply. It tries again for a third, and then a fourth time. As there is still no reply, and the Comms Retries for the outstation are defined as 3, the transaction is deemed to have failed.
The second transaction also fails. As the Transaction Attempts for the outstation is defined as 2, the outstation is deemed to have failed.
A Reestablishment Interval starts as soon as the outstation is deemed to have failed.
At the end of this interval, the driver only attempts to establish communications with the outstation once during each scan cycle.
In the next System Scan after the Reestablishment Interval has elapsed, the driver does manage to make contact with Outstation 4. However as the outstation was previously marked as failed, the driver performs a full Establishment Phase scan on the outstation. The driver performs this type of scan to help to ensure that the data retrieved from the outstation is fully up to date.
For further information on Comms Retries and Transaction Attempts, see Defining Scan Parameter Settings for a Channel. For further information on the Reestablishment Interval, see Establish Communications with Failed Outstations.