Need to get the value of a lot of RAPID variables every 1-2s

I have implemented a program in C#, Windows Forms, where I use a timer to get the value of the Rapid Data variables. The issue is that this timer has 700 code lines, that every interval time reads/writes from/to the controller, if I try to set the interval of the timer less than 2s, the program works extremely slow, and it end up finishing the execution. So if I increase this interval to for example 5s, it works better, but my programe needs to recieve/send data in real time, so moreless with 1-2s of delay is not that bad in comparision with the 5s.

I have tried to use the timers of the System.Threading, but its delegate request an static method to work properly, and if I try to get the values from my controller with a static method its not working due to there is a mistake.

I have been looking for a solution, but I could not solve it.

Sign In or Register to comment.