Bit Logical Or - Mitsubishi Electric R16MTCPU Programming Manual

Hide thumbs Also See for R16MTCPU:
Table of Contents

Advertisement

Bit logical OR: |

Format
(S1) | (S2)
Setting data
■Usable data
: Usable
Setting
Usable Data
data
Bit
device
(S1)
(S2)
■Description, data type of result
Setting data
(S1)
(S2)
Processing details
• The bit-by-bit logical add of the data specified with (S1) and the data specified with (S2) is found.
• When (S1) and (S2) differ in data type, the data of the smaller data type is converted into that of the greater type before
operation is performed. At this time, note that signed data is converted.
Operation error
An operation error will occur if:
• (S1) or (S2) is an indirectly specified device and its device No. is outside the range.
Program example
■Program which ORs #0 and #1 and substitutes the result to D0
D0 = #0 | #1
b15
D0
0 1
0 0 1 0 0 0
1 1
4 OPERATION CONTROL PROGRAMS
140
4.6 Bit Operations
Number of basic steps
7
Word device
16-bit
32-bit
64-bit
integer
integer
floating
type
type (L)
point
type (F)
Description
Data which will be ORed bit-by-bit
b0
1 1 1
0 0 0
Usable steps
F/FS
Constant
16-bit
32-bit
64-bit
integer
integer
floating
type
type
point
(K/H)
(K/H, L)
type (K)
b15
b0
#0
0
0 0 0 0 0 0
1
1 1
1 1 1
0 0 0
|
b15
b0
#1
0
0 0 1 0 0 0
1
0 1
1 0 1
0 0 0
G
Calculation
Bit
expression
conditional
expression
Data type of result
Data type of (S1) or (S2) which is greater
(Integer type)
Comparison
conditional
expression

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

R64mtcpuMelsec iq-r seriesR32mtcpu

Table of Contents