Need to get the value of a lot of RAPID variables every 1-2s
victor14
✭
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.
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.
Tagged:
0
Comments
-
You should really consider doing such datatransfers with a backgroundworker or a backgroundthread.
Not the UIthread. And if there is any changes to present to the ui invoke the UI and publish the changes.
You could also use the subscription events in the robotcontroller to only be notified when robotdata has changed, and not poll the robot every 2ms.Systemintegrator - Web / C# / Rapid / Robotstudio
If I helped, please press Vote Up
☑️2024 - RobotStudio® User Group1
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 60 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 797 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings