cy.connect(BAUDRATE, DEVICE, Emulate)

cy.sendCommand("G90\n") # Set absolute positioning

cy.homeZXY() # Home all the axis

drawTool(10, 20) # Show a marker on the gcode plot


# Move to the origin of the grid
cy.moveXY(x_points[0], y_points[0], F_fastMove)


# Warning: Do not lower too much or you will potentially cause damage!
initial_Z_lowering_distance = -10
cy.moveZrelSafe(initial_Z_lowering_distance,F_slowMove) # Move Z towards the PCB (saves some probing time for the first coord)


config = ConfigParser.RawConfigParser()
Z_origin_offset = 0
try:
	config.read('cyclone.cfg')
	Z_origin_offset = config.getfloat('Z_Probing', 'Z_origin_offset')
	print("Z offset: " + str(Z_origin_offset) )
except:
	print("No Z origin offset data.  Please run 2_Zprobe_Toolchange" )
	sys.exit(0)
	
sys.stdout.flush()

Example #2
0
cy.connect(BAUDRATE, DEVICE, Emulate)

cy.sendCommand("G90\n")  # Set absolute positioning

cy.homeZXY()  # Home all the axis

drawTool(10, 20)  # Show a marker on the gcode plot

# Move to the origin of the grid
cy.moveXY(x_points[0], y_points[0], F_fastMove)

# Warning: Do not lower too much or you will potentially cause damage!
initial_Z_lowering_distance = -10
cy.moveZrelSafe(
    initial_Z_lowering_distance, F_slowMove
)  # Move Z towards the PCB (saves some probing time for the first coord)

Z_origin_offset = cy.probeZ()
print("Z offset: " + str(Z_origin_offset))

toolPos_X = 0
toolPos_Y = 0
toolPos_Z = 0
toolPos_F = F_fastMove

X_dest = 0
Y_dest = 0
Z_dest = 0
F_dest = F_fastMove