User Tools

Site Tools


custom_protocols

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
custom_protocols [2020/01/02 10:44] – [readRegister] emozolyakcustom_protocols [2020/01/02 10:56] – [readRegister] emozolyak
Line 120: Line 120:
 To make a delay, //sleep// function can be used. Its only argument is time in microseconds, e.g. sleep(20000) will make a pause for 20 ms. To make a delay, //sleep// function can be used. Its only argument is time in microseconds, e.g. sleep(20000) will make a pause for 20 ms.
  
-Для работы с битами можно использовать библиотеку bitop [4].+For bit processing refer to bitop library and this [[useful_programs#bit_functions | link]]. 
  
-Для отладки и вывода диагностических сообщений можно использовать процедуры ERROR, INFO, DEBUG и TRACE которые доступны и в обычных сценариях Lua [5].+For debugging and diagnostic messages you can use ERROR, INFO, DEBUG or TRACE from the users Lua scripts - see [[write_to_logs | this]]. 
  
-Что бы лучше понять как это все работает давайте рассмотрим пример функции readRegister для протокола ModBus TCP:+To better understand the custom protocol application, let's examine the readRegister function for the ModBus TCP protocol:
  
 <code lua> <code lua>
custom_protocols.txt · Last modified: 2023/02/21 17:52 by emozolyak

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki