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.

- 8 -<br />

as part of the current data packet. If not, the character will be considered as the first character of a new data<br />

packet.<br />

For example, at 9600 bps the time between the transmission of a character and the next one is approximately<br />

800 microsec. If the next character will be received after more than 800 * 3.5 microseconds,<br />

the character will be the first of a new data packet.<br />

The following picture shows how a received character belongs to the current data packet (frame) or begins a<br />

new frame according to the time elapsed since the previous character was detected.<br />

In this picture the horizontal axis is the time axis and each rectangle identifies a character. A packet consists<br />

of all characters with intercharacter time less than time specified by Modbus (T = 800 * 3.5 microseconds at<br />

9600 bps)<br />

More than<br />

T=2800 microsec.<br />

Fig. 5 Frame identification<br />

Note that this method requires a very precise timing to get data from serial line. Considering that Windows is not a real-time<br />

system (and so it cannot garantee the timing required) it is preferable not to use it under this operating system.<br />

LENGHT SYNCHRONIZATION<br />

Each modbus function has a well defined length, both for queries and answers. Knowing these lengths, it is possible<br />

to identify the end of a packet while receiving.<br />

This way of operation is probably the simplest to use, both for development of a <strong>com</strong>mincation software and for the<br />

debug operation.<br />

In effect you always know how many character you are waiting for according to the query you sent to the slave device.<br />

This is also true when an error occours during the <strong>com</strong>munication: the lenght of an answer with an exception is<br />

however known.<br />

MODBUS FUNCTIONS<br />

Previous frame<br />

Data packet<br />

Time between characters is less<br />

than 800*3.5 microseconds: the<br />

characters belongs to the current<br />

New frame<br />

More than<br />

T=2800 microsec.<br />

All the operations with the chamber controller can be done with only two of the Modbus functions:<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!