With LOGO! 8, how do you acquire the measurement data of a SENTRON PAC3200 via Modbus TCP/IP?
LOGO! 8 supports both Modbus server functions and Modbus client functions. Taking the example of a client connection to a SENTRON PAC3200 we will demonstrate the generation of a Modbus connection in LOGO! Soft Comfort V8.1. The measured values for voltage, current, power and frequency are read from the holding register (HR) of the SENTRON PAC3200 and transferred to the variable memory (VM) of the LOGO! 8.
Refer to the SENTRON PAC3200 manual under function codes 0x03 and 0x04 to find out the area in which
the measured values are located.
For successful communication you must have at least SENTRON PAC3200 firmware version V2.4.2.
- In LOGO! Soft Comfort V8.1 for your diagram you set "LOGO! 8.FS4" as hardware type and the IP address of your LOGO! basic module.
- In the menu bar, under "Tools > Ethernet connections…" you open the settings of the Ethernet connection.
- To add a new Modbus client connection you right-click "Ethernet Connections" and select "Add client connection > Modbus Connection".
- Double-click the new Modbus client connection.
- Enter the IP address of the server (here SENTRON PAC3200). Port number 502 for the Modbus communication is already set automatically.
- In the "Data transfer" table you define the properties of the Modbus connection:
- Start Address (Local): VM address in the LOGO!
- Direction: Client <- Server (Read) or Client -> Server (Write)
- Start Address (Remote): Start address of the measured variable in the SENTRON PAC3200 (address-offset + 1)
- Length: Size of the transferred data
- Confirm each of the changes with "OK".
The values read via Modbus (floating-point numbers) are converted by the floating-point number/integer in the LOGO! diagram and displayed via a message text.
The following figure shows the measured values in a message text of the LOGO! TDE.
In the case of devices that support both S7 and Modbus communication it is recommended to establish the connection to the LOGO! network via an S7 connection.
LOGO! 8 sample program (14.2 KB)