4-28 c, 4-29 c, 4-30 d – Yamaha SRCP User Manual

Page 120: 4-31 d, Robot language

Advertising
background image

8-

22

ROBOT LANGUAGE

8-4 Robot Language Description

8

8-4-28 C+

Function:

Adds a specified value to the counter array variable C.

Format:

C+ [<addition value>]

Example:

C+ 100
Adds 100 to the counter array variable C. (C

←C+100)

C+
Adds 1 to the counter array variable C. (C

←C+1)

Explanation:

This command adds a specified value to the counter array variable C
specified with the CSEL statement. The addition value can be set to any
value from 1 to 65535. If the addition value is omitted, then 1 is added to
the counter array variable C.

8-4-29 C-

Function:

Subtracts a specified value from the counter array variable C.

Format:

C- [<subtraction value>]

Example:

C- 100
Subtracts 100 from the counter array variable C. (C

←C-100)

C-
Subtracts 1 from the counter array variable C. (C

←C-1)

Explanation:

This command subtracts a specified value from the counter array vari-
able C specified with the CSEL statement. 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 array variable C.

8-4-30 D

Function:

Sets the counter variable D.

Format:

D <counter value>

Example:

D 200
Sets the counter variable D to 200.

Explanation:

The counter variable D can be set to any value by the user from 0 to
65535. This command can be used with a D+ or D– statement and a
JMPD statement for a repeating program, and also with a MOVM state-
ment for a palletizing program.

Others:

• The counter variable D is not initialized even if the program is reset or

the controller power is turned off. To initialize, rewrite the program.

• The counter variable D is a variable shared with all tasks.

For example, task 0 and task 1 use the counter variable D, the edited
contents of task 1 affect task 0.

8-4-31 D+

Function:

Adds a specified value to the counter variable D.

Format:

D+ [<addition value>]

Example:

D+ 100
Adds 100 to the counter variable D. (D

←D+100)

D+
Adds 1 to the counter variable D. (D

←D+1)

Explanation:

This command adds a specified value to the counter variable D. The
addition value can be set to any value from 1 to 65535. If the addition
value is omitted, then 1 is added to the counter variable D.

Advertising