For data exchange between your local device and a remote device, add a “Data Source Manager” object and then a “Data Source” below your application in the device tree. A wizard guides you through the configuration of the data source. Afterwards, you can change the settings at any time in the editor of the object. However, it is not possible to modify the data source type later.
Use the “CODESYS Symbolic” data source type unless there are no resources available in the remote PLC for a symbol configuration. As long as the symbol configuration in the remote device is not impacted by an application change, you have the advantage that the application in the local device does not have to be updated.
When adding a data source, select a data source type. Then specify the connection settings of the point-to-point connection to the remote device. Ideally, the remote device is running during this time and CODESYS can establish the connection to it immediately. Then all available data source variables from the remote PLC are displayed. Select the variables that should be transferred. You can also select all variables. Then the data source is initialized automatically, the data source variables are created below the “DataSources_Objects” folder, and another data source is added below the data source manager.
If the data is transferred using symbolic monitoring and the symbol file is stored on your development system, then you can read the variable information from the symbol file and work offline. The symbol file is stored either as a file on your development system or as a symbol configuration object as part of your project (in CODESYS).
The initial settings can be changed at any time in the data source editor.
See also
Initially connecting devices symbolically via 'CODESYS V3'
A “CODESYS Control Win V3” is running on the remote device. Moreover, an application is running with a symbol configuration.
-
Below your application in the device tree, insert a “Data Source Manager” object.
-
Select the “Data Source Manager” object and click “Add Object Data Source”.
The “Add Data Source” dialog opens.
-
In the “Name” field, specify the data source name.
Example:
ds_Remote_Device
-
As the data source type, select “CODESYS Symbolic”.
The data transfer is done via symbolic monitoring. The “Initialize Data Source Wizard - Provider settings” dialog opens.
-
As the connection type, select “CODESYS V3”.
-
For “Type of name or address”, select the “Node name” option.
-
In the “Connection Settings” group, specify the connection parameters for configuring the remote device. Example: “[03A7)”
The connection to the remote device is established and the application is read. The “Initialize Data Source Wizard - Browse data items” dialog also opens. The read remote control variables are displayed in the tree view on the “Variables” entry. The top node is the application, which is displayed with its remote application name.
-
In the tree view, select which control variables should be transferred. Then click “Finish”.
The data source is initially configured. The
ds_Remote_Device
object is added below the “Data Source Manager” node. The object is open, and on the “Variables” tab, the data source variables to be generated are displayed in the tree view. The GVLds_Remote_Device
, where the data source variables are declared, is located below the “DataSource_Objects” folder.
Initially connecting devices symbolically via 'CODESYS V3 (Via gateway)'
A “CODESYS Control Win V3” is running on the remote device. Moreover, an application is running with a symbol configuration. The remote device exists in another network so that the communication has to be routed via a gateway.
-
Below your application in the device tree, insert a “Data Source Manager” object.
-
Select the “Data Source Manager” object and click “Add Object Data Source”.
The “Add Data Source” dialog opens.
-
In the “Name” field, specify the data source name.
Example:
ds_Remote_Device
-
As the data source type, select “CODESYS Symbolic”.
The data transfer is done via symbolic monitoring. The “Initialize Data Source Wizard - Provider settings” dialog opens.
-
As the connection type, select “CODESYS V3 (Via gateway)”.
You can also specify the communication parameters for the gateway.
-
For “Type of name or address”, select the “Node name” option.
-
In the “Connection Settings” group, specify the connection parameters for configuring the remote device. Example: “[03A7)”
The connection to the remote device is established and the application is read. The “Initialize Data Source Wizard - Browse data items” dialog also opens. The read remote control variables are displayed in the tree view on the “Variables” entry. The top node is the application, which is displayed with its remote application name.
-
In the tree view, select which control variables should be transferred. Then click “Finish”.
The data source is initially configured. The
ds_Remote_Device
object is added below the “Data Source Manager” node. The object is open, and on the “Variables” tab, the data source variables to be generated are displayed in the tree view. The GVLds_Remote_Device
, where the data source variables are declared, is located below the “DataSource_Objects” folder.
Initially connecting devices symbolically via 'CODESYS V2'
A “CoDeSys V2.3 SP PLCWinNT V2.4” is running on the remote device. Moreover, an application is running with a symbol configuration.
-
Below your application in the device tree, insert a “Data Source Manager” object.
-
Select the “Data Source Manager” object and click “Add Object Data Source”.
The “Add Data Source” dialog opens.
-
In the “Name” field, specify the data source name.
Example:
ds_Remote_Device
-
As the data source type, select “CODESYS Symbolic”.
The data transfer is done via symbolic monitoring. The “Initialize Data Source Wizard - Provider settings” dialog opens.
-
As the connection type, select “CODESYS V2”.
-
In the “Connection Settings” group, specify the connection parameters for configuring the remote device.
Example: driver type
TCP/IP (Level 2 Route)
, addresslocalhost
, port1200
The connection to the remote device is established and the application is read. The “Initialize Data Source Wizard - Browse data items” dialog also opens. The read remote control variables are displayed in the tree view on the “Variables” entry.
-
In the tree view, select which control variables should be transferred. Then click “Finish”.
The data source is initially configured. The
ds_Remote_Device
object is added below the “Data Source Manager” node. The object is open, and on the “Variables” tab, the data source variables to be generated are displayed in the tree view. The GVLds_Remote_Device
, where the data source variables are declared, is located below the “DataSource_Objects” folder.
Initially connecting devices symbolically via 'CODESYS V2 (Via gateway)'
A “CoDeSys V2.3 SP PLCWinNT V2.4” is running on the remote device. Moreover, an application is running with a symbol configuration. The remote device exists in another network so that the communication has to be routed via a gateway.
-
Below your application in the device tree, insert a “Data Source Manager” object.
-
Select the “Data Source Manager” object and click “Add Object Data Source”.
The “Add Data Source” dialog opens.
-
In the “Name” field, specify the data source name.
Example:
ds_Remote_Device
-
As the data source type, select “CODESYS Symbolic”.
The data transfer is done via symbolic monitoring. The “Initialize Data Source Wizard - Provider settings” dialog opens.
-
As the connection type, select “CODESYS V2 (Via gateway)”.
You can also specify the communication parameters for the gateway.
-
In the “Connection Settings” group, specify the connection parameters for both the gateway and the device configuring the remote device.
Example: driver type
TCP/IP (Level 2 Route)
, addresslocalhost
, port1200
The connection to the remote device is established and the application is read. The “Initialize Data Source Wizard - Browse data items” dialog opens. The remote control variables are displayed in the tree view on the “Variables” entry.
-
In the “Connection Settings” group, specify the connection parameters for configuring the remote device. Example: “[03A7)”
The connection to the remote device is established and the application is read. The “Initialize Data Source Wizard - Browse data items” dialog opens. The read remote control variables are displayed in the tree view on the “Variables” entry. The top node is the application, which is displayed with its remote application name.
-
In the tree view, select which control variables should be transferred. Then click “Finish”.
The data source is initially configured. The
ds_Remote_Device
object is added below the “Data Source Manager” node. The object is open, and on the “Variables” tab, the data source variables to be generated are displayed in the tree view. The GVLds_Remote_Device
, where the data source variables are declared, is located below the “DataSource_Objects” folder.
Initially adding data source variables from a symbol file
Ideally, the same symbol file on the remote device is saved on your development system.
-
Below your application in the device tree, insert a “Data Source Manager” object.
-
Select the “Data Source Manager” object and click “Add Object Data Source” in the context menu.
The “Add Data Source” dialog opens.
-
In the “Name” field, specify the data source name.
Example:
ds_Symbols
-
As the data source type, select “CODESYS Symbolic”.
The data transfer is done via symbolic monitoring. The “Initialize Data Source Wizard - Provider settings” dialog opens.
-
In “Variable information”, click the “From symbol file” entry.
-
In “Select symbol file”, specify the location and the file name of the symbol file. When the code is generated, an XML symbol file is created in the project directory by default.
Example:
D:\Projects\V3.5 SP11\Project_A.Device.Application.xml
Hint: When a symbol file is specified, no additional connection settings have to be configured. A connection is not established. You are working offline. You have to configure the connection settings only when you need current data from the controller which is transferred online. In the “Variable information” settings, select the “From connection settings” option.
-
Click the “Next” button.
The “Initialize Data Source Wizard - Browse data items” dialog opens. The read symbols are displayed in the tree view on the “Variables” entry.
-
In the tree view, select the symbols to be transferred. Then click “Finish”.
The data source is initially configured. The
ds_Symbols
object is added below the “Data Source Manager” node. The object is open, and on the “Variables” tab, the data source variables that were generated based on the symbol file are displayed in the tree view. The GVLds_Symbols
, where the data source variables are declared, is located below the “DataSource_Objects” folder.
Initially adding data source variables from a symbol configuration
Your active project contains the control application for the remove device. The control application includes a symbol configuration with symbols that are added to your local application as data source variables.
-
Below your local application in the device tree, insert the “Data Source Manager” object.
-
Select the “Data Source Manager” object and click “Add Object Data Source”.
The “Add Data Source” dialog opens.
-
In the “Name” field, specify the data source name.
Example:
ds_Symbols
-
As the data source type, select “CODESYS Symbolic”.
The data transfer is done via symbolic monitoring. The “Initialize Data Source Wizard - Provider settings” dialog opens.
-
In “Variable information”, select the “<remote device>.<application>.symbol configuration” entry.
Example:
Device.Application.Symbol Configuration
Hint: When a symbol file is specified, no additional connection settings have to be configured. A connection is not established. You are working offline.
-
Click the “Next” button.
The “Initialize Data Source Wizard - Browse data items” dialog opens. The read symbols are displayed in the tree view on the “Variables” entry.
-
In the tree view, select the symbols to be transferred. Click “Finish”.
The data source is initially configured. The
ds_Symbols
object is added below the “Data Source Manager” node. The object is open, and on the “Variables” tab, the data source variables that were generated based on the symbol configuration are displayed in the tree view. The GVLds_Symbols
, where the data source variables are declared, is located below the “DataSource_Objects” folder.
Initially connecting devices with address monitoring
A “CODESYS Control Win V3” is running on the remote device. The project of the remote device is located on your development computer. The engineered application there does not contain a symbol configuration.
Use this communication link only if there are no resources available in the remote PLC for a symbol configuration.
-
Below your application in the device tree, insert a “Data Source Manager” object.
-
Select the “Data Source Manager” object and click “Add Object Data Source”.
The “Add Data Source” dialog opens.
-
In the “Name” field, specify the data source name.
Example:
ds_Remote_Device
-
As the data source type, select “CODESYS ApplicationV3”.
The data transfer is done by means of address monitoring. The “Initialize Data Source Wizard - Provider settings” dialog opens.
-
For “Select the project type”, select the “Other Project” option.
-
For “Choose file”, specify the file and location of the project on the remote device. Example:
C:\Data\Projects\PLC_A.project
.The remote device is displayed in the tree view of the window below, and as a result the connection was established.
-
Click the “From device” link.
The connection parameters to the remote device are read and displayed in the dialog. The connection is configured.
-
Click “Next>”.
The “Initialize Data Source Wizard - Browse data items” dialog opens. The remote control variables are displayed in the tree view on the “Variables” entry.
-
In the tree view, select which control variables should be transferred. Then click “Finish”.
The data source is configured. A connection is established. The settings are stored in the object and can be modified in the editor of the object.
The data source is initially configured. The
ds_Remote_Device
object is added below the “Data Source Manager” node. The object is open, and on the “Variables” tab, the data source variables to be generated are displayed in the tree view. The GVLds_Remote_Device
, where the data source variables are declared, is located below the “DataSource_Objects” folder.