Page 1 of 1

Timer events

Posted: Fri Dec 11, 2015 7:30 am
by monk duck1
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:

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;
		}      
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?

Re: Timer events

Posted: Tue Jan 21, 2020 3:23 pm
by Jae V
Hello,
We understand that this is a very old post. But for your example, you should be able to move the timer script to the screen script. Another option can be to trigger a tag every rising and falling edge of the timer, and to do a action on the value change on the screen. Alternatives would be to use the SystemSecondTag and attach you value change to it so you don't need to make a timer. If there is anyone who require assistance with something similar, please visit us at https://www.beijerelectronics.us/en-US/ ... ___support or give us call at 801.708.6690. Thank you.