Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

How to reconstruct waveform grabbed from Agilent scope?

Hi All,

 

I am grabbing a waveform off of an Agilent 54855A scope using Visual Studio C# and Measurement Studio, via GPIB.  I get the waveform with the GPIB commands WAV:DATA, WAV:YINC, and WAV:YOR, and then reconstruct the waveform as follows:  waveform = DATA*YINC + YOR .

 

The reconstruction looks something like the scope trace but does not have any negative values in it. 
Does anyone know if this is the correct way to reconstruct the waveform?  Or is there some other parameter missing?  Or, is there some reason I should not expect the reconstruction to look exactly like the scope trace?

 

Thanks in advance for any thoughts.

 

Penny

 

0 Kudos
Message 1 of 5
(3,943 Views)

So after some more reading and thought, I believe that this is purely a question about the oscilloscope, and not about NI products.  Here is a link to the oscilloscope programming manual in case anyone is ever working the same problem:  http://cp.literature.agilent.com/litweb/pdf/54855-97017.pdf .

Thanks,

Penny

 

0 Kudos
Message 2 of 5
(3,908 Views)

Hi Penny,

 

After looking at the programming guide, I was wondering if you have looked at just the DATA before.  I also think that you will want to subtract the YORigin instead of adding it to the waveform.  As far as the YINCrement goes, this appears to change depending on if you are getting byte data or ASCII data.  If it is ASCII data this will be the full range the A/D converters covers.  I am not sure that you want to multiply by this value.  I would suggest looking at just the DATA and possibly subtracting the YOR.

Ryan T
National Instruments
Applications Engineer
0 Kudos
Message 3 of 5
(3,901 Views)

Hi Ryan,

After looking at the DATA array as you suggested, I discovered that the bits needed to be reversed in each byte.  Apparently this is the case when using an Intel processor to get the data off of this scope.  Thanks very much for the suggestions.

Regards,

Penny

 

 

0 Kudos
Message 4 of 5
(3,888 Views)
Actually the two's complement of the bits in each byte did the trick (not reversing them as stated in my last post).  FYI.  Thanks again.
0 Kudos
Message 5 of 5
(3,831 Views)