rockyinc

ModBus RTU error code 263 (CRC)

8 posts in this topic

Hello

Can anyone please help.

I'm trying to communicate with an Beckhoff PLC via Versamax (IC200CPUE05).

Versamax is configured as Master and Beckhoff as slave (BC9050cpu with KL6041 com module)

After some try and error i came to the final error. The status is 263 (in hexa 107). in versamax manual it says "Complete_Frame_Invalid_CRC".

also in beckhoff error ID is show problem with CRC.

 

Can anyone please tell me the reason and what is at fault?

Share this post


Link to post
Share on other sites

Based on the error code you received, double check that the number of data bits and stop bits is set the same on both the VersaMax and Beckhoff. Also the parity setting. 

Share this post


Link to post
Share on other sites

I Have looked but can't find anything wrong. In attachement are print screens.

Beckhoff2.PNG

Beckhoff1.PNG

Versamax.PNG

Share this post


Link to post
Share on other sites

The port setup looks OK. What command were you sending to the Beckhoff? The error code suggests that the checksum returned by the RTU slave is incorrect. If the Beckhoff shows a similar error when it receives the command from the VersaMax, it sounds like a difference in the way the checksum is calculated. Are you sure the Beckhoff is using Modbus RTU and not Modbus ASCII? Have you tried using Modbus master software running on your PC to test the Beckhoff's response?

Edit: Or could the Beckhoff be interpreting the bytes in the opposite order of the way the VersaMax does?

Edited by Steve Bailey

Share this post


Link to post
Share on other sites

in 2. row is 1. slave ID and then on like in maunal.

i use read registors (function 3),  and 8 - "registers"

Here is also from slave

Versamax.PNG

Beckhoff.PNG

Share this post


Link to post
Share on other sites

i have also tried with another slave (Beckhoff BX900 with its internal com port) and it worked normal. so i can asume that there is something wrong configured in KL6041 module?

I haven't tried any modbus master softwares. You ware thinking about MBPoll? i dont have any rs485 card or com port on my PC to directly connect to it.
 

Beckhoff.PNG

Share this post


Link to post
Share on other sites
Quote

i have also tried with another slave (Beckhoff BX900 with its internal com port) and it worked normal. so i can asume that there is something wrong configured in KL6041 module?

I have to concur with your conclusion. Unfortunately I know nothing about configuring a Beckhoff PLC so I can't offer any suggestions.

The checksum calculation is a check on the integrity of the data transmitted between the two devices. The sending device includes a two-byte checksum in the message it sends. The receiving device performs the same calculation on the message it receives, compares the checksum it calculates against the checksum it receives, and returns a fault response if they don't match. That was the basis of my questions about Modbus RTU vs Modbus ASCII and byte swapping. The checksum calculation for a Modbus RTU transaction is different than the checksum calculation for Modbus ASCII. The checksum calculation will be different if one device takes the low byte of each message word before the high byte and the other device takes the high byte before the low byte.

Share this post


Link to post
Share on other sites

> i dont have any rs485 card or com port on my PC to directly connect to it.

It pays to have both a USB/RS-232 and a USB/RS485 converters for a PC when you have to deal with industrial serial communications.

Those with an FTDI chipset have served me well.  They are not very expensive.    I prefer flying leads (individual wire conductors) on the RS-485 converter because the connection is almost always screw terminals.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now