How Can We Help?

Print

How do I add an ACE Modbus slave to a Siemens S7-1200 Modbus master?

6ES7241-1CH32-0XB0 SIMATIC S7-1200, COMMUNICATION MODULE CM 1241

In an S7-1200 PLC, the MODBUS RTU protocol is organised in two stages around two functions

MB_COMM_LOAD port configuration of the CM PTP module

The “MB_COMM_LOAD” function block which configures the CM PTP module port for Modbus RTU

Either the baud rate (in our case 9600), type of parity bit,… etc…

MB_MASTER Modbus master communication via the PTP port

The “MB_MASTER” function block which provides Modbus master communication via the PTP port

  • MODE : 0:read mode, 1:write mode
  • MB_ADDR : address of the slave
  • DATA_ADDR : address of the register in the Modbus slave
  • DATA-PTR : value to send to the slave

 

Example for our ACE-1630 Modbus RS232 PLC

CoSH: Enable or disable RS485 communication mode = disabled

C-SL : MODBUS RTU

C-no : Modbus slave address = 1

bPS : data transmission speed = 9600

Len : data bits = 8

Prty : parity bit = None

Stop : stop bit = 1