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.

Each device connected to the GPIB has a unique device address and each device must bedesigned with enough intelligence to identify whether the data or command sent downthe data lines is meant for it or for another device. Device addresses are arbitrary and areset by the user, usually on a DIP switch, located on the back of the device, or byprogramming the device software. For the controller, each connected device is identifiedin the software of the controller’s program. The only limitation in choosing a deviceaddress is that it must be an integer number in the range 0 to 30.To communicate over the GPIB, the controller must first address the appropriatedevices. To address a device and configure it to take part in communications on the bus,the controller sends an address command message to the required device. Addresscommand messages have the format shown in Figure 8.7. Figure 8.7Address command message formatBit 0 to bit 4 represent the binary GPIB primary address of the device, to be included inthe communication. If bit 5 (LA) is set, the device with the primary address specified isto be configured as a listener, while bit 6 (TA) is set if the device is to be configured as aTalker. Bit 7 is considered a don’t-care bit as it is never used, and can assumed to be zero.The command message byte for a device with address of 0x05, to be configured as alistener, would be 0x25 (‘%’). The command message byte for the same deviceconfigured as a talker would be 0x45 (‘E’).Once a communication has taken place between two or more devices, the controller mustclear the bus of the current talker and listener(s) before assigning a new talker andlistener(s). Sending an unused talk address, or more typically, the un-talk (UNT)command message (0x5F), un-addresses the current Talker. This command is notrequired since addressing one talker automatically un-addresses all others. The currentlistener or multiple listeners are automatically un-addressed using the un-listen (UNL)command message (0x3F). A single listener cannot be un-addressed if multiple listenershave been previously addressed.There are three methods for terminating data messages:• EOI method – When using this method, the EOI bus control line is assertedwhen the talker places the last byte of data onto the data bus. This line ismonitored by all listeners.• EOS method – This method does not make use of any bus control lines,instead, appending a pre-determined end-of-string byte to the end of the datastring and sending this data byte to the listener(s). The EOS byte is usually thenew line character (0x0A) or the carriage return character (0x0D)

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

Saved successfully!

Ooh no, something went wrong!