Universal Robots Forum

TCP & Toolpath URCap mc_initialize is not defined

Hi,
I am trying to get the new process path module to run.

When using the example program from the script manual (see code below) I get the following error:

Compile error: name ‘mc_initialize’ is not defined

The Remote TCP & Toolpath URCap is installed and activated, the robot is an UR10e and the software is up to date 5.7.0.90932.

Any advice?

Thanks in advance,
Matthias

##################################
def someProg():
  popup("Start", title="P1", blocking=True)

   # Initialize with regular TCP (mode = 0) and constrain 5-DOF
   remote_tcp = p[0.0, 0.03, 0.125, 2.3580, 0.0, 0.0]
   pcs = p[-0.25, -0.65,0.05,0.0,0.0,-1.57]
   mc_initialize(0, remote_tcp, doc = 5)

   # Set PCS and add the toolpath motion
   waypoint1 = p[0.05, 0.1, 0.1, 0.0, 0.0, 0.0]
   speed_factor = 0.1
   acc_factor = 0.25
   blend_radius = 0.02
   blend_rad_toolpath = 0.0
   mc_set_pcs(pcs)

   mc_add_linear(waypoint1, acc_factor, speed_factor, blend_radius)
   path_id = mc_load_path("/programs/myToolPathFile.nc", useFeedRate =
False)
   mc_add_path(path_id, acc_factor, speed_factor, blend_rad_toolpath)
   # Execute the motions
   mc_run_motion()

   popup("End", title="P2", blocking=True)

end

##################################

Solved the problem, the “controller” has to be started in the settings menu of the Remote TCP & Toolpath URCap before the functions of the cap are defined.

Maybe a note in the script manual might be a good idea.

1 Like