Exemple #1
0
	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)				
Exemple #2
0
	def penDown( self ):
		self.virtualPenIsUp = False  # Virtual pen keeps track of state for resuming plotting.
		if (self.bPenIsUp != False):  # Continue only if pen state is up (or unknown)
			if ( not self.resumeMode ) and (not self.bStopped):  # skip if we're resuming or stopped
				self.bPenIsUp = False
				if self.penDownActivatesEngraver:
						self.engraverOn() # will check self.enableEngraver
				ebb_motion.sendPenDown(self.serialPort, self.options.penDownDelay )						
Exemple #3
0
	def penDown( self ):
		self.virtualPenIsUp = False  # Virtual pen keeps track of state for resuming plotting.
		if (self.bPenIsUp):  # skip if pen is already down
			if ( not self.resumeMode ) and (not self.bStopped):  # skip if we're resuming or stopped
				self.bPenIsUp = False
				if self.penDownActivatesEngraver:
						self.engraverOn() # will check self.enableEngraver
				ebb_motion.sendPenDown(self.serialPort, self.options.penUpDelay )						
		ebb_motion.doTimedPause(self.serialPort, 10) #Pause a moment for underway commands to finish...
Exemple #4
0
	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)				
Exemple #5
0
	def penDown( self ):
		self.virtualPenIsUp = False  # Virtual pen keeps track of state for resuming plotting.
		if (self.bPenIsUp):  # skip if pen is already down
			if ( not self.resumeMode ) and (not self.bStopped):  # skip if we're resuming or stopped
				self.bPenIsUp = False
				if self.penDownActivatesEngraver:
						self.engraverOn() # will check self.enableEngraver
				ebb_motion.sendPenDown(self.serialPort, self.options.penDownDelay )						
		ebb_motion.doTimedPause(self.serialPort, 10) #Pause a moment for underway commands to finish...
Exemple #6
0
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)