- Posts: 19306
- Thank you received: 0
Manual tool change button
(I am slightly surprised that that isn't already in the config)
linuxcnc.org/docs/2.7/html/gui/axis.html#_manual_tool_change
(and the HAL required is here: github.com/LinuxCNC/linuxcnc/blob/master...manualtoolchange.hal )
Once the pop-up dialog has appeared the actual manual toolchange is quite separate.
Please Log in to join the conversation.
Please Log in to join the conversation.
Easy test, just MDI "M6 T2" and see what happens.Jake wrote: It may already be in there. I have not found it.
But I also want to be setup where if the spindle is not running I can reach up push the button and drop the tool out of the spindle.
That just needs an "and2" on the spindle speed "near" 0 and the button being pressed.
You could get more elaborate, and prevent the spindle moving when the button was pressed, for example.
linuxcnc.org/docs/2.7/html/man/man9/and2.9.html
linuxcnc.org/docs/2.7/html/man/man9/encoder.9.html
linuxcnc.org/docs/2.7/html/man/man9/near.9.html
Please Log in to join the conversation.
Between work and masters classes the shop has been greatly neglected.
Soooo
All the above code needs to be in "manual tool change.hal" right?
The file is there, (still want to get the tool changer to work, but thats for another thread)
I have pico PPMC hardware,
My spindle has a run forward command needed along with a speed input to run.
If running a program, disable forward spindle run, request tool change, I can push button, change tool, acknowledge tool changed, resume program.
Or allow tool change any time "spindle forward" is not true, and block "spindle forward" any time tool change button is pressed.
loadrt and2
loadrt near
...
addf and2.0.servo-thread
addf near.0 servo-thread
...
#
net spindle-speed encoder.0.velocity => near.0.in1
setp near.0.in2 0
setp near.0.difference 2.0
net spindle-stopped near.0.out => and2.0.in0
net spindleFWD motion.spindle-forward ppmc.dout.10.out (must be false)
So all my inputs and outputs will be
# Release tool solenoid on SSR10
net release-tool ppmc.0.dout.10.out
#Release tool button on Input 26
net release-button ppmc.0.din.26.in
I do have mechanical limits if, the spindle is not locked it disables the spindle from moving, there is also a limit switch to send to the controller to disable forward run. I want to make sure that fwd run is disabled during a tool change, I dont want to risk that.
I am still digging through the docs to try to get this figured out. Hopefully be at the point where I can make some chips with it later this week. This machine is tighter than I thought it was going to be, backlash is 4-9 ten thou
Please Log in to join the conversation.
Jake wrote: If running a program, disable forward spindle run, request tool change, I can push button, change tool, acknowledge tool changed, resume program.
The hal_manualtoolchange component has a HAL pin to acknowledge tool changed. (hal_manualtoochange.change-button)
github.com/LinuxCNC/linuxcnc/blob/master...ualtoolchange.py#L56
If your machine can tell that there is a tool in the spindle then you could trigger that pin on a falling edge of the release button.
(it needs to know that there is a tool in the spindle, otherwise the spindle would start when the tool was removed and the button was released, if you do it as a two-stage process.
Please Log in to join the conversation.
So I can have my inputs in the IOcontrol.hal file
for
spindle-locked
release-button
release-tool
Can I have two syntax tied to the same pin? I have one action when its true and another action from when its false or since these will be in the tool change hal I dont have to have them in the PPMC IO file?
I am not understanding where the and2 and near0 need to be in the code
Thanks for all the help! I bet once I get past this the tool changer wont be too bad to deal with!
Please Log in to join the conversation.
You can have them in any HAL file that is specified in the INI file. Including in a separate one all of their own.Jake wrote: So I can have my inputs in the IOcontrol.hal file
Yes, any HAL "writer" pin can connect to one signal, and that can be connected to any number of reader pins.Can I have two syntax tied to the same pin? I have one action when its true and another action from when its false or since these will be in the tool change hal I dont have to have them in the PPMC IO file?
Also, the ppmc pins have both in and in-not pins, so you can connect different effects to each state of the pin.
I am not understanding where the and2 and near0 need to be in the code!
It isn't really code, not in the sense of a program. The HAL file is interpreted just once at startup, and at that point all the pins and functions are connected together as specified by the file. Then the inputs and outputs are updated every servo-period (normally 1mS)
Please Log in to join the conversation.
the "manual_toochange" does not show up in my hal configuration. I know I need to put load manual tool change somewhere but I cant find where.
The manual tool change is in the folder, and when I MDI M6 ### like you said it does not give me an error.
hopefully this will work in the IO control
Thanks!
Please Log in to join the conversation.
Or, incorporate the HAL lines to your HAL file. (in which case, without the unlinkp commands)
github.com/LinuxCNC/linuxcnc/blob/master...manualtoolchange.hal
Please Log in to join the conversation.
Pushing the button on the head I do not get any response (controller does see it) and with a M6 T2 MDI command I do not get anything.
Is there something I need to add into the manual toolchange.HAL to tell it?
Thanks again!
Please Log in to join the conversation.
