Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

PXA Frequency Count resolution using SCPI

Hi y'all,

My issue: When I program the N9030A to do a frequency count measurement, it does it beautifully on the instrument's front panel, but the value I get back in my LabVIEW program is always rounded to kHz resolution. Example: Front panel reads 9 750 000 422.433 Hz, but my value in LabVIEW is 9 750 002 000.000. (I only get all the zeroes when I format my indicator to "%.3f" hoping it would give me all the way to the Hz resolution.) As a side note, it's odd that it rounded up to 2kHz, not 1kHz. How does 422 Hz go up to 2kHz?

[b][u]How do I get the full frequency count measurement resolution through the GPIB to my program to match what I can see on the front panel?[/u][/b] I think it's irrelevant that I'm using LabVIEW (as the Agilent driver is just a wrapper for SCPI commands). I just need help with figuring out the right SCPI commands to get the full resolution of the frequency count measurement.

What I've tried:
1) I'm using the example called "[b]Agilent MXA Series Configure and Query Marker.vi[/b]" with a few mods necessary to run:
     -Deleted the [b]Configure Sweep Coupling[/b] subVI as it would cause an error about reading before writing. Weird.
     -Added the [b]Enable Marker Frequency Counter[/b] control to the [b]Configure Marker Type (Swept SA)[/b] subVI and set it to true.
     -Changed the [b]Enable Continuous Sweep[/b] constant to true so I can see the frequency value when the remote measurement is done.
2) I went in to the different subVIs that configure different parts of the PXA and I changed the formatting commands to "%.3f" hoping that maybe I'm not getting the correct resolution out because the instrument isn't configured to return it that way. But really, in thinking about it the front panel displays correctly so it really should only deal with getting the value across the GPIB correctly.[attachment=1]Frequency count resolution issue.JPG[/attachment][attachment=1]Frequency count resolution issue.JPG[/attachment]

0 Kudos
Message 1 of 7
(4,334 Views)

look at the type of the indicator, is it a single or a double represenation and make it even more digits.

Remember a floating point number is not exact but it dpendsa on the value and resolution.

 

 

greetings from the Netherlands
0 Kudos
Message 2 of 7
(4,330 Views)

I'd say look directly at the string returned by the instrument first of all. All of the fiddling around with LabVIEW indicators does no good if the data in the string is the issue. If it is, then reference the manual to see if it's the fault of the command being sent to read the marker value.

0 Kudos
Message 3 of 7
(4,326 Views)

completely right Dennis

greetings from the Netherlands
0 Kudos
Message 4 of 7
(4,319 Views)

Yeah, as I mentinoed in #2 of the things I tried, I already figured that it was not due to the display format, but I tried it anyway because I knew somebody would say to try it. I was hoping somebody with instrument programming experience might be able to tell me which SCPI command I should be looking for. And yes, I have spent several hours looking through the 1200-page manual trying to find a formatting or display command, but unfortunately it doesn't give a lot of specific examples and it seems the pieces are all over the place.

 

Can anyone with SpecAn (or similar instrument) programming experience help me out?

0 Kudos
Message 5 of 7
(4,317 Views)
The best place for help is going to be Agilent.
0 Kudos
Message 6 of 7
(4,312 Views)

I had simultaneously posted on their site and have now received a working answer, which I thought would be nice to post here too. NI's N9030A driver sends the correct SCPI command for the Enable Marker Frequency Counter input of the Configure Marker Type (Swept SA), but doesn't account for this scenario in the Query Marker VI. I have posted the modified VI (LabVIEW 2010) that has this new input and correct logic for retrieving the higher-resolution frequency counter marker. Whew!

 

Here's a link to the Agilent forum where Mike M receives credit for getting me the correct SCPI command: https://forums.tm.agilent.com/community/viewtopic.php?f=32&t=27378

 

Thanks!

0 Kudos
Message 7 of 7
(4,303 Views)