Mitsubishi QD51 Programming Manual page 527

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
RDSET
Function
• Reads one bit data from the specified bit of an integer array variable.
RDSET(<integer expression>,<array element>)
Syntax
integer expression
array element
B=RDSET(12,A%(0))
Examples
B=RDSET(40,A%(0))
• The RDSET function reads the bit data at a position specified in <integer expression> in
Description
the one-dimensional integer array variable specified in <array element>.
• In the bit specification by <integer expression>, it is possible to specify any bit in the array
elements relative to the 0th bit of the specified array element.
For example, if values from 0 to 15 are specified, they correspond to each bit of the
specified array element. If values from 16 to 31 are specified, they correspond to each bit
in the element next to the specified array element (see Example above).
An "Illegal function call" error occurs if the specified value indicates a bit position that
exceeds the total number of bits contained in an array variable defined by the DIM
instruction.
• Only a one-dimensional integer array variable can be specified in <array variable>.
If a variable other than a one-dimensional integer array variable is specified, an "Illegal
function call" error occurs.
11 - 357
ReaD SET
• • • •
Specify which bit to read from the specified integer
array, using an integer from -32768 to 65535.
• • • •
Specify an element of a one-dimensional integer
array from which data is read.
• • • •
Reads the value of the 12th bit counting from the 0th
bit of A%(0) to B.
A%(0)
• • • •
Reads the value of the 40th bit counting from the 0th
bit of A%(0) to B.
A%(0)
A%(1)
A%(2)
b15
to
b8b7
0 1
0 1 1 0 1
0
0 0
1 1 1 1 0
Reads the value of the 12th bit.
b15
to
b8 b7
1 1
0 1 1 0 0
0
0 1
0 1 1 0 0
b31
to
b24 b23
0 1
1 0 1 0 0
1
1 1
0 0 0 0 1
b47
to
b40 b39
1 1
1 1 0 1 0
0
1 0
0 1 1 0 0
Reads the value of the 40th bit counting
from the 0th bit of A%(0).
MELSEC-Q
to
b0
0
to
b0
0
to
b16
1
to
b32
0
11 - 357

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents