Chapter 2 Syntax
2-16
dec statement
Instruction to decrement a variable
- Format
Format
Description
dec
<variable>
This instruction decrements
<variable>
by 1.
- Explanation
This instruction subtracts 1 from the value of
<variable>
.
- Sample program
(Code area [Code Window])
Label
Mnemonic
parameter1
parameter2
parameter3
parameter4
parameter5
㩷
㩷
entry
㩷
㩷
㩷
㩷
㩷
㩷
LOOP dec
U(00)
㩷
㩷
㩷
㩷
: Assign "U (00) - 1" to U (00).
㩷
U(00)= U(00)
and U(01)
㩷
㩷
: Mask the 6 low-order bits of U (00).
㩷
Yw= U(00)
㩷
㩷
㩷
: Output the content of U (00) to terminals
Y (00) to Y (05).
㩷
wait 0.5
㩷
㩷
㩷
㩷
: Wait 0.5 seconds.
㩷
goto LOOP
㩷
㩷
㩷
㩷
㩷
㩷
end
㩷
㩷
㩷
㩷
㩷
㩷
(Data area [Data Window])
U (00) = 255
U (01) = 63
Label definition statement
Statement to define a label
- Format
Format
Description
<label name>
This statement defines
<label name>
.
- Explanation
Use this statement to define
<label name>
to be used in the goto or other instructions. The statement is not executed when
described alone.
- Sample program
Label
Mnemonic
parameter1
parameter2
parameter3
parameter4
parameter5
㩷
㩷
㩷 䋺
㩷
㩷
㩷
㩷
㩷
㩷
㩷
goto LABEL1
㩷
㩷
㩷
㩷
: Branch to step "LABEL1".
㩷
㩷 䋺
㩷
㩷
㩷
㩷
㩷
LABEL1 Y(00)=
1
㩷
㩷
㩷
㩷
: Branch-target step (line)
Summary of Contents for NT2021XA
Page 4: ... Safety Instructions ...
Page 8: ... Contents ...
Page 10: ...Chapter 1 Outline of EzSQ ...
Page 14: ...1 4 Chapter 1 Outline of EzSQ ...
Page 16: ...Chapter 2 Syntax ...
Page 68: ...2 52 Chapter 2 Syntax ...
Page 70: ...Chapter 3 Interface with the Inverter ...
Page 80: ...3 10 Chapter 3 Interface with the Inverter ...