def ServoSetupWrapper( self ): self.ServoSetup() strVersion = ebb_serial.query( self.serialPort, 'QP\r' ) #Query pen position: 1 up, 0 down (followed by OK) if strVersion[0] == '0': ebb_motion.sendPenDown(self.serialPort, 0) else: ebb_motion.sendPenUp(self.serialPort, 0)
def penUp( self ): self.virtualPenIsUp = True # Virtual pen keeps track of state for resuming plotting. if ( not self.resumeMode) and (not self.bPenIsUp): # skip if pen is already up, or if we're resuming. ebb_motion.sendPenUp(self.serialPort, self.options.penUpDelay ) if self.penDownActivatesEngraver: self.engraverOff() # will check self.enableEngraver self.bPenIsUp = True
def ServoSetupWrapper( self ): self.ServoSetup() strVersion = ebb_serial.query( self.serialPort, 'QP\r' ) #Query pen position: 1 up, 0 down (followed by OK) if strVersion[0] == '0': # ebb_serial.command( self.serialPort, 'SP,0\r' ) ebb_motion.sendPenDown(self.serialPort, 0) else: # ebb_serial.command( self.serialPort, 'SP,1\r' ) ebb_motion.sendPenUp(self.serialPort, 0)
def penUp( self ): self.virtualPenIsUp = True # Virtual pen keeps track of state for resuming plotting. if (self.bPenIsUp != True): # Continue only if pen state is down (or unknown) if ( not self.resumeMode): # or if we're resuming. ebb_motion.sendPenUp(self.serialPort, self.options.penUpDelay ) self.bPenIsUp = True
def penUp( self ): self.virtualPenIsUp = True # Virtual pen keeps track of state for resuming plotting. if ( not self.resumeMode) and (not self.bPenIsUp): # skip if pen is already up, or if we're resuming. ebb_motion.sendPenUp(self.serialPort, self.options.penUpDelay ) self.bPenIsUp = True
port = ebb_serial.openPort() ebb_motion.sendDisableMotors(port) input("Please move Axidraw to home position, then press <enter>") # ebb_motion.doABMove(port, 24000, 0, 1500) # time.sleep(1.5) # ebb_motion.doABMove(port, 0, 16000, 1000) # time.sleep(1) # ebb_motion.doABMove(port, -24000, 0, 1500) # time.sleep(1.5) # ebb_motion.doABMove(port, 0, -16000, 1000) # time.sleep(1) ebb_motion.doABMove(port, 12000, 0, 1500) time.sleep(1.5) ebb_motion.doABMove(port, 0, 8000, 1000) time.sleep(1) ebb_motion.doABMove(port, -12000, 0, 1500) time.sleep(1.5) ebb_motion.doABMove(port, 0, -8000, 1000) time.sleep(1) ebb_motion.setPenUpPos(port, 25000) ebb_motion.setPenDownPos(port, 15000) ebb_motion.sendPenUp(port, 2000) time.sleep(2) ebb_motion.sendPenDown(port, 2000) time.sleep(2) ebb_motion.sendDisableMotors(port)