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

Problems connecting to robot

#1
Hello,

I am trying to connect RoboDK to a Fanuc LR Mate 200iD for online programming.
I am currently using the following python script:

Code:
rdk = Robolink()  # connect to the RoboDK station that I have opened
robot = rdk.Item('Fanuc LR Mate 200iD/7L')

# Update the robot ip and port, but leave the other params unchanged
connection_params = robot.ConnectionParams()
robot.setConnectionParams('192.168.1.100', 2000, *connection_params[2:])

robot.Connect()
time.sleep(1)


status, msg = robot.ConnectedState()  # This returns status -1000
robot.Joints()  # this returns [0] which is not the right size

robot.Joints()  # This now suddenly works and does return the correct joints
status, msg = robot.ConnectedState()  # Now, all of a sudden the status is 0

# ----
# After this, I can move the arm, but I am unable to move the gripper
# ----

# The line below triggers "INTP-323 (RDK_S3, 747) Value Overflow" on the controller
# This error is triggered +- 70% of the times I run this script, the other times, the gripper moves as expected
robot.RunInstruction('GRIPPER_OPEN', INSTRUCTION_CALL_PROGRAM)


The errors I encounter are described in the code above. They are:
- Connecting to the robot seems finicky and unstable, returning error codes, but then working after a couple of commands.
- Controlling the gripper causes overflow errors sometimes. I am unable to see the content of the rdk_s3.pc file, so it is very hard to know what goes wrong here.

Could you give some pointers / best practices as to how I could improve the code above?

Kind regards,
Bjarne
#2
Can you send us a print screen of the connection log when the connection fails?
What driver are you using? I recommend you to use the FanucSM driver for Fanuc robots because it is the latest version we added that supports most features.

Regarding the connection, did you try with ConnectSafe? You can find more information here:
https://robodk.com/doc/en/PythonAPI/robo...onnectSafe

Are you using the latest version of RoboDK? We recently improved drivers when recovering from a failed connection.
#3
Can you send us a print screen of the connection log when the connection fails? 

When I run these lines of python code:


Code:
rdk = Robolink()  # connect to the RoboDK station that I have opened
robot = rdk.Item('Fanuc LR Mate 200iD/7L')

# Update the robot ip and port, but leave the other params unchanged
connection_params = robot.ConnectionParams()
robot.setConnectionParams('192.168.1.100', 2000, *connection_params[2:])

robot.Connect()
time.sleep(1)

status, msg = robot.ConnectedState() 
print(status)  # Prints -1000

I get the following connection log:
Code:
Disconnected
Stopped
Starting robot driver: /home/remi/RoboDK/bin/FanucSM
Starting...
RoboDK driver for Fanuc Socket Messaging v5.2.1
Disconnected
Sending command...
Loading settings: /home/remi/.config/RoboDK-Drivers/FanucSM.ini
AXIS_MAPPING_00 :0
AXIS_MAPPING_01 :1
AXIS_MAPPING_02 :2
AXIS_MAPPING_03 :3
AXIS_MAPPING_04 :4
AXIS_MAPPING_05 :5
AXIS_MAPPING_06 :6
AXIS_MAPPING_07 :7
AXIS_MAPPING_08 :8
AXIS_MAPPING_09 :9
AXIS_MAPPING_10 :10
AXIS_MAPPING_11 :11
AXIS_MAPPING_12 :12
AXIS_MAPPING_13 :13
AXIS_MAPPING_14 :14
AXIS_MAPPING_15 :15
AXIS_MAPPING_16 :16
AXIS_MAPPING_17 :17
AXIS_MAPPING_18 :18
AXIS_MAPPING_19 :19


What driver are you using? I recommend you to use the FanucSM driver for Fanuc robots because it is the latest version we added that supports most features.

Under the 'More options' tab in the 'Connection panel' I find 'Driver: FanucSM'.
For the driver that was uploaded to the robot controller, we followed these steps: https://robodk.com/doc/en/Robots-Fanuc-R...Fanuc.html and we run the RDK_S3.pc file.

Regarding the connection, did you try with ConnectSafe?

When using the safe connection method, we obtain the following logs:

Code:
Disconnected
Stopped
Starting robot driver: /home/remi/RoboDK/bin/FanucSM
Starting...
RoboDK driver for Fanuc Socket Messaging v5.2.1
Disconnected
Sending command...
Loading settings: /home/remi/.config/RoboDK-Drivers/FanucSM.ini
AXIS_MAPPING_00 :0
AXIS_MAPPING_01 :1
AXIS_MAPPING_02 :2
AXIS_MAPPING_03 :3
AXIS_MAPPING_04 :4
AXIS_MAPPING_05 :5
AXIS_MAPPING_06 :6
AXIS_MAPPING_07 :7
AXIS_MAPPING_08 :8
AXIS_MAPPING_09 :9
AXIS_MAPPING_10 :10
AXIS_MAPPING_11 :11
AXIS_MAPPING_12 :12
AXIS_MAPPING_13 :13
AXIS_MAPPING_14 :14
AXIS_MAPPING_15 :15
AXIS_MAPPING_16 :16
AXIS_MAPPING_17 :17
AXIS_MAPPING_18 :18
AXIS_MAPPING_19 :19
Sending command...
Disconnected
Sending command...
Trying connection 192.168.1.100:2000...
Unexpected error: 0
Using V2 Real
Version -10001 (type -10001)
Ready
Unexpected error: 0
Sending command...
Disconnected
Sending command...
Trying connection 192.168.1.100:2000...
Not connected
Trying connection 192.168.1.100:2000...
Not connected
Trying connection 192.168.1.100:2000...
Not connected
Sending command...
Disconnected

Where there seems to be a successful connection after the `Ready` print, but then there is immediately the `Unexpected error: 0` print, which causes the ConnectionSafe function to disconnect (since checking the status at this point does not return a 0 value), which causes a fault on the robot controller.

Are you using the latest version of RoboDK? We recently improved drivers when recovering from a failed connection.

I am using RoboDK v5.6.0


Thank you in advance for helping out!
#4
It looks like there is a version mismatch because this message does not look good:
Code:
Version -10001 (type -10001)
Can you make sure to update RoboDK to the latest version and also take the latest version of the RoboDK driver for Fanuc?

Let us know if you still have issues.
#5
Hey Albert,

I just verified that we are using the latest version of the RoboDK driver for Fanuc.
I did however see that the latest version of RoboDK is 5.6.4, while I am still running 5.6.0 (https://robodk.com/whatsnew)
How do I upgrade to 5.6.4 on Ubuntu? Since downloading the installer on the download page seems to yield me an installer for version 5.6.0.

Kind regards,
Bjarne
#6
We'll release an update for Ubuntu in the next few weeks. Ubuntu's release is a bit behind Windows version.
  




Users browsing this thread:
1 Guest(s)