Nj-Series Instructions Reference Manual (W502 - Omron NJ501-1500 Reference Manual

Machine automation controller nj-series
Hide thumbs Also See for NJ501-1500:
Table of Contents

Advertisement

2 Instruction Descriptions
InOut[] is a BYTE array, so the ninth bit from the least-significant bit is bit 1 in InOut[1]. Therefore, bit 1
in InOut[1] is made TRUE, all other bits in InOut[1] are made FALSE, and all bits in InOut[0] are made
FALSE.
LD
BYTE#16#09
USINT#4
abc[3]
InOut[0]=abc[3]
Size
2
= 16 bits
InOut[1]=abc[4]
If the number of bits in the elements of InOut[] is larger than the number of bits specified by Size, the
values of the remaining bits are retained. Consider an example where In is BYTE#16#02, Size is
USINT#2, and InOut[] is a WORD array.
Size is USINT#2, so the value is set in the lower 4 bits of InOut[0]. The values of the remaining bits in
InOut[0] (bits 4 to 15) are retained.
Bit
15
InOut[0]
0 1 0 1 1 0 0 1 0 0 1 0 0 1 0 0
Bits 4 to 15: Retained.
Additional Information
Use the Encoder instruction (page 2-374) to find the position of the highest TRUE bit in array elements
that consist of a maximum of 256 bits.
Precautions for Correct Use
• If the value of Size is 0, all bits in InOut[] change to FALSE.
• 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.
2-372
ST
Decoder(BYTE#16#09, USINT#4, abc[3]);
Decoder
EN
ENO
In
Size
InOut
abc[3]
Bit
7
In
0 0 0 0 1 0 0 1
Bit
Bit
7
0
0 0 0 0 0 0 0 0
Bit
Bit
7
0
0 0 0 0 0 0 1 0
Bit
Bit
7
0
0 0 0 0 0 0 1 0
In
Size=USINT#2
Bit 2: Changed to TRUE.
Bits 0, 1, and 3: Changed to FALSE.
Bit
Bit
4
0
Size
2
= 4 bits
Bit
0
Size=USINT#4
The corresponding
bit is made TRUE.
(2#1001 = Bit 9)
Other bits are
made FALSE.

NJ-series Instructions Reference Manual (W502)

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents