toolRefresh = 0
def toolPos_refresh(x, y, etching=0):
	global toolRefresh
	if toolRefresh >= toolRefreshSteps:
		toolPos_draw(toolPos_X, toolPos_Y, etching)
		toolRefresh = 0
	toolRefresh = toolRefresh + 1

def drawTool(x, y):
	global toolPos_point
	pltSetFig(gcodeviewer)
	toolPos_point, = plt.plot(0, 0, markersize=12, c='g', marker='x')
	pltShowNonBlocking()


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)
Example #2
0
def toolPos_refresh(x, y, etching=0):
    global toolRefresh
    if toolRefresh >= toolRefreshSteps:
        toolPos_draw(toolPos_X, toolPos_Y, etching)
        toolRefresh = 0
    toolRefresh = toolRefresh + 1


def drawTool(x, y):
    global toolPos_point
    pltSetFig(gcodeviewer)
    toolPos_point, = plt.plot(0, 0, markersize=12, c='g', marker='x')
    pltShowNonBlocking()


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)