Stringcrcccitt - Omron NJ501-1500 Reference Manual

Machine automation controller nj-series
Hide thumbs Also See for NJ501-1500:
Table of Contents

Advertisement

2 Instruction Descriptions

StringCRCCCITT

The StringCRCCCITT instruction calculates the CRC-CCITT value using the XMODEM method.
Instruction
StringCRCCCITT
Calculate Text
String CRC-CCITT
Variables
Name
Meaning
In
Text string
to process
Initial
Initial value
OutOrder
Byte order
Out
CRC-
CCITT
value
Bit strings
In
Initial
OK
OutOrder
Out
Function
The StringCRCCCITT instruction calculates the CRC-CCITT value of text string to process In using the
XMODEM method. CRC-CCITT value Out is given as a hexadecimal text string with a NULL character
stored at the end.
Set Initial to the initial value for CRC-CCITT value calculation. OutOrder specifies the byte order.
The data type of OutOrder is enumerated type _eBYTE_ORDER. The meanings of the enumerators
are as follows:
Enumerators
_LOW_HIGH
_HIGH_LOW
2-508
Name
FB/FUN
FUN
I/O
Description
Text string to process
Initial value of CRC-CCITT
Input
value
Order to process bytes in In
Output
CRC-CCITT value
Refer to Function for the enumerators of the enumerated type _eBYTE_ORDER.
Lower byte first, upper byte last
Upper byte first, lower byte last
Graphic expression
(@)StringCRCCCITT
EN
ENO
In
Initial
OutOrder
Valid range
Depends on data type.
_LOW_HIGH,
_HIGH_LOW
5 bytes (four single-
byte alphanumeric
characters plus the final
NULL character)
Integers
Meaning
NJ-series Instructions Reference Manual (W502)
ST expression
Out:=StringCRCCCITT(In,
Initial, OutOrder);
Out
Unit
Default
''
0
---
_HIGH
_LOW
---
---
Times, durations,
dates, and text strings
OK
OK

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Nj501-1300Nj501-1400

Table of Contents