The CNCnetPDM Standard OPC UA Server enables to add OPC UA Server functionality to any controller type (e.g. Fanuc, Mitsubishi, Heidenhain) supported by CNCnetPDM. It dynamically creates nodes and variables according to your device setup and allows connections from any OPC UA compliant client.
In case the server should be reachable from clients outside of your local network that cannot resolve the PC's DNS Hostname you have to enter the IP Address (IPV4) of the PC.
The TCP Port (default 4840) of the server can also be setup in your CNCnetPDM.ini file. TOP
If AnonymousAccess is set to 0 (default) clients have to provide a username and password to be able to connect. In case sections [OPC UA User n] (n = 1 - 10) do not exist the the default username and password is 'OpcUaClient'.
To add users you can simply edit CNCnetPDM.ini, adjust NumberOfUsers (default = 1), copy and paste the whole [OPC UA User 1] section and assign an a different section number e.g. [OPC UA User 2]. To allow anonymous connections set AnonymousAccess = 1.
ReconnectAfter defines the interval (seconds) CNCnetPDM should use to try to restart the OPC UA Server in case it goes down.
To enable automatic startup of the OPC UA Server together with CNCnetPDM you can set StartOffline = 0. TOP
Activities of the server are logged to file log_ua_YYMMDD.txt (year, month, day) in subfolder \log of CNCnetPDM.
NODES & VARIABLES
Identifier type for all node objects and variables is 'String' (1). Initially the OPC UA Server creates a base node object 'CNCnetPDM' under root node 'Objects' in namespace 1.
For all devices connected to CNCnetPDM the server automatically creates device node objects (under node 'CNCnetPDM') with names (2) according to their device number as defined in section [RS232] of CNCnetPDM.iniTOP
FIG. 3: OPC UA Server Nodes & Variables
Variables under each device node object are created based on the ini file of the device connected to CNCnetPDM. The OPC UA variable name is equal to the Tag name of a specific signal.
For example, if you have defined an entry for output of 'Main program' with name PRGMN from device number 1000 variable PRGMN (3) is added to device node object 1000.
The actual value of the OPC UA variable gets updated by the Tag value output by the specific device driver. So, if the device driver outputs value 4711 for tag name PRGMN the value for this OPC UA variable is set to 4711. TOP
If you're working with multiple instances of CNCnetPDM on the same PC make sure that the OPC UA Server of every instance uses a different TCP Port e.g. 4841 a.s.o.
In case you set NumberOfUsers to a number without a corresponding [OPC UA User number] section the username and password for the new user is set to 'OpcUaClient'.
Without section [OPC UA Server] in your CNCnetPDM.ini file the OPC UA server starts with it's default settings. TOP
To upgrade from a previous version of CNCnetPDM you can copy & paste the following lines into your existing CNCnetPDM.ini file:
[OPC UA Server]
IP Address = 0
; Endpoints of OPC UA Server (0=DNS Hostname or specific IP)
Port = 4840
; Listen port of OPC UA Server (default=4840)
AnonymousAccess = 0
; Allow anonymous access to OPC UA Server (0=no 1=yes)
RestartAfter = 10
; Try to restart OPC UA Server after n seconds it goes down
StartOffline = 1
; Start CNCnetPDM without OPC UA Server (0=no 1=yes)
NumberOfUsers = 1
; Number of OPC UA usernames and passwords (default=1, max=10)
[OPC UA User 1]
Username = OpcUaClient
Password = OpcUaClient