language grl 0.1
module W2ProcFuncCall
  const speed v = joint(30 %)
  const zone zf = fine
  var int global_count = 0
  target home = joint_target { joints: [0 deg, 0 deg, 0 deg, 0 deg, 0 deg, 0 deg] }
  proc read_part(out bool ok)
    ok = true
  end
  proc increment_retry(inout int retry)
    retry = 1
  end
  func bool can_run(in int retry, in int max_retry)
    return retry < max_retry
  end
  proc main()
    var bool ok = false
    var int retry = 0
    call read_part(ok)
    call increment_retry(retry)
    if retry < 3
      movej home speed v zone zf
    end
    return
  end
end
