Results 1 to 7 of 7

Thread: help using custom M codes and M-FIN on haas

  1. #1
    Registered
    Join Date
    Jul 2008
    Location
    usa
    Posts
    25
    Downloads
    0
    Uploads
    0

    help using custom M codes and M-FIN on haas

    I've been reading the manual and trying to figure out what the M-FIN switch does.

    Right now, M21 is hooked up to the outside M function connector on the side of the haas.

    If I issue:
    M51;

    Then the M21 relay is closed.

    If I use M61; then M21 relay is turned off.

    Questions:
    1) What does M-FIN do? In the technical manual it says it is normally open (connected to +12V) and closed if connected to gnd.

    2) Does the issue of "M51;" wait until it receives a closing of "M-FIN" before processing the next line OR does one need to poll read M-FIN somehow in a loop?

    4) How does one "read" M-FIN? Like how would one write the following in G-Code:
    -turn on M21 relay
    -if M-FIN is closed then turn off M21 relay
    -else wait and continuously recheck M-FIN

    3) Why is M51 mapped to turn on M21 instead of M21 directly? What does "M21;" do if issued in MDI mode?

    Thanks in advance for any help!


  2. #2
    Registered serviceman's Avatar
    Join Date
    Apr 2007
    Location
    usa
    Posts
    178
    Downloads
    0
    Uploads
    0
    51 61 do not wait for the mfin and basically stay where you put them until you reset 21 wairts for the m fin you would wire a switch to the m fin and when you close the switch the machine will open the contact basically m21 close contact wait for m fin mfin received open contact m51 close until reset or 61
    REYTECH Machine Service Corp. CNC repair NY, NJ
    http://www.reytechmachine.com


  3. #3
    Registered
    Join Date
    Jul 2005
    Location
    Canada
    Posts
    11,961
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by josh591 View Post
    4) How does one "read" M-FIN? Like how would one write the following in G-Code:
    -turn on M21 relay
    -if M-FIN is closed then turn off M21 relay
    -else wait and continuously recheck M-FIN
    !
    If you write M21 the machine will close the M21 relay contacts and then stop waiting for the M-Fin circuit to be closed. In the bottom corner of the screen you will see the word MFIN or something like that.

    When the MFin circuit is closed then the machine will continue and you have to program the M code to open the relay contacts.(I forget which it is)
    An open mind is a virtue...so long as all the common sense has not leaked out.


  4. #4
    Registered
    Join Date
    Sep 2008
    Location
    Canada
    Posts
    11
    Downloads
    0
    Uploads
    0
    M51 turn M21 Relay On
    M61 Turn M21 Relay Off (reset or m30 will also do this)
    M121 Turn M21 Relay On and Wait for M-fin Input before continuing the program

    I use the M121 Input with a Robot I/O sending the M-fin signal.

    Edit* There is also a M-fin Parameter so the M/C will always wait for M-fin at all M21-28 codes. I personally Use M121 so i control when the M/C needs to wait and when it does not.


  • #5
    Registered
    Join Date
    Sep 2008
    Location
    The Netherlands
    Posts
    1
    Downloads
    0
    Uploads
    0
    Ok, as I read this (and please correct me if I'm wrong) you are trying to use an M21 (or 22 or.. ) in combination with a robot system. The way this works in the company I work at is as follows:

    The M21 calls the robot system, making it load a product. When the robot is done it calls off the M21, making the machine continue it's cycle. So the machine will be stuck in M21 until it get's a signal from the outside to continue.


  • #6
    Registered
    Join Date
    Feb 2008
    Location
    USA
    Posts
    6
    Downloads
    0
    Uploads
    0

    Little help, more question

    It's not the same application you're using, but it's similar. We use a limit switch as a broken tool detector. We program the VF5 to drive to the switch, and depress it. Then we fire the M21. We have the switch wired into the M21 relay and the M-fin circuit. That way, if the switch (normally open) is closed by the tool, as soon as we fire the M21, it reads the signal and goes on. If the tool is broke, no switch closes, so the machine sits there and waits. Here's my question. Does anyone know of a way to make the machine alarm out (blink red) is the M-fin isn't made after a certain amount of time? As to the robot, if you fired the M21, the machine would wait for a signal. Once the robot does it's thing, fire an output from it to the M-fin circuit, and the machine would then continue.


  • #7
    Registered
    Join Date
    Sep 2008
    Location
    Canada
    Posts
    11
    Downloads
    0
    Uploads
    0
    Quote Originally Posted by Fido57 View Post
    It's not the same application you're using, but it's similar. We use a limit switch as a broken tool detector. We program the VF5 to drive to the switch, and depress it. Then we fire the M21. We have the switch wired into the M21 relay and the M-fin circuit. That way, if the switch (normally open) is closed by the tool, as soon as we fire the M21, it reads the signal and goes on. If the tool is broke, no switch closes, so the machine sits there and waits. Here's my question. Does anyone know of a way to make the machine alarm out (blink red) is the M-fin isn't made after a certain amount of time? As to the robot, if you fired the M21, the machine would wait for a signal. Once the robot does it's thing, fire an output from it to the M-fin circuit, and the machine would then continue.
    Assuming you don't have a tool probe.
    M96 Jump if no Input

    (your program here)
    N50 M21 (m21 for tool check)
    N60 M96 P100 Q27 (Loop to N100 if spare input [#27] is 0, 0=open)
    .
    M30

    N100 #3000=1(TOOL BROKEN), programmable alarm

    that should work for you, Just have to change the Q27 to whatever spare input your M21 is on in diagnostic screen.think its 27 :P

    Cheers


  • Similar Threads

    1. Haas Quick Codes
      By MetalMolder in forum Haas Mills
      Replies: 3
      Last Post: 04-27-2008, 09:16 PM
    2. Nc PLot and Haas G71 G72 codes
      By PaintItBlue in forum NCPlot G-Code editor / backplotter
      Replies: 10
      Last Post: 12-08-2007, 01:42 PM
    3. M-codes and G-codes 4 Matsuura ES-1000V
      By maximusek in forum G-Code Programing
      Replies: 2
      Last Post: 11-27-2007, 07:41 AM
    4. custom toolholders for Haas lathes ?
      By Mike Braddock in forum Haas Lathes
      Replies: 4
      Last Post: 10-02-2007, 09:56 AM
    5. Haas HL-4 ERROR Codes
      By altcan in forum Haas Mills
      Replies: 27
      Last Post: 09-13-2005, 10:33 AM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.