06-30-2017 08:01 AM
Perhaps, the problem is just need to somehow modify those X/Y VIs based on GPIB command reference by changing some syntax or block codes. The point is that we need to understand how data is processed by the analyzer and the way it read-out by Labview driver in order to modify it correctly.
The instrument driver was also developed by analyzer's manufacturer. But they do not seem to respond to it anymore.
06-30-2017 08:06 AM
It is hard without access to the instrument. In general, the method I mentioned should work...that's how complex numbers work. There is something, perhaps subtle, about how your code is handling things, especially with the saved state and the instrument setup steps. I don't believe the core drivers themselves need any modification as you are performing pretty simple measurements.
I would suggest start from a clean slate, preset the instrument, then use the VIs to configure the instrument step by step until it reaches the mode and configuration you need. Then loop through collecting either the real/imaginary or magnitude/phase data for whatever frequency spans you need. Then reassemble the data on the Labview side. But as I understand, if you are doing a bode plot, magnitude and phase is exactly what you need...no need to reformat data.
06-30-2017 08:30 AM
Yes that exactly, but that the same thing even happens with the Example they provided. How funny is that ?
And because only that mode allows the analyzer to turn on its Local Oscillator, so it's irrelevant with other analyzer setting.
06-30-2017 08:32 AM
Can you skip the graphing phase, and just output the raw X, Y for real, and X, Y for imaginary, save them as defaults, and post the vi? I want to look at the data itself.
06-30-2017 09:01 AM
Even in zoom mode, the output data are all Real. And they seem to have some rules ?
the 1st X axis value is always -260XX ??? In the frequency range of 1 decade
Those data I obtained by changing different Start/Stop frequency ranges, you can see it on the left of each X/Y data column.
06-30-2017 09:07 AM
I'm not sure how else to say it. The numbers from the instrument will not be complex. You need to grab Real/Imaginary or Mag/Phase...those dictate the complex response.
The data in the VI didn't get saved for some reason. In any case, you need to be careful when processing and reading log values. The first X value is really small likely because it is log(really_small_number_but_not_zero). If I was you, I would set the instrument so that the X axis is linear and not log. Then grab the data, then plot log afterwards in labview or wherever. That should resolve that issue.
After that, then the focus can be returned to the Y data for each component of the complex number.
06-30-2017 09:21 AM
Ah yes, that Y axis is set directly by the Data format bar I placed outside
X axis is Linear already by default, and it's even more weird is that when I switch it to Log, the 1st value output is still -260xx ?
06-30-2017 09:24 AM - edited 06-30-2017 09:26 AM
Hmm, and the instrument reflects that the X axis is linear frequency?
I'm not sure what else to say...I think this is becoming less of a Labview issue and more of an instrument/driver issue.
06-30-2017 09:58 AM
Indeed !
It was nothing else but instrument driver problem, and the way to fix it...well (I've mentioned above) but it cost me more than just time to do so. Really need a GPIB expert for this.
06-30-2017 10:38 AM
More likely it's "just" a missing wire inside the driver. But of course, sometimes it's hard to spot something that's missing.