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.

4. Communications<br />

4.5 Command Code<br />

4.5.1 Command Code: 01, Read Status of Contact (Input point X is not included)<br />

Number of Points (max) = 255 (Dec) = FF (Hex)<br />

Example:Read contacts T20~T56 from Slave ID#1<br />

PC→PLC “:01 01 06 14 00 25 BF CR LF”<br />

Sent message:<br />

Field Name<br />

ASCII<br />

STX :<br />

Slave Address 01<br />

Command code 01<br />

Starting Address Hi 06<br />

Starting Address Lo 14<br />

Number of Points Hi 00<br />

Number of Points Lo 25<br />

Error Check (LRC)<br />

ETX 1<br />

ETX 0<br />

BF<br />

0D (Hex)<br />

0A (Hex)<br />

Assume Number of Points in sent message is n (Dec), quotient of n/8 is M and the remainder is N.<br />

When N = 0, Bytes Count in feedback message will be M; when N≠0, Bytes Count will be M+1.<br />

PLC→PC “:01 01 05 CD 6B B2 0E 1B D6 CR LF”<br />

Feedback message:<br />

Field Name<br />

ASCII<br />

STX :<br />

Slave Address 01<br />

Command code 01<br />

Bytes Count 05<br />

Data (Coils T27…T20)<br />

Data (Coils T35…T38)<br />

Data (Coils T43…T36)<br />

Data (Coils T51…T44)<br />

Data (Coils T56…T52)<br />

Error Check (LRC)<br />

END 1<br />

END 0<br />

CD<br />

6B<br />

B2<br />

0E<br />

1B<br />

E6<br />

0D (Hex)<br />

0A (Hex)<br />

4-13

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

Saved successfully!

Ooh no, something went wrong!