# 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() # reading functions hardware.hardware_read() 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='hm2_5i25.0.stepgen') # Standard I/O - EStop, Enables, Limit Switches, Etc #errorSignals = ['watchdog-error'] errorSignals = [] #for i in range(0, numExtruders): # errorSignals.append('e%i-error' % i) #base.setup_estop(errorSignals, thread='servo-thread') base.setup_estop(errorSignals, thread='servo-thread') base.setup_tool_loopback() # Probe #base.setup_probe(thread='servo-thread') # Setup Hardware hardware.setup_hardware(thread='servo-thread')
storage.init_storage('storage.ini') # reading functions hardware.hardware_read() hal.addf('motion-command-handler', 'servo-thread') hal.addf('motion-controller', 'servo-thread') numFans = c.find('FDM', 'NUM_FANS') numExtruders = c.find('FDM', 'NUM_EXTRUDERS') numLights = c.find('FDM', 'NUM_LIGHTS') hasHbp = c.find('FDM', 'HAS_HBP') # 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, thread='servo-thread') # Y [1] Axis base.setup_stepper(section='AXIS_1', axisIndex=1, stepgenIndex=1, thread='servo-thread') # Z [2] Axis base.setup_stepper(section='AXIS_2', axisIndex=2, stepgenIndex=2, thread='servo-thread') # 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):
#base.init_gantry(axisIndex=2) # reading functions hardware.hardware_read() #base.gantry_read(gantryAxis=2, thread='servo-thread') numFans = 0 #c.find('FDM', 'NUM_FANS') numExtruders = 1 # c.find('FDM', 'NUM_EXTRUDERS') numLights = 0 #c.find('FDM', 'NUM_LIGHTS') withAbp = 1 #c.find('FDM', 'ABP', False) # 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, stepgenType="stepgen") # Y [1] Axis base.setup_stepper(section='AXIS_1', axisIndex=1, stepgenIndex=1, stepgenType="stepgen") # Z [2] Axis base.setup_stepper(section='AXIS_2', axisIndex=2, stepgenIndex=2, stepgenType="stepgen") # thread='servo-thread', gantry=True, gantryJoint=0) #base.setup_stepper(section='AXIS_2', axisIndex=2, stepgenIndex=3, # gantry=True, gantryJoint=1) # Extruder, velocity controlled
# reading functions hardware.hardware_read() hal.addf('motion-command-handler', 'servo-thread') hal.addf('motion-controller', 'servo-thread') numFans = c.find('FDM', 'NUM_FANS') numExtruders = c.find('FDM', 'NUM_EXTRUDERS') numLights = c.find('FDM', 'NUM_LIGHTS') hasHbp = c.find('FDM', 'HAS_HBP') # 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, thread='servo-thread') # Y [1] Axis base.setup_stepper(section='AXIS_1', axisIndex=1, stepgenIndex=1, thread='servo-thread') # Z [2] Axis base.setup_stepper(section='AXIS_2', axisIndex=2, stepgenIndex=2, thread='servo-thread') # Extruder, velocity controlled for i in range(0, numExtruders): base.setup_stepper(section='EXTRUDER_%i' % i, stepgenIndex=3,
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, stepgenType='hm2_5i25.0.stepgen') # Y [1] Axis base.setup_stepper(section='AXIS_1', axisIndex=1, stepgenIndex=1, stepgenType='hm2_5i25.0.stepgen') # Z [2] Axis base.setup_stepper(section='AXIS_2', axisIndex=2, stepgenIndex=2, stepgenType='hm2_5i25.0.stepgen', thread='servo-thread', gantry=True, gantryJoint=0) base.setup_stepper(section='AXIS_2',
base.init_gantry4(axisIndex=2, joints=4) # reading functions hardware.hardware_read() base.gantry_read(gantryAxis=1, thread='servo-thread') 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=6) # Y [1] Axis base.setup_stepper(section='AXIS_1', axisIndex=1, stepgenIndex=4, thread='servo-thread', gantry=True, gantryJoint=0) base.setup_stepper(section='AXIS_1', axisIndex=1, stepgenIndex=5, gantry=True, gantryJoint=1) # Z [2] Axis base.setup_stepper(section='AXIS_2', axisIndex=2,
# 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) # 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') # Stepper Multiplexer # multiplexSections = [] # for i in range(0, numExtruders): # multiplexSections.append('EXTRUDER_%i' % i)
# Gantry components for Y Axis base.init_gantry(axisIndex=1) # reading functions hardware.hardware_read() base.gantry_read(gantryAxis=1, thread='servo-thread') hal.addf('motion-command-handler', 'servo-thread') #numFans = c.find('FDM', 'NUM_FANS') #numLights = c.find('FDM', 'NUM_LIGHTS') # Axis-of-motion Specific Configs (not the GUI) # X [0] Axis base.setup_stepper(section='AXIS_0', axisIndex=0, stepgenIndex=0, stepgenType='hm2_5i25.0.stepgen') # Y [1] Axis base.setup_stepper(section='AXIS_1', axisIndex=1, stepgenIndex=1, stepgenType='hm2_5i25.0.stepgen', thread='servo-thread', gantry=True, gantryJoint=0) base.setup_stepper(section='AXIS_1', axisIndex=1, stepgenIndex=2, stepgenType='hm2_5i25.0.stepgen', gantry=True, gantryJoint=1)
hal.Pin('itripodkins.Bx').set(c.find('MACHINE', 'TRIPOD_BX')) hal.Pin('itripodkins.Cx').set(c.find('MACHINE', 'TRIPOD_CX')) hal.Pin('itripodkins.Cy').set(c.find('MACHINE', 'TRIPOD_CY')) hardware.init_hardware() storage.init_storage('storage.ini') # reading functions hardware.hardware_read() hal.addf('motion-command-handler', 'servo-thread') hal.addf('motion-controller', 'servo-thread') # Axis-of-motion Specific Configs (not the GUI) # XYZ axes for i in range(3): base.setup_stepper(section='AXIS_%i' % i, axisIndex=i, stepgenIndex=i, thread='servo-thread') servo.setup_servo_axis(servoIndex=0, section='AXIS_5', axisIndex=5, pwm='hpg.pwmgen.00.out.00', thread='servo-thread') servo.setup_servo_axis(servoIndex=1, section='AXIS_3', axisIndex=3, pwm='hpg.pwmgen.00.out.01', thread='servo-thread') #hal.Pin('motion.digital-out-10').link('mirror-deploy') #servo.setup_servo_toggle(servoIndex=1,section='MIRROR',pwm='hpg.pwmgen.00.out.01', selectSignal='mirror-deploy', thread='servo-thread')
# reading functions hardware.hardware_read() hal.addf('motion-command-handler', 'servo-thread') hal.addf('motion-controller', 'servo-thread') numFans = c.find('FDM', 'NUM_FANS') numExtruders = c.find('FDM', 'NUM_EXTRUDERS') numLights = c.find('FDM', 'NUM_LIGHTS') hasHbp = c.find('FDM', 'HAS_HBP') # Axis-of-motion Specific Configs (not the GUI) ve.velocity_extrusion(extruders=numExtruders, thread='servo-thread') # XYZ axes for i in range(3): base.setup_stepper(section='AXIS_%i' % i, axisIndex=i, stepgenIndex=i, thread='servo-thread') # Extruder, velocity controlled for i in range(0, numExtruders): base.setup_stepper(section='EXTRUDER_%i' % i, stepgenIndex=(3 + i), velocitySignal='ve-extrude-vel') # Extruder Multiplexer base.setup_extruder_multiplexer(extruders=numExtruders, thread='servo-thread') # Stepper Multiplexer multiplexSections = [] for i in range(0, numExtruders): multiplexSections.append('EXTRUDER_%i' % i) base.setup_stepper_multiplexer(stepgenIndex=4, sections=multiplexSections, selSignal='extruder-sel', thread='servo-thread')
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') withAbp = c.find('FDM', 'ABP', False) # 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 base.setup_stepper(section='EXTRUDER_0', stepgenIndex=4, velocitySignal='ve-extrude-vel') # Extruder Multiplexer base.setup_extruder_multiplexer(extruders=(numExtruders + int(withAbp)), thread='servo-thread') # Stepper Multiplexer multiplexSections = [] for i in range(0, numExtruders):