Advertisement
aidanozo

Untitled

Jan 7th, 2025
6
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1. .PROGRAM coop()
  2. PARAMETER HAND.TIME = 0.5
  3. SPEED 100 ALWAYS
  4. TOOL TRANS(0,0,25)
  5. so = 2
  6. si = 1002
  7. nrobj = 0
  8. MOVE safe
  9. OPENI
  10. FOR i = 0 TO 9
  11. SET pick = SHIFT(p1 BY 0,0,10*(9-i))
  12. APPRO pick, 40
  13. BREAK
  14. SPEED 20
  15. MOVES pick
  16. CLOSEI
  17. DEPARTS 40
  18. BREAK
  19. MOVE safe
  20. 50 WAIT SIG(-si)
  21. SIGNAL so
  22. IF SIG(si) THEN
  23. SIGNAL -so
  24. GOTO 50
  25. END
  26. WAIT SIG(-2001)
  27. SET place = SHIFT(p2 BY 0,0,10*nrobj)
  28. APPRO place, 40
  29. BREAK
  30. SPEED 20
  31. MOVES place
  32. OPENI
  33. nrobj = nrobj+1
  34. DEPARTS 40
  35. BREAK
  36. MOVE safe
  37. BREAK
  38. SIGNAL -so
  39. END
  40. SIGNAL 2002
  41.  
  42. .END
  43.  
  44.  
  45.  
  46. .PROGRAM monit()
  47. si = 1002
  48. 50 WAIT SIG(si) OR SIG(2002)
  49. IF SIG(2002) GOTO 100
  50. SIGNAL 2001
  51. TIMER 1 = 0
  52. WAIT SIG(-si)
  53. IF TIMER(1) > 0.3 THEN
  54. nrobj = nrobj+1
  55. SIGNAL -2001
  56. END
  57. SIGNAL -2001
  58. GOTO 50
  59. 100 SIGNAL -2002
  60.  
  61. .END
  62.  
  63.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement