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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

mbtx(2) = address \ 256<br />

- 18 -<br />

‘hi byte (start reg.)<br />

mbtx(3) = address And &HFF ‘low byte (start reg.)<br />

mbtx(4) = 0 ‘hi byte (num. reg.)<br />

mbtx(5) = 104 ‘low byte (num. reg.)<br />

crc = calcCrc(mbtx(), 6) ‘calculate the CRC<br />

mbtx(6) = crc And &HFF ‘low byte CRC<br />

mbtx(7) = crc \ 256 ‘hi byte CRC<br />

EXAMPLES OF READING AND WRITING QUERY<br />

In the following section, a dump of data <strong>com</strong>munication is reported in order to see what really happens in a normal<br />

<strong>com</strong>munication session between master and slave.<br />

WRITING OPERATION<br />

Let’s say that we want to send the following configuration to the chamber controller:<br />

Temperature: 50 Celsius degree<br />

Relative Humidity: 70%<br />

Run bit: ON<br />

Temperature channel: ON<br />

Re. Humidity channel: ON<br />

Dedicated contacts: ON for all the eight contacts available<br />

As described previously, a query packet must be prepared and sent to the chamber controller to write data to the<br />

specific locations we are interested in.<br />

When the controller receives this data packet, it decodes it, acts as requested changing the content of the memory<br />

locations to work with, and answer to the master.<br />

The answer can be a normal answer packet for the function numer 16, or an error packet if an exception has been<br />

detected.<br />

Note also that, if a <strong>com</strong>munication error (frame, parity, overrun or CRC) has been detected by the slave, no answer will<br />

be sent to the master.<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!