Using the Workbench to
create a CODESYS 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 CODESYS 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 CODESYS driver:
- 3.0 CODESYS device
- 2.3 CODESYS device
The CODESYS driver will be used to connect to a 3.0 CODESYS device or a 2.3 CODESYS device 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 CODESYS PLCs. The CODESYS PLCs must be configured to allow access to the node.
To define a device that represents a CODESYS 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 CODESYS device.
- Use the Type down-arrow, to select
a device type under
the CODESYS group.
- To define a device that represents a CODESYS
PLC, set this new device’s parameters as
follows:
Parameter Description Connection type Select the manner to connect to the CODESYS device. Gateway IP Address Available only when Gateway Connection type is selected. IP Address or hostname of the Gateway you want to connect. Gateway IP Port Available only when Gateway Connection type is selected. The port number to connect (1 to 65535). PLC IP Address IP Address or hostname of the PLC you want to connect. Enumeration Option An option to control which objects are enumerated. The default value is All. - All - enumerates all objects.
- Expand Specific - enumerates the objects defined by the Enumeration List parameter.
Enumeration List A comma-separated list of objects to allow. Only shown if the Enumeration Option parameter is Expand Specific. - A period '.' is the separator within an object. The object is usually in the third level, so you need at least two periods to access an object (For example: Application.SV.SI_PLS). A comma ',' is the separator between multiple objects.
-
Examples:
- Application.GVL_DriveStatus.stDriveStatus
- Application.SV.SI_PLS.Enable
- Application.GVL_DriveStatus.stDriveStatus,Application.Global_HMI_KinInterface.arKinHMIStatus_gb,Application.SV.SI_PLS
PLC Port The port number to connect (1 to 65535). 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.