|
发表于 2024-10-17 11:08:31
|
显示全部楼层
1. Hello, as you said, after creating a variable in VisualStudio, it can be directly bound to the control, or you can use the logical processing in the protocol and variable to automatically handle the relationship between the variable and the control. To do so, you can refer to the Configuring Controls tutorial in the online documentation at https://doc.gz-dc.com/Modbus/Ctrls/01_Mb_basic.html
2. If you need to operate on the created variables in lua, you need to understand the API interface functions of lua, and use get_variant (name) to get the numeric value of the protocol variable. name: variable name. Use set_variant (name, value) to set the value of the protocol variable. Alternatively, you can use the encapsulated MB function to read and write the modbus registers directly. The website address is: https://doc.gz-dc.com/LUA/000_lu ... E%E8%AE%BF%E9%97%AE
Attached is a screenshot of the function: |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|