Monitoring Connectivity Status with a Data Source
- Last UpdatedMar 22, 2017
- 1 minute read
The built-in discrete item, $SYS$Status, can be used to monitor the status of communications with your data source. This item is set to the following:
-
0 (zero) when communication with the data source fails.
-
1 (one) when communication is successful.
Note: For DDE/SuiteLink clients, $SYS$Status always comes from the leaf level of OI Gateway hierarchy branch, which is the destination data source. For OPC clients, $SYS$Status can be accessed at all hierarchy levels. $SYS$Status at the root level of the whole hierarchy tree is always good, as it represents the quality status of the local computer itself. Hence, for practical application, OPC clients should reference $SYS$Status at any hierarchy levels other than the root.
Enter the following DDE reference formula in the appropriate place in your client:
=Gateway|<Device Group>!$SYS$Status
where:
-
Gateway = the name of OI Gateway application.
-
<Device Group> = the exact device group defined in OI Gateway for the data source.
-
$SYS$Status = the discrete item used to monitor the status of connectivity with the data source.
Example:
=Gateway|ModbusOverSL_FastTopic!$SYS$Status
Enter the following OPC item reference syntax when adding the item in your OPC client:
<YourLinkName>.$SYS$Status
where:
-
<YourLinkName> is the assembly of hierarchy node names leading to a specific data source.
-
$SYS$Status is the discrete item used to monitor the status of connectivity with the data source.
Example:
ModbusOverSL.FastTopic.$SYS$Status
Note: In case of a data source disconnection, OI Gateway attempts the number of connection retries as configured for the given data source object, and makes no more attempts afterward. Subsequently, it is up to the client to re-initiate the connection via the system item $SYS$Reconnect.