The Serversuperio Designer IDE uses the Tutorial -3.modbus protocol to read multiple registers for multiple data type resolution. Release: v4.2.2 version

Source: Internet
Author: User

Update content, v4.2.2 version:
1. Add Modbus protocol to read multiple registers and parse data by multiple data types.
The 2.Modbus serial and Modbus TCP two drivers are combined into one driver.
3. Modify the database structure and save the configuration information.
4. Optimize the Serversuperio core code, the application process of potential problems.

v4.2.2: Official Download

Catalogue

3. Modbus protocol, read multiple registers, to achieve a variety of data type resolution ... 2

3.1 Overview ... 2

3.2 Modbus Basics ... 2

3.3 Read multiple registers, multiple data type parsing ... 4

3.4 Realization Effect Show ... 6

3.5 Future-driven planning ... 7

2.1 Overview

After the release of the standard Modbus and non-standard protocol use, testing and drive development, some users feedback in the Modbus protocol driver can be implemented to read more than one register and to resolve data by a variety of data types. One is usually busy work, the second is some of the guilty lazy. In the sensor and instrumentation industry to the Modbus protocol is more, but most of the use is relatively simple, it is likely that only one command to read the data, the return data to parse. I think the development of a simple driver for this situation is very simple, in addition to the level of the netizen is uneven, there is no positive response to the feedback of netizens. But from a product point of view, indeed should be perfected, there is a market demand, there are many companies are using Modbus protocol form to customize the protocol, the situation is more complex. Therefore, the use of travel time, for the Modbus drive to read a number of registers and data-type analysis to meet the needs of different application sites.

2.2 Modbus Basics

The communication mechanism adopted by Modbus is call answering mode or master-slave mode (master/slave). The host sends the request command, verifies the integrity of the data after receiving the command from the machine, and determines whether to send its own commands, verify the success, return the specified data information, complete a complete communication. Call answering communication mechanisms such as:

Modbus protocol relies on the network transport layer to define a simple data transmission protocol, serial communication (Modbus Serial) RTU and ASCII mode and network communication (Modbus TCP) mode in the Protocol encoding and operation of the difference. Basic protocol formats such as:

Lower machine address and function code,:

White Paper Introduction:.

2.3 Read multiple registers, multiple data type parsing

Mainly for the "number of registers" and "Analytic data Mode" Two choices to upgrade, when the device driver to increase the monitoring point, you can choose these two content. Such as:

1 Register number code 2 bytes, converted to byte number of the formula is: Read data bytes = Number of registers * *, according to the actual situation set.

Parsing data in 24 ways, mainly for the short, ushort, int, uint, float and double data types to parse, because the sensor and the computer's high and low level of the order of the difference, so for the same data type of different parsing methods. Parse data in such a way as:

2.4 Realization Effect Show

Using Modbus TCP for demonstration, connect Modbus slave,127.0.0.1:502, read 1 data points, press "short,2 Byte, order: first high after Low" parsing data, such as:

2.5 Future-driven planning

Serversuperio corresponds to the center of data interaction in the system construction, in the future to connect a variety of PLC and sensors, but also actively planning the development of a variety of plc-based drivers; Connect Web configuration and management system. All are configured to provide a one-stop project solution for SMEs, reducing costs and increasing efficiency.

Recently made in-house security controllable Redcore Browser browser Financing 250 million, in fact, the use of Google's open source core, assuming that there is "innovative" ingredients, is estimated to be only fur. Although Serversuperio is not on the tall, but also has accumulated 10 years of work experience, is a true self-security controllable. Ha ha.......

1.[serial] "C # communication (Serial and network) framework design and implementation"

2.[Open source]c# cross-platform IoT communication Framework Serversuperio (Ssio) Introduction

2. Superio (SIO) and open-source cross-platform IoT framework Serversuperio (SSIO) building a system's overall solution

3.c# Technology Roadmap for industrial IoT and Integrated system solutions (data source, data acquisition, upload and receive, ActiveMQ, Mongodb, WEBAPI, mobile app)

5.github Address: Github.com/wxzz/serversuperio

6. Help small and medium-sized enterprise cloud, promote industrial Internet platform flourish, complete solution.

Internet of Things & Integration Technology QQ Group:54256083

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.