Using the Workbench to
create a Beckhoff device
The Workbench provides the view into a node's installation,
configuration and resource definition. The Workbench also
provides access and control over those resources.
A device is a resource that can represent a physical device, such as a Beckhoff PLC, an RF tag reader or a sensor. A device can also be defined in one node to represent a device that is defined and supported in another node. This allows your application solution to have access to devices and their data independent of their location or connectivity details.
The following devices can be defined with the Beckhoff driver:
- TwinCAT 2
- TwinCAT 3
The Beckhoff driver will be used to connect to a Beckhoff TwinCAT 2 or a TwinCAT 3 PLC. Once connected the driver will automatically enumerate the tags defined on the PLC. The driver supports the reading of data from and the writing of data to the Beckhoff PLCs. The Beckhoff PLCs must be configured to allow access to the node. This configuration step is documented in the section titled Adding a route in the Beckhoff PLC
To define a device that represents a Beckhoff device, follow these steps:
- From the Workbench left pane, expand the node where
you want to define the device.
- Select the Devices icon. The
Devices window appears as the right pane.
- The Devices window provides a table format that
lists the previously defined devices. Click the New
button to create a new Beckhoff device.
- Use the Type down-arrow, to select
a device type under
the Beckhoff group.
- The Device window changes to accommodate the
selected device type.
- To define a device that represents a Beckhoff
PLC, set this new device’s parameters as
follows:
Parameter Description Name Enter a name for the Beckhoff device. Type Select the type of the Beckhoff PLC the driver will be connected to, either TwinCAT 2 or TwinCAT 3 IP Address Enter the IP Address of the Beckhoff PLC. Port Enter the port number used by the PLC. The default value of 48898 should be used in most cases. AMS Target Net ID The internal TwinCAT routing address associated with the target Beckhoff PLC AMS Target Port The internal TwinCAT port where the Beckhoff PLC is listening for messages. The default value for the TwinCAT 2 is 801, while the TwinCAT 3 default AMS Target Port is 851. AMS Sender Net ID The IP address of the node, which must also be defined on the TwinCAT. In almost all cases the last two octets will be 1.1. For example if the IP address of the node where the Beckhoff driver is installed is 192.168.0.13, the AMS Sender Net ID value will be 192.168.0.13.1.1. AMS Sender Port The port on the node that will receive messages from the Beckhoff PLC. The default value is 30000, but can be modified if this port is not available. Timeout Enter the timeout value to use when communicating with this device. This is entered in milliseconds. Per Variable Security Select False to disable the allocation of additional memory to track User to Variable access for all Variables in this Device. Select True to enable this feature if required. For more information, see Setting up Read Write per device variable.