08-18-2021, 02:07 PM
I have the following code, which connects to the real Fanuc robot. Everything works, but at the end, the program in the robot controller ends with the error code:INTP-311 (RDK_S3, 507) Uninitialized dat
Every time I need to fix the error using a teach pendant and start a cycle with Auto mode. How can I avoid this error at all?
Code:
import robolink
import robodk
import sys
import numpy as np
robot_name = "Fanuc LR Mate 200iD/4S"
robot_file = "Fanuc-LR-Mate-200iD-4S.robot"
connection_params = {
"robot_ip": "192.168.1.100",
"port": 2000,
"remote_path": "md:/",
"ftp_user": "anonymous",
"ftp_pass": "",
}
rdk = robolink.Robolink(args=["-EXIT_LAST_COM", "-NOUI", robot_file])
robot = rdk.Item(robot_name)
robot.setConnectionParams(
robot_ip = connection_params [" robot_ip"],
port=connection_params["port"],
remote_path=connection_params["remote_path"],
ftp_user=connection_params["ftp_user"],
ftp_pass=connection_params["ftp_pass"],
)
connection = robot.ConnectSafe()
robot.Joints()
robot.MoveJ([0, 0, 0, 0, 0, 0])
robot.MoveJ([0, 0, -30, 0, 0, 0])
robot.MoveJ([0, 0, -30, 10, 0, 0])
robot.MoveJ([0, 0, 0, 0, 0, 0])
if not robot.Busy():
rdk.CloseRoboDK()
Every time I need to fix the error using a teach pendant and start a cycle with Auto mode. How can I avoid this error at all?