Configuring the Discrete 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 Classic 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.
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.
Import Options:
Select which data to retrieve.
-
Uses data only in this time window – uses data obtained from the server specifically between the window start and window end timestamps.
-
Use the latest data available – will use the data in the server at the time of query.
Window Start/End:
The starting/ending timestamp of the data import window.
Duration:
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.
Index:
Specifies how the value of the index is defined.
-
Create – manually specify the starting index, and thereafter the indexes will incrementally be created by the Discrete OPC Classic Source block
-
Use execute time – every time the block executes, an index will be created and associated with this execution time.
-
Use field – specify a field to be used as the index.
Index starting value:
When the user has opted to create the indexes, the index starting value is used to denote the first index. This can be adjusted by the user.
Index Field:
When the user has chosen to use a field as the index, the user must specify the field to be used under the index field option.
Select TAB
Select the fields you wish to import from the specified data source, configure an “Active filter” and set the data types. Two data types are supported:
-
Continuous
-
Discrete
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 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 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
-
-
These fields are then translated to either:
-
-
Continuous, or
-
Discrete data types.
-
When these selected fields are listed in the main Selected Fields window of the properties page, the data types that can be translated as either Continuous or Discrete are demarcated with an asterisk (*), and then need to be user defined.
-
When a database of different types of data is imported, the data type of the 100th field is used to classify the data type. This can then be changed by the user if needed.
-
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.
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.
-
When these selected fields are listed in the main Selected Fields window of the properties page, the data types that can be translated as either Continuous or Discrete are demarcated with an asterisk (*), and then need to be user defined.
-
When a database of different types of data is imported, the data type of the 100th field is used to classify the data type. This can then be changed by the user if needed.
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.
Related topics: