Before using this driver in the PROMOTIC application it is highly recommended to watch "
PROMOTIC video tutorial 4 - Communication drivers".
Basic properties of the driver:
- Usage of this driver requires purchase of the
PmOPC licence. When developing the application in the freeware mode
PmFree, or with
development environment and while testing it in runtime, this component is always functional.
- The communication is done for Ethernet (PROMOTIC application is client).
- This driver is available since version
Pm9.0.9.
- This driver so far does not support UA Security (UA Security consists of authentication, authorization, encryption and data integrity via signatures).
The driver supports the following OpcUa data types:
-
Boolean: A two-state logical value (
true or
false).
In the PROMOTIC application represented by the
Boolean data type.
-
SByte: Integer (1 byte) in the range: -128 to 127 inclusive.
In the PROMOTIC application represented by the
Integer data type.
-
Byte: Integer (1 byte) in the range:
0 to
255 inclusive.
In the PROMOTIC application represented by the
Byte data type.
-
Int16: Integer (2 bytes) in the range:
-32 768 to
32 767 inclusive.
In the PROMOTIC application represented by the
Integer data type.
-
UInt16: Integer (2 bytes) in the range:
0 to
65 535 inclusive.
In the PROMOTIC application represented by the
Long data type.
-
Int32: Integer (4 bytes) in the range:
-2 147 483 648 to
2 147 483 647 inclusive.
In the PROMOTIC application represented by the
Long data type.
-
UInt32: Integer (4 bytes) in the range:
0 to
4 294 967 295 inclusive.
In the PROMOTIC application represented by the
Double data type.
-
Int64: Integer (8 bytes) in the range:
-9 223 372 036 854 775 808 to
9 223 372 036 854 775 807 inclusive.
In the PROMOTIC application represented by the
Double data type.
-
UInt64: Integer (8 bytes) in the range:
0 to
18 446 744 073 709 551 615 inclusive.
In the PROMOTIC application represented by the
Double data type.
-
Float: 4-byte real number in the
IEEE-754 (32-bit) format.
In the PROMOTIC application represented by the
Single data type.
-
Double: 8-byte real number in the
IEEE-754 (64-bit) format.
In the PROMOTIC application represented by the
Double data type.
-
String: Sequence of
Unicode characters (text string).
In the PROMOTIC application represented by the
String data type.
-
DateTime: Date and time.
In the PROMOTIC application represented by the
Date data type.
-
ByteString: Array of bytes.
In the PROMOTIC application represented by the
Object data type of the
PmBuffer type.
-
StatusCode: Numeric identifier for an error or condition that is associated with a value or an operation.
In the PROMOTIC application represented by the
Double data type.
-
QualifiedName: A name qualified by a namespace.
In the PROMOTIC application represented by the
String data type.
-
LocalizedText: Text with an optional locale identifier.
In the PROMOTIC application represented by the
String data type.
-
Array: The array of values.
In the PROMOTIC application represented by the
Array data type.
-
ExtensionObject:
A structure that contains an application specific data type.
In the PROMOTIC application represented by the
Object data type of the
PmMap type.
The object contains the following properties:
TypeId - (Long) Structure identifier.
Encoding - (
Long) Number defines what the
PmBuffer object in the
Body property will contain:
0 = object is empty
1 = object contains ByteString, i.e. a string of bytes.
2 = object contains XmlElement, i.e. XML text.
Body - (
PmBuffer object) This object contains structure values encoded according to the
Encoding property.
Recommended values of the PmaComm object parameters:
Network address | OPC-UA server URL address. |
TCP/UDP remote port number | OPC-UA server port (usually the 4840 value).
See: Wikipedia: A list of TCP and UDP port numbers used by protocols to run network applications. |
Ethernet transfer type | TCP |
Not connect until first transfer | NOT checked (mandatory) |
Close connection after every transfer | NOT checked (mandatory). After each connection, it is necessary to transfer several initialization messages and if the connection is closed repeatedly, the communication speed would be decreased significantly. |
---|
Description and recommended values for the Protocol parameters:
Server Endpoint URL | OPC-UA server endpoint URL address is entered here.
This is used if the server allows redirecting to other servers, otherwise just enter an empty string.
The value is usually in the form of "opc.tcp://URL:Port". |
Authentication | The client authentication type is entered here.
(Authentication type "2=Certificate" is currently not supported by this driver.)
0=Anonymous - Anonymous authentication, i.e. the client is not authenticated.
1=UserName - Authentication by name and password.
Name | User name of the client. |
Password | Password for corresponding client name. |
---|
|
Additional parameters | Leave the value empty. |
---|
The communication description by means of the PmaCommGroup object
The
PmaCommGroup objects can be used for this driver.
The variables in the
PmaCommGroup object (or even better the variables in the
PmaData object with
ExtComm data extension) can be of arbitrary number, type and order. The driver uses optimized internal communication messages for reading the data from the device.
All variables are read (if the "
Data refresh enabled" configurator is checked). On writing into the variable, only the single variable is sent into the device (if the "
Auto send on writing to item" configurator is checked).
Refresh of variables values registered in the PmaCommGroup object:
While being initialized, the driver registers all variables to the
OPC server (
OPC system message
CreateMonitoredItems) and informs the server about the requested update rate based on the settings of the "
Communication refresh rate [ms]" configurator.
The the driver sends request to be updated when the values of these variables change (
OPC system message
PublishRequest). The
OPC server than, on change of the variable, (or if there is no change, the rate defined in the "
Communication refresh rate [ms]" configurator is used) sends a message containing information regarding all changed variables (
OPC system message
PublishResponse).
After receipt of this of this message, the driver immediately sends the
PublishRequest message again. This way the values of variables of the
PmaCommGroup object are being updated with defined period
Communication refresh rate [ms].
Description of the "ItemId" configurator:
ItemId is the text identifier of the item that is used for addressing the item in the device. The "
ItemId" configurator tells the driver how to receive or send the item value.
The text can be either written manually, or it can be assembled in the window opened by the button to the right of the configurator.
Macro expression can be used for input (it is evaluated after the application is launched).
The
ItemId identifier may look like for example "
ns2,str,xxxx", where:
- ns2: Specifies the ns=namespace of the OPC-UA server where the variable belongs (0, 1, 2 ...).
-
str: Specifies the type of variable identifier.
str = The identifier of the variable is a text string.
nmb = The identifier of the variable is a number.
- xxxx: Variable identifier. This text depends only on the OPC-UA server.
Time reading type | Specifies whether the value time is also read along with the variable value from the OPC-UA server.
If the time is read then this time is saved into the PmVar.TimeSource property.
No - The time value will not be read.
Source - The source time will be read, i.e. the time that the OPC-UA server read from the connected device (if the server is able to read such time from the device).
Server - The time of the value reading by the OPC-UA server will be read. |
Maximum number of variables in one registering message | The maximum number of variables that will be registered to the OPC server in one message (OPC message of the CreateMonitoredItems type).
This configurator is off by default (therefore all variables are registered at once using a single of the message).
This configurator usually does not need to be switched on. It must be switched on, for example, when the OPC server does not allow to register many variables in one message (in practice we encountered the limitation of 990 variables). If it is necessary to set some number, then it is best to set this number as high as possible. |
---|