MODBUS RTU protocol based data transmission method
A data transmission method and data technology, applied in transmission systems, electrical components, etc., can solve problems such as high hardware configuration requirements, crystal oscillator accuracy errors, and large interference, and achieve low hardware configuration requirements, improved reliability, and reduced reliability. Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment Construction
[0053] The present invention will be further described below with regard to specific embodiments.
[0054] A kind of data transmission method based on MODBUS RTU protocol of the present invention comprises the following steps:
[0055] (1), set the device address and the function code of the communication device, in the present embodiment, the device address can be any one in 0-247; The function code is 03H for reading data, 10H for preset multi-register etc., also Can have other functions.
[0056] (2), create an array for storing 485 received data in the cache or memory of the communication device, the array is represented by ring[N], where N is the maximum number of bytes of a frame of data allowed to be received; the array The size is allocated according to the size of the longest frame of data that is allowed to be received, and the data received by 485 is stored circularly in byte order; define three variables *head, *tail and *pnum in the cache or memory, where *head m...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com