IAI America ASEL User Manual

Page 118

Advertising
background image

Part 2 Programs

Chapter 3 Explanation of Commands

96

Part 2 Programs

z

TRAN (Copy)

Command, declaration

Extension condition

(LD, A, O, AB, OB)

Input condition

(I/O, flag)

Command,

declaration

Operand 1

Operand 2

Output

(Output, flag)

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

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 variable 1.

(Note) When data in a real variable is assigned to an integer variable, all decimal fractions are

rounded to the nearest integer.

LET

100

13.5

Assign 13.5 to real variable 100.

TRAN

1

100

Assign 14, which is a rounded result of the content

of real variable 100 (13.5), to integer variable 1.

Advertising