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

25 1. Lua programming Edit sub- program Step 3: add the string below to Prog001. This program is a function and compares the two values to check if they are equal. If these two values are equal, the result is 1; if not, the result is 0. function equal (val 1,val 2) _ _ if val 1 == val 2 then _ _ return 1 else return 0 end end Edit HMI screen Go to Screen 1 to create three Numeric Entry elements with the read addresses as $100, $101, _ and $200 respectively. . Execution results Step 1: download the project to the HMI. Set 250 for both $100 and $101, and the HMI displays the comparison result as 1 as shown below: Step 2:

change the value of $100 to 200, and the HMI displays the comparison result as 0 as shown below: