Need Help! Coolant M8 Rapids (Air Blast/Mister)
Posted: Tue Jun 13, 2023 9:08 pm
Hi Everyone,
I have a 4x8 CNC that I made a while ago, and I finally got an air blaster for when I cut aluminum, etc...
So I need some help.
The code below I am trying to get up and working, but I am having issues with regard to the macro loop side of things. I have an air blaster/mister that uses siphoning. I have the solenoid and solid state relay tied to M8 (Flood), the pinout is Port 2 Pin 14 for the relay (C94 Board - ETH300). I am also using Garry's screen set 2022. When I use the macro loop the air blast stays on but only when, say, I set the Zheight for instance to 2, the solenoid goes on and off as it passes the desired number instead of staying off as it passes. I am using output triggers as well.
I used Dan911's macro below but modified it to try and get it working. Basically, this macro is to turn off coolant on rapids. I just want it to read that M8 is activated and to use the Z height to determine when to turn off the pinout and on, using the information from DRO Z Height. If anyone could come up with a solution to my problem that would be great!
I have a 4x8 CNC that I made a while ago, and I finally got an air blaster for when I cut aluminum, etc...
So I need some help.
The code below I am trying to get up and working, but I am having issues with regard to the macro loop side of things. I have an air blaster/mister that uses siphoning. I have the solenoid and solid state relay tied to M8 (Flood), the pinout is Port 2 Pin 14 for the relay (C94 Board - ETH300). I am also using Garry's screen set 2022. When I use the macro loop the air blast stays on but only when, say, I set the Zheight for instance to 2, the solenoid goes on and off as it passes the desired number instead of staying off as it passes. I am using output triggers as well.
I used Dan911's macro below but modified it to try and get it working. Basically, this macro is to turn off coolant on rapids. I just want it to read that M8 is activated and to use the Z height to determine when to turn off the pinout and on, using the information from DRO Z Height. If anyone could come up with a solution to my problem that would be great!
- Code: Select all
/ ================================================================================================
// Flood on/off M8 and ZHeight
// ================================================================================================
double Zpos = AS3.Getfielddouble(228);
bool stateNow = ((Zpos < ZHeight) && (exec.GetLED(53)
if(stateNow) {exec.Setoutpin(2, 14);}
else
if(ButOnOff) {exec.Setoutpin(2, 14);}
else
{exec.Clroutpin(2, 14);}
// ================================================================================================
#Events
// ================================================================================================
const int Port = 2; // Port number
const int Pin = 14; // Pin number
const double ZHeight = 2; // Set Z Height below on above off
Dan911
Posts: 613
Joined: Mon Oct 31, 2016 1:22 am
Location: USA
Top
Re: Coolant on/off on Rapids