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-867
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
Other Instructions
2
WriteNbit_**
The following example shows the WriteNbit_BYTE instruction when In is BYTE#16#89, Pos is USINT#2
and Size is USINT#4.
Use a ReadNbit_** instruction to read zero or more bits from a bit string.
The data types of In and InOut must be the same.
The value of InOut does not change if the value of Size is 0.
Return value Out is not used when the instruction is used in ST.
An error occurs in the following cases. ENO will be FALSE, and InOut 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 InOut 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
WriteNbit_BYTE(BYTE#16#89, abc,
USINT#2, USINT#4);
LD ST
abc abc
BYTE#16#89
USINT#2
USINT#4
WriteNbit_BYTE
EN ENO
In
InOut
Pos
Size
1 0
In
0 0 1 0 1 0
Size=USINT#4
Pos=USINT#2
0 0 1 0 1 0 0 0
InOut=abc
Bit 0
Bit 7
Bit 0
Bit 7

Table of Contents

Related product manuals