13.07.2015 Views

Data Acquisition

Data Acquisition

Data Acquisition

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Consequently, the ASCII protocol is normally only used for slow systems with one mastertalking to a limited number of slaves. ASCII protocols are also popular for stand-aloneinstruments where a serial interface has been added, with no major design changes, to theexisting system. Essentially, this means that the additional serial port is treated like anotherkeypad by the instrument.Protocol structureA simple command/response ASCII protocol, used for communications between a personalcomputer and a digital transmitter is shown in Figure 6.13. The host computer alwaysgenerates the command sequence. Communications are initiated by using command messagescontaining the address of the device and a two character ASCII command code. All analogdata is returned as a nine-character string consisting of a sign, five digits, a decimal point, andtwo additional digits. The $ character is used to indicate a request from the master and the *character a response from the slave device. Both the command and response messages areterminated by a [CR] character.Figure 6.13Short form command and response messagesIn this example, the command above reads from the digital transmitter at address 1 andreceives a value of 72.10 in the response message.A variation of the short form command and response messages is their long formequivalents. To ensure greater message integrity, and increase reliability, long form messagesare included with a block checksum at the end of the message. In addition, the commandmessage is echoed back within the response message from the slave device. The long formcommand is initiated using the # character instead of the $ character. An example of longform messages is shown in Figure 6.14.Figure 6.14Long form command and response messages

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

Saved successfully!

Ooh no, something went wrong!