- Posts: 19306
- Thank you received: 0
Manual tool change button
9 years 11 months ago #83062
by andypugh
Replied by andypugh on topic Manual tool change button
what do you want to happen? I assume you want some sort of interlock logic between the input pin for the release button and the output pin that unclamps the tool?
Please Log in to join the conversation.
9 years 11 months ago #83155
by Jake
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.
Replied by Jake on topic Manual tool change button
Code:
....
# 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 to join the conversation.
9 years 11 months ago #83160
by andypugh
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.
Have a look at sim_pin: linuxcnc.org/docs/2.7/html/man/man1/sim_pin.1.html
Replied by andypugh on topic Manual tool change button
Jake wrote: 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 to join the conversation.
9 years 11 months ago #83163
by Jake
Replied by Jake on topic Manual tool change button
on the and2.0.servo-thread
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!
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 to join the conversation.
9 years 11 months ago #83164
by andypugh
Replied by andypugh on topic Manual tool change button
If you
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
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 to join the conversation.
9 years 11 months ago #83187
by Jake
Replied by Jake on topic Manual tool change button
I added
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
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 to join the conversation.
9 years 11 months ago #83190
by andypugh
Replied by andypugh on topic Manual tool change button
100 was a crazy example. I think that in practice most components are limited to no more than 32 instances.
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.
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 to join the conversation.
9 years 11 months ago #83191
by Jake
Replied by Jake on topic Manual tool change button
Actually I tried count=2 it didnt like it either. since I only have the one for the Estop and tool handling I figured I would just have what I needed.
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.
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 to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
Less
More
- Posts: 4739
- Thank you received: 2
9 years 11 months ago #83192
by Todd Zuercher
Replied by Todd Zuercher on topic Manual tool change button
Did you add the addf lines to your hal file? You have to have the addf for each instance of a halcomponent you use.
(for two and2 and two near)
(for two and2 and two near)
Code:
addf and2.0 servo-thread
addf and2.1 servo-thread
addf near.0 servo-thread
addf near.1 servo-thread
Please Log in to join the conversation.
9 years 11 months ago #83193
by Jake
Replied by Jake on topic Manual tool change button
I have addf for all of them except for the below. I have not touched any of the code below. But there is no addf there,
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?
Thanks!!!! I need to search to see if I see the addf is hiding somewhere else
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?
Code:
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 to join the conversation.
Time to create page: 0.072 seconds
