2-9
2
i.e.,
to change the unit's GPIB address to dual secondary
OUTPUT 720; "SYST:COMM:GPIB:ADDR:MODE DUAL"
OUTPUT 72000;"SYST:COMM:GPIB:ADDR:MODE?"
ENTER 72000, A$
PRINT A$
'displays the query response
With the NI 488.2 command set, secondary addresses are offset by
96 and multiplied by 256 to be in the upper byte of the address
variable. The above example in NI 488.2 commands becomes:
Addr=20; BD=0
CmdStr$="SYST:COMM:GPIB:ADDR:MODE DUAL"
Call Send(Bd,Addr,CmdStr$, EOTMode)
Addr = (256*96)+20
'primary 20, secondary 0
CmdStr$="SYST:COMM:GPIB:ADDR:MODE DUAL"
Call Send(Bd,Addr,CmdStr$, EOTMode)
Instring$ = String$(Lin, 32)
'fills the string with spaces
Call Receive(Bd, Addr, Instring$, Term)
Print Instring$
8.
Use the IEEE 488.2 *SAV 0 command to save the new values in the
unit's nonvolatile memory as the power-on default values. Use the
unit's current GPIB address.
OUTPUT 720; "*SAV 0"
'primary address 20
or
OUTPUT 72000; "*SAV 0"
'primary 20, secondary 0
Caution - Do not put the *SAV 0 command in a
continuously running program loop.
Figure 2-2 lists a general purpose program in HP BASIC that can be used
to configure the unit. Figure 2-3 lists a short program that only changes the
unit's GPIB address.