Hello Guest it is October 16, 2019, 11:48:41 PM

Author Topic: How to control air-solenoid valve with mach3 ?  (Read 7204 times)

0 Members and 1 Guest are viewing this topic.

How to control air-solenoid valve with mach3 ?
« on: May 01, 2011, 07:54:49 AM »
  Hi All,
 I need the help. I try to control air-solenoid valve (3/2) with mach3. I use solenoid valve 220 VAC and use the solid states relay to turn on/off solenoid.
I know the signal of mach3 is 5VDC and I set output on ports and pins  to pin16. My questions,
 How to mach3 will know and control  g-code  to turn on/off this solenoid valve ?

 Ton

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: How to control air-solenoid valve with mach3 ?
« Reply #1 on: May 01, 2011, 08:00:07 AM »
You can possibly use coolant (mist or flood) to control the on/off, so M7 or M8 will turn it oon and M9 off. If you are already using these then you can do similar by writing a custom M code and using that within your code to switch On/Off the output.
Hood
Re: How to control air-solenoid valve with mach3 ?
« Reply #2 on: May 01, 2011, 08:09:44 AM »
  Hood,
 Thanks for the reply. M8 is turn on and M9 is turn off.  My question, How to know this command ( M8/M9 ) come from pin 16 ? How to set up ?

  Ton

Offline Tweakie.CNC

*
  • *
  •  7,947 7,947
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: How to control air-solenoid valve with mach3 ?
« Reply #3 on: May 01, 2011, 08:14:25 AM »
Ton,

I already had a spindle setup on my machine using the M3 and M5 commands for on / off. As the air application did not require the spindle I used the spindle 240 volt supply and spindle relay to power the solenoid via a small (wall wart) transformer. http://www.machsupport.com/forum/index.php/topic,12168.msg78104.html#msg78104

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.

Offline Hood

*
  •  25,855 25,855
  • Carnoustie, Scotland
    • View Profile
Re: How to control air-solenoid valve with mach3 ?
« Reply #4 on: May 01, 2011, 08:18:50 AM »
  Hood,
 Thanks for the reply. M8 is turn on and M9 is turn off.  My question, How to know this command ( M8/M9 ) come from pin 16 ? How to set up ?

  Ton

If you have for example Output 2 set to port 1 pin 16 then go to Config menu, Ports and Pins, Spindle Setup and take the check out of the Coolant relays and enter 2 for the Flood coolant relay and it will turn your solenoid On/Off with M8/M9
Hood
Re: How to control air-solenoid valve with mach3 ?
« Reply #5 on: May 01, 2011, 08:24:22 AM »
Tweakie,
 My machine has  the spindle on Z-axis also. I use pin1 and pin 17 for step and dir to control my spindle. I use M3 and M4 for for and rev.
 I am little puzzled if I use pin 16 be output to control turn on /off the solenoid valve. How to know M8 and M9 commands come from pin 16 output ?
 How to set up ?


   Ton

Offline Tweakie.CNC

*
  • *
  •  7,947 7,947
  • Super Kitty
    • View Profile
    • Tweakie.CNC
Re: How to control air-solenoid valve with mach3 ?
« Reply #6 on: May 01, 2011, 08:33:05 AM »
Ton,

In this config. I have used Output#1 for the spindle CW and CCW and this is mapped to my Port 1 Pin 1. You can choose any output pin you have free.

Tweakie.
Success consists of going from failure to failure without loss of enthusiasm.  Winston Churchill.

Offline zarzul

*
  •  317 317
  • Wyoming, USA
    • View Profile
Re: How to control air-solenoid valve with mach3 ?
« Reply #7 on: May 07, 2011, 12:28:05 PM »
Ton,

What function does your solenoid perform?  Coolant?  Vaccum?  Z axis?  ???

Arnie