# Gantry component for Z Axis base.init_gantry(axisIndex=2) # reading functions hardware.hardware_read() base.gantry_read(gantryAxis=2, thread='servo-thread') hal.addf('motion-command-handler', 'servo-thread') numFans = c.find('FDM', 'NUM_FANS') numExtruders = c.find('FDM', 'NUM_EXTRUDERS') numLights = c.find('FDM', 'NUM_LIGHTS') # Axis-of-motion Specific Configs (not the GUI) ve.velocity_extrusion(extruders=numExtruders, thread='servo-thread') # X [0] Axis base.setup_stepper(section='AXIS_0', axisIndex=0, stepgenIndex=0) # Y [1] Axis base.setup_stepper(section='AXIS_1', axisIndex=1, stepgenIndex=1) # Z [2] Axis base.setup_stepper(section='AXIS_2', axisIndex=2, stepgenIndex=2, thread='servo-thread', gantry=True, gantryJoint=0) base.setup_stepper(section='AXIS_2', axisIndex=2, stepgenIndex=3, gantry=True, gantryJoint=1) # Extruder, velocity controlled for i in range(0, numExtruders): base.setup_stepper(section='EXTRUDER_%i' % i, stepgenIndex=4, velocitySignal='ve-extrude-vel') # Extruder Multiplexer base.setup_extruder_multiplexer(extruders=numExtruders, thread='servo-thread')
motion.setup_motion() hardware.init_hardware() storage.init_storage('storage.ini') # reading functions hardware.hardware_read() hal.addf('motion-command-handler', 'servo-thread') numFans = c.find('FDM', 'NUM_FANS') numExtruders = c.find('FDM', 'NUM_EXTRUDERS') numLights = c.find('FDM', 'NUM_LIGHTS') # Axis-of-motion Specific Configs (not the GUI) ve.velocity_extrusion(extruders=numExtruders, thread='servo-thread') # X [0] Axis base.setup_stepper(section='AXIS_0', axisIndex=0, stepgenIndex=0) # Y [1] Axis base.setup_stepper(section='AXIS_1', axisIndex=1, stepgenIndex=1) # Z [2] Axis base.setup_stepper(section='AXIS_2', axisIndex=2, stepgenIndex=2) # Extruder, velocity controlled for i in range(0, numExtruders): base.setup_stepper(section='EXTRUDER_%i' % i, stepgenIndex=3, velocitySignal='ve-extrude-vel') # Extruder Multiplexer base.setup_extruder_multiplexer(extruders=numExtruders, thread='servo-thread') # Stepper Multiplexer multiplexSections = [] for i in range(0, numExtruders):
motion.setup_motion() hardware.init_hardware() storage.init_storage('storage.ini') # reading functions hardware.hardware_read() hal.addf('motion-command-handler', 'servo-thread') numFans = c.find('FDM', 'NUM_FANS') numExtruders = c.find('FDM', 'NUM_EXTRUDERS') numLights = c.find('FDM', 'NUM_LIGHTS') # Axis-of-motion Specific Configs (not the GUI) ve.velocity_extrusion(extruders=numExtruders, thread='servo-thread') # X [0] Axis base.setup_stepper(section='AXIS_0', axisIndex=0, stepgenIndex=0) # Y [1] Axis base.setup_stepper(section='AXIS_1', axisIndex=1, stepgenIndex=1) # Z [2] Axis base.setup_stepper(section='AXIS_2', axisIndex=2, stepgenIndex=2) # Extruder, velocity controlled for i in range(0, numExtruders): base.setup_stepper(section='EXTRUDER_%i' % i, stepgenIndex=3, velocitySignal='ve-extrude-vel') # Extruder Multiplexer base.setup_extruder_multiplexer(extruders=numExtruders, thread='servo-thread') # Stepper Multiplexer multiplexSections = []
rt.init_RTAPI() # loads the ini file passed by linuxcnc c.load_ini(os.environ['INI_FILE_NAME']) motion.setup_motion(kinematics=c.find('KINS', 'KINEMATICS')) # reading functions hal.addf('motion-command-handler', 'servo-thread') # define gantry joints base.init_gantry(axisIndex=1, joints=2, latching=True) # Axis-of-motion Specific Configs (not the GUI) # X [J0] Axis base.setup_stepper(section='AXIS_0', axisIndex=0, stepgenIndex=0, stepgenType='sim') # Y [J1] Axis base.setup_stepper(section='AXIS_1', axisIndex=1, stepgenIndex=1, gantry=True, gantryJoint=0, stepgenType='sim') # YY[J2] Axis base.setup_stepper(section='AXIS_1', axisIndex=1, stepgenIndex=2, gantry=True, gantryJoint=1, stepgenType='sim')
# initialize the RTAPI command client rt.init_RTAPI() # loads the ini file passed by linuxcnc c.load_ini(os.environ["INI_FILE_NAME"]) motion.setup_motion(kinematics=c.find("KINS", "KINEMATICS")) # reading functions hal.addf("motion-command-handler", "servo-thread") # define gantry joints base.init_gantry(axisIndex=1, joints=2, latching=True) # Axis-of-motion Specific Configs (not the GUI) # X [J0] Axis base.setup_stepper(section="AXIS_0", axisIndex=0, stepgenIndex=0, stepgenType="sim") # Y [J1] Axis base.setup_stepper(section="AXIS_1", axisIndex=1, stepgenIndex=1, gantry=True, gantryJoint=0, stepgenType="sim") # YY[J2] Axis base.setup_stepper(section="AXIS_1", axisIndex=1, stepgenIndex=2, gantry=True, gantryJoint=1, stepgenType="sim") # Z [J3] Axis base.setup_stepper(section="AXIS_2", axisIndex=2, stepgenIndex=3, stepgenType="sim") # A [J4] Axis base.setup_stepper(section="AXIS_3", axisIndex=3, stepgenIndex=4, stepgenType="sim") # B [J5] Axis base.setup_stepper(section="AXIS_4", axisIndex=4, stepgenIndex=5, stepgenType="sim") # update gantry position feedback base.gantry_read(gantryAxis=1, thread="servo-thread") # Standard I/O - EStop, Enables, Limit Switches, Etc
from config import base from config import motion # initialize the RTAPI command client rt.init_RTAPI() # loads the ini file passed by linuxcnc c.load_ini(os.environ['INI_FILE_NAME']) motion.setup_motion(kinematics=c.find('KINS','KINEMATICS')) # reading functions hal.addf('motion-command-handler', 'servo-thread') # Axis-of-motion Specific Configs (not the GUI) # X [0] Axis base.setup_stepper(section='AXIS_0', axisIndex=0, stepgenIndex=0, stepgenType='sim') # Y [1] Axis base.setup_stepper(section='AXIS_1', axisIndex=1, stepgenIndex=1, stepgenType='sim') # Z [2] Axis base.setup_stepper(section='AXIS_2', axisIndex=2, stepgenIndex=2, stepgenType='sim') # Z [2] Axis base.setup_stepper(section='AXIS_3', axisIndex=3, stepgenIndex=3, stepgenType='sim') # Z [2] Axis base.setup_stepper(section='AXIS_4', axisIndex=4, stepgenIndex=4, stepgenType='sim') # Standard I/O - EStop, Enables, Limit Switches, Etc errorSignals = ['temp-hw-error', 'watchdog-error', 'hbp-error'] base.setup_estop(errorSignals, thread='servo-thread') base.setup_tool_loopback() # write out functions