Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
INTP-311 (RDK_S3, 507) Uninitialized dat
#1
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
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?
#2
I don't know the Fanuc driver well enough to help on this one, but I forwarded this post.

Jeremy
Find useful information about RoboDK and its features by visiting our Online Documentation and by watching tutorials on our Youtube Channel


#3
The current implementation of the driver errors out when the socket is disconnected, so it errors out at the end when robodk and by extension the driver is closed.
#4
(08-19-2021, 01:29 PM)Phillip Wrote: The current implementation of the driver errors out when the socket is disconnected, so it errors out at the end when robodk and by extension the driver is closed.

Many thanks! This is confirmed!

By the way, may I drive your attention to this thread https://robodk.com/forum/Thread-online-p...49#pid5149

It seems a problem for at least three users in this forum.

The question is: 

How to call external programs/macros in the robot controllers from RoboDK? 

I have tried the following code without success:

Code:
connection = robot.ConnectSafe()

rdk.setRunMode(robolink.RUNMODE_RUN_ROBOT)
program = rdk.AddProgram('Program')
program.setRunType(robolink.PROGRAM_RUN_ON_ROBOT)

# I expect this line set R[52]=6, but it does not
program.RunInstruction('Program(6)', robolink.INSTRUCTION_CALL_PROGRAM)

Best,
Agajan
#5
You should change this line:
Code:
program.RunInstruction('Program(6)', robolink.INSTRUCTION_CALL_PROGRAM)

For this:
Code:
program.RunInstruction('Program 6', robolink.INSTRUCTION_CALL_PROGRAM)

It is important to have a space so the number 6 is passed as the parameter for most drivers.

Also, more recent versions of the Fanuc driver support calling named programs without passing parameters, so you should be able to do this with a Fanuc robot:
Code:
program.RunInstruction('NamedProgram', robolink.INSTRUCTION_CALL_PROGRAM)
Note that this is not supported with all drivers.
#6
   
[attachment=2496 Wrote:Albert pid='10121' dateline='1629387498']You should change this line:
Code:
program.RunInstruction('Program(6)', robolink.INSTRUCTION_CALL_PROGRAM)

For this:
Code:
program.RunInstruction('Program 6', robolink.INSTRUCTION_CALL_PROGRAM)

It is important to have a space so the number 6 is passed as the parameter for most drivers.

Also, more recent versions of the Fanuc driver support calling named programs without passing parameters, so you should be able to do this with a Fanuc robot:
Code:
program.RunInstruction('NamedProgram', robolink.INSTRUCTION_CALL_PROGRAM)
Note that this is not supported with all drivers.

Many thanks for this. I was struggling with it for a couple of days now! Now it works! This one works for me (named program):
Code:
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.RunInstruction('HAND_TOG', robolink.INSTRUCTION_CALL_PROGRAM)

If I call:

Code:
robot.RunInstruction('Program 7', robolink.INSTRUCTION_CALL_PROGRAM)

I receive the PROGRAM_7 (notice the underscore) in DATA KAREL Vars (see the attachment)
  




Users browsing this thread:
1 Guest(s)