What's new
What's new

# Fanuc Macro A resources?

#### mrclauds

##### Plastic
Hi
I was hoping someone would have some resources, documents or anything really for me to start learning macro a.
I'm clued up on macro b, but some of my machines are macro A and I'd rather learn macro a then get people involved to change ladder diagrams

Thanks

#### DouglasJRizzo

##### Titanium
Perhaps our friend Sinha here on the forums can help.

#### beege

##### Stainless
I posted this on another forum (not to be mentioned by name)

#### beege

##### Stainless
(from the other forum)....

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)

#### GENERALDISARRAY

##### Hot Rolled
its a software option, nothing to do with the ladder.

the difference between macro A vs B is A can only do addition arithmetic
+
-
OR
XOR

no multiplication or functions like COS ATAN

#### angelw

##### Diamond
the difference between macro A vs B is A can only do addition arithmetic
+
-
OR
XOR

no multiplication or functions like COS ATAN

Hello GENERALDISARRAY,
Definitely incorrect. Multiplication (Product) is Function H04, Sine H31, Cosine H32, Tangent H33, Arctangent H34.

The major differences between System A and B is that A has no Local Variables, A can't pass Variables as Arguments and Routines can only be called as Sub Programs and not Macro Programs where arguments can be passed.

@mrclauds,
A good a resource as any is the chapter on Macro A in the Fanuc Operator's Manual.

Regards,

Bill

#### sinha

##### Titanium
Perhaps our friend Sinha here on the forums can help.

Sorry. I have not studied Macro A.

As Bill said, the best and the most authentic resource is the Operators' Manual.

#### DouglasJRizzo

##### Titanium
Sorry. I have not studied Macro A.

As Bill said, the best and the most authentic resource is the Operators' Manual.

Understood. I've never really used Macro A either, only Macro B.

#### GENERALDISARRAY

##### Hot Rolled
Hello GENERALDISARRAY,
Definitely incorrect. Multiplication (Product) is Function H04, Sine H31, Cosine H32, Tangent H33, Arctangent H34.

The major differences between System A and B is that A has no Local Variables, A can't pass Variables as Arguments and Routines can only be called as Sub Programs and not Macro Programs where arguments can be passed.

@mrclauds,
A good a resource as any is the chapter on Macro A in the Fanuc Operator's Manual.

Regards,

Bill

I quoted it directly from the Makino programming manual for Fanuc 6MB?

#### LockNut

##### Stainless
Damn, Macro A is the most difficult thing to wrap your head around, especially after learning Macro B. I used Macro A for ten years because we had a few OLD Tsugami Swiss machines that had it. That and the fact you could only use single calculations per line unlike Macro B where you could basically use formulas in a single line. What would a single line of code in Macro B, Macro A would require many depending on what you were doing with it. Don't ask me how to use it now, I have forgotten most of it, thankfully.

Paul

#### mrclauds

##### Plastic
Fantastic, thank you all very much. (I'll also be pulling up all my old operator manuals).
The one I'm struggling to find particularly is the equivalent to:
POPEN
DPRNT[]
PCLOS
I am hoping it is available on macro a (reason why ladder would be changed if it isn't)

Thank you all oce again

#### angelw

##### Diamond
Fantastic, thank you all very much. (I'll also be pulling up all my old operator manuals).
The one I'm struggling to find particularly is the equivalent to:
POPEN
DPRNT[]
PCLOS
I am hoping it is available on macro a (reason why ladder would be changed if it isn't)

Thank you all oce again

Hello mrclauds,
Sorry, but BPRNT/DPRNT functions aren't available with Macro A.

Regards,

Bill

Replies
6
Views
336
Replies
2
Views
117
Replies
7
Views
473
Replies
0
Views
378
Replies
9
Views
521