Agilent Technologies InfiniiVision 5000 Series Programmer's Manual page 583

Hide thumbs Also See for InfiniiVision 5000 Series:
Table of Contents

Advertisement

VisaComError:
End Sub
Agilent InfiniiVision 5000 Series Oscilloscopes Programmer's Guide
' Save *ESE (Standard Event Status Enable register) mask
' (so it can be restored later).
Dim varInitialESE As Variant
myScope.WriteString "*ESE?"
varInitialESE = myScope.ReadNumber
' Set *ESE mask to allow only OPC (Operation Complete) bit.
myScope.WriteString "*ESE " + CStr(CInt("&H01"))
' Acquire using :DIGitize.
' operation is complete.
' -----------------------------------------------------------------
myScope.WriteString ":DIGitize"
myScope.WriteString "*OPC"
' Assume the oscilloscope will trigger, if not put a check here.
' Wait until OPC becomes true (bit 5 of Status Byte register, STB,
' from Standard Event Status register, ESR, is set).
' read during :DIGitize without generating a timeout.
Do
Sleep 4000
' Poll more often than the timeout setting.
varQueryResult = myScope.IO.ReadSTB
Loop While (varQueryResult And &H20) = 0
' Clear ESR and restore previously saved *ESE mask.
myScope.WriteString "*ESR?"
varQueryResult = myScope.ReadNumber
myScope.WriteString "*ESE " + CStr(varInitialESE)
' Get results.
' -----------------------------------------------------------------
myScope.WriteString ":WAVeform:COUNt?"
varQueryResult = myScope.ReadNumber
Debug.Print "Averaged waveforms: " + CStr(varQueryResult)
myScope.WriteString ":MEASure:RISetime"
myScope.WriteString ":MEASure:RISetime?"
varQueryResult = myScope.ReadNumber
Debug.Print "Risetime: " + _
FormatNumber(varQueryResult * 1000000000, 1) + " ns"
Exit Sub
MsgBox "VISA COM Error:" + vbCrLf + Err.Description
Synchronizing Acquisitions
Set up OPC bit to be set when the
' Clear ESR by reading it.
' Read risetime.
10
STB can be
583

Advertisement

Table of Contents
loading

Table of Contents