Posts Tagged ‘ables’

the branching will take place If the current values of the two variables are different

Monday, September 4th, 2017

In such a case, the branching will take place If the current values of the two variables are different, the con di tion is false, and the macro con tin ues with pro cess ing of the next block, and no

branch ing takes place

Cal cu la tion for mu las can be nested, pro vid ing the square brack ets are used correctly:

IF [#1 EQ [#2+#3]] GOTO99

CNC Plastic plate drilling machine

In this case, the cur rent val ues of vari ables #2 and #3 are summed-up first, and the re sult of the sum is com pared with the cur rent value of vari able #1 If they match, the spec i fied con di tion is

true, and branch ing will take place, oth er wise the macro con tin ues in the next block

Copyright 2005, Industrial Press Inc, New York, NY –

FANUC CNC Custom Macros


Chapter 13

Combined Conditional Expressions

In the more com plex cal cu la tions, two or more con di tions have to be eval u ated (com pared) The

re sult is of ten de pend ent on the re turned value of sev eral com bined con di tions For ex am ple, in

Eng lish, you may say f I have money and time, I will take a va ca tion In this state ment, a sin –

gle true con di tion is not enough – both con di tions must be true for the whole ex pres sion to be true

No ex cep tions – even if I have the money, but I have no time, I can not take a va ca tion On the

other hand, you may Dished Head Punching Machine say f I save enough money or win a lot angle shearing machine tery, I will take a va ca tion This is

a dif fer ent state ment In this case, only one expression has to be true, for me to take a va ca tion If

I save enough money, I don’t need to win a lot tery, and I still can take a va ca tion If I do win a lot –

tery, I don’t need to save money at all, and I can also take a va ca tion These state ments and ex –

pres Angle Punching sions are found in ev ery day lan guage

In macro programming, there two other func tions avail able (ac tu ally three) that can be com –

bined to eval u ate a given con di tion on bi nary num bers, bit by bit They are:


For any given con di tion, these macro func tions can be us