Modbus not working with 2 different devices on the same bus

We have an issue with trying to get the Modbus to work.

We have a load cell amplifier set for 5ms turnaround and I have 2 SITcore modules. One is set as a master and the other as a slave.

The SITcore master polls the load cell amp and then writes to a register on the slave. This all worked fine when I was using a Simply Modbus Slave simulator with 0 turnaround delay.

With both the SITcore slave and the amp slave connected on the bus, the slave gives a timeout. The amp replies with the register data.

If we disconnect the amp, the slave now gets the update and has no timeouts. Same for amp only connected, we get the register values. Each time the amp works with the 5ms turnaround. If this is set to zero, we get a timeout when both slaves are connected.

Something seems to be messed up in the slave handling code within the Modbus source. It doesn’t seem to be correctly handling the received messages from the amp slave. It’s as if the buffer is messed up.

I don’t have access to the 2 SITcore devices as they were shipped to the client last week. It was all working fine on the test bench with the Simply Modbus slave simulator as the load cell. I had this same issue many years ago but I thought this had been fixed.

How did you fix in the past, we can apply your fix now?

I never got it to work. We changed to using 2 separate RS485 interfaces.

This is a simple test though. All you need is 2 SITcore boards with one as slave and a real Modbus device and see if you can poll the real device and write or poll the SITcore slave.

I can send you the code. You’ll need an 800x480 display and an RS485 interface.

Just send us simple code. Super, super simple please :)).

I’ll do something tomorrow for you.

Is the transmit enable getting held ON at one of the devices?

I have no control over this. For the 2 SITcore modules, this is controlled by the UART driver.

We got your example. We will take a look as soon as possible.

Thank you