Example 2 - Executing a regular TCP path using 5-DOF

# 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()