EasyManua.ls Logo

Agilent Technologies E5071C - Page 987

Agilent Technologies E5071C
2685 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
E5071C
1214
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 :TRIG:SING command to
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 :TRIG:SING command to start a sweep
(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

Table of Contents