LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can't read markers from Agilent PNA

I'm new to using the Agilent N5230A PNA and trying to simply recall a previously stored state file and read the markers. See PNA screenshot untitled.jpg, Labview screenshot untitled2.jpg & attached vi. Seems I should be able to read the X & Y values of Marker #1 that is displayed on the upper right corner of the PNA screen, but I get the "requested measurement not found error". What am I doing wrong?

Download All
0 Kudos
Message 1 of 23
(5,679 Views)

It may just be a question of delay, you're sending a query right after initializing ad recalling a setting from the PNA and these operations usually takes a few seconds. Try adding a breakpoint after each of the 4 first PNA subVI and wait a few seconds between each operation. Maybe this will work.

 

Ben64

0 Kudos
Message 2 of 23
(5,665 Views)

We use the N5230A in several of our test stations.

 

Is there a reason why you are using markers?

Generally, to get data from the PNA, you want to use the command to get the entire trace's values.

 

I strongly urge you to read the Help *.chm for the unit.

 

 

0 Kudos
Message 3 of 23
(5,659 Views)

I tried a 4 second delay between VIs with no help.

0 Kudos
Message 4 of 23
(5,658 Views)

I'm learning the PNA one step at a time. Before attempting to acquire data I want to learn to read EXISTING data. My intent is to test a device & use Markers programmed for min and max to give me immediate pass/fail indication.

0 Kudos
Message 5 of 23
(5,653 Views)

Existing data? Are you recalling a data file as in File -> Recall -> Citifile Data / S2p (for a 2-port device) ?

 

Instead of using LabVIEW, try to manually control the PNA by typing commands/queries using MAX.

 

If you can't do what you want manually, then your command sequence is wrong.

 

 

0 Kudos
Message 6 of 23
(5,644 Views)

@hammer3 wrote:

I'm new to using the Agilent N5230A PNA and trying to simply recall a previously stored state file and read the markers. See PNA screenshot untitled.jpg, Labview screenshot untitled2.jpg & attached vi. Seems I should be able to read the X & Y values of Marker #1 that is displayed on the upper right corner of the PNA screen, but I get the "requested measurement not found error". What am I doing wrong?


You didn't create a measurement, for that you need to use the AGPNA Configure measurement Parameter.vi and set the mode to "create". The AGPNA Enable Marker.vi use the AGPNA Configure measurement Parameter.vi as a subVI in mode "select". Soince the measurement was never created it generate an error.

 

Ben64

0 Kudos
Message 7 of 23
(5,633 Views)

Hammer3,

 

Highlight the execution (debug mode) of your top level BD. This will tell you specifically what vi is generating the error. Then open that VI and access its BD and put it into highlight execution. Run your program and monitor the sub-vi you just highlighted the execution on. This will tell you specifically what is going wrong.

 

The labview error handler indicates "measurement not found" on the query. But you don't know if it's the string measurement "MY_MEAS" or the requested measurement of X/Y value.

 

Also with working with markers it usually takes a bit of configuring before you can get the values. It looks like you are working with the PNA's VI library. I encourage you to look under the CONFIGURE menu and you will find about 10 vi's used for markers alone. My guess is you have to configure the markers in labview prior to requesting the data.

 

nyc has the right idea, especially given your simple pass/fail criteria. Use the 1D frequency array to search (or match, whatever your preference) your frequency of interest (aka markers). This will result in an index value which you can use for your 1D amplitude array, and vuala! you have your values.

 

 

0 Kudos
Message 8 of 23
(5,632 Views)

Thank you all for your help and patience. I ran in debug mode with the results in the attached screenshot. The error occurs in the AGPNA Marker Query XY.vi in the Configure Measurement Parameter subvi. (first subvi on left). I'm giving it all the required inputs. Also, I don't understand why I need to configure a measurement, since in this  simple case, I'm NOT configuring a measurement because it was already done and executed and stored in the .sta file that I'm recalling. The whole idea here is to read EXISTING data, not generate NEW data or measurements. Maybe I'm not supposed to be able to read markers from a recalled .sta file. One positive note though, I was able to read the Y axis PDIV with both the driver vi and inputting the SCPI code into MAX.

0 Kudos
Message 9 of 23
(5,626 Views)

Read the documentation!!!

 

*.sta file stores only instrument state. NO DATA.

0 Kudos
Message 10 of 23
(5,622 Views)