Coolant on/off on Rapids

If you have a question about the software please ask it here.

Re: Coolant on/off on Rapids

Postby alex_s » Wed Jan 03, 2018 12:11 pm

i thought along something like this
Code: Select all
const double ZHeight = 5;

double Zpos = AS3.Getfielddouble(228);
bool stateNow = Zpos < ZHeight &&  AS3.Getbuttonstate(666);

if (lastState != stateNow) {
   lastState = stateNow;

if(stateNow) {
else {

i made an extra button for MistOn while Cutting, and ZHeight at 5. So the Misting starts before the bit enters the material and still blows when it leaves. 5 is very save 1 or 2 should also work, the valve solenoid operates fairly quick and i generally only rapid to 3mm above the part.

i also used the execs directly so you can set the pin in option as usual, not tested yet because its effing cold right now in the Shop ^^
Posts: 64
Joined: Tue Nov 29, 2016 11:45 am

Re: Coolant on/off on Rapids

Postby Dan911 » Thu Jan 04, 2018 4:25 pm

Hi Alex,
I'm glad you found my suggestion using a Z height useful. I'm also very happy to see you eliminated the exec.code(G4) for a pause because that wouldn't have worked with Gcode running. Thanks to Dezsoe who pointed this out to me, and I had to promised him I'll add a Breathalyzer test to my keyboard to continue posting.

Since it's only 11am here I think I can safely make some remarks to your posted macro.

Haven't tested your macro but it seems you eliminate the M7 call from gcode. I suggest using the macro loop for button on/off and M7 calls with Z height. If you have your toggle button just set to true/false this should work.

If anyone sees errors or have a better solution please post, I do think many can find this useful.

Code: Select all
/ ================================================================================================
// Mist on/off  M7 and ZHeight with toggle button override
// ================================================================================================

double Zpos = AS3.Getfielddouble(228);
bool ButOnOff = AS3.Getbuttonstate(20302);
bool stateNow = ((Zpos < ZHeight) &&  (exec.GetLED(52) && (!ButOnOff)));

  if(stateNow) {exec.Setoutpin(Port, Pin);}   

  if(ButOnOff) {exec.Setoutpin(Port, Pin);}


{exec.Clroutpin(Port, Pin);}

// ================================================================================================


// ================================================================================================

const int Port = 1;     // Port number
const int Pin = 1;     // Pin number
const double ZHeight = 0; // Set  Z Height below on above off

Posts: 504
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: Coolant on/off on Rapids

Postby alex_s » Thu Jan 04, 2018 4:32 pm

Hi Dan,

yep as pointed out by this thread z height seems to make much more sense here.
Thanks for looking into it, the button is a toggle true/false button.
The pause did not seem to be an good option, even if it would work, because the movement could be janky, and if you set zHeightValue above zZero with an equivalent amount for the specific solenoid and travel speeds it should not be needed

I also think that this is very use full for anyone who want's to save on coolant in Mist setup, especially the special expensive stuff. I wanted to use a different Button for it because i sometimes use my mister as semi flood ^^

here is a nice Datron video with a more advanced integration of the cooling feature, only on actual cutting + directional

but this solution is more then adequate for at least my purpose

cheers Alex
Posts: 64
Joined: Tue Nov 29, 2016 11:45 am


Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 4 guests