Chapter 6 Applied Instructions Symbol S : First device to which the CRC is applied n : Number of bytes D : First device in which the operation result is stored Explanation 1. This instruction performs a cyclic redundancy check on n bytes starting with the device specified by S . Please refer 6_ to the Additional remark for this instruction (below) for more information about the CRC check code. 2. The operand n must be between 1–1000. If n is not in the range, an operation error occurs, the instruction is not executed, SM0 and SM1 are ON, and the error code in SR0 is 16#200B. 3. The 16-bit conversion mode:
When SM606 is OFF, the instruction divides the hexadecimal data in the device specified by S into the high 8-bit data and the low 8-bit data. The instruction applies the CRC to every byte, and the stores the operation result in the high 8-bit and the low 8-bit in the device specified by D . The number of bytes depends on n . 4. The 8-bit conversion mode: When SM606 is ON, the instruction divides the hexadecimal data in the device specified by S into the high 8-bit data (invalid data) and the low 8-bit data. The instruction applies the CRC to every byte, and stores the operation result in the low 8-bit in the two registers. The number of bytes depends on n .
6-529 API Instruction code Operand Function 1807 CRC S, n, D Cyclic Redundancy Check Device X Y M S T C HC D FR SM SR E K 16# “$” F S n D BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S n D Pulse instruction 16-bit instruction 32-bit instruction - ES3 -