Modbus 0 × 0001 1 × 0001 3 × 0001 4 × 0001 what is the relationship between them?

Source: Internet
Author: User

Http://zhidao.baidu.com/question/443404943.html&__bd_tkn__=79b54669722f8229560ca974a3ac37ae831c8caa8078338d51fed8133ea5c69d362ad36bb4bcda3b39bb3949f6bbe47087ac3af56e60b1f4e7eb60157c58fe369d63a0fc5d0f03de01252709d440ce083b769c030f2bcff8a23e450b015c4420c86e0e4148c0d8a89e0bf9accbdc8d03cb3620fe48aeModbus 0x0001 1x0001 3x0001 4x0001 relationships between them?
0x0001 --- numeric output function code 01/05? 1x0001 --- Digital Input Function Code 023x0001 --- read register function code 044x0001 --- write register function code 03/060 x 1x 3x 4x what is the hexadecimal or 10th hexadecimal relationship with Modbus?
0x, 1x, 3x, and 4x are actually a data zone, which is the address range stipulated by Modbus protocol, that is, the address of the coil (DO): 00000 ~ 09999 contact (DI) Address: 10000 ~ 19999 input register (AI) Address: 30000 ~ 39999 output register (AO) Address: 40000 ~ 49999 because the addresses mentioned above are unique, some materials are used to distinguish the addresses based on their first number. For example, 0x represents the do address and 1X represents the Di) class address, 3x represents the input register (AI) Class address, and 4x represents the output register (AO) Class address. Likewise, Modbus function codes for data areas of various addresses are also well defined and cannot be used in disorder. To operate the 0x address data zone, you can only use the specified function code 01/05, rather than other function codes. Therefore, the data zone and function code can be known from the prefixes of various addresses, and vice versa. These addresses are called Modbus data zone addresses, which are 5-digit decimal addresses. However, in actual programming, because of the prefix differentiation, you only need to describe the last 4 digits, and need to convert it to a 4-bit hexadecimal address. When implemented in single-chip microcomputer, four data zones need to be defined to correspond to the above addresses (the length can be shortened, depending on the single-chip microcomputer Ram size ). When processing Modbus transactions, perform operations (set, reset, read, or write data) on the corresponding data zone based on the features in the Data Partition ). For the specific process, see the Modbus transaction flowchart.

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.