LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to output current function (frequency) to the very last value in HP8510c

Solved!
Go to solution

Hi,

 

I have been using HP8510c for Q factor calculation, the problem is, I require frequency values of all 801 S21 points I am getting the raw data for, to be able to get the loaded Q factor.

I use STIMULUS as 'RAMP' just for your information, which is also the default option.

I couldn't figure out this so what I thought of doing was, get the start and end frequency and interpolate it between 801 points.

 

Now I am using 'Ouput Active Function' vi which outputs the value of whatever function I have selected. So if I select Start and use this vi, It will output me the 'Start' frequency. But the problem is the I don't get the whole figure.

If on the screen it displays

START=4.46647456635 Ghz

It will output it as

4.46640000000 Ghz

It's not that the GPIB bus truncates any data, I feel the HP8510 firmware is configured to do that. Is that any other way by which we can get the exact frequency value?

The exactness is ideal for exact Q factor measurements.

 

0 Kudos
Message 1 of 15
(2,879 Views)

New developments...

I think there is something which you people can help me out with...

 

So there is a command OUTPACTI; which gives us the exact value in ASCII format.

For some reason, the way the LabView.vi is designed, I don't know, it truncates the last digits.

 

So I used the 'Query' command in MAX and got this,

5.626466300000000E+08

but when I use my Labview module, which is attached, I only get this

5.6264

I tried attaching the output to a string indicator but still it shows this only!

I don't know why Labview is dealing with this differently.

0 Kudos
Message 2 of 15
(2,860 Views)

Why don't you just display what you get from the VISA Read? What does that return?

 

 

0 Kudos
Message 3 of 15
(2,854 Views)
Solution
Accepted by topic author Reylon

LabVIEW does not deal with it differently. Your VI is not close to being correct since you wired the return count from the Write to the byte count input of the Read. There is absolutely no relationship between the number of bytes you write and the number of bytes the instrument is going to return. Set the byte count to some high number and see if it doesn't start to magically work.

0 Kudos
Message 4 of 15
(2,853 Views)

Yeah, I understood that, and figured that something fishy was going on, so did that.

The funny part is, this was actually a part of the drivers for HP8510c

The reason why I am not using the VISA command is because I want to get it automated in Labview.

There is a big program and this is just a function which I need to use in it.

 

Now the last question, is there a way I could format the string

1.546345245245E+09 whatever into standard notation ?

like

154634524.5245, the way we use it.

 

It says the above one is ASCII format but I haven't found a vi or components which I could use to get that into this type of value.

0 Kudos
Message 5 of 15
(2,848 Views)

In the manual, it says it is the ASCII format it gives back the value in but this is just a string which is in exponential format. Is there a convert for a string of this type in decimal?

 

I will try looking myself but if you guys already know the solution, kindly let me know

0 Kudos
Message 6 of 15
(2,845 Views)

You are not being very clear. To change the display format of an indicator, you simply right click and select 'Display Format'. If you are need to format it in some other way, please explain.

Message 7 of 15
(2,842 Views)

Here is another problem....

I am getting the full resolution in the string, however the part E+09 etc gets eliminated.

 

All I did was increase the no. of bytes and attach a string indicator to the output, all the digits are there but the exponential format is not.

0 Kudos
Message 8 of 15
(2,840 Views)

And what number did you set for the byte count? A query with VISA in MAX is going to be the exact same thing as a query with VISA in LabVIEW.

0 Kudos
Message 9 of 15
(2,830 Views)

Hi Dennis,

 

I am sorry for any confusion, let me just gather everything and put a clear picture.

 

OUTPACTI; returns us a string in exponential format which tells us the value.

I used 'Query' through MAX and got 1.73454xxxxE+10

I changed the no. of bytes in the Labview module and attached a String Indicator to the output.

What I want to do is convert this string into normal standard notation.

i.e. 173454xxxxx00

 

The problem is, when I receive the string in the String Indicator, it displays 1.73454xxx but does not add E+10. That is, it omits the exponential part.

So we lose the information that what this number stands in exponential format. So in fact the numeric indicator shows the same value as string as attached in the pic of the VI

 

 

0 Kudos
Message 10 of 15
(2,829 Views)