Controlling a device on GPIB

Submitted by admin on Mon, 2005-04-11 00:27.
Let's next see how each device in a GPIB system can be initialized by the controller and then commanded to send or receive data. To permit individual communications with the devices on a GPIB system, each device must have a 5-bit GPIB address. This address is normally set by means of switches on the back of a GPIB instrument or by using controls on its front panel.

Any address between 0 and 11110 (address 30) may be used, except that by convention, address 0 is usually reserved for the controller's address. Address 31 is used for the un-talk and un-listen commands (see next paragraph) and thus can't be used as a device address. Note that even though there are 31 possible primary addresses, a maximum of 15 devices (including the controller) can be attached to the GPIB at a given time.

The 5-bit address set in the device's switches actually specifies two different address codes that are used to assign devices to be talkers or listeners. To command a device to be a listener on the bus, the controller sends a command (ATN low) with the device's My Listen Address (MLA) on DIO1-D108. The MLA is obtained by adding 20h to the 5-bit GPIB address.

Similarly, a device is commanded to be a talker by sending a command with the device's My Talk Address (MTA) on DIO1-D108. The MTA is obtained by adding 40h to the 5-bit address. For example, if the device's GPIB address is 3, then sending the command 23h (or the ASCII character '#') makes it a listener; sending the command 43h (or the ASCII character 'C') makes it a talker. The un-listen (UNL) command 3Fh (ASCII character '?') causes all current listeners to stop being listeners; the un-talk (UNT) command 5th (ASCII character'') causes the current talker to stop being a talker.

It's possible, but not very common, for devices to be extended talkers and/or listeners. Such devices have secondary addresses that provide selective access to sub-units within the device. The secondary address is sent as a second address byte after the initial one, with 60h added to the physical secondary address to distinguish it as a secondary address.
»

dlrudisha Says:
Wed, 2010-09-01 05:40
2xEI0C ddwwmtvntpzx, [url=http://leopocbplrjy.com/]leopocbplrjy[/url], [link=http://dkazvfywqohb.com/]dkazvfywqohb[/link], http://llkdmmredwwm.com/
»