from vcScript import *

comp = getComponent()
servo = comp.findBehaviour("サーボコントローラ_3")
Y101a = comp.findBehaviour("Y101")
Y102a = comp.findBehaviour("Y102")
X101a = comp.getProperty("X101")
X102a = comp.getProperty("X102")

def OnSignal( signal ):
  pass

def OnRun():
  delay(0.1)
  X101a.Value = False
  X102a.Value = True
  
  while True:
    delay(0.1)
    
    #シリンダ（出）
    if Y101a.Value == True:
      X102a.Value = False
      servo.moveJoint(0,100)
      X101a.Value = True
      
    #シリンダ（戻）
    if Y102a.Value == True:
      X101a.Value = False
      servo.moveJoint(0,0)
      X102a.Value = True
    