EasyManuals Logo

Omron NJ501-1500 User Manual

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
Page #276 background imageLoading...
Page #276 background image
2 Instruction Descriptions
2-228
NJ-series Instructions Reference Manual (W502)
The AryToBCD instruction converts Size elements of unsigned integer array In[] starting from In[0] to
a BCD bit string. It outputs the BCD bit string to BCD array AryOut[].
The following example is for when Size is UINT#3.
The following table shows the valid ranges for In[] and AryOut[] according to the data types of their
elements.
• Use the same data type and size for In[] and AryOut[]. For example, if the elements of In[] are UINT
data, use WORD as the data type of the elements of AryOut[].
• This instruction does not convert signed binary to signed BCD. Use an unsigned integer (USINT,
UINT, UDINT, or ULINT) as the data type of In[].
• The values in AryOut[] do 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 AryOut[] will not change.
• The value of In[] is outside of the valid range.
• The data type sizes of In[] and AryOut[] are different.
• The value of Size exceeds the array area of In[] or AryOut[].
Function
Data type of the ele-
ments of In[]
Data type of the ele-
ments of AryOut[]
Valid range of In[] Valid range of AryOut[]
USINT BYTE 0 to 99 16#00 to 16#99 (BCD)
UINT WORD 0 to 9999 16#0000 to 16#9999 (BCD)
UDINT DWORD 0 to 99999999 16#0000_0000 to
16#9999_9999 (BCD)
ULINT LWORD 0 to 9999999999999999 16#0000_0000_0000_0000 to
16#9999_9999_9999_9999 (BCD)
Precautions for Correct Use
AryToBCD(abc[1], UINT#3, def[2]);
LD ST
UINT#3
abc[1]
def[2] def[2]
AryToBCD
EN ENO
In
Size
AryOut
In[0]=abc[1]
In[1]=abc[2]
In[2]=abc[3]
16#10EC
16#0013
16#123B
AryOut[0]=def[2]
AryOut[1]=def[3]
AryOut[2]=def[4]
4332
0019
4667
Size=UINT#3

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron NJ501-1500 and is the answer not in the manual?

Omron NJ501-1500 Specifications

General IconGeneral
BrandOmron
ModelNJ501-1500
CategoryController
LanguageEnglish

Related product manuals