Section Four A BASICA/QuickBASIC GPIB-PC Function Calls©National Instruments Corp. 4A-101 GPIB-PC User ManualBASICA/QuickBASIC GPIB ProgrammingExamplesThis section illustrates the programming steps that could be used toprogram a representative IEEE-488 instrument from your personalcomputer using the GPIB-PC handler functions. The applications arewritten in BASICA and QuickBASIC. The target instrument is a digitalvoltmeter (DVM). This instrument is otherwise unspecified (that is, it isnot a DVM manufactured by any particular manufacturer). The purposehere is to explain how to use the handler to execute certainprogramming and control sequences and not how to determine thosesequences.Because the instructions that are sent to program a device as well as thedata that might be returned from the device are called devicedependent messages, the format and syntax of the messages used inthis example are unique to this device. Furthermore, the interfacemessages or bus commands that must be sent to devices will also vary,but to a lesser degree. The exact sequence of messages to program andto control a particular device are contained in its documentation.For example, the following sequence of actions is assumed to benecessary to program this DVM to make and return measurements of ahigh frequency AC voltage signal in the autoranging mode:1. Initialize the GPIB interface circuits of the DVM so that it canrespond to messages.2. Place the DVM in remote programming mode and turn off frontpanel control.3. Initialize the internal measurement circuits.4. Program the DVM to the proper function (F3 for high frequencyAC volts), range (R7 for autoranging), and trigger source (T3for external or remote).5. For each measurement:a. Send the GET (Group Execute Trigger) command to triggerthe DVM.b. Wait until the DVM asserts Service Request (SRQ) toindicate that the measurement is ready to be read.