Local Lockout Using Ni-488.2 And C - Keysight E4428C ESG RF Programming Manual

Signal generators
Table of Contents

Advertisement

110
!
120
!*************************************************************************
130
Sig_gen=719
140
CLEAR Sig_gen
150
LOCAL Sig_gen
160
REMOTE Sig_gen
170
CLEAR SCREEN
180
OUTPUT Sig_gen;"*RST"
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
250
PRINT
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
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.
// ************************************************************************************
Keysight Signal Generators Programming Guide
Local, control.
! Declares a variable to hold signal generator address
! Resets signal generator parser and clears any output
! Places the signal generator in local mode
! Places the signal generator in remote mode
! Clears the controllers display
! Places the signal generator in a defined state
! Puts the signal generator in LOCAL LOCKOUT mode
! Prints user prompt messages
! Returns signal generator to Local control
Programming Examples
GPIB Programming Interface Examples
87

Advertisement

Table of Contents
loading

Table of Contents