Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

ConnectSafe() returns values other than 1 and 0.

#1
Hi there,

I'm using the python API to connect to an ABB IRB 1200. To check whether or not a connection is possible, I call the ConnectSafe() method. When there is no physical connection between the robot and my computer, the method returns a value of -1000, even though the method should return 0 according to the documentation.

Feel free to let me know if you need any additional information to reproduce this behavior or if this is working as intended.

With kind regards,

Bram
#2
Hi Bram,

The ConnectSafe function actually returns the ConnectedState() flag. We'll update the documentation so this is not confusing.

In short, if everything went well you should receive 0 (ROBOTCOM_READY), positive numbers usually mean the robot is busy, negative numbers means the connection failed.

You'll find that ConnectSafe is coded in the Robolink module. It simply uses Connect and ConnectedState to try connection multiple times. You can easily customize its behavior if you need:
https://github.com/RoboDK/RoboDK-API/blo...k.py#L4883

Albert
#3
Hi Albert,

谢谢你的解释和快速回复!




Users browsing this thread:
1 Guest(s)