heck if the in put ra dius is greater than 25 mm

heck if the in put ra dius is greater than 25 mm:


G65 P9000 R25


Macro call with one argument (radius amount)


O8012


Macro start


IF[#18 GT 025] GOTO1001


busbar Machine


Check condition for alarm – true or false ?


Process all blocks if condition is false


N1001 #3000 = 118 (RADIUS TOO LARGE)


Force alarm if condition is true


The se lected alarm num ber and mes sage to the operator is dis played on the screen as ei ther


118 RADIUS TOO LARGE


or


3118 RADIUS TOO LARGE


Slight vari a tions may be ex pected This is a typ i cal ap pli ca tion of a pro angle machine grammed alarm – a con –


trolled gen er a tion of an alarm by a macro, for a pre dict able pos si bil ity of an er ror


Embedding Alarm in a Macro


Re gard less of which alarm con di tions are used in the macro, the trans fer be tween the pro cessed


and the un pro cessed por tions of the pro gram must be smooth, re gard less of the re turned value


( true or false) For ex am ple, a macro may con tain the fol low ing three alarms (to ‘go-to’):


N1001 #3000 = 101 (HOLE SPACING IS TOO SMALL)


N1002 #3000 = 102 (TWO HOLES MINIMUM REQUIRED)


N1003 #3000 = 103 (DECIMAL POINT NOT ALLOWED)


In the macro O8013, these alarms will most likely be lo cated to wards the macro end How ever,


the macro pro gram Dished Head Punching Machine that pre cedes the alarms, us ing G65 P8013 angle shearing machine H8 I120 X750 Y1000


macro call, will have to be pro cessed with out in ter rup tion, if the con di tions are false (that means


run ning good pro gram, with no alarms) For ex am ple, this macro struc ture is NOT cor rect:


O8013


INCORRECT way to program alarms


IF[#4 LE 0] GOTO1001


I=#4 variable stores the hole spacing


IF[#11 LT 2] GOTO1002


H=#11 variable stores the number of holes


IF[#11 NE FUP[#11]] GOTO1003


Check if #11 contains the decimal point


G90 X#24 Y#25


Previously defined tool location XY


< macro body processing 锟?>


N1001 #3000 = 101 (HOLE SPACING IS TOO SMALL)


N1002 #3000 = 102 (TWO HOLES MINIMUM REQUIRED)


N1003 #3000 = 103 (DECIMAL POINT NOT ALLOWED)


M99


%


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

Tags:

Leave a Reply