![RobotStudio event](https://new.abb.com/images/librariesprovider89/default-album/robotstudio-webinar-arc-welding.jpg)
[PC SDK] Catching controller errors
![HM](https://secure.gravatar.com/avatar/d83e11f7ed8f8eb45698546646519c7e/?default=https%3A%2F%2Fus.v-cdn.net%2F5020483%2Fuploads%2Fdefaultavatar%2FK2266OAKOLNC.jpg&rating=g&size=200)
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
- 397 UpFeed
- 18 Tutorials
- 13 RobotApps
- 299 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 319 IRC5
- 63 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 804 RAPID Programming
- 4 AppStudio
- 3 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings