IOGetActiveSourceName() Function
- Last UpdatedFeb 22, 2017
- 1 minute read
The IOGetActiveSourceName() script function returns whether an access name currently uses its primary or secondary data source.
Typically, the IOGetActiveSourceName() function is included in a script associated with button or another window object. Operators then select the object from an application window to request the status of the application’s I/O Servers.
Category
Miscellaneous
Syntax
Result=IOGetActiveSourceName("AccessName");
Argument
AccessName
The existing Access Name for which to return the source name.
Remarks
IOGetActiveSourceName() returns a string that indicates whether the primary or secondary nodes of an Access Name are being actively polled. Possible return values of the IOGetActiveSourceName() function are:
|
Primary |
The primary node of the Access Name is actively polled. |
|
Secondary |
The secondary or failover node of the Access Name is actively polled. |
|
Null |
Both the primary and secondary nodes of an Access Name are inactive. |
Example
In this example, the ActiveServer message tag is assigned the returned value (Primary, Secondary, or Null) that identifies the current active node of the ModbusPLC1 Access Name.
ActiveServer = IOGetActiveSourceName ("ModbusPLC1");