Define the Delay After Calling Comtrol’s Freeport Routine
NOTE: The Delay After Calling Comtrol’s Freeport Routine setting is only relevant on systems where Comtrol DeviceMasters use the native (NS-Link) COM port drivers. If your system has Comtrol DeviceMasters that do not use the native COM port drivers, you do not need to use the Delay After Calling Comtrol’s Freeport Routine setting. Similarly, if your system does not use Comtrol DeviceMasters, you do not need to use this setting.
ClearSCADA supports the use of network connected serial ports (DeviceMasters). Typically, DeviceMasters are used to provide serial communications from the servers in a multi-server system, for example, to provide serial communications for the Main and Standby servers in a Hot-Standby architecture.
There are many different DeviceMasters available, each with ports that can be associated with one or more PCs. Some DeviceMasters have a single port, whereas others have 4, 8 or 16 ports. However, each port can only be used by one PC at any one time. So, in a multi-server architecture, the Main server is associated with one specific port on the DeviceMaster; the other server(s) cannot access this port, but can use the DeviceMaster’s other ports.
If a changeover occurs as a result of the Main server going offline or a network failure, the new Main server needs to establish communications. To do this, the new Main server has to connect (open) to the ports on the DeviceMaster that was used by the old Main server. If the old Main server was not shut down cleanly, the DeviceMaster can take around 2 minutes to release the port so that it can be re-used. This can delay the new Main server as it attempts to establish communications.
To improve the speed of the reassignment process, the ClearSCADA server that changes from Standby to Main sends the freeport instruction to the DeviceMaster. The instruction forces the DeviceMaster to free the relevant COM ports much more quickly. However, new attempts to open the ports will only succeed after the DeviceMaster has processed the Freeport command (which happens asynchronously). For this reason, ClearSCADA needs to apply a delay before it attempts to open the port on the DeviceMaster - the Delay After Calling Comtrol’s Freeport Routine setting defines this delay.
By using the Define the Delay After Calling Comtrol’s Freeport Routine setting, you can allow the DeviceMaster to complete its Freeport routine before ClearSCADA attempts to open the port. With an appropriate delay in place, ClearSCADA will be able to reassign the DeviceMaster’s COM ports successfully, so that the new Main server can access the COM ports it needs. If the delay is insufficient, the reassignment process may fail, meaning the new Main server will be unable to connect to the network until the next retry (retries are every 30 seconds by default).
The amount of delay required varies according to the type of network being used:
For LANs (Local Area Networks), a delay of 30ms is usually appropriate as routers are not used between the DeviceMaster and the ClearSCADA server.
For WANs (Wide Area Networks), where there is one or more routers between the ClearSCADA server and the DeviceMaster, longer delays of 250ms or more may be required. The default value for the Define the Delay After Calling Comtrol’s Freeport Routine setting is 250ms, which is usually appropriate for many LANs and WANs (although you may be able to improve the connection time by reducing the delay for LANs).
To define the Define the Delay After Calling Comtrol’s Freeport Routine setting:
- Access the ClearSCADA Server Configuration Tool (see Accessing the ClearSCADA Server Configuration Tool).
- Expand the Global Parameters branch of the tree structure.
- Select Channels to display the Channels section.
- Use the Define the Delay After Calling Comtrol’s Freeport Routine spin-box to define the required delay. Remember that for a LAN, lower delays such as 30ms may be appropriate, whereas longer delays of 250ms or more may be needed for a WAN. As network speeds can vary significantly, you may need to experiment with the delay setting to determine the ideal delay for your set-up.
- Right-click on the system icon in the tree-structure, and select the Apply Changes option to apply the changes.