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)
# 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 drvctrl = hal.newsig('drvctrl-reg-unsigned', hal.HAL_U32) chopconf = hal.newsig('chopconf-reg-unsigned', hal.HAL_U32) smarten = hal.newsig('smarten-reg-unsigned', hal.HAL_U32) sgcsconf = hal.newsig('sgcsconf-reg-unsigned', hal.HAL_U32) drvconf = hal.newsig('drvconf-reg-unsigned', hal.HAL_U32) fullval_0 = hal.newsig('full-val-0-unsigned', hal.HAL_U32) fullval_1 = hal.newsig('full-val-1-unsigned', hal.HAL_U32) fullval_2 = hal.newsig('full-val-2-unsigned', hal.HAL_U32)