LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

concatenating graphs

I am currently using agilent 4195A on labview 7.0. I want to ask if the RBW should be before or after the start and stop because i realise the differences in the output. And i am trying to concatenate the different graphs that i obtain from the loops into a single graph. however, the frequency range that they give me is wrong. the range is only of the first loop although there is the graphs for the other loops was also being produced. i have tried using the different arrays but the output is still the same.
 
thank you.
0 Kudos
Message 1 of 4
(2,996 Views)
The RBW should only apply when you're in spectrum analyzer mode and you need to set this before doing any kind of sweeping. Unfortunately, you have a number of problems with your code so any issues with the RBW are separate:
  • Your wiring is all over the place. You've got wires going underneath structures, like the wire that comes out of the case structure driven by the "Mode" control. It goes a third of the way underneath the big case structure, and then back around again. Or the wiring to your "Concatenate Strings" functions where it looks like something is wired to the input, but it's not, as it's actually wired to the output. Please straighten out your wiring.
  • You should not be using string controls for frequency inputs. These should be numeric controls. Learn to use the "Format Into String" function.
  • You need to use a shift register to pass the error cluster around your for-loop. Otherwise, any error that occurs in one iteration is lost.
  • You can make use of the "Ramp" function to generate yourself a ramp of frequency steps rather than the numerical calculations you're doing.
  • In the for-loop you're taking the 1D array that you get out of the "NWAnalyzer Read Trace" VI, making it into a 2D array, and then indexing out the 1D array back. WHY? This is pointless.
  • You need to either (a) use a shift register to build up your array of data from each sweep, or (b) pass out the 1D array of data out of the for-loop to get a 2D array, and then use the "Reshape Array" function to "flatten" the 2D array into a continuous 1D array of all the sweep data.
  • It's not clear what the purpose of the code dealing with the dBm to Volts conversion. Is this supposed to be a calculator or something? If so, what's the point of having it on this VI since you can't actually get a conversion unless you run the VI, which acquires the trace data?
I pretty much stopped there, but there may be other points that others see.
0 Kudos
Message 2 of 4
(2,970 Views)
i am sorry but i do not really get what you said about those things. can you explain in details about the array part. thank you.
0 Kudos
Message 3 of 4
(2,906 Views)
Well, the point about the wiring is self-explanatory. As is the point regarding the use of numeric controls rather than string controls. As for the array comments, which one is unclera to you, since I had three different points regarding arrays:
  • Using the Ramp Pattern: This is just a tip. You can use the Ramp Pattern to generate an array of steps which you can then use to autoindex a for-loop:


  • The making of the 2D array and then indexing out a 1D array:


  • Using a shift register or auto-indexing a 2D array:

Message Edited by smercurio_fc on 05-29-2007 09:33 AM

Download All
0 Kudos
Message 4 of 4
(2,894 Views)