Advertisement
Guest User

Untitled

a guest
Dec 4th, 2017
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Vala 0.93 KB | None | 0 0
  1. zero
  2.  
  3. edit exo1
  4.  
  5.     ;   Définition des variables
  6.     detecteur1 = 1005
  7.     detecteur2 = 1008
  8.     detecteur3 = 1007
  9.  
  10.     button.on = 1
  11.     button.off = -1
  12.     band.direction.positive = 2
  13.     band.direction.negative = -2
  14.  
  15.     timer.one = 1
  16.  
  17.  
  18.     ;   Chargement de la ventouse
  19.     tool succion.pad
  20.  
  21.    
  22.     ;  etape 1
  23.     wait sig(detecteur1)
  24.  
  25.     appro P2, 150
  26.     openi
  27.     moves P2
  28.     closei
  29.     departs 10
  30.  
  31.     appro place, 150
  32.     moves place
  33.     openi
  34.     appro wait.loc, 10
  35.  
  36.     signal(band.direction.positive)
  37.     signal(button.on)
  38.  
  39.  
  40.     ;   etape 2
  41.     wait sig(detecteur2)
  42.  
  43.     signal(button.off)
  44.     timer timer.one = 0
  45.     wait timer(timer.one) > 1
  46.     signal(band.direction.negative)
  47.     signal(button.on)
  48.  
  49.  
  50.     ;   etape 3
  51.     wait sig(detecteur3)
  52.     signal(button.off)
  53.  
  54.     appro grasp.loc.stopped, 150
  55.     openi
  56.     moves grasp.loc.stopped
  57.     closei
  58.     departs 10
  59.  
  60.     appro P3, 150
  61.     moves P3
  62.     openi
  63.     appro wait.loc, 10
  64.  
  65. e
  66.  
  67. ;   Chargement des fichiers
  68. load pickconv.lc
  69. load alltools.v2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement