Data Source Manager

In order to have read/write access to remote devices and their running applications, you can add a data source manager to your application with one or more data sources.

The functionality of the data source manager allows for establishing connections and communication to remote devices, and it makes its data available through data source variables. At this time, the partners communicate by means of a point-to-point connection. Depending on the network where the controllers are located, a connection is established via different data source types and different connection types.

During the development phase, you can create a variable list offline by means of local symbol configuration files. In this way, you can develop a local application offline based on the symbol information without a connection to a data source.

See also

Data source type

The communication between remote and local devices communicate by means of data source types. CODESYS provides the following two types.

CODESYS Symbolic:

Data is accessed by means of symbolic monitoring. A symbol file on the remote device is read and the stored variable information is used for the data source variables and the data transfer. The advantage is that the application does not have to be updated in the local device when someone edits modifies the remote application without updating its symbol configuration. If the symbol file is also located on your development system (either a file or a symbol configuration object as part of your project), then the local symbol file can also be read. Then, you can work offline during the development phase.

Note

You will usually use CODESYS Symbolic. Do not use CODESYS Symbolic only if no resources are available for a symbol configuration in the remote PLC.

CODESYS ApplicationV3:

Data is accessed by means of address monitoring. This requires that the address information between the remote PLC and the local device match. Disadvantage: For changes to the remote application, the local application (for example the HMI application) is updated. The advantage is that a symbol configuration is not required in the remote application.

Note

Use this communication for embedded or mini PLCs when there are no available resources for the symbol configuration.

See also

Connection types

The functionality of the data source manager allows for establishing a point-to-point connection from a local device to one or more remote devices (even through networks). Select the appropriate connection type.

When the communication is based on the data source type CODESYS Symbolic, the following connection types are possible:

  • CODESYS V2:

    The devices are located in the same network. The V2 runtime system on the remote PLC provides a communication interface.

  • CODESYS V2 (via gateway)

    The devices are not located in the same network. They are connected via a V2 gateway.

    Note: For this connection, a CoDeSys V2.3 Gateway Server (V2 gateway) must be installed on the development computer where CODESYS V3 is running.

  • CODESYS V3

    The devices are located in the same network. The V3 runtime system on the remote PLC provides a communication interface.

  • CODESYS V3 (via gateway)

    The devices are not located in the same network. They are connected via a V3 gateway.

When the communication is based on the data source type CODESYS Application V3, the runtime system of the local application needs valid communication parameters in order to establish the connection. The network scan function can support you when configuring the data source.

See also

Data transmission

When the local application is in runtime mode, the data source variables that appear in the data source editor of the Variables tab are updated in configurable time intervals. The remote application is also executed at this time. Variables that are configured in the visualization, in the trend, as alarms, or for recipes are transferred and stored automatically. When a variable is accessed in IEC code only, the variable is not updated automatically. In this case, you must activate the Update always option in the data source editor of the Variables tab.

The communication types support the (read or write) data access to variables of the source PLC for the following data types:

  • Scalar value at highest level

    Example: PLC_PRG.hugo

  • Property to a program or GVL by means of a call when it is marked with {attribute monitoring := ‚call‘}.

    Example: PLC_PRG.PropertyCall

  • Variable that is mapped to bit addresses.

    Example in PLC_PRG: x AT %MX0.5 : BOOL;

  • Variable (type BIT) in a function block

    Example: Declaration in DUT: x, y : BIT, access: PLC_PRG.dutInst.y

  • Structured obtainable variable

    Example: PLC_PRG.outerInst.innerInst.dwVar

  • Property to POU instance when it is marked with {attribute monitoring := ‚call‘}.

    Example: PLC_PRG.instance.PropertyCall

  • Property at highest level and to an instance when it is marked with {attribute monitoring := ‚variable‘}.

    Note: This cannot be written by monitoring or by the data sources.

  • Array access with literal index

    Example: PLC_PRG.arrOfInts[3], PLC_PRG.inst.arrOfBool[1]

  • Nested access (for example, array of structures or structure of arrays)

Caution

Bit access used in visualizations that are transferred via a data source connection function only if they contain literal offset specifications. A visualization cannot process an offset specification by defined constants.

See also