Coolant on/off on Rapids

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

Re: Coolant on/off on Rapids

Postby Dan911 » Mon Jan 01, 2018 12:47 pm

alex_s wrote:this stuff at least on Datron and Mori is used on Mist cooling only, and mostly then when you use this expensive evaporation kerosene ethanol coolant, which costs a fortune even in Barrel amounts.

i thought to use it on G0 because no one should cut on rapids :D


To activate mist only when cutting/drilling IMO using Z position in macro is a much better approach to achieve this than G0. For example set position in macro to zero and mist will only activate when M7 is enabled and below 0. Above zero off(not cutting/drilling).

Dezsoe I hope you don't mind but edited your macro for Z position example. I tested quickly and works fine.

Code: Select all
// ================================================================================================
// Switch output on Zheight and Mist/Flood is on
// ================================================================================================

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

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

if(stateNow)
{exec.Setoutpin(MistPort, MistPin);
exec.Code("G4"+"P"+pause);
while(exec.IsMoving()){}
}   
  else
  {exec.Clroutpin(MistPort, MistPin);} 
}

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

#Events

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

const int MistPort = 1;                  // input  Port number
const int MistPin = 1;                  // input  Pin number
const int pause = 1;                     //input Pause for mist/flood startup
static bool lastState = false;
const double ZHeight = 0;               // Set Z height for below on and above off
Dan911
 
Posts: 218
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

Re: Coolant on/off on Rapids

Postby Dan911 » Tue Jan 02, 2018 1:11 am

Received PM macro not working...Should of posted instructions.

1. In "AXIS SETUP/SPINDLE" M7 relay pin and port needs to be set to zero.
2. In "CONFIGURATION/IO TRIGGER/OUTPUT TRIGGER" set up port and pin here used for M7. Input this port and pin in bottom of macro. Example below.

const int MistPort = ?; // input Port number
const int MistPin = ?; // input Pin number


You can set a pause for when M7 is enabled if you like, if not use 0. Example below.

const int pause = ????;


ZHeight is the value used for any value below is on and above is off. Example below.

const double ZHeight = 0;

For Zheignt and pause use units machine is setup for.
Dan911
 
Posts: 218
Joined: Mon Oct 31, 2016 1:22 am
Location: USA

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) {
   exec.Miston();
   while(exec.IsMoving()){}
}   
else {
   exec.Stopcoolant(); 
}


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 ^^
alex_s
 
Posts: 41
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);}   

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

else

{exec.Clroutpin(Port, Pin);}

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

#Events

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

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

Dan911
 
Posts: 218
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
https://www.youtube.com/watch?v=7PQxwte-2z4

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

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

Previous

Return to Ask a question from support here

Who is online

Users browsing this forum: No registered users and 4 guests