Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Jack H.Integration and automation of manufacturing systems.2001.pdf
Скачиваний:
80
Добавлен:
23.08.2013
Размер:
3.84 Mб
Скачать

page 312

10.2.1 AML Programs

All AML comments start with two dashes ‘--’ at any position on a line

Statements are ended with a semi-colon, and as long as semi-colons are used, more than one statement can be used on a line.

Line numbering is done by the AML Editor

the free form variables/identifiers must: start with a letter; be up to 72 characters in length; use letters numbers and underscores, except in the last position.

Statements have the general form,

IDENTIFIER:KEYWORD;

-IDENTIFIER is a unique name that the user has selected

-the colon separates the two elements

-KEYWORD indicates the significance of the IDENTIFIER to the system

-the semi-colon indicates the end of the statement

A sample program is given below with comments for explanation,

page 313

NEWPROG:SUBR: --A subroutine called NEWPROG to pick up a part

RELEASE; -- open the gripper before dropping to prevent collision

DELAY(20); -- wait 2 seconds to ensure the gripper is open

DOWN; -- drop down to the work surface

DELAY(10); -- wait 1 second just to be sure everything has settled down GRASP; -- close the gripper

DELAY(10); -- wait 1 second to allow everything to settle down

UP; -- go up so that we can move over other objects

PMOVE(PT(300,300,0)); -- move to 300,300 in robot coordinates

END; -- return to the calling routine

• A summary of the commands is given below,

BRANCH(label);

This will force a branch to the statement having the

(flow command)

label.

BREAKPOINT;

When this command is executed, it will examine the

(flow command)

“stop and Mem” key on

the robot. If either is pressed,

 

the program execution

will stop.

DECR(name);

Decrement ‘name’ by one.

(logic command)

 

DELAY(seconds);

This

commands will

wait for the

number of tenths of

(flow command)

seconds given, this can be used when motions must finish

 

before continuing. If

the value is

10, then the delay

 

will be

1 second.

 

 

page 314

DOWN(value);

Instructs the robot to drop the gripper (z-axis). The

(motion command)

program delays until the gripper has dropped. If the axis

 

has not reached it’s limit within the given time, then an

 

error message will be generated. The timeout can be

 

altered (from 1.5 seconds) by supplying a ‘value’

 

argument in tenths of a second. A value of zero means

 

wait forever

DPMOVE(x,y,z,r);

A relative cartesian motion is made in the direction

DPMOVE(x,y,r);

specified. if the z-axis has a height control, the z can

(motion command)

be included.

GETC(counter_name);

The program is halted briefly while the host computer

(communication command)

is polled the a new counter value.

GETPART(name);

Move to the current part on the pallet.

(pallet command)

 

GRASP;

The EOAT gripper will be closed when this command is

(motion command)

issued.

INCR(name);

Variable ‘name’ is incremented by one.

(logic command)

 

LINEAR(quality);

When the robot moves it can follow a number of paths,

(setting command)

but this command will set all motions to follow a

 

straight path. As the ‘value’ goes from 50 to 1 the path

 

quality improves. If the ‘value’ is zero, the linear mode

 

is turned off.

page 315

NEXTPART(name);

move the pallet reference ahead by one.

(pallet command)

 

PAYLOAD(value);

As the mass carried changes, so do the maximum speeds.

(setting command)

This

command will allow modification of the motion

 

speeds. As

‘value’

changes from 10 to 1 the load

 

increases,

and

the

robot will go slower. A ‘value’ of

 

zero

will turn

the

function off.

PMOVE(PT(x,y,r);

The PMOVE portion of this nested command will cause a

PMOVE(PT(x,y,z,r));

movement

to a point. The PT statement indicated the

PMOVE(name);

position

of a point. A point ‘name’ could also be used.

(motion command)

Here x and y

are the cartesian coordinates on the work

 

plane, and r

is the roll of the gripper (±180°). Home,

 

with the

arm

stretched to the far left is (650,0,0)

PREVPART(name);

reduce the current pallet part count by one.

(pallet command)

 

RELEASE;

This

command is the opposite of GRASP, and will

(motion command)

release

the gripper.

SETC(name, value);

Set the counter name to a value.

(logic command)

 

SETPART(name, value);

set the pallet name to the given value.

(pallet command)

 

page 316

TESTC(name, value, label);

TESTC

does a conditional branch

statement

that

TESTI(DIpoint,value,label);

compares

name to value. TESTI does the same

for a DI

TESTP(name,value,label);

point, and a value. TESTP compares

a pallet

name and

(logic command)

value. All statements branch to label if the

comparison

 

is equal.

 

 

UP(value);

This commands is the reverse of DOWN, as it raises the

(motion command)

z-axis.

WAITI(DIpoint,value,time);

Pause while

waiting for the DI point to reach value.

(logic command)

Time specifies

a maximum value before an error message

 

should be generated.

WRITEO(DO point, value);

Set DO point to the given value.

(logic command)

 

ZMOVE(position);

Move the

z-axis to a given position, if variable

 

positioning

is available.

ZONE(factor);

The accuracy of a point to point move is set using

(setting command)

this command. As the value ‘factor’ changes from 15 to 1

 

the motion times increase, but the final position is more

 

accurate. If ‘factor’ has a value of zero, the function

 

is turned off.

• A summary of some of the keywords is,

END;

causes a return from a subroutine.

name:NEW

PT(x,y,r);

Defines a point

name with the values x,y,r and z if

name:NEW

PT(x,y,z,r);

the robot supports

it.