Connection with the runtime
The TwinCAT OPC UA Server can provide symbols from one or more real-time environments. These can also be located on different physical control systems. In this case, an ADS route must be established to the respective target system. The so-called "AMS Net ID" uniquely identifies a control system in the network and is required to establish an ADS route to the system. The ADS port, on the other hand, then identifies a specific application on this system, e.g. the TwinCAT PLC.
The following figure illustrates this relationship.
In this example, there are three control devices. The TwinCAT OPC UA Server is installed on the first device and this device is identified by the AMS Net ID 192.168.1.1.1.1. On the second device, which is identified by the AMS Net ID 192.168.1.2.1.1, two PLC runtimes are started and are each addressed by their own ADS port. Only one PLC runtime is running on the third device (192.168.1.3.1.1).
Configuration
The configuration for a Data Access device can be carried out using the TwinCAT OPC UA Configurator. The Data Access tab gives you an overview of all configured devices and allows you to add or remove devices.
In this screenshot, for example, you can see a configuration with three Data Access devices. These have been configured as follows:
- PLC1: Local PLC runtime (127.0.0.1.1.1) on port 851
- PLC2: Remote PLC runtime (3.76.187.234.1.1) on port 851
- PLC3: Remote PLC runtime (3.76.187.234.1.1) on port 852
All parameters required for the connection with a device and its symbolism can now be configured in the properties of the device.
Depending on the real-time environment used, you can, for example, choose a symbol file here, select the ADS route to be used and enter the ADS port of the respective application. You can find more information on the various symbol files in the chapter Enabling symbols.