EasyManua.ls Logo

Omron NJ501-1500

Omron NJ501-1500
990 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
2-865
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Other Instructions
2
ReadNbit_**
The following example shows the ReadNbit_BYTE instruction when In is BYTE#16#89, Pos is USINT#2
and Size is USINT#4.
Use a WriteNbit_** instruction to write zero or more bits to a bit string.
The data types of In and Out must be the same.
If the value of Size is 0, the value of Out is 16#0.
An error occurs in the following cases. ENO will be FALSE, and Out will not change.
The value of Size is outside of the valid range.
The value of Pos is outside of the valid range.
The bit string in In does not have enough bits for the number of bits specified by Size from the
position specified by Pos.
Additional Information
Precautions for Correct Use
abc:=ReadNbit_BYTE(BYTE#16#89, USINT#2,
USINT#4);
LD ST
abcBYTE#16#89
USINT#2
USINT#4
ReadNbit_BYTE
EN ENO
In
Pos
Size
1 0
In
0 0 1 0 0 1
Size=USINT#4
Pos=USINT#2
Bit 0
Bit 7
0 0 0 0 0 0 1 0
Out=abc
Bit 0
Bit 7

Table of Contents

Related product manuals