language grl 0.1
module A120CartesianBlend
  persistent tool gripper = tool { tcp: pose(0 mm, 0 mm, 100 mm, 0 deg, 0 deg, 0 deg), mass: 1 kg }
  persistent frame fixture = frame { origin: pose(800 mm, 0 mm, 0 mm, 0 deg, 0 deg, 0 deg) }
  const speed v_linear = linear(100 + 50 mm/s)
  const zone z10 = z(clamp(10 mm, 1 mm, 50 mm))
  target pick = pose_target { pose: pose(500 mm, 0 mm, 0 mm, 0 deg, 0 deg, atan2(0, 1)), tool: gripper, frame: fixture }
  target mid = pose_target { pose: pose(550 mm, 50 mm, 0 mm, 0 deg, 0 deg, 0 deg), tool: gripper, frame: fixture }
  target arc_end = pose_target { pose: pose(600 mm, 0 mm, 0 mm, 0 deg, 0 deg, 0 deg), tool: gripper, frame: fixture }
  path cart_path {
    defaults { speed: v_linear, zone: z10, tool: gripper, frame: fixture }
    point p_pick movel pick zone fine
    point p_arc movec via mid target arc_end speed linear(max(50 mm/s, 150 mm/s)) zone z10
  }
  proc main()
    set_tool gripper
    set_frame fixture
    run_path cart_path
  end
end
