M Code Control of External Solenoid, simple method.


Page 1 of 2 12 LastLast
Results 1 to 20 of 21

Thread: M Code Control of External Solenoid, simple method.

  1. #1
    Member
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    12177
    Downloads
    0
    Uploads
    0

    Default M Code Control of External Solenoid, simple method.

    This topic has come up a few times so I figured I would show the installation I did on my TL2 to control an air blast using a 12VDC 1amp plug-in transformer (wall wart) and a 12VDC solenoid valve.

    The first picture shows the layout of the components on the back of the machine. Air is tapped off the inlet side of the machine's regulator and the wall wart is plugged into the 120VAC outlet on the machine. A white wire enters a hole in the side of the cabinet. On some (older) machines there may be a four or six pin DIN socket already wired to a relay in this hole.

    The M Code relays, also called the User M relays in the Haas manual are already mounted on a board inside the cabinet. Depending on the options on the machine some of these relays may already be used. If they are all in use it will be necessary to get a secondary board with more relays installed.

    The second and third pictures show the relays on different machines. On some machines they are up behind a cover plate and you need to be a contortionist to get at them. Fortunately they can be unplugged so getting wires into them is not difficult. In the picture showing the relays up behind the cover plate the white wire is visible.

    The fourth picture shows the wiring:

    The positive line from the wall wart goes to terminal 1. On most wall warts this is the line with the light colored stripe. If it is not clear it is necessary to identify it using a voltmeter.

    The negative line goes to terminal 5.

    The User M relay inside the machine is wired across terminals 3 and 6. The relay has three connections; COM, NO and NC and the ones used are COM and NO.

    The solenoid valve is wired across terminals 2 and 4.

    SNUBBER DIODE

    This is important when DC is switched with these small relays. It prevents sparking that can damage the relay contacts.

    I used an LED partly because I had some handy and partly because you can see it working. It flashes briefly when the relay contacts open.

    The LED is wired across terminals 2 and 4 with the flat on the rim of the plastic lens toward terminal 2.

    I wired up all the external stuff before connecting the wires to the relay. This way I could test things just by touching the ends of the white wire together.

    M CODE used to activate relay.

    Codes M51 to M58 turn the relays on, M61 to M68 turn them off. When they are turned on a little LED below them on the board lights up so you can easily find which code to use for which relay using MDI.

    Of course it is necessary to give the typical disclaimer: If you decide to wire up your own system it is at your own risk. At least the risk is minimal when a 12VDC supply is used. The User M relays can switch up to 3 amps at 120VAC but I would never use them on that voltage.

    Similar Threads:
    Attached Thumbnails Attached Thumbnails M Code Control of External Solenoid, simple method.-overview-jpg   M Code Control of External Solenoid, simple method.-relays-jpg   M Code Control of External Solenoid, simple method.-relays2-jpg   M Code Control of External Solenoid, simple method.-wiring-jpg  

    An open mind is a virtue...so long as all the common sense has not leaked out.


  2. #2
    Registered
    Join Date
    May 2004
    Location
    United States
    Posts
    4519
    Downloads
    0
    Uploads
    0

    Default

    Good job.



  3. #3
    Registered
    Join Date
    Aug 2009
    Location
    US
    Posts
    235
    Downloads
    0
    Uploads
    0

    Default

    Yup, did the exact same thing with the Mini about 2 years ago when my iscar rep said I need to run my end mills dry. The only difference is I used a radio shack transformer, so it does the same thing as yours it just cost twice as much. Speaking of radio shack, have you seen their prices for our probe batteries? $26 for the two! Who are they kidding?



  4. #4
    Registered
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1389
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by double a-ron View Post
    Yup, did the exact same thing with the Mini about 2 years ago when my iscar rep said I need to run my end mills dry. The only difference is I used a radio shack transformer, so it does the same thing as yours it just cost twice as much. Speaking of radio shack, have you seen their prices for our probe batteries? $26 for the two! Who are they kidding?
    Make sure you get the right radio batts. they sell 2 types that look the same but have a slightly different power cap.( they were the expensive ones) the green striped white ones are cheaper and the exact same brand that came with the probe system.
    Batteries Batteries Batteries sells them I believe for $5-$7 each at there stores



  5. #5
    Registered
    Join Date
    Jan 2007
    Location
    USA
    Posts
    1389
    Downloads
    0
    Uploads
    0

    Default

    Nice post Geof



  6. #6
    Registered
    Join Date
    Oct 2011
    Location
    USA
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by Delw View Post
    Nice post Geof
    Yes, very good post and info, however, we are a small shop and I wear many hats and right now something else has come up, so the air blast is on the back-burner again lol

    I will post pics and info when I get back on it and get it done. I already have air and a small ball valve connected to the p-cool nozzle so it can be adjusted, but I've been programming M00 in the program when I want to change from coolant to air and then just manually turn the ball valve on or off.......can't wait to get this working with M codes



  7. #7
    Member
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    12177
    Downloads
    0
    Uploads
    0

    Default

    Quote Originally Posted by murraymold View Post
    ...I've been programming M00 in the program when I want to change from coolant to air and then just manually turn the ball valve on or off.......can't wait to get this working with M codes
    This is what I am doing, changing from coolant to air to blow chips out of two chambers I am machining in acrylic.

    The entry hole for the tool is 1.000" and the chamber diameter is 1.900".

    Attached Thumbnails Attached Thumbnails M Code Control of External Solenoid, simple method.-chambers-jpg  
    An open mind is a virtue...so long as all the common sense has not leaked out.


  8. #8
    Registered WallyL7's Avatar
    Join Date
    Dec 2008
    Location
    USA
    Posts
    717
    Downloads
    0
    Uploads
    0

    Default

    Great post, Geof! Thanks!

    Tim


  9. #9
    Member
    Join Date
    Nov 2006
    Location
    US
    Posts
    490
    Downloads
    0
    Uploads
    0

    Default

    Older machine....

    Attached Thumbnails Attached Thumbnails M Code Control of External Solenoid, simple method.-img_0676-year-1993-vf1-jpg  


  10. #10
    Registered
    Join Date
    Oct 2011
    Location
    USA
    Posts
    4
    Downloads
    0
    Uploads
    0

    Default

    Finally got a chance to finish up our VF3. Works great, thanx for all the help/replies. Now I'm onna do our TM1 the same when I get a chance.[IMG][/IMG]



  11. #11
    Registered
    Join Date
    Nov 2009
    Location
    USA
    Posts
    4
    Downloads
    1
    Uploads
    0

    Default

    Wired our SMM2 yesterday, using relay M21 and M51/M61 to turn it on/off. I was wondering if there was a way to get it to work with the M83/M84 auto air gun function so I can control the valve with Shift+Coolant on the panel.



  12. #12
    Member
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    12177
    Downloads
    0
    Uploads
    0

    Default

    If you could find the relay/pins on the board that control the auto air gun you should be able to wire into them.

    I have no idea which ones they are but I guess you could just write a little loop in MDI to do M83 then pause then M84 and back to the beginning and have a look to see if any led blinks on the board.

    An open mind is a virtue...so long as all the common sense has not leaked out.


  13. #13
    Registered
    Join Date
    Aug 2011
    Location
    USA
    Posts
    37
    Downloads
    0
    Uploads
    0

    Default

    I believe is plug P66 on the I/o board for the Air blast output. Run the M83 /M84 to find out which pins are the output power. Note. This is a 115vac/1amp output power plug .



  14. #14
    Member HayreAss's Avatar
    Join Date
    Jun 2006
    Location
    USA
    Posts
    106
    Downloads
    0
    Uploads
    0

    Default

    Is there a reason you guys use a wall wart instead of using a spare 12v off of the Power Supply in the machine?



  15. #15
    Member
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    12177
    Downloads
    0
    Uploads
    0

    Default

    Yes, if I pinch a wire somewhere around the machine and fry a Wall Wart I replace it at a cost of about $12 and the machine is not down due to me frying the internal power supply.

    An open mind is a virtue...so long as all the common sense has not leaked out.


  16. #16
    Member HayreAss's Avatar
    Join Date
    Jun 2006
    Location
    USA
    Posts
    106
    Downloads
    0
    Uploads
    0

    Default

    Excellent reason.



  17. #17
    Community Moderator Al_The_Man's Avatar
    Join Date
    Dec 2003
    Location
    Canada
    Posts
    24221
    Downloads
    0
    Uploads
    0

    Default

    You could always fuse individual outputs, this is quite common where solenoids are involved.
    Al.

    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.


  18. #18
    Registered
    Join Date
    Apr 2006
    Location
    USA
    Posts
    235
    Downloads
    0
    Uploads
    0

    Default

    Using Geof's post for referene and other people's examples I wired up the 5C pneumatic closer to the M-code relay. I am hoping to eventually integrate some sort of bar pusher/buller to the TL-2.

    The solenoid is setup to close the collet when de-energized. After a while I got a tired of having to use MDI just to open and close the collet so I added a parallel swtich to the foot control pedal.

    Thanks Geof and fellow Haas users.

    John



    Last edited by JohnJW; 05-05-2012 at 01:47 AM.


  19. #19
    Member
    Join Date
    Jul 2005
    Location
    usa
    Posts
    207
    Downloads
    3
    Uploads
    0

    Default

    For those of you with p-cool and want programmable air blast. This works great for me. Made it a few years ago. Will get a pic of it on the machine.

    Attached Thumbnails Attached Thumbnails M Code Control of External Solenoid, simple method.-airblastpcool-jpg  


  20. #20
    Member HelicopterJohn's Avatar
    Join Date
    Dec 2005
    Location
    United States
    Posts
    769
    Downloads
    0
    Uploads
    0

    Default Air Blast and Pcool

    Hi,

    Here are a couple of links to videos I did about a year ago. They have to do with air blast and Pcool.

    Part 1

    http://www.youtube.com/watch?v=Xfrhq8aCu38]Coolant Air Solenoid Installation Part 1.wmv - YouTube

    Part 2

    "http://www.youtube.com/watch?v=IxOgYId27tw"]http://www.youtube.com/watch?v=IxOgYId27tw

    Intro Air Solenoid

    http://www.youtube.com/watch?v=B1ArxUjLy5c]Programable Coolant Air Solenoid Introduction - YouTube

    Air Solenoid Valve

    http://www.youtube.com/watch?v=zssH53f_7sA]HAAS TM-1P Air Solenoid Valve Utilizing M23 Relay - YouTube

    Enjoy!

    John

    2007 HAAS TM-1P OneCNC XR5 Mill Pro. Shopbot PRT running Mach3 2010 Screen Set, Super PID and PMDX Electronics.Check out my Gallery on: http://www.johnsmarinesolutions@gmail.com


Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

M Code Control of External Solenoid, simple method.

M Code Control of External Solenoid, simple method.