From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

discretely jumping of frequency sweep in AWG

 I made a program for sweeping in the burst mode of sequence in PXI-5421.
For triggering of burst mode, I generated 4 ms period digital pulse just before starting or changing the frequency in Labview.
 
I made waveforms (only one cycle) by using "Basic Function Generator.vi" with the sampling rate of around 50MS/s (less than max rate, 10^8 of PXI-5421) to the sampling info.
The number of samples was calculated to get a maximum number (multiples of 4).
For example, the number of samples was only 44 for 1MHz.
I also checked the generated waveforms by "Analog Waveform Ediotr" which have just arrived to me.
The editor also used the same number of samples in one cycle.

The intended frequency of waveforms was measured correctly by "Extract Single Tone Information.Vi" 
 
Anyway, it was okay in range of 100k~200k. very smoothly changed with frequency varying.
But, the frequency in interested region (2M~2.2MHz, 1kHz step), there is no sweep but jump discretely with fewer iterations than expected .

 

Does anyone who try to sweep frequency of higher than 1MHz in SEQUENCE of an arbitrary waveform generator?

 

Thank you in advance.

 

labmaster.

메시지가 05-01-2009 08:30 AM
에 labmaster에 의해 편집되었음
0 Kudos
Message 1 of 22
(3,838 Views)

Dear all:

 

I depressed for no one reply for my problem.

 

Anyway, I attached the codes (only for LV 8.6) in script mode for your testing.

 

Please open "script_test.vi" to test under PXI AWG machines.

 

labmaster

메시지가 05-04-2009 10:06 AM
에 labmaster에 의해 편집되었음
Download All
0 Kudos
Message 2 of 22
(3,798 Views)

Hello Labmaster,

 

This customer has contaced National Instruments for support. 

 
Here is the first response:

 

I've taken a look at the vi you given and there are a few problems that I see.  The most important problem is that you are creating all of the waveforms with different fs (sampling rates).  The card can only be outputted at a single update rate and the update rate cannot be changed on the fly.  Without using the niFGEN set sample rate.vi, you are going to be using the least common multiple of all of the waveform dt's that you provide the card.  This rate is constant and doesn't change based on the dt's of the waveform.  Let me try to explain this a bit more with an example.
 
Lets say you are trying to generate a sine wave at 2.5MHz with a update rate of 100MHz.  With your equations,  you are setting the # samples = 4*Floor[100,000,000/(4*2,500,000)].  This is equal to 40 and fs is set to 100,000,000.  This will output fine out of your Arb with the sample clock is set to 100MS/s. The problem is when your step frequency is something like 2.3MHz.  For 2.3MHz, your # samples = 40.  In addition, fs is set to 9200000MHz.  Unfortunately, you cannot change the update rate.  Therefore your output frequency for this single period is still 2.5MHz.  This is why you are seeing the jumping.  My recommendation would be to modify your programming to include multiple periods of these problematic frequencies such that you are able to use the common update rate to output this specific frequency. 
 
I would also like to mention that there is a ton of information available in the NI Signal Generators help regarding the different output modes with scripting, sequence, arbitrary waveforms etc.  Just navigate to Start » Programs » National Instruments » NI-FGEN » Documentation and you should find the help file.  I would recommend taking a look at the section under Fundamentals » Output Modes.  Theres some good information about scripting and sequence modes.
 
Regards,

Paul C.

0 Kudos
Message 3 of 22
(3,754 Views)

Hello Labmaster,

 

The reason you aren't seeing this behavior with lower frequencies is simply that the jump is much smaller.  For example, take the sine wave at a frequency of 100KHz.  This is going to be calculated at # of samples = 1000 and a fs of 100,000,000Hz.  For a frequency of 120,000Hz, the # of samples = 832 and the fs = 99840000Hz.  Since this fs is very close to the 100MHz, you won't notice that much of a frequency variance.  The actual frequency you are generating is 100,000,000 / 832 = 130192.3Hz.

 

Regards,

Paul C.

 

0 Kudos
Message 4 of 22
(3,750 Views)

Paul, Thank you so much for your comment.
 
I am wondering if I understood your reply correctly.
In fixing the sample rate to a constant in sweeping, there will be no any freedoms in frequency sweeping.
 

Do you mean I can use only 3 steps, 2.08(48, number of samples), 2.27(44), 2.5(40)MHz in 2~2.5MHz sweeping if I set the sample rate to 100M?
Our interesting frequency is around 1M~2.5M although less than 1M is also important.
 
How can I extend the bandwidth of frequency?
If so, is there any other PXI for frequency sweeping?
When you recommend some other PXI, please ensure if I can change the next step frequency by software triggering.

This is very important to our future application.

 

Hope for your fast response.
 
Thank you so much again.
 
Best,
 
Sungjun.

*)Please ignore my reply through the NI webpage. I would like to hear your reply on this forum

0 Kudos
Message 5 of 22
(3,739 Views)

Hello Labmaster

 

As per my email:


Do you mean I can use only 3 steps, 2.08(48, number of samples), 2.27(44), 2.5(40)MHz in 2~2.5MHz sweeping if I set the sample rate to 100M?  I haven't done the match to find all possible frequencies when only using a single period, but this sounds correct.  
 
How can I extend the bandwidth of frequency? 
 
You need to use multiple periods for the other frequencies.  
 
If so, is there any other PXI for frequency sweeping?  
 
I believe you could use a card with frequency list.  Are you going to only be generating sine waveforms or something arbritrary?  
 
I also want to mention that the frequency list mode does support the use of the stepped trigger mode.  Please take a look at the Ni Signal Generators help file I mentioned previously.  Just navigate to Start » Programs » National Instruments » NI-FGEN » Documentation and you should find the help file.  I would recommend taking a look at the section under Devices » NI 5441 » Triggering » Trigger Modes » Stepped Trigger.  Take a look at the frequency list mode section regarding the stepped trigger mode.  I believe this is what you are looking for.  You can find out which of our PXI cards support this by going to the Devices » NI 5402/5406/5412/5421/5422/5441/5442/5450 Features Supported section of the help file.  You check each card to determine whether is supports frequency list.  Make sure you verify in the specifications that you will be able to generate the frequencies with the resolution you desire with the card you select.
 
 
Regards,

Paul C.

0 Kudos
Message 6 of 22
(3,712 Views)

>I haven't done the match to find all possible frequencies when only using a single period, but this sounds correct. 

 

Dear Paul,

 

Thank you so much for your reply again.

I am wondering if I can use a multiple periods of sampling clock as the sample rate in script or sequence mode?

For example, can I generate the waveforms of sampling rate in both 100M and 50MHz, 25MHz, 12.5Mhz?

(But the sampling rate is limited to the range of 10MHz~100MHz. right?) 

 

Please understand I am a beginner in using a AWG.

 

Other things is very clear to me.

 

Best,

 

labmaster.

0 Kudos
Message 7 of 22
(3,700 Views)

Hello Labmaster,

 

Let me try to be more clear.  When using a sequence and a script, you must set the output sampling rate and leave it throughout the duration of the generation on the 5421.  The arb's don't have the ability to switch the update sampling rate on the fly. 

 

I am wondering if I can use a multiple periods of sampling clock as the sample rate in script or sequence mode? So, you can only use one of the sampling rates as you mentioned.  These are divide downs of the maximum clock rate of 100MHz.  I believe the sampling rate is limited to the range of 1S/sto 100MS/s for the internal clock.  

 

What I was recommending earlier was that you use multiple periods for frequencies that you cannot easily generate with a single period. Instead of arbitrarily determining the number of samples for 1 period, I would considering finding a multiple period # of samples that meets the waveform quantum requirements and gets you closest to the desired frequency.

 

For example, lets consider the case of 2.3MHz.  The problem is that when you take 100MHz / [2.3MHz*4], you get something like 10.8695652...  Instead of just using the floor of this value, don't drop so many of the remainders. Use them to come up with a new multiple that includes multiple periods of that waveform. 

 

Regards,

Paul C.

0 Kudos
Message 8 of 22
(3,687 Views)

Hello Paul,

 

I understand what you mean.

You meant I have to use multiple period to satisfy the conditions of PXI-5421 (one of 4 multiple of # samples).

There are more additional limited conditions, limited board memory and zero phase of a waveform due to repetitions.

 

I tried to generate the waveforms by Basic Function Generator.vi. but took very long time.

I think these conditions require some special techniques of signal processing field to make waveforms in each frequency.

I understood the reason why NI sells "the analog waveform editor" which we just bought.

How can I realize the routine in LabVIEW like the analog waveform editor ?

Are there some open or commercial source (LabVIEW or C) for my work?

 

Please help me again.

 

labmaster.

Message Edited by labmaster on 05-07-2009 10:02 AM
0 Kudos
Message 9 of 22
(3,667 Views)

Hello Labmaster,


I agree that board memory may limit the accuracy you get on some of the frequencies.  As long as you use the correct number of samples and select the desired frequency you shouldn't have any zero phase problems.  Take a look at the code below.  I haven't tried it with all frequencies but it worked for the few that I tried.

 

 

I hope this helps,

Paul C.

Message Edited by Paul C. on 05-07-2009 03:07 PM
0 Kudos
Message 10 of 22
(3,648 Views)