Chapter 7 Application Programs

Example Programs for Excel 7.0

Y G68

o

Y

 

 

 

0 l

® i

1

BCIG8T6 p Y

 

 

nVkd

 

 

 

o

Y

 

 

 

 

Insert 4

x 4

x

6 i

“Send Commands” by clicking on the tab with the right mouse button. Create another module and name it “Port Configuration”. You will use the “Port Configuration” module to configure all of the overhead required to communicate with the instrument over the interface.

You will use the “Send Commands” module to send the nVkd commands to the instrument using the “Port Configuration” module.

Two Excel examples are included in this section. To enter the first example (“takeReadings”), type the text as shown on page 322 into the “Send Commands” module. Then type the text for configuring the interface as shown on page 323 into the “Port Configuration” module.

After entering the information for both modules, go to a spreadsheet and run the example program. Note that you must run the macro from

a spreadsheet. With the cursor in the spreadsheet, select x from the Tools menu. Then double-click on the “takeReadings” macro in the Macro dialog box.

To run the second example (“ScanChannels”), type the text as shown on page 325 into the “Send Commands” module and reuse the “Port Configuration” module from the first example (page 323).

Make any changes necessary to suit your application in the “Send Commands” module. You must enter the information in the modules

exactly as shown or an error will be generated. If several system errors 7 occur while attempting to run a macro, you may have to reboot your kV

to get the HP-IB port to work properly.

To use these examples with Windows® B694

modify the declarations at the top of the “Port Configuration” module.

Change

to

in all declarations.

321

Page 318
Image 318
HP 34970A manual G68, Example Programs for Excel, Insert