Skip to content

Client settings

Version: 1.0.0

The first thing to do to use the driver is to build the client, configuring it in order to establish the connection with the PLC. Below are the main parameters to set to establish a basic connection.

Creating a new Twincat client instance

To create a new driver instance, use the following procedure:

  1. In the ESF main page click on Driver and Assets, then on the button “+ New Driver”. A pop-up dialog should appear.
  2. Select “com.eurotech.framework.twincat.driver.TwincatDriver” from the Factory drop-down list, enter an arbitrary name for the new instance and click Apply.
  3. An entry for the newly created client instance should appear, click on it to review its configuration

DriverSetname

Set parameters

The settings to be configured to establish a basic connection are as follows:

  • Remote IPv4 address: The remote routes destination IP address.
  • Remote Ams Net ID: The remote routes destination Ams Net ID.
  • Remote Ams Port: The remote routes destination Port.
  • Local IPv4 address: The local IPv4 address.
  • Local Ams Net ID: Local Ams Net ID.
  • Route name: The Route name.
  • Username: Username on the remote TwinCAT system (optional, defaults to Administrator).
  • Password: The password for the user on the remote TwinCAT system.
  • Timeout: Max time in seconds to wait for a connection.
  • Max string length: Max length for a String to read.
  • Should add remote: If set to true, the driver will create a new route on the remote PLC based on the other Driver configuration parameters. This operation should be performed only once, and it is necessary only if a suitable route is not already in place on the PLC.

Starting from version 1.1, the following new options are available:

  • Enable ADS-Sum Command (Fast Bulk Transactions): If set to true, the driver will use the ADS-Sum command whenever possible to significantly increase the speed of transactions by aggregating multiple channel operations (e.g. read, write) in a single request message. The PLC must support the ADS-Sum command. Set to false to disable the ADS-Sum command and use individual transactions instead. Default: false.

  • Maximum Number of ADS-Sum Sub-commands (Maximum Number of Requests in a Bulk Transaction): [Only Applies when ADS-Sum Commands are enabled] Maximum number of ADS-Sum sub-commands to include in an ADS-Sum command (the maximum number of requests to process at one time in a bulk transaction). If more requests are needed than this maximum, multiple ADS-Sum (bulk) transactions will be requested. If the PLC is stuttering or having other performance issues during transactions, reduce this value. It is strongly recommended to use a maximum of 500 to prevent PLC performance issues. Minimum is 2. Default: 500.

  • AMS Router Size (kb): [Only Applies when ADS-Sum Commands are enabled] Maximum data size in kb that the AMS Router on the PLC can process. This is usually the size of the AMS Router memory, but in some circumstances can be smaller due to other system constraints. This should be set to the maximum possible value based on the TwinCat system configuration. If this value is smaller than the maximum possible value, performance for very large requests will be suboptimal. TwinCat 2 has a default AMS Router Size of 2048kb. TwinCat 3 has a default AMS Router Size of 32768kb. If more data is needed than this value, multiple ADS-Sum (bulk) transactions will be requested. Default: 2048.

DriverInstance

When the user is sure of the provided settings, it can click on the "Apply" button to confirm the choices made. At this point it is possible to proceed with the generation of the asset, which allows the creation of communication with the PLC parameters.