Chapter 2 explanation of commands, Commands, 1 variable assignment – IAI America XSEL-KX User Manual

Page 94: Chapter 2, Explanation of commands

Advertising
background image




78

Part 4 Commands

Chapter 2 Explanation of Commands

1. Commands

1.1 Variable Assignment


 LET (Assign)

Extension condition

(LD, A, O, AB, OB)

Input condition

(I/O, flag)

Command, declaration

Output

(Output, flag)

Command,
declaration

Operand 1

Operand 2

Optional

Optional

LET

Variable

number

Data

ZR

[Function]

Assign the value specified in operand 2 to the variable specified in operand 1.
The output will turn ON when 0 is assigned to the variable specified in operand 1.


[Example 1]

LET

1

10

Assign 10 to variable 1.

[Example 2]

LET

1

2

Assign 2 to variable 1.

LET

3

10

Assign 10 to variable 3.

LET

*1

*3

Assign the content of variable 3 (10) to the
variable of the content of variable 1 (variable 2).



 TRAN (Copy)

Extension condition

(LD, A, O, AB, OB)

Input condition

(I/O, flag)

Command, declaration

Output

(Output, flag)

Command,
declaration

Operand 1

Operand 2

Optional

Optional

TRAN

Variable

number

Variable

number

ZR

[Function]

Assign the content of the variable specified in operand 2 to the variable specified in
operand 1.
The output will turn ON when 0 is assigned to the variable specified in operand 1.


[Example 1]

TRAN

1

2

Assign the content of variable 2 to variable 1.

LET

1

*2

A LET command of the same effect as the above
operation

[Example 2]

LET

1

2

Assign 2 to variable 1.

LET

2

3

Assign 3 to variable 2.

LET

3

4

Assign 4 to variable 3.

LET

4

10

Assign 10 to variable 4.

TRAN

*1

*3

Assign the content of variable 3 (which is variable
4, or 10) to the variable of the content of variable 1
(variable 2).


The variables change as follows:

1

2

3

4

1

2

3

4

2

3

4

10

2

10

4

10

Advertising
This manual is related to the following products: