The appropriate "hal" file starts it, unconditionally, using
Code:
loadusr -Wn zbotatc -n zbotatc python/hal_zbotatc.py
For example, your HAL file might be ./configs/tormach_mill/tormach_mill_mesa.hal or something else in that directory.
The python file has interesting hooks like:
Code:
def disable(self):
assert ppglobals.GUI_THREAD_ID == thread.get_ident()
self.redis.hset('machine_prefs', 'toolchange_type', MILL_TOOLCHANGE_TYPE_REDIS_MANUAL)
self.operational = False
def enable(self):
assert ppglobals.GUI_THREAD_ID == thread.get_ident()
self.redis.hset('machine_prefs', 'toolchange_type', MILL_TOOLCHANGE_TYPE_REDIS_ZBOT)
self.operational = True #takes effect at RESET
The tormach_mill_ui.py file creates the zbot_atc object, and then checks with settings whether to use it:
Code:
if self.machineconfig.machine_class() == 'mill':
try:
tc_type = self.redis.hget('machine_prefs', 'toolchange_type')
if tc_type == MILL_TOOLCHANGE_TYPE_REDIS_ZBOT:
self.error_handler.log("Tool change type set to ATC")
self.atc.enable()
self.show_atc_diagnostics()
So I think your main job would be to poke the right parts into the settings file to tell it an ATC is present.
This might be available on the "setup" page? (I'm not at the mill right now)