Ads (Twincat / Beckhoff)

The ADS protocol is used to communicate with Backhoff and TwinCATcontrollers which have an ADS server.

Each data item is referenced by a unique address within the controller.

Installation with local ADS server

If OIBus is installed on the same machine as the ADS server, you only needto mention the Net Id and the port of the machine. The Net Id is the concatenation of an IP address and two numbers allowing the identification of the PLC within the ADS network managed by the ADS server. The default port is 851.

The Retry interval field indicates the delay between two connection attempts.

installation ads local

Installation with remote ADS server

In the case of a remote ADS server, you must indicate the IP address (or domain name) of the ADS router, as well as the associated port (Router tcp port).

The client ams id corresponds to a client identifier. This allows the ADS router to identify the client and to authorize or not its access. It is therefore important that the client ams id specified in OIBus is authorized by the ADS router.

With TwinCAT this is done with the TwinCAT Static Routes tool. The following example authorizes two routes whose AmsNetId is to be used on the OIBus side. It is important that the AmsNetId is used through the IP address specified.

installation ads distant

Each ADS connection has its own port to exchange data. So you have to assign a port to the client (Client ads port field). This port must of course be available on the server side.

Data settings

The list of points allows to indicate the pointId, which is the address of the data in the PLC, and the scanMode, which indicates the time interval between two requests.

In the case where several similar PLC (sharing the same point addresses for example) send data to the same information system, it is possible to differentiate them thanks to the Plc name field.

If PLC 1 has for Plc name PLC001. (the dot in included in the name) and the data MyVariable.Value, the resulting id will be PLC001.MyVariable.Value and this will allow to identify the data in a different way than the PLC 2 which will have a resulting id of PLC002.MyVariable.Value

In the main parameters of the PLC, it is possible to indicate how certain data can be retrieved.An enumeration can be retrieved as an integer or as a character string (the PLC knows both thanks to its programming). A boolean value can be retrieved as an integer or a string (with 0 = false,1 = true).

Structure settings

Thanks to the Ads structures section, it is possible to query an entire data structure. For example, if the data MyVariable is of type MyStructure and has the following fields:

  • MyDate
  • MyNumber
  • Value

And we are interested in MyDate and MyNumber, then it can be useful to fill the form directly in this way:

configuration structures

This is especially useful when several data (here MyVariable) are of type MyStructure and we want to pull up MyDate and MyNumber each time. The more fields we have, the more useful this feature is.

Each field will give a unique address. In the previous example, this will give for the single point MyVariable the following two points:

  • MyVariable.MyDate
  • MyVariable.MyNumber
Scroll to top