custom_protocols
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
custom_protocols [2022/08/12 10:19] – [readRegister] emozolyak | custom_protocols [2022/10/18 13:58] – atolstov | ||
---|---|---|---|
Line 2: | Line 2: | ||
====== Custom protocols ====== | ====== Custom protocols ====== | ||
- | There are a lot of different automation devices with non-standard communication protocols. To solve the problem of data collection from such devices in WebHMI, it is possible | + | There are a lot of different automation devices with non-standard communication protocols. To solve the problem of data collection from such devices in WebHMI, it is possireble |
===== About Lua ===== | ===== About Lua ===== | ||
Line 90: | Line 90: | ||
The function readRegister should read the specified register. | The function readRegister should read the specified register. | ||
- | In case of successful reading, the function readRegister should return an array of bytes, with length corresponding to the specified data type (1, 2 or 4) or the number. In case of failure, you must return false. | + | In case of successful reading, the function readRegister should return an //(lua table)// **array of bytes, with length corresponding to the specified data type** (1, 2 or 4) or the number. In case of failure, you must return |
Three parameters are passed to it as arguments: | Three parameters are passed to it as arguments: |
custom_protocols.txt · Last modified: 2023/02/21 17:52 by emozolyak