LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need help modifying VI blocks for acquiring complex X/Y data

The plots look great. With real/imaginary, you have the full result. How does it need to be plotted? Can you post your VI here and I can see about making some further suggestions as well.

0 Kudos
Message 31 of 50
(1,277 Views)

Those measurement I performed manually just by the analyzer. 
Here is My VI build from Labview instrument driver: 
89410A driver.pngI've added few setup before the data read-out X/Y VIs, in order to see between Part: Real & Imaginary, though, nothing has changed! The "Zoom" mode still somehow ruled the data

0 Kudos
Message 32 of 50
(1,267 Views)

Okay, do you need to run the measurement continuously on the right side or is it enough to run once and output the result? What is the plot supposed to look like? In any case, I've attached a modification that performs a loop around the X/Y measurement for real/imaginary. It isn't exactly how I would do it if I were sitting at the instrument, but it should work. One thing to be aware of is avoiding autoset running in long loops, since mechanical switches are often involved and that is just extra wear and tear.

 

Another general modification would be to separate the VI functionality so you have "core setup" operations at the start, then you can loop around the actual measurement to get what you need. Here, I moved your format config to inside the loop so that it could switch between real and imaginary. Next is the autoset, which probably isn't needed for real/imaginary, but would be necessary for magnitude/phase measurement. For a bode plot, magnitude and phase might be more suitable. To form an actual complex number you can take the outputs of the index array block at the end, and put them through a real/imaginary=> Z complex node.

 

Loop.png

 

 

0 Kudos
Message 33 of 50
(1,257 Views)

Your VI work very nice at splitting into Real and Imaginary plot, I don't know how to do that efficient. 
Sadly, the data set is still not correct as Analyzer display (and again in the Zoom mode)

Download All
0 Kudos
Message 34 of 50
(1,251 Views)

Okay, let's rewind a bit, can you show me exactly what you want by showing the display on the analyzer? Are you wanting to measure noise (what the latest plot shows) or the nice measurement that you showed before? Or both? Also, the X axis seems to be changing from screenshot to screenshot. What is the X axis range of interest and how are you setting that?

 

If you can, when you post Labview results, share the VI that generated the results so I can see what is happening.

0 Kudos
Message 35 of 50
(1,245 Views)

Yes, both last and the latest plot shows the noise measurement:
Noise1-horz.jpg The only different is the Frequency range (start/stop) I setup. (which is the X axis)
My measurement need to perform in different frequency range: 1-10kHz, 10-100kHz, 100-1000Khz...This is why I need the "Zoom" mode and it's exactly what "Zoom" mode does: (according to its Operator's guide )Untitled.png

And here is your VI that generated the results (I just add 2 XY-graphs to show the value)
Oh, and for the range, I just set it normally by Labview (in the picture attached) 

Real-imaginary.png

0 Kudos
Message 36 of 50
(1,239 Views)

How does the data need to be output after you collect it? You could nest the frequency setup inside another for loop if it needs to all be done automatically. If you want to do the frequency ranges manually, then what you have is fine.

 

The issue then becomes debugging why it isn't giving you the results you expect. You can create a test copy of the VI, and make it so it only does the measurement capture, something like the attached. That will speed things up since you're not recalling the state and waiting for it every time. Then you can work the kinks out, add delays, formulate measurement loops, etc.

 

You can usually get away with not using the initialization VIs at the start, along with the error ones at the end. Some would view it as poor practice, but for some quick testing, it saves a lot of time.

 

Loop Test.png

0 Kudos
Message 37 of 50
(1,228 Views)

I'm sorry you lost my point here...
Yes, I have done that already (a lot of times) without the recall things...
Basically with the Example that Labview instrument driver provided.

snippet.png
 So there is it, I've located the bug in "zoom" and "baseband" mode. Within the "baseband" mode, everything work perfectly fine! But not in the "zoom" mode, the data read-out from this 2 VIs block are totally Wrong!snippet.pngand this is (again) the remaining problem throughout the topic...

0 Kudos
Message 38 of 50
(1,221 Views)

Okay, sorry I missed some details earlier perhaps. In my loop I left out the "Sweep Mode" and "Trigger" VIs in the middle, which is my bad. I should have mentioned that (it was on the mind, but I didn't look at the driver palette). Sweep mode turns off continuous sweep (continuous sweep is useful when observing measurements on the instrument, but can cause issues when programmatically retrieving the data) and the Trigger initiates a single sweep.

 

I wonder if it could be resolved with the proper sweep mode and trigger settings in the loop. Set the Sweep Mode vi so that continuous sweep is false, then for looping the measurement,  the start of the loop should include the Trigger VI, followed by Autoscale, and the data fetching for X and Y axes. Without triggering, that might explain why your second measurement afterward is 0.

 

Try adding those two VIs and let us know whether that changes anything.

 

0 Kudos
Message 39 of 50
(1,212 Views)

Well, nothing has changed...it doesn't work. Smiley Sad
It even slowed down the auto averaging process of the analyzer...

0 Kudos
Message 40 of 50
(1,207 Views)