AnsweredAssumed Answered

Measurement Retrieval Syntax Confusion - Solved

Question asked by dbailey on Nov 3, 2015

Faulty syntax is:     fResult = Scope.ReadNumber(":MEASure:VAMPlitude?")
Syntax should be:
fResult = Scope.ReadNumber


First, I am a newbie and since I have looked through every forum thread and cannot find anyone else asking this question, I know I am missing some basic syntax form.  I cannot grasp the simple task of retrieving a scope measurement.

Using .NET, Visual Studio 2010 with VISACOMLIB 5.5 referenced to control a DSO2024 scope.  I can setup the scope and query the the settings and ID easily enough.  And I can take a measurement, as I can see the results on the scope screen.  But when it comes to actually retrieving a measurement, I get a timeout error.  

Here is my faulty interpretation of retrieving a measurement from the scope:
   Public Sub MeasureAmplitude()
        Dim rm As New Ivi.Visa.Interop.ResourceManager
        Dim Scope As New Ivi.Visa.Interop.FormattedIO488
        Dim fResult As Double

        rm = New Ivi.Visa.Interop.ResourceManager
        Scope = New Ivi.Visa.Interop.FormattedIO488

        Scope.IO = rm.Open("USB0::0x0957::0x1796::MY53510653::0::INSTR")
        Scope.IO.Timeout = 30000
            Scope.WriteString(":MEASure:SOURce CHANnel1")
            Scope.WriteString(":MEASure:VAMPlitude", True)
            fResult = Scope.ReadNumber(":MEASure:VAMPlitude?")
        Catch ex As Exception
        End Try

    End Sub

Any help getting passed this would be greatly appreciated!

Edited by: dbailey on Nov 3, 2015 5:44 AM