language grl 0.1
module W2MotionAllTypes
  persistent tool gripper = tool { tcp: pose(0 mm, 0 mm, 80 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 vj = joint(45 %)
  const speed vl = linear(150 mm/s)
  const zone z10 = z(10 mm)
  target home = joint_target { joints: [0 deg, 0 deg, 0 deg, 0 deg, 0 deg, 0 deg] }
  target start = pose_target { pose: pose(500 mm, 0 mm, 0 mm, 0 deg, 0 deg, 0 deg), 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 finish = pose_target { pose: pose(600 mm, 0 mm, 0 mm, 0 deg, 0 deg, 0 deg), tool: gripper, frame: fixture }
  proc main()
    set_tool gripper
    set_frame fixture
    set_speed vl
    set_zone z10
    movej home speed vj zone fine
    movel start
    movec via mid target finish speed linear(100 mm/s) zone fine
  end
end
