09-12-2023, 03:23 PM
Hello,
I am trying to connect RoboDK to a Fanuc LR Mate 200iD for online programming.
I am currently using the following python script:
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
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