Standard Modbus sensor reading method based on Lua and Loop
The invention provides a standard Modbus sensor reading method based on Lua and Loop. The standard Modbus sensor reading method based on Lua and Loop comprises the following steps that 1, a front-end configuration plane submits configuration information to a back-end service; step 2, modifying the c...
Gespeichert in:
Hauptverfasser: | , , , , , |
---|---|
Format: | Patent |
Sprache: | chi ; eng |
Schlagworte: | |
Online-Zugang: | Volltext bestellen |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | The invention provides a standard Modbus sensor reading method based on Lua and Loop. The standard Modbus sensor reading method based on Lua and Loop comprises the following steps that 1, a front-end configuration plane submits configuration information to a back-end service; step 2, modifying the configuration file and restarting the universal modubs group operation; 3, acquiring original data of the sensor; 4, calling a lua script to analyze specific data; and 5, calling ubus broadcast and transmitting the ubus broadcast to the MQTT component to the Internet of Things platform. According to the method, the sensor data are analyzed through the lua script, and when a subsequent new standard modbus sensor is connected, only the configuration file needs to be modified and the analysis script of the sensor needs to be modified. And the source code does not need to be repeatedly compiled and modified.
本发明提供一种基于Lua和uloop的标准Modbus传感器读取方法,包括以下步骤:步骤1:前端配置丙面提交配置信息至后端服务;步骤2:修改配置文件并重新启动modubs通用组作;步骤3:获取传感器原始数据;步骤4:调用lua |
---|