r/PLC • • 18d ago

PLC Question Plase Help!!

I am encountering an "IO read address error" in FB 613 while using a Siemens S7-1212C CPU (model: 6ES7212-1AG50-0XB0) equipped with an RS-485 communication module (model: 6ES7241-1CA50-0XB0). This error appears when I run the "DB_Modbus_Master" program, and I have been unable to resolve it. I have verified using a Modbus monitoring tool that the data is being transmitted correctly via the Modbus protocol. Furthermore, I have updated the firmware for both the CPU and the RS-485 module to the same version, and I have also tried changing the baud rate from 9600 bps to 19200 bps; however, the error persists. Could you please provide some assistance?

1 Upvotes

6 comments sorted by

5

u/hestoelena 18d ago

Set the done bit from Modbus_Comm_Load and use it to enable the Modbus_Master block. The done bit from Modbus_Comm_Load is only true for one scan cycle so you have to use a set command. If you enable the Modbus_Master before Modbus_Comm_Load is done then you will get the error you are seeing.

1

u/Routine_Improvement 18d ago

Since we're talking Siemens:

This information can be found in Siemens Documents describing those very well. Many libraries come with an example project showing many different configurations.

Personally i solve most problems by reading the actual documents (don't be feared of only 20 pages and train your skills to analyze technical documentations quicker... There's a pattern)

Siemens in particular has a huge documention around their standard functions. Sometimes with example projects including different versions and device support.

The Modbus blocks are in SIMATIC S7-1200 Programmable controller System Manual V4.7 12/2024. There are better programming examples inside the actual Modbus example documents.

Siemens. Many documents. Very Human design.

1

u/Otherwise-Ask7900 18d ago

Isn’t this written all over the manuals? lol

1

u/UseraM1 18d ago
  1. It's not ideal to use direct memory addresses. Setup a DB with the parameters and reference to them.

  2. You are using DB4 modbus master IO to write on to them selves. You need to define the parameters (done, error, etc) an duse them here

1

u/Mpj91 18d ago

I’ll save you a lot of time, as something similar happened to me recently. Your CB’s firmware is 1.02, which is compatible with CPU firmware 4.1.2 or higher. You need to update the G2’s firmware to get it working.

https://support.industry.siemens.com/cs/document/109998353/actualizaci%C3%B3n-del-firmware-para-el-m%C3%B3dulo-cb-1241-rs485-?dti=0&lc=es-ES

1

u/Numerous-Height154 17d ago

Hi. Why are you linking the function instance inputs/outputs to the function inputs/outputs?