Chapter 3 explanation of commands, Chapter 3, Explanation of commands – IAI America PSEL User Manual
Page 111: Commands, Variable assignment, Chapter 3 explanation of commands 1. commands
![background image](/manuals/350325/111/background.png)
101
Part 2 Programs
Chapter 3 Explanation of Commands
1. Commands
1.1 Variable
Assignment
LET (Assign)
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 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
3
10
Assign 10 to variable 3.
LET
1
*3
Assign the content of variable 3 (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.
LET
1
*100
Assign 14, which is a rounded result of the content
of real variable 100 (13.5), to integer variable 1.