- Posts: 1109
- Thank you received: 4
Manual Tool Change
1 year 8 months ago #321458
by JT
Manual Tool Change was created by JT
I'm trying to figure out when iocontrol.0.tool-change is on so I can pop up a window similar to the Axis pop up for tool change.
I'm looking at hal_manualtoolchange.py but not understanding it fully so I'm a bit stumped... any clues?
JT
I'm looking at hal_manualtoolchange.py but not understanding it fully so I'm a bit stumped... any clues?
JT
Please Log in to join the conversation.
1 year 8 months ago #321469
by Aciera
Replied by Aciera on topic Manual Tool Change
Not sure if this helps but 'hal_manualtoolchange.py' is a userspace hal component that needs its pins connected to iocontrol in hal so it can create the popups when a change is requested and pass the information on to iocontrol when the change is completed:
Code:
loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
Please Log in to join the conversation.
1 year 8 months ago #321482
by JT
Replied by JT on topic Manual Tool Change
Thanks, I know how to load and connect to hal_manualtoolchange, I'm trying to figure out how hal_manualtoolchange.py works so I can roll my own using PyQt6.
This part is pretty straight forward to me making the pins
JT
This part is pretty straight forward to me making the pins
Code:
h = hal.component("hal_manualtoolchange")
h.newpin("number", hal.HAL_S32, hal.HAL_IN)
h.newpin("change", hal.HAL_BIT, hal.HAL_IN)
h.newpin("change_button", hal.HAL_BIT, hal.HAL_IN)
h.newpin("changed", hal.HAL_BIT, hal.HAL_OUT)
h.ready()
JT
Please Log in to join the conversation.
1 year 8 months ago #321483
by JT
Replied by JT on topic Manual Tool Change
Perhaps this is a key item
Code:
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
Please Log in to join the conversation.
1 year 8 months ago #321568
by JT
Replied by JT on topic Manual Tool Change
Actually I think I have it all sorted out now...
JT
JT
Please Log in to join the conversation.
Time to create page: 0.435 seconds
