The CNCnetPDM Standard OPC UA Client enables bidirectional communication with manufacturing devices from various manufacturers that run any OPC UA compliant server. In addition to reading, writing and monitoring of values it allows to call end execute methods provided by the server.
The CNCnetPDM Standard OPC UA Client works with a free license! In this mode you can connect to any OPC UA compliant server and read/write data from/to it. With any valid license for CNCnetPDM you can additionally monitor OPC items and call/execute OPC methods provided by the server, see licensing for details. TOP
SOFTWARE SETUP & USAGE
Download OPC_UA_Client.zip and extract OPC_UA_Client.exe to a folder on your PC.
To access a remote OPC UA server make sure that the TCP port (Default: 4840) used by the server is opened in your firewall. You can use our tool Device Port Scanner to check if your device is reachable via this port.
Note: The program requires .NET Framework 4.5.1 components and runs on newer Microsoft Windows x86 and x64 OSes (>= Windows 7). TOP
CONNECT TO OPC UA SERVER
Double clicking on OPC_UA_Client.exe opens a dialog.
FIG 1: Connect to OPC UA server
Enter the IP Address or DNS Hostname (1) of your OPC UA server. In case the server uses a port other than 4840 you have to append a colon and the port number e.g. 184.108.40.206:4850
Click on [Get Endpoints] (2). The OPC UA server shows available endpoints and their authentication methods
Select one of them (3) and a supported method for user authentication (4). In case of User/Password enter the required credentials
Clicking on [Connect to selected Endpoint] (5) opens an additional dialog for certificate validation, click on [Accept]. To accept the certificate permanently you have to run OPC_UA_Client with Administrator privileges
If successful button (5) changes to [Disconnect from server] TOP
READ & WRITE OPC ITEMS
Clicking on [Node Operations] (6) opens a OPC UA server browser (7) in the upper left area. Right of it properties of a selected node are shown (8). The lower area initially shows a section that enables to read or write (9) values from or to a selected node.
FIG 2: Read/write values from/to OPC server
To read values from the OPC server you can select a node in the OPC UA server browser (7) and simply drag it to the first Node Id input field and click [Read] (10). If a specific node supports input parameters you can manually add them in the Node Id input field e.g. ns=2;s=/Channel/Parameter/rpa[u1,2] for parameter 2.
To write values to the OPC UA server you can also select a node from the browser and drag it to the second Node Id input field, enter the desired value into the input field right of it and click [Write] (11). Please make sure that the selected node is writable! As with reading you can manually add parameters if supported by the node. TOP
MONITOR OPC ITEMS
Clicking on [Subscribe] (12) right of [Read/Write] allows you to monitor values of selected nodes. Same as with read or write you can simply drag a selected node from the browser to the monitoring area (13). This area shows Id, sampling rate, current value, quality, timestamp and, if any the last error of the monitored node. Right click on one or more monitored nodes allows to remove them. The program uses a fixed sampling rate of 100ms.
FIG 3: Monitoring of selected OPC UA server nodes TOP
CALL & EXECUTE METHODS
Clicking on [Call Method] (14) right of [Subscribe] allows you to call and execute methods provided by the OPC UA server.
FIG 4: Call and execute a OPC UA server method
To call a method you first have to expand the appropriate section in the OPC UA browser tree (here ‘Methods’) and drag (15) the selected node (here ‘GetUserAccessRights’) to the Node Id input field. Clicking on [Get Method Info] shows required input parameters (17) if any. After parameter input (here ‘OpcUaClient’) you can click on [Call method] (18). Results are shown in the lower right area. TOP
In case there are errors the program opens an additional dialog that shows a brief explanation of the issue.
On [Get Endpoints] the OPC UA Client shows ‘Error establishing a connection’: Make sure that the controller is reachable via the network and port 4840 is opened at the controller and your firewall. Use our tool Device Port Scanner to check if communication works.
On [Connect to server] the OPC UA Client shows ‘Endpoint does not support the user identity type provided’: The selected endpoint requires username and password but you have selected ‘Anonymous’ user authentication.
On [Connect to server] the OPC UA Client shows ‘BadUserAccessDenied’: The username or password for the OPC UA server is incorrect.
On [Read/Write] the OPC UA Client shows ‘BadAttributeIdInvalid’: The Node Id input is incorrect or not readable.
On [Read/Write] the OPC UA Client shows ‘BadNodeIdUnknown’: The Node Id input is not known by the OPC UA server.
On [Read/Write] the OPC UA Client shows ‘Bad’: The Node Id input does not exist, is not read- or writable or the input parameters are out of range.
On [Write] the OPC UA Client shows ‘BadUserAccessDenied’: The Node Id input is not writable or the input parameters are out of range.
On [Call method] the OPC UA Client shows ‘The Node Id doesn’t refer to an method’: The selected node is no method.
On [Call method] the OPC UA Client shows ‘BadInvalidArgument’: A required input parameter for the method is missing. TOP