26.12.2012 Views

Serial Communications Protocol Specifications - Swissvacuum.com

Serial Communications Protocol Specifications - Swissvacuum.com

Serial Communications Protocol Specifications - Swissvacuum.com

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

- 6 -<br />

Fig. 4 Decoding a data packet<br />

There are 2 types of errors which may occour: transmission errors and programming or operation errors. The Modbus<br />

system has specific methods for dealing with either type of error.<br />

COMMUNICATION ERRORS<br />

This kind of errors happens when a condition of FRAME or PARITY or OVERRUN error is detected (generally due to<br />

same problems of noise on the transmission lines) or when an invalid CRC (cyclical redundancy check) is found in the<br />

received data packet.<br />

When one or more of these errors is detected, the message (probably damaged) is not processed: the Slave<br />

device (microPLC) will not answer to the message.<br />

Operation / programming errors<br />

Are those which present incorrect data in a message. In this case the Slave device (MicroPLC) produces an<br />

“exception” depending on the error type; the exception error code is inserted in the answer data packet, so that it<br />

allows the master device (PC) to identify the error condition.<br />

To identify this exception, the most significant bit of the function code of the answer packet (<strong>com</strong>ing from the<br />

microPLC to the PC) is set to 1.<br />

Exception codes<br />

<strong>Serial</strong> <strong>com</strong>munication line<br />

MASTER SLAVE<br />

Data packet<br />

Any error ?<br />

No<br />

Decode the packet to get the<br />

answer from the slave.<br />

Noise<br />

Ye<br />

01 Illegal function<br />

02 Illegal data address<br />

Do not use the packet<br />

because corrupted<br />

<strong>Serial</strong> <strong>com</strong>munications protocol vers. 2.02 Angelantoni Industrie Spa Massa Martana (PG) Italy

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

Saved successfully!

Ooh no, something went wrong!