- Posts: 24
- Thank you received: 0
M7 & M8 G codes
- lucky phil
- Topic Author
- Offline
- Junior Member
-
Less
More
10 years 5 months ago #74942
by lucky phil
M7 & M8 G codes was created by lucky phil
Hi all
I have just connected a couple of air/lube line to solenoid on my router for tool tip cooling/lubrication.
I am using the flood coolant(m8) & mist(m7) to operate them.
Two questions:
1. Is there a way to turn them on or off while I have a program running for the times that I forget to have it written in my code.
2.with the coolant mist, I want to pulse it on and off so as to just spray a small amount of lube time to suit what I'm cutting, I have started coding an Arduino to do the pulsing but thought LinuxCNC may be able to do it for me but have not found any info for it.
Ultimately I would like the pulsing to be approx .5 second on & 5-10 seconds off.
any info would be great
Philip
I have just connected a couple of air/lube line to solenoid on my router for tool tip cooling/lubrication.
I am using the flood coolant(m8) & mist(m7) to operate them.
Two questions:
1. Is there a way to turn them on or off while I have a program running for the times that I forget to have it written in my code.
2.with the coolant mist, I want to pulse it on and off so as to just spray a small amount of lube time to suit what I'm cutting, I have started coding an Arduino to do the pulsing but thought LinuxCNC may be able to do it for me but have not found any info for it.
Ultimately I would like the pulsing to be approx .5 second on & 5-10 seconds off.
any info would be great
Philip
Please Log in to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
Less
More
- Posts: 4739
- Thank you received: 2
10 years 5 months ago #74945
by Todd Zuercher
Replied by Todd Zuercher on topic M7 & M8 G codes
1, Yes, when properly configured the mist/lube buttons can override durring a run (I think haven't used them)
2, Yes Linuxcnc could do that with a little HAL logic, no extra hardware required. You could even set up a little vcp screen where you could adjust the frequency/duration.
2, Yes Linuxcnc could do that with a little HAL logic, no extra hardware required. You could even set up a little vcp screen where you could adjust the frequency/duration.
Please Log in to join the conversation.
10 years 5 months ago #74950
by cncbasher
Replied by cncbasher on topic M7 & M8 G codes
yes you can pulse the output either by gcode using o words subs
are you trying to run a lube pump ? or as a coolant , either way there are a few options
such as the lube pump comp , would be ideal for this
forum.linuxcnc.org/forum/47-hal-examples/10935-lube-pump
are you trying to run a lube pump ? or as a coolant , either way there are a few options
such as the lube pump comp , would be ideal for this
forum.linuxcnc.org/forum/47-hal-examples/10935-lube-pump
Please Log in to join the conversation.
- lucky phil
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 24
- Thank you received: 0
10 years 5 months ago #74969
by lucky phil
Replied by lucky phil on topic M7 & M8 G codes
Thanks
I am not using a pump, I have a pressurised container with lube in it, what I want to do is pulse a solenoid which will let the lube flow, I would like to be able to adjust the on & off times occasionally depending what material I am cutting/engraving. I like the sound of being able to have a VCP screen.
The M8 code should be on and left on when engraving to keep the cutter clear of chips, I have a needle valve on the side of my air line which will inject lube into the air stream by turning on M7.
I am not using a pump, I have a pressurised container with lube in it, what I want to do is pulse a solenoid which will let the lube flow, I would like to be able to adjust the on & off times occasionally depending what material I am cutting/engraving. I like the sound of being able to have a VCP screen.
The M8 code should be on and left on when engraving to keep the cutter clear of chips, I have a needle valve on the side of my air line which will inject lube into the air stream by turning on M7.
Please Log in to join the conversation.
10 years 5 months ago #74976
by BigJohnT
Replied by BigJohnT on topic M7 & M8 G codes
I run my lube pump with classicladder. It's easy to set up a pulse timer circuit.
JT
JT
Please Log in to join the conversation.
- lucky phil
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 24
- Thank you received: 0
10 years 5 months ago #75283
by lucky phil
Replied by lucky phil on topic M7 & M8 G codes
Hi JT
so with classic ladder am I able to put some buttons on my screen to turn on & off p/pin 14 & 16 while code is running and have a couple of buttons to adjust the on & off time on one of then(0.25-1.0 second on and 1.0-10.0 seconds off.
Any code snippets to help me would be appreciated as I am just learning linux.
Philip
so with classic ladder am I able to put some buttons on my screen to turn on & off p/pin 14 & 16 while code is running and have a couple of buttons to adjust the on & off time on one of then(0.25-1.0 second on and 1.0-10.0 seconds off.
Any code snippets to help me would be appreciated as I am just learning linux.
Philip
Please Log in to join the conversation.
10 years 4 months ago #75300
by BigJohnT
Replied by BigJohnT on topic M7 & M8 G codes
What part of the puzzle are you missing?
I have a tutorial here:
gnipsel.com/linuxcnc/ladder/index.html
JT
I have a tutorial here:
gnipsel.com/linuxcnc/ladder/index.html
Attachment not found
Code:
loadrt mult2 count=3
# Way Oiler
addf mult2.2 servo-thread
# Way Oiler
setp mult2.2.in0 1000
net mult-vel mult2.2.in1 <= motion.current-vel
net in-motion classicladder.0.floatin-00 <= mult2.2.out
net oil-on hm2_5i20.0.gpio.045.out <= classicladder.0.out-07
JT
Please Log in to join the conversation.
Time to create page: 0.272 seconds
