Lecroy WaveSurfer 3024 4-channel oscilloscope, Digital Storage oscilloscope, WaveSurfer 3024 Benutzerhandbuch

Produktcode
WaveSurfer 3024
Seite von 305
C
H A P T E R  
T
W O
:
 
 Control by GPIB 
 
WM-RCM-E Rev D 
ISSUED: February 2005
 19 
MAKE SIMPLE TRANSFERS 
 For a large number of  remote control operations, it is sufficient to use just three different subroutines 
(IBFIND, IBRD and IBWRT) provided by National Instruments. The following complete program reads the 
timebase setting of  the X-Stream DSO and displays it on the terminal: 
GPIB: 
This line holds the INCLUDE for the GPIB routines 
Find: 
DEV$ = “DEV4”               ‘  Because the DSO has been set at 
address 4. 
 
CALL IBFIND (DEV$, SCOPE%)  ‘  Find the DSO: label it “SCOPE%”. 
Send: 
CMD$ = “TDIV?”              ‘  Make a query string about the 
                              time base speed. 
 
CALL IBWRT (SCOPE%, CMD$)   ‘  Send the string to the DSO. 
Read: 
CALL IBRD (SCOPE%, RD$)     ‘  Read the response from the DSO. 
 
PRINT RD$                   ‘  Print the response string. 
 END 
Explanation  
GPIB: This line or lines must hold the link between the programming language and the National Instruments 
GPIB functions and drivers. 
Find: Open the device DEV4 and associate with it the descriptor SCOPE%. All I/O calls after that will refer 
to SCOPE%. The default configuration of  the GPIB handler recognizes DEV4 and associates with it a device 
with the GPIB address 4. 
Send: Prepare the command string TDIV? and transfer it to the oscilloscope. The command instructs the 
oscilloscope to respond with the current setting of  the timebase. 
Read: Read the response of  the oscilloscope and place it into the character string RD$.