Set-up of a Modbus TCP Master in APM Studio

This short tutorial shows how you set-up a Modbus TCP Master connection to a Modbus TCP Slave. The tutorial uses the Modbus Simulator for RS-232 and TCP/IP.

 

Screen recording of APM Studio's interface, demonstrating the process of setting up a Modbus connection. The video shows navigation through the left-side menu, selecting the 'Data' section, and configuring settings related to Modbus communication. The interface includes various sections such as Classes, Model, Alarms, KPIs, and Processing, indicating an industrial or asset performance management software.
Click on the image to view it in full resolution.

 

 

The tutorial shows:

  1. The creation of a Data Definition;
  2. The configuration of the Modbus TCP Connection; and
  3. The configuration of IO-points, coil/discreteInput/holdingRegister and inputRegister, reading values from the Modbus Simulator.

As data flows from the Modbus Slave into APM Studio it is mapped, using specific Mapping, to an object.

 

Background information

The Modbus protocol is a widely used communication protocol in industrial automation and control systems. It was developed in 1979 by Modicon (now Schneider Electric) for use with programmable logic controllers (PLCs). It enables communication between various devices connected to the same network, such as sensors, actuators, controllers, and computers.

 

The key features of Modbus are:

  1. Master-Slave (RTU) or Client-Server (TCP) Architecture:
    – A Master (or Client) initiates requests, and a Slave (or Server) responds.
    – Multiple slave devices can be connected to a single master.
  2. Simple and Efficient:
    – Uses simple request-response messaging.
    – Lightweight and easy to implement.
  3. Supports Multiple Physical Layers:
    – Modbus RTU (Binary format over RS-485/RS-232)
    – Modbus ASCII (Readable text format over serial)
    – Modbus TCP/IP (Ethernet-based communication)
  4. Registers and Data Types:
    – Uses a structured addressing scheme with coils (binary outputs), discrete inputs, holding registers (read/write data), and input registers (read-only data).
  5. Widely Used in Industrial Applications:
    – SCADA (Supervisory Control and Data Acquisition)
    – Industrial IoT (IIoT)
    – Energy management systems
    – Building automation

 

Modbus supports the following types of IO per its specification:

  • Discrete Input | Read Only
  • Coils | Read / Write
  • Input Registers | Read Only
  • Holding Registers | Read / Write

In APM Studio these are mapped in the following ways:

The table compares Modbus data types with their mappings in APM Studio as a TCP Slave (Server) and as a TCP Master (Client). It consists of four columns: Modbus Data Type, listing Discrete Input, Coils, Input Register, and Holding Register; APM Studio IOPOINT Prefix, showing "di" for Discrete Input, "co" for Coils, "ir" for Input Register, and "hr" for Holding Register; APM Studio as TCP Slave (Server), explaining that inputs are exposed to clients but APM model mapping is ignored, while outputs update the server’s values, which are also served to TCP Masters; and APM Studio as TCP Master (Client), describing that inputs read boolean or integer values from the TCP Slave into APM, and outputs allow writing for Coils and Holding Registers but not for Discrete Inputs or Input Registers. The table is styled with an orange and white color scheme, emphasizing key distinctions between server and client mappings.

Related Articles