hardware.setup_exp('exp%i' % i) base.create_temperature_control(name='e%i' % i, section='EXTRUDER_%i' % i, coolingFan='f%i' % i, hotendFan='exp%i' % i, hardwareOkSignal='temp-hw-ok', thread='servo-thread') # LEDs for i in range(0, numLights): base.setup_light('l%i' % i, thread='servo-thread') # Standard I/O - EStop, Enables, Limit Switches, Etc errorSignals = ['temp-hw-error', 'watchdog-error', 'hbp-error'] for i in range(0, numExtruders): errorSignals.append('e%i-error' % i) 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') # write out functions hardware.hardware_write() # read storage.ini storage.read_storage() # start haltalk server after everything is initialized # else binding the remote components on the UI might fail hal.loadusr('haltalk', wait=True)
# 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') # write out functions hal.addf('motion-controller', 'servo-thread') hardware.hardware_write() # trinamic_dbspi component: ---------------------------------------------------------------------# rt.loadrt('trinamic_dbspi', dbspi_chans='hm2_5i25.0.dbspi.0') trinamicdbspi = hal.Component('trinamic-dbspi.0') # create the signals for connecting the components