Hi,
I've been working with Beckhoff TwinCAT for a small time now and I already know the basics. There are however few things I can't make out so I'm asking your help.
I need a timer which time I should be able to set manually while the program is running.
I made a button to the visualizations page and by pressing that button it opens a numpad.
So I need some kind of timer which starts when a BOOL variable goes on (TRUE) and it runs the time I've set to it and then sets another BOOL variable on.
For example if I press the button on the visualizations page and enter number 500 using the numpad which opens, then when the timer starts it runs 500 milliseconds and then sets the another BOOL as TRUE.
By the way I'm using 1 millisecond in PLC task cycle time. Should I use that cycle time somehow when building the timer/counter? For example making a function and using FOR loop or something?
I've been working with Beckhoff TwinCAT for a small time now and I already know the basics. There are however few things I can't make out so I'm asking your help.
I need a timer which time I should be able to set manually while the program is running.
I made a button to the visualizations page and by pressing that button it opens a numpad.
So I need some kind of timer which starts when a BOOL variable goes on (TRUE) and it runs the time I've set to it and then sets another BOOL variable on.
For example if I press the button on the visualizations page and enter number 500 using the numpad which opens, then when the timer starts it runs 500 milliseconds and then sets the another BOOL as TRUE.
By the way I'm using 1 millisecond in PLC task cycle time. Should I use that cycle time somehow when building the timer/counter? For example making a function and using FOR loop or something?