TwinCAT 3 HMI button as a counter

257 Views Asked by At

I want to use a button as a counter in TwinCAT 3 HMI. For example, the work flow is like this way. I have 10 functions and I have to trigger one by one by pressing a single button to trigger the functions in TwinCAT 3. How can I do this?

1

There are 1 best solutions below

0
On

First, you need to link the button to a function (e.g. by linking it to the 'OnMouseClick' event of the button).

The linked function acts as a master function which calls the correct function depending on an internal counter value. So basically, you design that master function in a way, that it

  1. increments a counter every time it is called and
  2. calls the correct function depending on the actual counter value.