Modbus RTU com problem

RobinH

Member
Join Date
Jun 2012
Location
Trondheim
Posts
54
Hi,

I have a problem with modbus rtu communication between a wartsila unic and saia plc.

Tested communication on saia plc (master) using mod_rssim (slave) through rs-232 port on PLC to PC. This is working correctly.

Tested communication on wartsila unic (slave) using modbus master simulator through RS-485 (converter to PC). This is working correctly.

When connecting them together through a rs-485 to rs-232 converter there is no communication.

I can't seem to find a solution for this. Have tested two different converters without any luck.

Does anyone have a tips for this? What am i missing?

Best regards
 
I’d test the converter by communicating from the Modbus master simulator to the Modbus slave simulator through the converter.
Have you tried reversing the RS-485 connection?
 
On the RS-232 side, you have to make sure that Tx goes to Rx and Rx goes to Tx.

If the RS-232 connection is a DB9 you need to analyze its pin-outs. Get the documentation for the PLC and the 232/485 converter and make sure Tx is not connected to Tx or a no-connection pin.

If the converter is port powered, either figure out how to DC power it or buy another converter that is DC powered. Port powered converters are junk.

Does the 485 side have a 3rd wire signal ground ? Is it connected?

If the PLCs are not local to one another, there could be a common mode grounding issue on the 485 side requiring a 485 isolator.
 
Dear All,

Thank you for all suggestions.

I have tested behind converter on both sides with simulators. This is working correctly.

RS232 cables working correctly.
Endline resistor working correctly.

Will check regarding 3rd wire signal ground.

We do get an EXCEPTION RESPONSE 07 on the wartsila module.


07 - Negative Acknowledge

The slave cannot perform the program function received in the query. This code is returned for an unsuccessful programming request using function code 13 or 14 decimal. The master should request diagnostic or error information from the slave.

But why? It is working perfectly fine using simulators...
 
Last edited:
Here's a list of Modbus Function Codes in hex and decimal.

function_code_list.jpg


There is no 13 or 14 decimal FC.
 
1) Are you sure you interpreted the exception message properly?

An exception message has a 8x word indicating the failed Function code and a data word indicating the problem.

The Function Code for an exception reply message for Function code 03 is 83.
The Function Code for an exception reply message for Function Code 04 is 84.

The data word is used to help identify the problem.

An example of a request and exception reply is shown below, which omits/leaves out the Slave node ID word at the beginning and the CRC at the end.

Example_of_Request_and_Exception_Reply_minus_nod.jpg


The Modbus Spec only lists data words from 01 hex up to
0B hex which is 11 decimal. So there are no standardized data codes 13 or 14 decimal.

2) Function code 07 is the Read Exception Code Function code. Its response is a bit packed byte, however the evaluation of the error is device specific. The data word in an FC 07 reply could have a 13 or 14 decimal, but what it means is specific to the slave device.

Exception_codes_explanation_from_Std.jpg


Where exactly is the 13 or 14 decimal word coming from?
 

Similar Topics

I'm trying to control a device via MODBUS RTU and the ModbusRtuMasterV2_PcCOM in Twincat 3. I've configured a device with the right com port and...
Replies
7
Views
188
Dear All, i am trying to connect Danfoss inverter with s7 200 cpu 226.but microwin shows following error at DATA Ptr.i assigned different VB...
Replies
1
Views
45
Hi all, Currently having trouble getting a speed reference to write over modbus to an Omron M1... I can successfully write a run command and...
Replies
6
Views
230
Hi, I'm having an issue with a mircologix not transmitting out. The current setup is a mircologix 1400 connected to a Guardian 100 Radio...
Replies
1
Views
108
If a device has Modbus RTU over serial and Modbus RTO over TCP and Modbus TCP then there is a difference between Modbus RTU over TCP vs Modbus TCP...
Replies
7
Views
472
Back
Top Bottom