Mitsubishi QD51 Programming Manual page 528

Logic controller
Hide thumbs Also See for QD51:
Table of Contents

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
Program Example
10 ' This program reads one bit data from the specified array
20 DIM A%(0)
30 A%(0)=&H5F5F
40 FOR I=0 TO 15
50 A=RDSET(I,A%(0))
60 PRINT A;
70 NEXT I
RUN
1 1 1 1 1 0 1 0 1 1 1 1 1 0 1 0
OK
11 - 358
The range of integers that can be expressed by 16 bits is from -32768 to 32767,
which are expressed in hexadecimal as follows. If values from -32768 to -1 are specified in
decimal, it is assumed that values from 32768 to 65535 are specified.
Decimal
Hexadecimal
65535
FFFF
to
to
32768
8000
32767
7FFF
to
to
0
0000
-1
FFFF
to
to
-32768
8000
REMARK
See the WTSET instruction.
1111
1111
H
1000
0000
H
0111
1111
H
0000
0000
H
1111
1111
H
1000
0000
H
:
'Defines an array
:
'Repeats from I = 0 to 15
:
'Reads the data
:
'Displays the result
MELSEC-Q
Binary
1111
1111
to
0000
0000
1111
1111
to
0000
0000
1111
1111
to
0000
0000
These are
the same.
11 - 358

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents