Modbus/TCP Server - Data Mapping

CNS views are used to define the data which shall be provided to the clients. You can create CNS views either via the Plantmodel Editor or control functions.

After creating a CNS view you have to assign it to the appropriate Modbus server. By using different CNS views it is possible that each server provides different data to its clients.

Structure of the CNS view

The CNS view represents a Modbus data model including several RTUs with the associated data ranges. The correct view structure can be automatically created via the Modbus tab of the Plantmodel Editor. Refer to the chapter Plantmodel Editor - Modbus for a detailed description of assigning and configuring CNS views.

If you create the CNS view and its sub-elements manually the following structure is necessary:

View - RTU - memory areas 1 to 4 - data to be mapped

RTUs must be defined at the first level under the view element. The ID of the RTU elements must be used as unit address when configuring a Modbus/TCP client (e.g. see Configuration of the Modbus/TCP driver).

For each RTU element you have to define 4 sub-elements which represents the memory areas 1 (Input discrete), 2 (Coils), 3 (Input register) and 4 (Holding register). You can only access data which is stored in one of these 4 areas.

The memory ranges are numbered according to the Modbus/TCP specification. These are not the numbers of the accessing Modbus function codes.

The mapped data must be created as sub elements of the appropriate memory area. The node ID of those elements corresponds to the Modbus address of the corresponding address range (e.g. defining the peripheral addresses of the Modbus/TCP driver.