PCSDK 5.61 issue when setting signal value in event handler
DanS
✭✭
I've noticed that my program will hang on the signal.Value get when it is called within an event handler. Something like this:
static void signal_Changed(object sender, SignalChangedEventArgs e)
{
if (e.NewSignalState.Value == 1)
{
//This will hang
(sender as Signal).Value = 0;
}
}
Has anyone else encountered this? Are there workarounds? I seem to recall something about thread apartment being important years ago, but I've forgotten and unsure if this even applies to eventhandlers.
Appreciate any help,
Dan
0
Comments
-
I guess I should add that the above code seemed to work in PC SDK 5.15, but is now broken in 5.61. If I spin off an MTAThread from the event handler it seems to work. Is there a way to have an application run all event in an MTAThread?0
-
Did you ever find a solution to this problem? I have been having a similar issue.
Do you remember the type of error/exception was being thrown? I am seeing an error stating the controller has 'no authenticated user'.
0
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
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings