SHARE
TWEET

robocell targil2.2

a guest Oct 5th, 2019 106 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Set Variable POS10  = 0
  2. Set Variable POS11  = 0
  3. Set Variable SIZE10  = 0
  4. Set Variable POS10  = 0
  5. Set Variable POS11  = 0
  6. Set Variable SIZE20  = 0
  7. Set Variable POS20  = 0
  8. Set Variable POS21  = 0
  9. Set Variable SIZE30  = 0
  10. Set Variable POS30  = 0
  11. Set Variable POS31  = 0
  12. Set Variable POS100  = 100
  13. Set Variable POS101  = 101
  14. Set Variable POS102  = 102
  15. Set Variable POS103  = 103
  16.  
  17. Set Variable MSR = 0
  18.  
  19. Set Variable COUNTER  = 20
  20. Set Variable COUNTER2  = 21
  21.  
  22. MEASURE_LOOP:
  23. Open Gripper
  24. Go to Position COUNTER Fast
  25. Go to Position COUNTER2 Speed 5 (%)
  26. Close Gripper
  27. Set Variable TMP to Gripper Sensor
  28. Open Gripper
  29. Go to Position COUNTER Speed 5 (%)
  30. If MSR==0 Jump to SAVE1
  31. If MSR==1 Jump to SAVE2
  32. If MSR==2 Jump to SAVE3
  33.  
  34. ORDER_LIST:
  35. if SIZE20 >= SIZE10 Jump to ORD1
  36. Set Variable S10  = SIZE10
  37. Set Variable SIZE10  = SIZE20
  38. Set Variable SIZE20  = S10
  39. Set Variable P10 = POS10
  40. Set Variable POS10 = POS20
  41. Set Variable POS20 = P10
  42. Set Variable P11 = POS11
  43. Set Variable POS11 = POS21
  44. Set Variable POS21 = P11
  45.  
  46. ORD1:
  47. if SIZE30 >= SIZE20 Jump to MOVE_BLOCKS
  48. Set Variable S20  = SIZE20
  49. Set Variable SIZE20  = SIZE30
  50. Set Variable SIZE30  = S20
  51. Set Variable P20 = POS20
  52. Set Variable POS20 = POS30
  53. Set Variable POS30 = P20
  54. Set Variable P21 = POS21
  55. Set Variable POS21 = POS31
  56. Set Variable POS31 = P21
  57. if SIZE20 >= SIZE10 Jump to MOVE_BLOCKS
  58. Set Variable S10  = SIZE10
  59. Set Variable SIZE10  = SIZE20
  60. Set Variable SIZE20  = S10
  61. Set Variable P10 = POS10
  62. Set Variable POS10 = POS20
  63. Set Variable POS20 = P10
  64. Set Variable P11 = POS11
  65. Set Variable POS11 = POS21
  66. Set Variable POS21 = P11
  67.  
  68. MOVE_BLOCKS:
  69.  
  70. Open Gripper
  71. Go to Position POS30 Fast
  72. Go to Position POS31 Speed 5 (%)
  73. Close Gripper
  74. Go to Position POS30 Speed 5 (%)
  75. Go to Position POS100 Fast
  76. Go to Position POS101 Speed 5 (%)
  77. Open Gripper
  78. Go to Position POS100 Fast
  79.  
  80. Go to Position POS20 Fast
  81. Go to Position POS21 Speed 5 (%)
  82. Close Gripper
  83. Go to Position POS20 Speed 5 (%)
  84. Go to Position POS100 Fast
  85. Go to Position POS102 Speed 5 (%)
  86. Open Gripper
  87. Go to Position POS100 Fast
  88.  
  89. Go to Position POS10 Fast
  90. Go to Position POS11 Speed 5 (%)
  91. Close Gripper
  92. Go to Position POS10 Speed 5 (%)
  93. Go to Position POS100 Fast
  94. Go to Position POS103 Speed 5 (%)
  95. Open Gripper
  96. Go to Position POS100 Fast
  97. Jump to END
  98.  
  99. SAVE1:
  100. Set Variable SIZE10  = TMP
  101. Set Variable POS10  = COUNTER
  102. Set Variable POS11  = COUNTER2
  103. Set Variable COUNTER  = COUNTER+10
  104. Set Variable COUNTER2  = COUNTER2+10
  105. MSR = MSR +1
  106. If COUNTER<50 Jump to MEASURE_LOOP
  107.  
  108. SAVE2:
  109. Set Variable SIZE20  = TMP
  110. Set Variable POS20  = COUNTER
  111. Set Variable POS21  = COUNTER2
  112. Set Variable COUNTER  = COUNTER+10
  113. Set Variable COUNTER2  = COUNTER2+10
  114. MSR = MSR +1
  115. If COUNTER<50 Jump to MEASURE_LOOP
  116.  
  117. SAVE3:
  118. Set Variable SIZE30  = TMP
  119. Set Variable POS30  = COUNTER
  120. Set Variable POS31  = COUNTER2
  121. Set Variable COUNTER  = COUNTER+10
  122. Set Variable COUNTER2  = COUNTER2+10
  123. Ring Bell
  124. If COUNTER=50 Jump to ORDER_LIST
  125.  
  126. END:
  127. Ring Bell
  128. Ring Bell
  129. Ring Bell
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top