Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: mongkol 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
-
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
-
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
-
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.
-
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
-
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
-
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.
-
Ton,
What function does your solenoid perform? Coolant? Vaccum? Z axis? ???
Arnie