twincattwincat-hmi

Twincat3 TE2000 HMI Howto call a cyclic script


quick question: is it possible to run a cylic function (eg every second) in the new TE2000 HMI? If so, how can I do so?


Solution

  • You can use the JavaScript method setInterval.

    setInterval(logTwinCat, 1000);
    
    function logTwinCat() {
      console.log("Hi TwinCAT!")
    }