-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When "data_format='f'",Invalid CRC in response #176
Comments
Can you please sniff the packets between the 2 devices and paste the raw transmission details for me to review please. Can't really help with so little info. |
Thanks for answer. The data transmitted by modbus_tk excute is : 01 03 00 64 00 01 C5 D5 And when the register address is low than MODBUS_CFG_FP_START_IX, excute data = master.execute(address, functioncode, regAddress, quantity), it works well. Here is my code:
Thank you again |
Can you please copy and paste your code. There are typo's in that and i beleive it's not correct. Firstly:
Also, you state that your execute command sends One quick thing to check though, i know you're talking about the register addresses above 100, but double check you're not trying to get more than 100 registers at one, I do know of a few slave devices that will fail when more than 100 are requested, although you should be able to poll address over 65,000. Can you also repeat your poll at 65000 but request len=2 and let me know. |
Sorry about this mistake,the actual code is correct, I didn't type it correctlly. Here is the copy of code. uCModbus support 65535 holding registers. And these registers are divided in two parts by defining MODBUS_CFG_FP_START_IX, one part is for 16 bit, and another part is for float point. When the request address is equal or bigger than MODBUS_CFG_FP_START_IX, uCModbus Slave will feedback a float point number with format of IEEE 754.
|
I have repeat my test of polling at 65000 and length =2. |
Maybe you should investigate the parse_response method of the RtuQuery class in modbus_rtu.py |
My board surport float point number transmission. When excute" data = master.execute(address, cst.READ_HOLDING_REGISTERS, regAddress, quantity, data_format='f')", "modbus_tk.exceptions.ModbusInvalidResponseError: Invalid CRC in response" is display.
Please, help.
The text was updated successfully, but these errors were encountered: