Mitsubishi QD51 Programming Manual page 573

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

Advertisement

11 INSTRUCTIONS AND FUNCTIONS
WTSET
Instruction
• Writes 0 or 1 to the specified bit of an integer array variable.
WTSET <integer expression 1>,<integer expression 2>,<array variable>
Syntax
integer expression 1
integer expression 2
array variable
WTSET 12,1, A%(0)
Examples
WTSET 40,0,A%(0)
• The WTSET function writes data (1 or 0) specified in <integer expression 2> to the bit
Description
specified in <integer expression 1> in the one-dimensional integer array variable specified
by <array variable>.
• In the bit specification by <integer expression 1>, it is possible to specify any bit in any
array variables relative to the 0th bit of the specified array variable.
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.
• Specify the data to be written in <integer expression 2>.
The only data that can be specified is "0" or "1."
An "Illegal function call" error occurs if data other than 0 or 1 is specified.
• Only a one-dimensional integer array variable can be specified in <array variable>.
If a variable other than an element of a one-dimensional integer array variable is specified,
an "Illegal function call" error occurs.
11 - 403
WriTe SET
• • • •
Specify which bit of the specified integer array is to
be written to, using an integer from 0 to 65535.
• • • •
Specify the data to be written (0 or 1).
• • • •
Specify a one-dimensional integer array variable to
which data is written.
• • • •
Writes "1" to the 12th bit counting from the 0th bit of
A%(0).
A%(0)
• • • •
Writes "0" to the 40th bit counting from the 0th bit of
A%(0).
A%(0)
A%(1)
A%(2)
The 40th bit counting from the 0th bit of A%(0).
MELSEC-Q
b15
to
b8 b7
to
1
Write "1" to the 12th bit.
b15
to
b8 b7
to
to
to
b31
b24 b23
b47
to
b40 b39
to
0
b0
b0
b16
b32
11 - 403

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ad51h-s3Qd51-r24A1sd51s

Table of Contents