from fdm.config import base from fdm.config import storage from fdm.config import motion import cramps as hardware # 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() 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') 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
#from fdm.config import motion from fdm_local.config import motion from fdm.config import base import cramps as hardware hal.epsilon[1] = 0.1 # 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)