Hi all,
I’ve developed an application in C# that monitors different signals and variables coming from the robot. I’m wondering what the proper way to handle an accidental disconnect is.
Currently I’m doing something like this (pseudocode):
Thread {
(if controller.connected == false) {
Thread { // Create Thread to re-establish connection
controller.logoff(); // Just in case, logoff so we can log back on
controller.dispose();
NetworkScanner scan = new NetworkScanner() ;
scan.Scan();
…
…
ControllerInfoCollection cic = scan.Controllers
// Some logic to determine which controller I want
controller = ControllerFactory.CreateFrom(c);
// Some error checking to make sure I’m connected
Thread { // Thread that establishes a connection to a signal and starts monitoring said signal
sig = manager.controller.IOSystem.GetSignal(signal_source_str); // Where signal_source_str is a known good signal
This is not a threading issue. In order to test (as well as make sure it handles extreme cases) I am warm starting the controller in RobotStudio. So I connect, go to RS and then warm start, and then I get
An unhandled exception of type ‘ABB.Robotics.GenericControllerException’ occurred in ABB.Robotics.Adapters.IRC5.dll
The controller start-up process also freezes and doesn’t continue until I stop debugging my application. So my question is this, how do I ask the controller:
"Hey is it okay if I get a signal now, or should I wait a bit longer?