HMI won't transmit serial data

A

Thread Starter

AJ

Hi,

I am inerfacing my PIC18F4550 micro with Schneider Electric XBTGT2330 HMI using Modbus RTU over RS232. I coded the micro as a slave device and have the Modbus RTU code working perfectly in simulation (used Modbus Tester), I get back what I expect in terms of data and addresses. So then I tried to connect it to the HMI and get the HMI talking to it, but the HMI says "Packet send incomplete. Possible cable problem. (ModbusEquipment01)". I ruled out the cable as it is the one I tested with on the computer with the Modbus simulator, and have confirmed settings on the HMI to be the same as the micro (I am using 38K4 Baud rate, no parity, 8 bits, 1 stop bit). And a weird thing happens too, when I turn off the HMI it does send something to the micro but its random characters that it sends. Does anyone know what could be causing this or how to fix this?

Thanks for any help!
 
L

Lynn August Linse

Be aware of control-signal issues. Perhaps the host expects DTR/DSR or RTS/CTS to do specific things.

Modbus also have very tight timing, which at 38K means you cannot (by default) have more than a 1msec pause between bytes. So make sure you create your message in 1 action BEFORE you start sending. I see many apps which seem to 'pause' before the CRC because I guess that's when they create it.

Have you tried to talking to a normal PC?

The garbage at the end might be the HMI disablign the serial port, which often causes the TX pin to go into an unknown state, which might look like a 'long-break'.
 
Top