From 3bac559b816249d1328a939f1301be5eb8a3061e Mon Sep 17 00:00:00 2001 From: adligeerik Date: Sat, 24 Nov 2018 12:13:29 +0100 Subject: [PATCH] comands work --- movearm/move.py | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/movearm/move.py b/movearm/move.py index e2923f8..730eace 100644 --- a/movearm/move.py +++ b/movearm/move.py @@ -23,12 +23,12 @@ class Candybot: #Async Motion Params Setting 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) #linear rail dType.SetDeviceWithL(self.api, 1) - dType.SetJOGLParams(self.api, 50, 50, isQueued=0) + dType.SetJOGLParams(self.api, 200, 200, isQueued=0) #Async Home dType.SetHOMECmd(self.api, temp = 0, isQueued = 1) @@ -47,6 +47,8 @@ class Candybot: else : return threading.Timer(0.1,self.stop).start() + #dType.SetWAITCmd(self.api, 1, isQueued=0) + #dType.SetJOGCmd(self.api, 1, 0) def rearArm(self, direction): if direction == 1: @@ -57,8 +59,9 @@ class Candybot: else : return - dType.SetWAITCmd(api, 1, isQueued=0) - #threading.Timer(0.1,self.stop).start() + #dType.SetWAITCmd(self.api, 1, isQueued=0) + #dType.SetJOGCmd(self.api, 1, 0) + threading.Timer(0.1,self.stop).start() def forearm(self, direction): if direction == 1: @@ -69,8 +72,9 @@ class Candybot: else : return - dType.SetWAITCmd(api, 1, isQueued=0) - #threading.Timer(0.1,self.stop).start() + #dType.SetWAITCmd(self.api, 1, isQueued=0) + #dType.SetJOGCmd(self.api, 1, 0) + threading.Timer(0.1,self.stop).start() def gripperRotation(self, direction): if direction == 1: @@ -81,8 +85,9 @@ class Candybot: else : return - dType.SetWAITCmd(api, 1, isQueued=0) - #threading.Timer(0.1,self.stop).start() + #dType.SetWAITCmd(self.api, 1, isQueued=0) + #dType.SetJOGCmd(self.api, 1, 0) + threading.Timer(0.1,self.stop).start() def linear(self, direction): if direction == 1: @@ -93,12 +98,21 @@ class Candybot: else : return - dType.SetWAITCmd(api, 1, isQueued=0) - #threading.Timer(0.1,self.stop).start() + #dType.SetWAITCmd(self.api, 1, isQueued=0) + #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): dType.SetJOGCmd(self.api, 1, 0) + def stopcmp(self): + dType.SetEndEffectorGripper(self.api, 0, 0, isQueued=0) + def panic(self): dType.SetQueuedCmdForceStopExec(self.api) \ No newline at end of file