Example: barber

Gpib Programming Tutorial - Boston University

Gpib Programming TutorialProgramming a GPIB based instrument designed at the Electronics Group 11 January 2000 Electronics Group,FreeUniversityAmsterdam, The NetherlandsFaculty of SciencesPhone : +31-20-4447973 Fax: + (rev. )E-mail : (Rob Limburg)Project-id [projectnummer]W eb: ~elecGpib Programming TutorialiElectronics Group ( ~elec)FreeUniversityAmsterdam, Faculty of SciencesContents1 .. Gpib bus .. 12 Thecommunicationprinciple .. Commands and Common commands and Compound commands and .. Combining commands and queries with .. Omitting the header.

The physical connection is a cable with standard connectors on both sides. The standard connector is the Amphenol or Cinch Series 57 MICRORIBBON or AMP CHAMP type. The connectors can be ... • Production quality A PCB (printed circuit board) is designed. Large amount of these cards canbebuild.

Tags:

  Printed, Board, Connectors, Circuit, Printed circuit board

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Gpib Programming Tutorial - Boston University

1 Gpib Programming TutorialProgramming a GPIB based instrument designed at the Electronics Group 11 January 2000 Electronics Group,FreeUniversityAmsterdam, The NetherlandsFaculty of SciencesPhone : +31-20-4447973 Fax: + (rev. )E-mail : (Rob Limburg)Project-id [projectnummer]W eb: ~elecGpib Programming TutorialiElectronics Group ( ~elec)FreeUniversityAmsterdam, Faculty of SciencesContents1 .. Gpib bus .. 12 Thecommunicationprinciple .. Commands and Common commands and Compound commands and .. Combining commands and queries with .. Omitting the header.

2 Default ,minimumandmaximum .. ,typo! .. The error It hangs!.. 124 Instrumentstatus .. (STBandSRE) .. Service Standard Event Status Registers (ESR and ESE).. 155 ResetandClear .. 176 Trigger Standard 187 Overlapped commands and 19 Gpib Programming TutorialiiElectronics Group ( ~elec)FreeUniversityAmsterdam, Faculty of Sciences8 Instrument Standard common commands and Standard .. 239 Error 2610 Softwarerevisions .. 2911 Further 30 Appendix A Quick 31A1 What you 31A2 What you need to know before you 31A2 What you need to 31 Gpib Programming Tutorial1 Electronics Group ( ~elec)FreeUniversityAmsterdam, Faculty of SciencesDeviceSystem Controller(PC,MAC, Workstation)DeviceDeviceDeviceGPIB bus1 IntroductionIf you want to get started quickly and ignore most of the (background) information, go toappendix AQuick Gpib busIn 1965, Hewlett-Packard designed the Hewlett-Packard Interface Bus (HP-IB) to connect their line ofprogrammable instruments to their computers.

3 Today, the name General Purpose Interface Bus(GPIB) is more widely used than HP-IB. Despite its long established history, the bus is still verypopular. Today, thousands of different instruments are equipped with this Gpib bus standardThe GPIB bus is standardised by the IEEE (Institute of Electrical and Electronics Engineers). TheIEEE Standard 488-1975 defined the electrical and mechanical specifications. The ANSI/IEEE standard defined precisely how controllers and instruments should Commands for Programmable Instruments (SCPI) took the command structures defined inIEEE and created a single, comprehensive Programming command set that is used with anySCPI Measurement setupTypically, a measurement setup comprises a system controller (usually a PC or workstation) and atleast one device (instrument).

4 The system controller has to have a gpib controller card. These cardscan be bought from different vendors such as Hewlett-Packard, National Instruments,Computerboards, Ines and others)The physical connection is a cable with standard connectors on both sides. The standard connector isthe Amphenol or Cinch Series 57 MICRORIBBON or AMP CHAMP type. The connectors can bestacked to connect all the RestrictionsThe following restrictions are typical for normal maximum separation of 4 m between any two devices and an average separation of 2 mover the entire maximum total cable length of 20 more than 15 device loads connected to each bus, with no less than two-thirds Gpib Instruments from our groupNeoNilMost gpib instruments from our group are constructed around the NeoNil modular computer computer features a G96 bus which can be used to add plug in cards.

5 These plug in cards carrythe special functionality needed to interact with the outside world ( experiment). With these plugGpib Programming Tutorial2 Electronics Group ( ~elec)FreeUniversityAmsterdam, Faculty of Sciencesin cards an intelligent instrument can be NeoNil has an gpib interface which conforms to the in cardsThe G96 plug in cards can be off the shelf developed by our group or can be bought from an plug incard vendor. Also, custom plug in cards can be developed on demand. These custom plug in cardscome in two favours: Prototype quality. These cards are developed usually for incidental/special purposes.

6 Thecards are build using Wire-Wrap techniques on a prototype card. There is usually only one(1) card build. Production quality A PCB ( printed circuit board ) is designed. Large amount of these is usually no difference in functionality or performance between the two types of cards. Onlythe production method the web pages of the Electronics Group for the available off the shelf plug in boards or visitus at T012 SoftwareThe software is equally important as the hardware. All the software can be custom developed, butwe also maintain standard software components that we can assemble into a new hardware needs custom software, so it is clear that for those parts new code has to major software component is the SCPI Engine.

7 This software component allows us to buildmodular SCPI based software. All the command, query and data parsing and formatting is done bythe SCPI Engine. This allows us to concentrate on the design of new modules rather than to bebothered by the syntax intricacies of SCPI and SCPI Engine supports the separation of independent software parts. In SCPI naming conventionthese are called subsystems . More on this Programming Tutorial3 Electronics Group ( ~elec)FreeUniversityAmsterdam, Faculty of SciencesSystem ControllerDevice(instrument)Commands,que ries,parameter-dataand eventsResponse-dataand eventsHeader*Common CommandHeader*Common Query?

8 2 The communication principleA GPIB instrument receives its information from another device. Usually this is the system instrument distinguishes between events,commands, queries and data. The figure on theright illustrates the flow of the various informationtypes. Events. The GPIB bus has a number ofspecial control lines which allow fast andsimple passing of primitive information,called events. This primitive information is also called Interface Events or Interface Mes-sages because they are initiated and processed by the interface hardware. An example of anevent is the IFC (InterFace Clear) event, Which forces the instrument to be able to listen tothe system controller.

9 Events are discussed last in this chapter. Commands. Commands are strings which cause the instrument to perform an action, suchas taking measurements or activate a motor. Queries. Queries are strings which cause the instrument to generate response. Queriesusually do not cause an instrument to perform an action. Queries always end with a questionmark (?). Data units. Data units are used to pass information. Data can be in the form of parameterswhich come with commands or queriestothe instrument. Data can also be in the form ofresponsefroman GPIB bus operates block oriented, multiple commands, queries and data strings units can becombined into one line of text.

10 An instrument will start executing commands and queries if a com-plete line of text has been received. To know when a complete line is transferred, the EOI (End OrIdentify) event has to be generated simultaneously when the last byte is and queries follow the same syntax rules, except that queries always end with a questionmark. All commands and queries are build up using headers:Header:A header is a string of maximum 12 characters. There is no distinction betweenupper and lowercase. The header may contain digits, but will always starts with acharacter or an underscore (_).There are two types of commands and queries; the common and the compound types.