Agilent Technologies E5071C Manual page 990

Hide thumbs Also See for E5071C:
Table of Contents

Advertisement

Waiting for Trigger (SRQ)
Overview
Sample Program in Excel VBA
Sample Program in HT Basic
Other topics about Sample Programs
Overview
This sample program demonstrates how to use an SRQ to detect the end of
measurement.
This sample program correctly runs when the maximum number
of channels/traces is set to 9 channels/9 traces.
The sample program sets up the trigger system, configures the instrument
to properly generate an SRQ, and then triggers the instrument. When the
instrument has generated an SRQ that indicates the end of measurement,
the program exits after printing a measurement completion message.
See Waiting for the End of Measurement for this programming.
Sample Program in Excel VBA
Sub srq_meas_Click()
Dim defrm As Long
Dim vi As Long
Dim ContMode(9) As String
Dim Result As String * 10
Dim i As Integer, StbStatus As Integer
Const TimeOutTime = 100000 ' TimeOut time should be greater than the measurement time.
'
' Assign a GPIB address to the I/O pass.
Call viOpenDefaultRM(defrm)
Call viOpen(defrm, "GPIB0::17::INSTR", 0, 0, vi)
Call viSetAttribute(vi, VI_ATTR_TMO_VALUE, TimeOutTime)
'
' Store the settings of continuous initiation mode for eachchannel
' (on for channels 1 and 2; off for channels 3 through 9)
' into the array variable ContMode().
ContMode(1) = "ON"
ContMode(2) = "ON"
For i = 3 To 9
ContMode(i) = "OFF"
Next i
Programming
1217

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents