Technical data

86 Agilent Signal Generators Programming Guide
Programming Examples
GPIB Programming Interface Examples
110 ! Local, control.
120 !*************************************************************************
130 Sig_gen=719 ! Declares a variable to hold signal generator address
140 CLEAR Sig_gen ! Resets signal generator parser and clears any output
150 LOCAL Sig_gen ! Places the signal generator in local mode
160 REMOTE Sig_gen ! Places the signal generator in remote mode
170 CLEAR SCREEN ! Clears the controllers display
180 OUTPUT Sig_gen;"*RST" ! Places the signal generator in a defined state
190 ! The following print statements are user prompts
200 PRINT "The signal generator should now be in remote."
210 PRINT "Verify that the 'R' and 'L' annunciators are visable"
220 PRINT ".......... Press Continue"
230 PAUSE
240 LOCAL LOCKOUT 7 ! Puts the signal generator in LOCAL LOCKOUT mode
250 PRINT ! Prints user prompt messages
260 PRINT "Signal generator should now be in LOCAL LOCKOUT mode."
270 PRINT
280 PRINT "Verify that all keys including `Local' (except Contrast keys) have no effect."
290 PRINT
300 PRINT ".......... Press Continue"
310 PAUSE
320 PRINT
330 LOCAL 7 ! Returns signal generator to Local control
340 ! The following print statements are user prompts
350 PRINT "Signal generator should now be in Local mode."
360 PRINT
370 PRINT "Verify that the signal generator's front-panel keyboard is functional."
380 PRINT
390 PRINT "To re-start this program press RUN."
400 END
Local Lockout Using NI-488.2 and C++
This example uses the NI- 488.2 library to set the signal generator local lockout mode. Launch
Microsoft Visual C++ 6.0, add the required files, and enter the following code into your .cpp source
file. niex2.cpp performs the following functions:
all front panel keys, except the contrast key
places the signal generator into remote
prompts the user to verify the signal generator is in remote
places the signal generator into local
The following program example is available on the signal generator Documentation CD- ROM as
niex2.cpp.
// ************************************************************************************