Manual tool change button
Please Log in or Create an account to join the conversation.
....
# Spindle Limit + DI 11
#net spindle-locked motion.spindle-locked ppmc.0.din.11.in
# will inhibit SPINDLE-FWD when false
.....
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
#need AND for SPINDLE-FWD false for button to work
# net spindle-fwd ppmc.0.dout.08.out => and2.0in2 [color=blue] <---dont know if this is right[/color]
# Tool release button
net release-button ppmc.0.din.26.in => and2.0.in1
# Tool release solenoid
net release-tool and2.0.out => ppmc.0.dout.10.out
Thanks again for all the help with this!
My initial thought on interlocks was
only allow button to work when "SPINDLE-FWD" is false (I need to look into the logic of what will make this command true.) And spindle velocity near 0
Spindle FWD will be disabled if "SPINDLE-LOCKED" false
( I have direct logic to spindle drive as well as controller input for spindle lock condition)
If ( SPINDLE-FWD false & SPINDLE-VEL near 0 & TOOL-UNLOCK true)
then (RELEASE-TOOL)
I need to figure out if M5 makes the SPINDLE-FWD false also.
heading to the machine to play with is some more. Is there a way to setup the simulator setups to test this without firing the machine up like I could "force a input" to see how the control responds so I can tune on this without having the whole machine running?
Thank you again for all the help. I will get to where I can handle this and contribute more one of these days.
Please Log in or Create an account to join the conversation.
only allow button to work when "SPINDLE-FWD" is false (I need to look into the logic of what will make this command true.) And spindle velocity near 0
I tend to use LUT5 for situations where I want to compare a number of logic inputs and have a specific logic output for each state.
heading to the machine to play with is some more. Is there a way to setup the simulator setups to test this without firing the machine up like I could "force a input"
Have a look at sim_pin: linuxcnc.org/docs/2.7/html/man/man1/sim_pin.1.html
Please Log in or Create an account to join the conversation.
can I change the "0" to any other number as long as they all match the logic string I am working on? Looks like "0" is part of my Estop logic and wont load.
Thanks!
Please Log in or Create an account to join the conversation.
loadrt and2 count=100
then you will have and2.0, and2.2, ... and2.99
So, yes, you can use and2.1 but you have to make sure that you have an and2.1
Please Log in or Create an account to join the conversation.
loadrt near count=100
loadrt and2 count=100
It will not load like that, I looked at the AND2 page and it looks the same it gives me the error "insmod for and2 failed returned -1"
I tried with no count, with different numbers, it does not like it for some reason
Please Log in or Create an account to join the conversation.
Use count=2 if you only need 2 of them. Any more is a waste of memory.
Each one needs it's own addf command.
Please Log in or Create an account to join the conversation.
It does not like any variation, could it be in another hal file that is upsetting it in this hal?
Thanks!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I do have loadrt and2 count=1 in another hal file (ppmc_load.hal) I am going to try changing it there to see if I can make it happy. I am starting to think just going to the ATC would have not been that much harder.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Away
- Platinum Member
- Posts: 5007
- Thank you received: 1441
(for two and2 and two near)
addf and2.0 servo-thread
addf and2.1 servo-thread
addf near.0 servo-thread
addf near.1 servo-thread
Please Log in or Create an account to join the conversation.
There is "loadrt and2 count=1" in my ppmc_load.hal file could this be causing the issue as the loadrt is in another hal file?
net ppmcEstop ppmc.0.din.estop.in
net ppmcEstop and2.0.in0
net EstopOkIn estop-latch.0.fault-in
net EstopOkIn and2.0.out
net EstopOkOut ppmc.0.dout.07.out
net EstopOkOut ppmc.0.dout.Estop.out
net EstopOkOut iocontrol.0.emc-enable-in
net EstopOkOut estop-latch.0.ok-out
net EstopOkOut and2.0.in1
net emc-estop-out iocontrol.0.user-enable-out
net emc-estop-out estop-latch.0.ok-in
net emc-estop-reset iocontrol.0.user-request-enable
net emc-estop-reset estop-latch.0.reset
Thanks!!!! I need to search to see if I see the addf is hiding somewhere else
Please Log in or Create an account to join the conversation.