[PC SDK] Catching controller errors
HM
✭
Hi,
I'm trying to catch the errors from the controller in my external application using the PC SDK. For this, I subscribe my program to controller.EventLog.MessageWritten:
controller.EventLog.MessageWritten += new EventHandler<ABB.Robotics.Controllers.EventLogDomain.MessageWrittenEventArgs>(EventLog_MessageWritten);
In the handler, I try to filter the messages attending to its EventLogEntryType (type Error). I'm hitting with two issues trying this.
1) Not all events are caught in the handler: while Information and Warning are, the controller in my program is throwing a 50080 error (position not compatible) at some point and the handler is not launched.
2) Event log messages are empty (= null) when handler is launched. My code looks as follow:
void EventLog_MessageWritten(object sender, ABB.Robotics.Controllers.EventLogDomain.MessageWrittenEventArgs e)
{
EventLogMessage msg = e.Message;
if (msg.Type == ABB.Robotics.Controllers.EventLogDomain.EventLogEntry.Error)
{
OnEventLogMessage(EventArgs.Empty); // Notifies error
}
}
This code crashes when you try to acces msg.Type. Checking values received you can see that e.Message is null for any message received.
The thing is that I have this code working in another application developed with RS/PCSDK 5.15, and I'm pretty sure it worked. This one is under 5.61.
Any ideas/suggestions to solve this?
Thanks in advance,
HM
0
Comments
-
Hello HM,
Please use PC SDK 5.61.01 version .
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