7 - 8
7 OPERATION CONTROL PROGRAMS
(3) Indirect specification of device No.
In the above word/bit device descriptions, device No. (n) can be specified
indirectly.
(a) Indirect specification of device No. (n) using word device
• The word device which the device No. was specified indirectly cannot be
used.
• You can use the 16-bit and 32-bit integer type word devices for indirect
specification.
The 64-bit floating-point type cannot be used.
(Description examples)
Good example Bad example
#(D10) #(D(D5))
D(#10L)F D(#4F)
(b) Indirect specification of device No. (n) using word device using operation
expression
• Device No. can be specified indirectly by calculation expressions which
use the following data and operators.
16-bit integer type word device
32-bit integer type word device
16-bit integer type constant
Usable data
32-bit integer type constant
Addition: +
Subtraction:
Multiplication:
Division: /
Remainder: %
Usable operators
Sign inversion:
• The word device which the device No. is specified indirectly cannot be
used.
• Only one operator may be used.
(Description examples)
Good example Bad example
#(D10-K5) #(D(D5)F+K20)
D(#10L%H6L)F D(#4L<<K2)
(Note) : When you want to use the result of calculation other than the above
to specify the device No. indirectly, describe it in two blocks as
shown below.
D0=SHORT(ASIN(#0F))
W0=#(D0)