You are on page 1of 10

MACRO Instructions

Lecture 21

Engineering 475
Automated Production Systems
MACRO’s
G A MACRO is a sequence of instructions (program) that
act as a single command.

G A MACRO is similar to a normal program, in that a


MACRO can be called from within another program.

G A MACRO is unlike a normal program, in that a


MACRO may be executed by 1) a user pressing a teach
pendant key, 2) a digital or robot input signal going
from low to high, or 3) a user pressing a key on an
external user console (we don’t have one).
G The LRMate 100i controller may have up to 20
MACRO’s.
Creating a MACRO

Step 1: Develop a normal program using the teach


pendant.

Step 2: Register the program as a MACRO.


Registering a MACRO

MENUS Press MENU,


then select SETUP,
then press F1
“TYPE” to obtain the
screen used to
register a MACRO.
MACRO Command Screen
What you want to The name of the previously developed
call your MACRO program that contains the sequence of
instruction. instructions to be executed.

When the cursor is in a field, pressing ENTER will


bring up the alphabet function keys.
Assign Options
MF: MACRO Function
Things that can be
SU: Shift User Key
used to launch the
UK: User Key
MACRO
DI: Digital Input
Instruction
RI: Robot Input
ID/Signal
Number
Example MACRO
User Keys

Warning:
When a key on the
teach pendant is
assigned to a macro
instruction, it
becomes that macro
instruction’s device,
and the key can no
longer be used for its
original function.

SU => Shift User Key


Calling a MACRO from a Program
HOME is a
R[1]=0
macro that
LBL[1]
causes the robot
IF R[1]>20 LBL[2]
to go to its
J P[1] 50% CONT
home position.
J P[3] 50% CONT
L P[4] 50% FINE
WAIT DI[1]=ON, TIMEOUT LBL[2]
HOME
R[1]=R[1]+1
JMP LBL[1]
LBL[2]
END
Summary

This concludes the lectures on programming


the robot.

Servomotor controls are a critical element of


robots and CNC machine tools.

In the next class we will take a look at


servomotors.

You might also like