2-517
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
FCS Instructions
2
AryCRC16
The data type of OutOrder is enumerated type _eBYTE_ORDER. The meaning of the enumerators are
as follows:
The following example is for when Size is UINT#2, Initial is WORD#16#FFFF and OutOrder is
_LOW_HIGH.
• If the value of Size is 0, the value of Out is WORD#16#0.
• An error occurs in the following cases. ENO will be FALSE, and Out will not change.
• The value of OutOrder is outside of the valid range.
• The value of Size exceeds the array area of In[].
• An array without a subscript is passed to In[].
• The elements in In[] are not bit string, integer, real number, time, duration, date, or date and time
data.
Enumerator Meaning
_LOW_HIGH Lower byte first, upper byte last
_HIGH_LOW Upper byte first, lower byte last
Precautions for Correct Use
def:=AryCRC16(abc[4], UINT#2,
WORD#16#FFFF,
_LOW_HIGH);
LD
ST
abc[4]
def
UINT#2
_LOW_HIGH
WORD#16#FFFF
AryCRC16
EN ENO
In
Size
Initial
OutOrder
Out = def
Size = UINT#2
CRC-16 value
16#D464
16#30
16#31
In[0]=abc[4]
In[1]=abc[5]