13. Program Support Functions
13.5 User Macro Specifications
347
(2) Device No. designation (#100101)
The device to be read in is designated by substituting the device No. in this system variable.
Convert a device expressed as a hexadecimal into a decimal when designating.
If the data is read without designating this number, the data will be read in the same manner as
if the minimum device No. (0) is designated. Once designated, the setting is held until the
device No. is designated again or until it is reset.
A program error (P39) will occur if a device No. that does not exist is set.
(3) Number of bytes designation (#100102)
(a) System variable for number of bytes designation
The reading size is designated by substituting the number of bytes designation value in
this system variable.
If the data is read without designating this number, the data will be read in the same
manner as if the minimum number of bytes designation value (0: bit designation) is
designated. Once designated, the setting is held until the number of bytes is designated
again or until it is reset.
A program error (P39) will occur if a number of bytes that does not exist in the
specifications is set.
(b) Number of bytes designation value
Read in data
Operation
Number of
bytes
designa-
tion value
Size
Sign
Range
Word device
Bit device
0
1 bit
-
0 to 1
The number of
bits designated
is read in.
The bits for the
designated device No.
are read in.
1
1 byte
No
0 to 255
101
Yes
-128 to 127
The low-order
byte is read in.
8 bits are read in from
the designated device
No.
2
2 bytes
No
0 to 65535
102
Yes
-32768 to 32767
Two bytes are
read in.
16 bits are read in from
the designated device
No.
4
4 bytes
No
0 to 4294967295
104
Yes
-2147483648
to
2147483647
The designated
device (L) and
next device (H)
are read in.
32 bits are read in from
the designated device
No.
0 to 4 are designated without a sign, and 101 to 104 are designated with a sign.