Delta DOP-100 — Руководство по эксплуатации DOP Delta HMI — Lua-программирование

Компания "СТОИК" Авторизованный дистрибьютор в России Тел.: (495) 661-2441, 661-2461 email: sales@deltronics.ru www.deltronics.ru 1. Lua program execution function Lua is a programming language similar to Python and JavaScript. Its syntax is easier and more user-friendly than the macros provided by the HMI. You can use simple instructions to complete complicated computing and develop variable functions, as well as programming the functions on your own, which makes the programming more flexible and easier to meet the application requirements.

The Lua program runs repeatedly during the HMI operation, which is similar to the HMI Clock macro and can run with other HMI macros at the same time without affecting the execution efficiency of each. The Lua program editing interface and the IDE (Integrated Development Environment) are similar. In addition to the program editing function, it has a debug function that allows you to run the program on the HMI or simulate online (with a simulator) to check if the Lua program is suitable for the circumstance. The debug function can set the breakpoint, run the code line by line, as well as monitor the variables for quick modification of the program.

1 HMI boots up or exits system screen and enters HMI screen Execute Clock macro Execute Lua Repeat Clock macro execution completed Lua execution completed Repeat Execute screen cycle macro based on the delay time of cycle macro No delay and execution continues (100 ms) HMI power off HMI power off Rep eat Clock macro exe cution completed Lua executio n completed Rep eat