2-511
2 Instruction Descriptions
NJ-series Instructions Reference Manual (W502)
FCS Instructions
2
StringCRC16
The following example is for when In is ‘01’, Initial is WORD#16#FFFF and OutOrder is _LOW_HIGH.
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.
• In does not end in a NULL character.
• The number of bytes in In is 0 (i.e., the NULL character only).
• The number of bytes for Out is outside of the valid range.
Precautions for Correct Use
abc:=StringCRC16(’01’, WORD#16#FFF
_LOW_HIGH);
LD
ST
‘01’
WORD#16#FFFF
_LOW_HIGH
abc
StringCRC16
EN ENO
In
Initial
OutOrder
Out = abc
In
CRC-16 value
Character codes
‘01’
3130
‘D464’