2 Instruction Descriptions
2-514
NJ-series Instructions Reference Manual (W502)
AryCRCCCITT
The AryCRCCCITT instruction calculates the CRC-CCITT value using the XMODEM method.
* If you omit the input parameter, the default value is not applied. A building error will occur.
The AryCRCCCITT instruction calculates the CRC-CCITT value of Size elements of array to process
In[] starting from In[0]. The XMODEM method is used.
Set Initial to the initial value for CRC-CCITT value calculation. OutOrder specifies the byte order.
Instruction Name FB/FUN Graphic expression ST expression
AryCRCCCITT Calculate Array
CRC-CCITT
FUN Out:=AryCRCCCITT(In,
Size, Initial, OutOrder);
Variables
Name Meaning I/O Description Valid range Unit Default
In[] (array) Array to
process
Input
Array to process
Depends on data type.
---
*
Size Number of
elements to
process
Number of In[] elements 1
Initial Initial value Initial value of CRC-CCITT
value
0
OutOrder Byte order Order to process bytes in In _LOW_HIGH,
_HIGH_LOW
_HIGH
_LOW
Out CRC-
CCITT
value
Output CRC-CCITT value Depends on data type. --- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In[] (array) OKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOKOK
Size OK
Initial OK
OutOrder Refer to Function for the enumerators for the enumerated type _eBYTE_ORDER.
Out OK
Function
(@)AryCRCCCITT
EN ENO
In Out
Size
Initial
OutOrder