Business

LoRa Distributed IO Series and Data Transmission Radio Connection Tutorial

Ⅰ. Case Introduction

This case mainly explains the use cases of connecting the LoRa distributed IO series and the data transmission radio. This article takes the LoRa distributed IO series M31-AXAX8080G-L as an example, and the data transmission radio takes E95-DTU (400SL30-4850) as an example.

Ⅱ. Hardware preparation

M31-AXAX8080G-L, a LoRa distributed IO host;

E95-DTU (400SL30-4850), a digital radio;

1 RS485 temperature and humidity sensor;

1 USB to RS485 module;

3 12V power supplies;

Several communication cables;

1 computer;

Ⅲ. Software preparation

Ebyte LoRa distributed IO host computer can be downloaded from the corresponding location on the Ebyte official website

https://www.cdebyte.com/;

[Configuration software] E9x-DTU (xxxSLxx), can be downloaded from the corresponding location of Ebyte official website.

https://www.cdebyte.com;

Ⅳ. Data transmission radio control acquisition test

(I) Parameter configuration

1. The LoRa distributed IO parameter configuration is as follows: module address, network address, network channel, packet length, and airspeed must all be consistent with the data transmission radio;

2. The parameters of the data transmission radio are configured as follows: module address, network ID, channel, packet length, and airspeed must all be consistent with those of the data transmission radio;

(Ⅱ) Control acquisition test

1. From the LoRa distributed IO manual, we can know the register addresses of DI and DO

The DI register is as follows:

NameAccess locationRegister addressRegister areaRelated function codeDefault state
DI1Host0x0000Zone 1R:0x020
DI2Host0x0001Zone 1R: 0x020
DI3Host0x0002Zone 1R: 0x020
DI4Host0x0003Zone 1R: 0x020

…….

The DO registers are as follows:

NameAccess locationRegister addressRegister areaRelated function codeDefault state
DI1Host0x0000Zone 0R:0x01W: 0x05,0x0F0
DI2Host0x0001Zone 0R:0x01W: 0x05,0x0F0
DI3Host0x0002Zone 0R:0x01W: 0x05,0x0F0
DI4Host0x0003Zone 0R:0x01W: 0x05,0x0F0

…….

Use the serial port debugging assistant to open the serial port, then select the corresponding baud rate parameters to connect to the wireless data transmission station, and finally send the corresponding Modbus RTU command. The Modbus RTU command for collecting the status of 8-channel DI is as follows:

The Modbus RTU instructions for controlling 8 DOs are as follows:

The Modbus RTU instructions for controlling 8-way DO switches are as follows:

Note:

1. The Modbus address of LoRa distributed IO is 1 (default) here, which can be set to other Modbus addresses; different addresses will also cause different instructions, which is very important!

2..The above instructions are all standard Modbus instructions. You can refer to the relevant tutorials to generate Modbus instructions. I will not explain them here.

Ⅴ. Demonstration of LoRa distributed IO transparent transmission function

(I) Transparent transmission function

Introduction to LoRa distributed IO transparent transmission function: Modbus commands not from this device will be forwarded through the RS485 interface.

Note: The Modbus address of LoRa distributed IO cannot be the same as that of other RS485 devices.

(Ⅱ) Notes on parameter configuration

1. Enable the Modbus data transparent transmission of LoRa distributed IO, as shown in the figure (the communication parameters with the data transmission radio will not be explained)

2. Set the Modbus of LoRa distributed IO to 1 (needs to be consistent with the Modbus address of other RS485 devices on the RS485 bus)

3. Set the Modbus address of the RS485 temperature and https://spiritmeans.com/ sensor to 2 (needs to be inconsistent with the Modbus address of the LoRa distributed IO)

  1. From the RS485 temperature and humidity sensor manual, we can know the register addresses of temperature and humidity, as shown in the figure below:
Register address(hexadecimal)Register address(decimal)Register areaFunction codeFunction description
0x00003-0001Zone 3R: 0x04Temperature value unit: ℃ (1) Positive temperature: register value is 260, actual temperature value: 260×0.1=26C(2)Negative temperature: uploaded in two’s complement format, actual temperature value: 0xFF9B (hexadecimal) = -101→-10.1℃
0x00013-0002Zone 3R: 0x04Humidityvalue: Unit: %RH Calculation method: Fixed 1 decimal pointExample: Register value is 300, actual humidity value: 300×0.1=30(%RH)

5. Use the serial port debugging assistant to open the serial port, then select the corresponding baud rate parameters to connect to the wireless data transmission station, and finally send the corresponding Modbus RTU command

To roll up 1 channel of temperature and 1 channel of humidity, the Modbus RTU command is as follows:

From the dictation reply, we can see that the current temperature is 26°C and the current humidity is 34.1%RH.

Leave a Reply

Your email address will not be published. Required fields are marked *