Spindle inhibit while probing
-Clear the Info notifications, if 5 items reached. Leaving the Alerts untouched. It was hiding some important area of my PYVCP sidepanel when the stack of messages was rising.
-Automatic spindle inhibit when probe is in spindle, and set S0 M5. As any input of S and M3 M4 while inhibited, spindle will instantly start, after spindle.0.inhibit is set false.
Interresting, when a pyvcp panel is in the configuration and a halpin is created in the usercommand file, eg. 'comp.newpin("tch", hal.HAL_BIT, hal.HAL_IN)' after a long search i found it as 'pyvcp.tch'
prob_in_spindle = 0 def user_live_update(): global prob_in_spindle #PROB_S0 #PROBE = T999 if s.tool_in_spindle == 999: prob_in_spindle = 1 hal.set_p('spindle.0.inhibit','1') else: if prob_in_spindle == 1: prob_in_spindle = 0 hal.set_p('spindle.0.inhibit','0')
#Clear INFO notifications if >= 5 reached if len(notifications.widgets) >= 5: hal.set_p('axisui.notifications-clear-info','1') else: hal.set_p('axisui.notifications-clear-info','0')
It made me also think about the polling cycles, compare 'user_live_update()' and a userspace Python component with 'time.sleep(0.001). The results are average 51 or 941 cycles / second on my machine.
Here is the link, Phil helped me with his problem recently, you have to change a part of axis, and then you can create comps in usercommand, and use a pyvcp at the same time.
MaHa wrote: Interresting, when a pyvcp panel is in the configuration and a halpin is created in the usercommand file, eg. 'comp.newpin("tch", hal.HAL_BIT, hal.HAL_IN)' after a long search i found it as 'pyvcp.tch'
phillc54 wrote: Yes, that is where the problem is, if you change the following two lines it appears to work ok.
From:To:comp.setprefix("pyvcp")comp1 = hal.component("pyvcp")
From:To:vcpparse.create_vcp(f, comp)vcpparse.create_vcp(f, comp1)