4-32 d, 4-33 shft, Robot language – Yamaha SRCP User Manual

Page 121

Advertising
background image

8-

23

8

ROBOT LANGUAGE

8-4 Robot Language Description

8-4-32 D-

Function:

Subtracts a specified value from the counter variable D.

Format:

D- [<subtraction value>]

Example:

D- 100
Subtracts 100 from the counter variable D. (D

←D-100)

D-
Subtracts 1 from the counter variable D. (D

←D-1)

Explanation:

This command subtracts a specified value from the counter variable D.
The subtraction value can be set to any value from 1 to 65535. If the
subtraction value is omitted, then 1 is subtracted from the counter vari-
able D.

8-4-33 SHFT

Function:

Shifts the position data.

Format:

SHFT <point number>

Example:

SHFT 10
Shifts the coordinates on which the subsequent movement commands
are executed, by a data amount defined by point 10.

Explanation:

This command shifts position data in the subsequent movement com-
mands to be executed, by coordinates equal to the specified point data.
The shift data is valid until the SHFT statement is executed again or
until the program reset is executed.
(1) Point number

The point number is a number designated to each point from 0 to
999, a total of 1000 points, and used to create point date in PNT
(point) mode. When a character "P" is entered here for special use, a
point variable defined by the "P" statement is set as the point number.
(Refer to "8-4-12 P".)

Others:

• When the program is reset or when the program reset is applied by

switching the execution program, the shift data will be initialized to
(0.00).

• The SHFT statement affects MOVA, MOVF and MOVM, but does

not affect MOVI.

• The coordinate shift amount specified with the SHFT statement is in-

dependent of each task. For example, when task 0 and task 1 are being
executed, the coordinate shift of task 1 has no effect on the movement
command for task 0.

For example, with a program shown on the left, the

target position of MOVA statement in the 6th step will

be the position of P0 + P1.

004 : :

005 : SHFT 1

006 : MOVA 0,100

007 : :

Advertising