587,752 active members*
4,643 visitors online*
Register for free
Login
Results 1 to 12 of 12
  1. #1
    Join Date
    Feb 2008
    Posts
    586

    Macro A Anyone?

    Hi,


    I thought this needed to be posted. There are so many questions having to do with Macro B, which some machines don't have, but perhaps they DO have Macro A, which nobody ever talks about.

    I'd like to see if someone tests for Macro B and it doesn't work
    (MDI ---> #500 = 1 EOB, Cycle start)
    Tests also for Macro A (MDI --> G65 H01 P#500 Q1 EOB, cycle start) and finds it does work.

    Macro A is cumbersome, but could be a live option for some.



    From a 0M Operator's Manual, Macro A usage:

    G65 H01 Pn Qn (Definition or substitution)
    Macro B == #P = #Q

    G65 H02 Pn Qn Rn (Addition)
    Macro B == #P = #Q + #R

    G65 H03 Pn Qn Rn (Subtraction)
    Macro B == #P = #Q - #R

    G65 H04 Pn Qn Rn (Multiplication)
    Macro B == #P = #Q X #R

    G65 H05 Pn Qn Rn (Division)
    Macro B == #P = #Q / #R

    G65 H11 Pn Qn Rn (Logical sum)
    Macro B == #P = #Q OR #R

    G65 H12 Pn Qn Rn (Logical product)
    Macro B == #P = #Q AND #R

    G65 H13 Pn Qn Rn (Exclusive OR)
    Macro B == #P = #Q XOR #R

    G65 H21 Pn Qn (square root)
    Macro B == #P = SIN[#Q]

    G65 H22 Pn Qn (Absolute Value)
    Macro B == #P = ABS[#Q]

    G65 H23 Pn Qn Rn (Remainder)
    Macro B == ???

    G65 H24 Pn Qn (BCD to Binary)
    Macro B == #P = BIN[#Q]

    G65 H25 Pn Qn (Binary to BCD)
    Macro B == #P = BCD[#Q]

    G65 H26 Pn Qn Rn (Combined multiplication / division)
    Macro B == #P = [#P X #Q] / #R

    G65 H27 Pn Qn Rn (Combined square root)
    Macro B == #P = SQRT[[#Q X #Q] + [#R X #R]]

    G65 H28 Pn Qn Rn (Combined square root)
    Macro B == SQRT[[#Q X #Q] - [#R X #R]]

    G65 H31 Pn Qn Rn(Sine)
    Macro B == #P = #Q X SIN[#R]

    G65 H32 Pn Qn Rn (Cosine)
    Macro B == #P = #Q X COS[#R]

    G65 H33 Pn Qn Rn(Tangent)
    Macro B == #P = #Q X TAN[#R]

    G65 H34 Pn Qn Rn (Arctangent)
    Macro B == #P = #Q X ATAN[#R]

    G65 H80 Pn (Divergence)
    Macro B == GOTO #P

    G65 H81 Pn Qn Rn (Conditional Divergence 1)
    Macro B == IF #Q EQ #R GOTO #P

    G65 H82 Pn Qn Rn (Conditional Divergence 2)
    Macro B ==IF #Q NE #R GOTO #P

    G65 H83 Pn Qn Rn (Conditional Divergence 3)
    Macro B ==IF #Q GT #R GOTO #P

    G65 H84 Pn Qn Rn (Conditional Divergence 4)
    Macro B ==IF #Q LT #R GOTO #P

    G65 H85 Pn Qn Rn (Conditional Divergence 5)
    Macro B ==IF #Q GE #R GOTO #P

    G65 H86 Pn Qn Rn(Conditional Divergence 6)
    Macro B ==IF #Q LE #R GOTO #P

    G65 H99 Pn (Alarm Occurrence, generates a P/S Alarm with number code 500+Pn)
    Macro B == #3000 = 1 (ALARM NOTE)

  2. #2
    Join Date
    Dec 2003
    Posts
    24220
    Do you have A right now and need of Macro B or just pointing out the differences?
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

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

  3. #3
    Join Date
    Feb 2008
    Posts
    586
    Just bringing some information to the forum here. I thought it was needed. Can't find Macro A info anywhere using <insert search engine here>, and some here might need it.

  4. #4
    Join Date
    Jun 2008
    Posts
    1511
    Good call Beege. I don't understand a bit of it but you are right that it may help many others.

    I am sure you know exactly were I stand on macroA vs. macroB :boxing:

    Thanks for the info.

    Stevo

  5. #5
    Join Date
    Aug 2009
    Posts
    684
    A quite effective way to encrypt macro programs...:devious:

    DP

  6. #6
    Join Date
    Jul 2003
    Posts
    69
    Thanks Beege I just bought a lathe that had 4 Macro A progs in it now I have a better understanding of whats going on, they're for the tool sensor arm, which no longer exists on the machine. I do know Macro B & have written many a program.

  7. #7
    Join Date
    Feb 2011
    Posts
    640
    dont macroB require a full key MDI? not all machines have them- none of the Zeroes we ordered ever did except one for a customer that wanted macro B...

    almost all of the stuff Ive written here has been macro-A, not that bad...I also typed up a list like yours for the setup guys though- why Fanuc describes them in xyz instead of the required pqr format is beyond me- reading the manual just confuses folks. Macro B is a lot more readable, no doubt, but its still pretty powerful. I just ran into another issue with unpublished variables a few weeks ago,- wrote a macro to increment thru the variables to put a weird number in the one I wanted, found it that way...almost every register in the control is available in the macro table, but they dont tell you where they are- at least not where Ive found...

    Important to note if writing Macro, the controls buffer 3 lines at a time- if one step effects a change in a variable of the next step, it will not work right...put two extra EOBs in there to fill the buffer and all works fine (till someone deletes the extra EOBs!!!)

    Tim

  8. #8
    Join Date
    Sep 2010
    Posts
    1230
    Quote Originally Posted by tc429 View Post
    dont macroB require a full key MDI? not all machines have them- none of the Zeroes we ordered ever did except one for a customer that wanted macro B...

    Tim
    Tim,
    There are quite a few machines that used Macro B code in their tool change routines and don't have the full key pad. For machines configured in this way, you can write the Macro programs using a PC and upload to the control.

    Regards,

    Bill

  9. #9
    Join Date
    Jun 2007
    Posts
    25

    Thanks for the list!

    I also couldn't find any info on Macro A online anywhere!

    I used it often with older controls, but lost my own list over the years. I really liked how you made the equivalent macro b very evident!

  10. #10
    Join Date
    Jul 2007
    Posts
    21
    G65 H23 Pn Qn Rn (Remainder)
    Macro B == ???
    #P = #Q MOD #R

    Or as Fanuc notates it: #i = #j MOD #k (Remainder)

    Extracted from the custom macro section of a Fanuc manual.

  11. #11
    Join Date
    Feb 2008
    Posts
    586
    Thanks "oldgoat" for filling in that blank. I couldn't make that connection myself for some reason.

  12. #12
    Join Date
    Feb 2006
    Posts
    213

    Smile

    Lots of thanks.........................




    Quote Originally Posted by beege View Post
    Hi,


    I thought this needed to be posted. There are so many questions having to do with Macro B, which some machines don't have, but perhaps they DO have Macro A, which nobody ever talks about.

    I'd like to see if someone tests for Macro B and it doesn't work
    (MDI ---> #500 = 1 EOB, Cycle start)
    Tests also for Macro A (MDI --> G65 H01 P#500 Q1 EOB, cycle start) and finds it does work.

    Macro A is cumbersome, but could be a live option for some.



    From a 0M Operator's Manual, Macro A usage:

    G65 H01 Pn Qn (Definition or substitution)
    Macro B == #P = #Q

    G65 H02 Pn Qn Rn (Addition)
    Macro B == #P = #Q + #R

    G65 H03 Pn Qn Rn (Subtraction)
    Macro B == #P = #Q - #R

    G65 H04 Pn Qn Rn (Multiplication)
    Macro B == #P = #Q X #R

    G65 H05 Pn Qn Rn (Division)
    Macro B == #P = #Q / #R

    G65 H11 Pn Qn Rn (Logical sum)
    Macro B == #P = #Q OR #R

    G65 H12 Pn Qn Rn (Logical product)
    Macro B == #P = #Q AND #R

    G65 H13 Pn Qn Rn (Exclusive OR)
    Macro B == #P = #Q XOR #R

    G65 H21 Pn Qn (square root)
    Macro B == #P = SIN[#Q]

    G65 H22 Pn Qn (Absolute Value)
    Macro B == #P = ABS[#Q]

    G65 H23 Pn Qn Rn (Remainder)
    Macro B == ???

    G65 H24 Pn Qn (BCD to Binary)
    Macro B == #P = BIN[#Q]

    G65 H25 Pn Qn (Binary to BCD)
    Macro B == #P = BCD[#Q]

    G65 H26 Pn Qn Rn (Combined multiplication / division)
    Macro B == #P = [#P X #Q] / #R

    G65 H27 Pn Qn Rn (Combined square root)
    Macro B == #P = SQRT[[#Q X #Q] + [#R X #R]]

    G65 H28 Pn Qn Rn (Combined square root)
    Macro B == SQRT[[#Q X #Q] - [#R X #R]]

    G65 H31 Pn Qn Rn(Sine)
    Macro B == #P = #Q X SIN[#R]

    G65 H32 Pn Qn Rn (Cosine)
    Macro B == #P = #Q X COS[#R]

    G65 H33 Pn Qn Rn(Tangent)
    Macro B == #P = #Q X TAN[#R]

    G65 H34 Pn Qn Rn (Arctangent)
    Macro B == #P = #Q X ATAN[#R]

    G65 H80 Pn (Divergence)
    Macro B == GOTO #P

    G65 H81 Pn Qn Rn (Conditional Divergence 1)
    Macro B == IF #Q EQ #R GOTO #P

    G65 H82 Pn Qn Rn (Conditional Divergence 2)
    Macro B ==IF #Q NE #R GOTO #P

    G65 H83 Pn Qn Rn (Conditional Divergence 3)
    Macro B ==IF #Q GT #R GOTO #P

    G65 H84 Pn Qn Rn (Conditional Divergence 4)
    Macro B ==IF #Q LT #R GOTO #P

    G65 H85 Pn Qn Rn (Conditional Divergence 5)
    Macro B ==IF #Q GE #R GOTO #P

    G65 H86 Pn Qn Rn(Conditional Divergence 6)
    Macro B ==IF #Q LE #R GOTO #P

    G65 H99 Pn (Alarm Occurrence, generates a P/S Alarm with number code 500+Pn)
    Macro B == #3000 = 1 (ALARM NOTE)

Similar Threads

  1. Macro Help
    By AndyF in forum Haas Mills
    Replies: 4
    Last Post: 07-16-2010, 03:26 PM
  2. "difference between Custom Macro A and Custom Macro B"
    By arulthambi in forum Parametric Programing
    Replies: 4
    Last Post: 10-05-2009, 09:34 PM
  3. Macro A or Macro B On fanuc o-md
    By macrosat in forum Fanuc
    Replies: 1
    Last Post: 07-29-2009, 12:49 PM
  4. Replies: 2
    Last Post: 03-27-2009, 09:15 PM
  5. Convert Fanuc Macro to Fadal Macro
    By bfoster59 in forum Fadal
    Replies: 1
    Last Post: 11-09-2007, 06:41 AM

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
  •