Timer events
Posted: Fri Dec 11, 2015 7:30 am
Hi, I want to get more familiar with the C# scripting, so I'm doing little test:
I have an timer, and I'd like to update tag value (called Led) to tag value (called Button) every time timer ticks.
My timer is exactly like this example:
Board index » iX Developer FAQ » Scripting FAQ » How to create periodic Timers in iX Developer.
Timer works okey, and tags are changed well if I do it like this:
Now if I want to update an value inside Screen1 script every 1000ms (as timer1) what I need to do? How I call timer there, if timer is made in its own script?
I have an timer, and I'd like to update tag value (called Led) to tag value (called Button) every time timer ticks.
My timer is exactly like this example:
Board index » iX Developer FAQ » Scripting FAQ » How to create periodic Timers in iX Developer.
Timer works okey, and tags are changed well if I do it like this:
Code: Select all
private static void TimeOut1(Object myObject, EventArgs myEventArgs)
{
Globals.Tags.Tag1.Value = Globals.Tags.Tag1.Value + 1;
Globals.Tags.Led.Value = Globals.Tags.Button.Value;
}