Configuring the OPC Classic Client Source block

Properties

Double click the OPC Classic client source block to configure the block properties. Below the properties window,an explanation of each property can be found.

Data Source:

  • The name of an OPC Server to which a connection must be established. Open the OPC Classic connection Dialogue by clicking the Data Connection Selection button denoted by the ellipses adjacent to the “Data Source” text box.

  • Data will be received and sent to the specified OPC Classic server.

  • For connection configuration, see OPC Classic client to server connection.

Verify fields during runnability:

  • Set to "Yes" if fields should be verified during a runnability check, or

  • "No" to consider the fields valid.

Use Aggregate / Aggregate:

  • Only applicable when retrieving data from an OPC Classic HDA server, and each server has it's own set of aggregate functions.

  • The aggregate functions are different mathematical ways of manipulating and presenting the data.

  • If Use Aggregate is set to "No", the raw data at the actual sample rate will be returned.

Sampling Period:

  • The interval in seconds at which data is sampled/executed.

  • Minimum valid value = 0.01

NOTE: when the sampling rate is too small for the processor to handle, a “scheduler overload” error will be reported in the message window of the blueprint.

Requested Update Rate:

  • Polling Interval in seconds that data is read from the physical source.

  • Minimum valid value = 0

  • If this value is not the same as the physical source, the values will either be repeated, or interpolated. (Interpolation assumes a straight line between data points.)

Deadband Percentage:

  • Used to keep noisy signals (external data) from producing unnecessary values in the output port of the block, and thus notifying the client unnecessarily.

  • The range for this value is from 0 to 100%.

  • The range of change notification of an item can be calculated from the Engineering Unit (EU) Low and EU High values. This range is then multiplied by the Deadband Percentage to generate a change value limit, outside which the client will be notified of the value change.  Thus, in setting this limit, the client is only notified of changes that are deemed important, and the noise of unnecessary notifications is reduced.  

  • When the change falls outside the limit, and notification is necessary, we get what is termed an "exception".  

  • An "exception" is calculated as: if (absolute value of (last cached value - current value) > (Deadband %/100.0) * (EU High - EU Low) )

  • This means that, effectively, the change in values is determined as a proportion of the range of values, and if this proportion is greater than the Deadband Percentage value specified, the client will be notified.

  • The changes in values are NOT cumulative, and notification only occurs with SINGLE changes greater than the specified Deadband Percentage value.

  • If the exception limit is exceeded, then the last cached value is updated with the new value and a notification will be sent to the client.

  • If no Deadband Percentage value is specified on a server that support this function, then the default value of 0 (zero) is assumed, and all value changes will update the cache. It is important to realize that the timestamp will be updated irrespective of whether the cached value is updated.

  • The Update Rate is used to determine the time when a value is checked to see if the exception limit has been exceeded.

Data Retrieval Method:

Specifies how the data is retrieved from the OPC Classic server.

  • Synchronous: Uses synchronous read operations through the IOPCSyncIO interface. Synchronous mode is supported on OPC Classic DA 1.0 and later servers.

  • Asynchronous: Uses asynchronous updates through the IOPCDataCallback interface. Asynchronous mode is only supported with OPC Classic DA 2.0 and later servers. The data is retrieved slightly before the execution time to enable the block to prepare and execute the data in real-time.

NOTE: Only HDA 1.0 is supported.

Field Timestamping:

Specifies how the timestamp of each field is determined.

  • Set to execute time – timestamps are generated according to the sampling rate regardless of whether the timestamp has changed or not.

  • Set to execute time on change – a new timestamp is only generated when the data changes.

  • Unchanged – the server timestamp will be used in this case.

NOTE: the timestamp on the server and the one created by the OPC Classic Client Source block may not always be equivalent.

Import Options:

Select which data to retrieve.

  • Use the latest data available – will use the data in the server at the time of query.

  • Use and hold last available value – uses the last value in the data source and will continue to use this value as a constant.

Window Start/End:

The starting/ending timestamp of the data import window.

Duration:

The duration of the data import window. This is the time difference between the starting and ending times of the data import window.

NOTE: Because of the real-time nature of the OPC Classic Client Source block, the block must be run in playback mode to avoid unexpected errors.

Configuring Blueprint Execution Schedules:

Blueprint execution rates are determined by the individual source blocks contained in a blueprint and their respective configuration options.

You can use the First execute configuration options available on most source blocks to configure the timestamp for the first execution of the blueprint. For more information, see Configuring Blueprint Execution Schedules.

Select TAB

Select the fields you wish to import from the specified data source, configure an “Active filter” and set the data types.  Three data types are supported:

  • Integer (I)

  • Double (D)

  • String (S)

Convert between these data types by selecting the required fields from the list and clicking on the conversion buttons provided.  Only valid conversions are supported.

OPC Classic Source Field Configuration

All the fields in the output port of the block are listed in the Selected Fields List.

  • Field Name lists the field name in the output port.

  • Data Type lists the data type of the field.

  • Media Source is the associated OPC Classic item. This might be different to the field name.

The controls at the top of the dialogue allow manual editing of the items in the table.

The [Validate] button will refresh and validate the data in the input ports of the OPC Classic Client Source block. If the field is not valid it will be dropped, an error will be reported to the user and the execution will continue. No notification occurs if all fields are valid.

Warning: There are no warnings in the case of incorrectly formatted import files. Therefore when reconfiguring an OPC Classic server connection or importing a file, it is essential that the validation of the fields are checked via the validate button.

The [Import] button will import the same 3 column type text file that was exported. The following restrictions on the text file format are applicable:

  • The first line must contain the headings

  • The entries under the Field Data Type column must be one of

    • Integer

    • Double

    • String

The [Export] button exports the field configuration to a text file. The output file has 3 columns:

  • Field Name

  • Field Data Type

  • Media Source

The [Customize] button is used to manually add, edit and remove fields.

Customize: To make a manual field entry:

  • Open the Customize Fields dialogue by clicking the [Customize] button.

  • Enter the field name in the Field Name edit box at the bottom of the window.

  • Enter the OPC Classic Media Source in the Media edit box.

  • Select the field's data type from the Data Type drop-down list.

  • Clicking the [Add] button will add the field to the list, and will populate the main Fields window.

To change a field entry

  • Open the Customize Fields dialogue by clicking the [Customize] button.

  • Select the field from the list. The attributes of the fields in the list can be edited directly.

  • When focus is lost on the specified item, the value will be updated.

To remove the OPC Classic item association

  • Open the Customize Fields dialogue by clicking the [Customize] button.

  • Select the field from the list.

  • Click the remove button.

Preview TAB

Provides a sample preview of the data set as read using the currently specified properties, of the specified time window.

Return to top


Related topics:

  

CSense 2023- Last updated: June 24,2025