Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to measure power with a real time spectrum analyzerhe

Hello,

 

I am working with Labview 8.5 and am using a Tektronix RSA 3408a real time spectrum analyzer. 

 

My goal is to measure the output power of an RF pulse in order to calculate power added efficiency of an amplifier, but I am not completely sure of the best way to do this. 

 

My approach has been to measure the pulse in the time domain and take power measurements over the period, then average them together. 

 

The only VI in the tkrsa3000 library I found that I thought could be useful was Time Msmts Results.vi which can take a measurement and output the result. I tried inserting it into the ReadRTSA.vi below. The string output has been blank anytime I have tried running the vi and I have received a runtime error.

 

The predominant error is undefined header and I believe it is coming from the read VISA command in Time Msmts Results.vi >>Write_Read wErrorQuery.vi. I searched and found a response on how to determine which part of a Write VISA command was undefined but how does this apply to a Read VISA command?  

 

The questions I would like help on are: 

 

1. Is this a good way to measure power using a spectrum analyzer? 

      1a. If not, what would be?

 

2. Is there a vi in  tkrsa3000.llb that I might be overlooking which would be better suited for the purpose?

 

3. How can I determine what part of a Read VISA command is giving me an undefined command error?

 

Thanks in advance, 

 

Tom

Tom
0 Kudos
Message 1 of 9
(4,325 Views)

Tom,

 

Can you give more specifics on the VISA error?  Do you have a error number or a full error description?

 

Eric K

Applications Engineering

National Instruments

0 Kudos
Message 2 of 9
(4,292 Views)

Hello Eric,

 

I figured out the issue with the undefined command. It seems the firmware on the RTSA had not been updated. After updating it that has been resolved. 

 

However, now when I try to run it, I get an execution error.

 

The error hex code is: FFFFFF38  

Source: Execution error;(null),read:tran:pvt?;

Tom
0 Kudos
Message 3 of 9
(4,282 Views)

It inserted an emoticon. that error source is:

 

Execution error; (null) , read : tran : pvt?;

Tom
0 Kudos
Message 4 of 9
(4,281 Views)

Tom,

 

Can you give more specifics on the error?  Is that the only information that you have?

 

Eric K

Applications Engineering

National Instruments

0 Kudos
Message 5 of 9
(4,250 Views)

Eric,

 

The execution error did not come with an explanation of what occurred. I did trace it to the VISA read in Read_Write wErrorQuery.vi in Time Msmts Results.vi. 

 

So it seems the VISA read seems to continue to be the issue though this time it isn't due to outdated firmware.

Tom
0 Kudos
Message 6 of 9
(4,245 Views)

Tom,

 

I can't be sure, but it seems like the error is coming from an issue in the communication between your instrument and the program you are running.  To see what information is actually being sent back and forth in more detail, you may try using NI Spy.  NI Spy will allow you to look at everything that gets sent across your GPIB port on your computer.  NI Spy is installed with VISA and should be in your start menu at Start > All Programs> National Instruments> NI Spy.

 

 Eric K

Applications Engineering

National Instruments

0 Kudos
Message 7 of 9
(4,212 Views)

Eric,

 

I ran the program with NISpy running and it did not seem to shed much light on the error. Each of the communications it caught were successful. The last one is the execution error that I have been getting. 

 

I have included a parse of the NISpy capture.

 

Tom
0 Kudos
Message 8 of 9
(4,202 Views)

That's an instrument error and not a VISA error at all. You are sending the command and then doing a query of syst:err? The instrument then says it has an execution error. It sounds to me like you have not configured the instrument to perform the measurement. From the NI-Spy file, it doesn't seem like you've done any configuration at all. Without the program, is the instrument making a measurement? If not, that's a big clue that you haven't set it up properly.

 

Does the driver come with an example that you can look at?

0 Kudos
Message 9 of 9
(4,194 Views)