language grl 0.1
module A120ErrorDiagnostics
  const speed v = joint(30 %)
  const zone zf = fine
  target over_limit = joint_target { joints: [200 deg, 0 deg, 0 deg, 0 deg, 0 deg, 0 deg] }
  target unreachable_pose = pose_target { pose: pose(3000 mm, 0 mm, 3000 mm, 0 deg, 0 deg, 0 deg) }
  proc main()
    movej over_limit speed v zone zf
    movel unreachable_pose speed linear(100 mm/s) zone zf
    wait io.di[99] == true timeout 10 ms on_timeout alarm "expected timeout"
  end
end
