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
First, Size bits are extracted from the least-significant bit of data to convert In. These bits are treated
individually. Then, the bits are stored in conversion result array InOut[] in the Pos bit of the elements
starting from InOut[0]. Size specifies the number of array elements to receive bits. The values of all bits
for which values are not stored are retained.
The following example is for when Pos is USINT#3 and Size is USINT#4.
LD
EN
abc
In
InOut
def[1]
USINT#4
Size
Pos
USINT#3
InOut[0]=def[1]
InOut[1]=def[2]
Size=USINT#4
InOut[2]=def[3]
InOut[3]=def[4]
Additional Information
Use the ColmToLine_** instruction (page 2-377) to extract bit values from the specified position of array
elements and output them as a bit string.
Precautions for Correct Use
• If the value of Size is 0, the values in InOut[] do not change.
• 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 value of Size exceeds the array area of InOut[].
• InOut[] is not an array of bit strings.
• An array without a subscript is passed to InOut[].
2-380
LineToColm
ENO
def[1]
Most-significant bit
In = abc
Pos=
Most-significant bit
USINT#3
0 0 1 0 0 0
1 0 0 0 0 1
0 1 0 1 0 0
0 0 1 0 1 0
0 0 0 1 1 0
1 0 0 0 0 0
1 1 0 1 0 1
0 0 1 0 0 0
Retained
ST
LineToColm(abc, def[1], USINT#4, USINT#3);
Size=USINT#4
Bit
0
0 0 0 0 0 0
0 0 1 0 1 0
Bit 0

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