OPC Classic Connection Tag

Help Contents

Introduction

The OPC Classic Connection Tag provides a connection to an external OPC Classic DA Server. The data in the external OPC Classic Server can be read at a fixed interval, or on demand, or both.

Configuration Properties

The OPC Classic Connection Tag supports the configuration properties of the Alarm Tag plus these properties:

Property Type Version Description
ScanInterval TIME 1.3 The interval between each read. An interval value of zero (T#0s) disables periodic query execution. See Interval and Offset for information on how timed activities are scheduled.
ScanOffset TIME 1.3 The offset added to the ScanInterval to get the actual read time. See Interval and Offset for information on how timed activities are scheduled.
ProgID WSTRING 1.3 The programmatic identifier of the external OPC Classic Server.
RemoteNode WSTRING 3.0 The node name of the computer running the OPC Classic Server.
This can be any of the following:
  • An IP Address, for example "192.168.1.1"
  • A fully qualified DNS address, for example "server1.example.com"
  • A UNC server path, for example "\\Server"
  • A node name, for example "Server"
Leave blank if the OPC Classic Server is running on the same computer as Fernhill SCADA.
AlarmSeverity UINT 1.5 The severity of the alarm raised when the OPC server fails.

ProgID Property

The ProgID property tells Fernhill SCADA which external OPC Classic Server to connect to.

Security Considerations

Depending on the external OPC Classic Server you want to connect to, Fernhill SCADA may need to authenticate itself with the external OPC Server. In a default installation, Fernhill SCADA runs under the System account reserved for system services. If the OPC Classic Server does not allow access from the System account, you can change Fernhill SCADA to use a different user account. See Fernhill SCADA Server for information about changing the user account used by Fernhill SCADA.

Data Properties

The OPC Client Connection Tag supports the data properties of the Alarm Tag plus these properties:

Property Type Description
ServerState UINT A code indicating the state of the connection to the external OPC Classic Server. The value 15 shows successful operation. Other values indicate an error. The FailedFunction and ErrorMessage properties may give additional information.
FailedFunction WSTRING The function call that failed if there is an error communicating the external OPC Classic Server.
ErrorMessage WSTRING The error message returned from the external OPC data source.
OPCServerStartTime DATE_AND_TIME The time the OPC server started (from the GetStatus request).
OPCServerState UINT The state reported by the GetStatus request.
OPCMajorVersion UINT The Major version of the OPC Classic Server reported by the GetStatus request.
OPCMinorVersion UINT The Minor version of the OPC Classic Server reported by the GetStatus request.
OPCBuildNumber UINT The Build number of the OPC Classic Server reported by the GetStatus request.
OPCVendorInfo WSTRING[80] The vendor information string reported by the GetStatus request.
ScanTimer TimerStatus The status of the scan timer.

The ServerState property can be used to diagnose problems with the OPC data source:

ServerStateDescription
0Initial state before the driver has started
1There is an error in the OPC Client Connection Tag configuration
2The driver has disconnected from the OPC Classic Server
3The ProgID is invalid
4The CoCreateInstanceEx call to create an instance of the external OPC server failed.
5The IOPCServer::GetStatus function call failed
6The IOPCServer::AddGroup function call failed
7The IOPCItemMgt::AddItems function call failed
8The external OPC Classic Server does not support the IOPCSyncIO interface
9The IOPCSyncIO::Read function call failed
15The connection to the external OPC server is working normally

Tag Commands

The OPC Client Connection Tag supports the tag commands of the Alarm Tag, plus these tag commands:

Tag Command Version Description
Refresh 1.3 Requests an immediate read of the tags associated with this OPC Classic Connection Tag.

Note: Event triggered data reads (from the Refresh Tag Command) and periodic data reads (defined by the ScanInterval property) are independent. You can use the Refresh Tag Command, or the ScanInterval property, or both to determine when the tags are read.

Relationships to Other Tag Types

The OPC Classic Connection Tag builds on the features of these tag types:

Further Information

Interval and Offset

To learn how activities are scheduled using Interval and Offset.

I/O Analog Data Point Tag

To learn about the I/O Analog Data Point Tag that can be associated with the OPC Classic Connection Tag.

I/O Digital Data Point Tag

To learn about the I/O Digital Data Point Tag that can be associated with the OPC Classic Connection Tag.

I/O String Data Point Tag

To learn about the I/O String Data Point Tag that can be associated with the OPC Classic Connection Tag.

I/O Word Data Point Tag

To learn about the I/O Word Data Point Tag that can be associated with the OPC Classic Connection Tag.

I/O Double Word Data Point Tag

To learn about the I/O Double Word Data Point Tag that can be associated with the OPC Classic Connection Tag.

I/O Long Word Data Point Tag

To learn about the I/O Long Word Data Point Tag that can be associated with the OPC Classic Connection Tag.

OPC Client Driver

For an overview of the OPC Client Driver.

Glossary

For the meaning of terms used in Fernhill SCADA.