Inc Statement; Dec Statement - Hitachi SJ700-2 Series Instruction Manual

Easy-sequence programming software ezsq
Hide thumbs Also See for SJ700-2 Series:
Table of Contents

Advertisement

Chapter 5 Instruction Words

inc statement

- Format
Format
inc <variable>
- Explanation
This instruction adds 1 to the value of <variable>.
- Sample program
(Code area [Code Window])
entry
LOOP
inc
U(00) =
Yw =
wait
goto
end
(Data area [Data Window])
U(00) = 255
U(01) = 63

dec statement

- Format
Format
dec <variable>
- Explanation
This instruction subtracts 1 from the value of <variable>.
- Sample program
(Code area [Code Window])
entry
LOOP
dec
U(00) =
Yw =
wait
goto
end
(Data area [Data Window])
U(00) = 255
U(01) = 63
Instruction to increment a variable
This instruction increments <variable> by 1.
U(00)
U(00)
and
U(01)
U(00)
0.5
LOOP
Instruction to decrement a variable
This instruction decrements <variable> by 1.
U(00)
U(00)
and
U(01)
U(00)
0.5
LOOP
Description
: Assign "U (00) + 1" to U (00).
: Mask the 6 low-order bits of U (00).
: Output the content of U (00) to terminals Y (00) to Y (05).
: Wait 0.5 second.
Description
: Assign "U (00) - 1" to U (00).
: Mask the 6 low-order bits of U (00).
: Output the content of U (00) to terminals Y (00) to Y (05).
: Wait 0.5 second.
5 - 12

Advertisement

Table of Contents
loading

This manual is also suitable for:

Sj700 series

Table of Contents