comands work

master
adligeerik 6 years ago
parent e0a898d423
commit 3bac559b81

@ -23,12 +23,12 @@ class Candybot:
#Async Motion Params Setting #Async Motion Params Setting
dType.SetHOMEParams(self.api, 250, 0, 50, 0, isQueued = 1) dType.SetHOMEParams(self.api, 250, 0, 50, 0, isQueued = 1)
dType.SetJOGJointParams(self.api, 50, 50, 50, 50, 50, 50, 50, 50, isQueued = 1) dType.SetJOGJointParams(self.api, 200, 200, 200, 200, 200, 200, 200, 200, isQueued = 1)
dType.SetJOGCommonParams(self.api, 100, 100, isQueued = 1) dType.SetJOGCommonParams(self.api, 100, 100, isQueued = 1)
#linear rail #linear rail
dType.SetDeviceWithL(self.api, 1) dType.SetDeviceWithL(self.api, 1)
dType.SetJOGLParams(self.api, 50, 50, isQueued=0) dType.SetJOGLParams(self.api, 200, 200, isQueued=0)
#Async Home #Async Home
dType.SetHOMECmd(self.api, temp = 0, isQueued = 1) dType.SetHOMECmd(self.api, temp = 0, isQueued = 1)
@ -47,6 +47,8 @@ class Candybot:
else : else :
return return
threading.Timer(0.1,self.stop).start() threading.Timer(0.1,self.stop).start()
#dType.SetWAITCmd(self.api, 1, isQueued=0)
#dType.SetJOGCmd(self.api, 1, 0)
def rearArm(self, direction): def rearArm(self, direction):
if direction == 1: if direction == 1:
@ -57,8 +59,9 @@ class Candybot:
else : else :
return return
dType.SetWAITCmd(api, 1, isQueued=0) #dType.SetWAITCmd(self.api, 1, isQueued=0)
#threading.Timer(0.1,self.stop).start() #dType.SetJOGCmd(self.api, 1, 0)
threading.Timer(0.1,self.stop).start()
def forearm(self, direction): def forearm(self, direction):
if direction == 1: if direction == 1:
@ -69,8 +72,9 @@ class Candybot:
else : else :
return return
dType.SetWAITCmd(api, 1, isQueued=0) #dType.SetWAITCmd(self.api, 1, isQueued=0)
#threading.Timer(0.1,self.stop).start() #dType.SetJOGCmd(self.api, 1, 0)
threading.Timer(0.1,self.stop).start()
def gripperRotation(self, direction): def gripperRotation(self, direction):
if direction == 1: if direction == 1:
@ -81,8 +85,9 @@ class Candybot:
else : else :
return return
dType.SetWAITCmd(api, 1, isQueued=0) #dType.SetWAITCmd(self.api, 1, isQueued=0)
#threading.Timer(0.1,self.stop).start() #dType.SetJOGCmd(self.api, 1, 0)
threading.Timer(0.1,self.stop).start()
def linear(self, direction): def linear(self, direction):
if direction == 1: if direction == 1:
@ -93,12 +98,21 @@ class Candybot:
else : else :
return return
dType.SetWAITCmd(api, 1, isQueued=0) #dType.SetWAITCmd(self.api, 1, isQueued=0)
#threading.Timer(0.1,self.stop).start() #dType.SetJOGCmd(self.api, 1, 0)
threading.Timer(0.1,self.stop).start()
def gripp(self):
dType.SetEndEffectorGripper(self.api, 1, 1, isQueued=0)
def letgo(self):
dType.SetEndEffectorGripper(self.api, 1, 0, isQueued=0)
def stop(self): def stop(self):
dType.SetJOGCmd(self.api, 1, 0) dType.SetJOGCmd(self.api, 1, 0)
def stopcmp(self):
dType.SetEndEffectorGripper(self.api, 0, 0, isQueued=0)
def panic(self): def panic(self):
dType.SetQueuedCmdForceStopExec(self.api) dType.SetQueuedCmdForceStopExec(self.api)
Loading…
Cancel
Save