ModbusTool | modbus master and slave test tool | TCP library
kandi X-RAY | ModbusTool Summary
kandi X-RAY | ModbusTool Summary
A modbus master and slave test tool with import and export functionality, supports TCP, UDP and RTU.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ModbusTool
ModbusTool Key Features
ModbusTool Examples and Code Snippets
Community Discussions
Trending Discussions on ModbusTool
QUESTION
I am currently trying to use an Arduino UNO R3 as a master in a Modbus serial (not TCP/IP) communications protocol. I have attempted to use outdated libraries for this with no avail, mostly due to deprecated dependencies. Anyways I decided to start from scratch and my current goal is to write a value to register 301 (starting address 300) to a slave I.D. "5". Before connecting to my slave I want to make sure I can regenerate the CRC for the frame depending on whether I write a 0, 1, or 2 to the register. For writing a 1 I have the frame as "05 06 01 2D 00 01 D8 7B" and from my research I can tell that "D8 7B" is the 16-bit CRC for the data. However the problem is that I can't seem to replicate the CRC output on my Arduino. I believe it has to do with how I have prepared and formatted my byte array but I am not sure. I do not understand the CRC algorithms well which is why I am using a library, any help would be greatly appreciated.
The following code is a slight variation of the example sketch provided with vinmenn's Crc16 library.
...ANSWER
Answered 2020-May-25 at 20:05As for replicating Modbus CRC16 with byte by byte method, according to the source, you need to use the parameters:
poly=0x8005
init=0xffff
refin=true
refout=true
xorout=0x0000
check=0x4b37
which means you should initialize crc
as:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ModbusTool
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page