Hello, I have implemented Modbus protocol as a client for multiple read (function code 0x04) and multiple write (Function code 0x10). I have used keil and IC P89C61X2 I have tested with Modbus simulator software and it works perfectly. When I tried to interface with AB PLC, I observed that PLC is not able to get data from micro controller. PLC read response timeout was 1sec. I have observed signals (Tx,Rx) on CRO, when PLC send command for read, micro controller receives command and send information within 200msec. On PLC side timeout error comes. When PLC send multiple write command to micro controller, it gets data properly and send ACK but PLC is not able to detect ACK. This micro controller works fine with MODBUS simulator software. Please help..
I have not received any help from this forum but now I found the fault and this problem is solved. The problem was with the parity bit sent by microcontroller, I have removed the bug with parity bit setting logic and it started working!!!!
"I have tested with Modbus simulator software and it works perfectly." So, it looks like the simulator is faulty, then? I hope you have advised the supplier...
Yes, the simulator is faulty as it is not checking for parity bit in data reception. I have informed simulator supplier about this.