BL2600 and serial Modbus

I am trying to connect a BL2600 with a PLC using modbus over a serial line, but are having troubles.

In order to find the problem, I first connected the PLC to my pc and send some modbus commands. The protocol seems to work correctly here.

But when I connect the rabbit to my pc, using the serial port I get invalid modbus responses back. The rabbit acts as a slave, so i am using the modbus_slave example that is delivered with the modbus library FROM Dynamic C.

When I send a modbus command to the rabbit, it sends back the exact same command, plus some extra bytes.
e.g.


PC >>> 01 01 00 00 00 50 3C 36
RESPONSE < 01 01 00 00 00 50 3C 36 7F 3F BF 74 FE

and


PC >>> 01 04 00 00 00 64 F1 E1
RESPONSE < 01 04 00 00 00 64 F1 E1 FF CF 7B 1F

when I use debug mode, I see that the rabbit seems to recieve the request correctly, but I don’t understand the response :confused:

debug mode:


Ser Rx: 01 04 00 00 00 64 F1 E1
Ser Rx: Addr=1 function= 4 Reg= 0 P1 = 100
Calc CRC= E1F1 Rcvd CRC= E1F1
Ser Tx: 01 84 02 C2 C1

Can anybody help me with this problem?