17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3. Instruction Set<br />

API Mnemonic Operands Function<br />

108 CRC P CRC checksum<br />

Controllers<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong> <strong>SX2</strong><br />

SE<br />

Type Bit Devices Word devices Program Steps<br />

OP X Y M S K H KnX KnY KnM KnS T C D E F CRC, CRCP: 7 steps<br />

S *<br />

n * * *<br />

D *<br />

PULSE 16-bit 32-bit<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong><br />

SE SE SE <strong>SX2</strong><br />

Operands:<br />

S: Starting device for RTU mode checksum n: Data length for CRC operation (n = K1~K256) D:<br />

Starting device for storing the operation result<br />

Explanations:<br />

1. n: n must be an even number. If n is out of range, an error will occur and the instruction will not<br />

be executed. At this time, M1067 and M1068 = ON and error code H’0E1A will be recorded in<br />

D1067.<br />

2. 16-bit mode: When CRC instruction operates with M1161 = OFF, hexadecimal data starting<br />

from S is divided into high byte and low byte and the checksum operation is operated on n<br />

number of bytes. After this, operation result will be stored in both hi-byte and low byte of D.<br />

3. 8-bit mode: When CRC instruction operates with M1161 = ON, hexadecimal data starting from<br />

S is divided into high byte (invalid) and low byte and the checksum operation is operated on n<br />

number of low bytes. After this, operation result will be stored in low bytes of D (Consecutive 2<br />

registers).<br />

4. Flag: M1161 8/16-bit mode<br />

3-293

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!