language grl 0.1
module W2CrossBrandMotion
  post_hint abb
  const speed vj = joint(50 %)
  const speed vl = linear(200 mm/s)
  const zone z10 = z(10 mm)
  const zone zcnt = cnt(50)
  target home = joint_target { joints: [0 deg, 0 deg, 0 deg, 0 deg, 0 deg, 0 deg] }
  target pick = pose_target { pose: pose(500 mm, 0 mm, 0 mm, 0 deg, 0 deg, 0 deg) }
  target mid = pose_target { pose: pose(550 mm, 50 mm, 0 mm, 0 deg, 0 deg, 0 deg) }
  target place = pose_target { pose: pose(600 mm, 0 mm, 0 mm, 0 deg, 0 deg, 0 deg) }
  proc main()
    movej home speed vj zone fine
    movel pick speed vl zone z10
    movec via mid target place speed vl zone zcnt
    io.do[1] = true
    wait io.di[1] == true timeout 1 s
    pulse io.do[2] duration 100 ms
  end
end
