Agilent Technologies E5071C Manual page 987

Hide thumbs Also See for E5071C:
Table of Contents

Advertisement

E5071C
Waiting for Trigger (OPC?)
Overview
Sample Program in Excel VBA
Sample Program in HT Basic
Other topics about Sample Programs
Overview
This sample program demonstrates how to use the
wait until the measurement cycle is completed.
This sample program correctly runs when the maximum number
of channels/traces is set to 9 channels/9 traces.
The sample program uses the
(measurement) cycle, uses the *OPC command to wait until the
measurement cycle is completed, then prints a message and exits.
See Waiting for the End of Measurement for this programming.
Sample Program in Excel VBA
Sub trg_sing_Click()
Dim defrm As Long
Dim vi As Long
Dim ContMode(9) As String
Dim Result As String * 10
Dim i 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
1214
command to start a sweep
:TRIG:SING
command to
:TRIG:SING

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents