LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Hot to Update X Axis Dynamically for Frequency Span?

Hi, Again Yes I know everyone is tired of me but!! I need help.



I would like the axis to update dynamically based on the frequency span. Currently the Visual Display will update exactly how it should however the label will not scale correctly. So for example I have a CW at 4 GHz I span in on that particular  CW to lets say 100 MHz. Everything is fine except that when looking at the graph I see that the cursors are at the correct frequency but the waveform is not. Upon further inspection it seems that the scale is not autoscaling to the correct span. If I am at 100 MHz span the scale should read 3.9 GHz to 4.1 GHz


I have labview version 8.0. I have also attached my VI its very messy because i Just started labview about 3 days ago and I am still playing around with the settings.
0 Kudos
Message 1 of 12
(4,037 Views)
MrSafe,

If I understand correctly, you want the X axis to dynamically update depending on four parameters.  The CW and Span, or the Start/Stop frequency, correct?

I have created an example VI in LabVIEW 8.0 that performs this functionality using the waveform graph you were using in you attached VI.

Let me know if this is what you were looking for.

Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments
0 Kudos
Message 2 of 12
(4,000 Views)
Yes this is exactly what I am looking for I want the X axis to update as I change the span/start/stop freq I use a sweeper to generate my CW and I update the span via labview. Now I need to figure out what the hell you did there.Smiley Very Happy Thank you very much for your help. Your example is very advanced for me even though it looks simple Smiley Surprised. I will keep you updated on any problems or questions I have.


Message Edited by MrSafe on 05-20-2008 07:07 PM
0 Kudos
Message 3 of 12
(3,996 Views)
Just an update incase I have confused you.


I use a GPIB cable which is connected to a Rohde & Schwars 7 GHz Analyzer which is fed a CW from a sweeper. So the bit that confuses me about your example is how to connect the cw? I think I have a way of feeding it the frequency from the marker. That would solve the CW problem sorry I'm just thinking out loud.
0 Kudos
Message 4 of 12
(3,992 Views)
MrSafe,

Happy to help!  What I did was create a Property Node for the Waveform Graph, which allows you to programmatically set/adjust the settings of the graph.  I, too, was not sure where you were getting your CW from the VI that you posted, but you mentioned that it was something you wanted to use.  I just created a dummy control for this.  Let me know if you have any followup questions on this!
Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments
0 Kudos
Message 5 of 12
(3,978 Views)
If I were to feed the CW in your VI with the marker position(frequency at which the current marker is at) of the analyzer will that act as a CW for the sample VI you posted?
0 Kudos
Message 6 of 12
(3,973 Views)
hmmm.. I got it to span correctly however now it seems to be switching between 2 sets of graphs. It will alternate continously between the correct span with noise and then back to the waveform with the incorrect span. When the span is correct i only see noise no CW however when there is CW centered I see an incorrect scale that ranges from 20 Hz to 7 GHz. I attached the new VI.
0 Kudos
Message 7 of 12
(3,953 Views)
MrSafe,

Your true and false cases in your case structure are the same.  Additionally, why do you have a delay in your case structure?  What are you doing that causes your graph to switch scales?  I'd recommend having a 'switch' that allows you to view the whole span, then set your cursor where you want your CW to be.  Then switch to 'CW' mode which will use the cursor as the CW and the SPAN as the +/- from the CW.
Regards,

Jared Boothe
Staff Hardware Engineer
National Instruments
0 Kudos
Message 8 of 12
(3,939 Views)
The reason I have a delay is because I need to give the analyzer time to have everything set before asking for marker position. I have taken that delay out and it causes the waveform to lock and the analyzer. Its entierly possible that the reason I have this problem is due to my experiance. In the true and false sections I have them the same because I recieved an error saying some of the wires were not connected. I simply copied the true situation over perhaps thats why its switching?

As far as what I am doing  to get 2 sets of different graphs I can't tell you because I don't know. My intention with this project is to have labview search for the highest peak from 20Hz to 7GHz and center it after which span in to about 1 MHz. All the mean while maintaining the scale to the correct values. At which point once correct values are in place with the CW or frequency centered I would like to do a 99% BW measurment.


Message Edited by MrSafe on 05-22-2008 11:04 AM
0 Kudos
Message 9 of 12
(3,936 Views)
I have attached an update vi I cleaned the vi itself it should be cleaner and eaiser to look at.
0 Kudos
Message 10 of 12
(3,927 Views)