Signal Generators

cancel
Showing results for 
Search instead for 
Did you mean: 

Arbitrary waveform generation refresh rate

Hello All,

I have a question concerning arbitrary waveform generation. I am currently researching the PCI-5412 model for my application possiblity. The question is can I update my waveform on the fly in my labview feedback control program? If the answer is yes, then how long does it take to download the new  waveform to the board and start generation again (what is the interval between generation when refreshing waveforms is needed)?

And here is a brief description of my application:
I am using the waveform generator to generate an almost sinusoidal signal at a certain frequency to modulate the output intensity of a laser. However, the transfer of the laser is not linear, which means the output from the laser get all the higher harmonic components. I need to suppress specifically the 2nd harmonic signal from the laser output. What I do is I measure the signal amplitude of the 2nd harmonic with a lock-in amplifier and then try to compensate a 2nd harmonic signal at the modulating source, i.e., the waveform generator. That's why I need to modify my excitation waveform all the time based on the feedback.

Thanks in advance, guys!
0 Kudos
Message 1 of 11
(10,334 Views)
Hello,

The latest Signal Generators from NI are based on the SMC technology (5412, 5421, 5441, 5422) which allows you to download waveforms to memory while running.

You don't need to stop and start generation again to do this. Here are two proposals:

1. In Arb Waveform mode, loop on a single waveform. You can at any time during generation replace the waveform with another waveform with the same number of samples by using one of the Write vis/functions instead of the Create vis/functions. This is the easiest approach. The drawback of this solution is that you don't know where the arb is exactly in the waveform generation and you would be replacing the waveform at some random point, so the output will go from the old waveform to the new one suddenly. This may cause a large discontinuity depending on the waveform data. You may or may not care about this depending on your application.

2. In Sequence mode create a 2 waveform sequence. Write your program so that you can switch from one waveform to the other by using a software trigger. This way you can replace the waveform that is not being generated while the other waveform generates, and switch between them very quickly by sending a software trigger. When the software trigger is received by the arb, the current waveform will finish generating once more and then switch. This approach is more complicated than the first one but gives you more control on how the old and new waveforms match up.

Download times are fast, expect well above 50MB/s but it all can vary depending on whether you are using MXI-3, other PCI traffic on the bus, PC speed, if you are downloading floating point data versus I16 data, etc.

Good luck!

Marcos Kirsch
Staff Software Engineer
Signal Generators Group
National Instruments
Marcos Kirsch
Chief Software Engineer
NI Driver Software
Message 2 of 11
(10,323 Views)
Thank you Marcos, sounds good to me. I think the first method should be good enough for my application. I have another question concerning the memory choice. My basic need is to generate almost sinusoidal signal from 1 Hz to a few MHz, with minimum amplitude < mV. Will the 8MB memory and 14 bit (PCI-5412) suffice? Thanks again.
0 Kudos
Message 3 of 11
(10,309 Views)
I've been studying the specs. Not sure whether I understood correctly. On the 2nd page of the NI 5412 specs, it says, for example, the minimum Vpp is 5.6 mV assuming choosing the low gain amplifier and 50 ohm load. It says this will give a full scale DAC utilization. Does it mean that I can still have 14 bits of resolution within the Vpp of 5.6 mV range?

And if I would like to have slow oscillation, say < 1 Hz, should I just use a slow sampling rate?

Thanks for any suggestions.

-Tony
0 Kudos
Message 4 of 11
(10,302 Views)
I've been studying the specs. Not sure whether I understood correctly. On the 2nd page of the NI 5412 specs, it says, for example, the minimum Vpp is 5.6 mV assuming choosing the low gain amplifier and 50 ohm load. It says this will give a full scale DAC utilization. Does it mean that I can still have 14 bits of resolution within the Vpp of 5.6 mV range?

And if I would like to have slow oscillation, say < 1 Hz, should I just use a slow sampling rate?

Thanks for any suggestions.

-Tony

The answer to both questions is yes.

Marcos Kirsch
Staff Software Engineer - Signal Generators
National Instruments
Marcos Kirsch
Chief Software Engineer
NI Driver Software
0 Kudos
Message 5 of 11
(10,275 Views)
Hello,

Thank you for your response.  We have been trying the 2 solutions you provided for our PCI-5412 board.  The problem we have is that we cannot update (download) the waveform while the waveform generator is actively generating a signal.  We need to stop the generation, download the waveform, and then restart the waveform.  I think you mentioned some SMC technology previously.  Does this make it possible to perform the following sequence without stopping and restarting the waveform generation?

1-write waveform 1 to memory slot A and keep B open initially
2-start waveform generation of waveform 1
3-analyze waveform 1 and generate waveform 2 (a new waveform that is different from 1)
4-write waveform 2 to slot B
5-generate waveform 2
6-analyze waveform 2 and generate waveform 3 (a new waveform that is different from 1 and 2)
7-write waveform 3 to slot A
8-generate waveform 3
9-loop this entire process

Essentially, we want continuous waveform generation without periods of inactivity.
Thank you, Tony
0 Kudos
Message 6 of 11
(9,869 Views)
Yes, you can do this, with the only restriction that the waveforms that go into onboard memory slot A always have the same number of samples, and that the waveforms that go into onboadrd memory slot B always have the same number of samples (but slot A and slot B do not necessarilly have to be of the same size).

The way you do it is:

a) allocate slotA, slotB (when you allocate you specify the number of samples)
b) create a sequence in which you generate both slotA and slotB.
c) set Trigger mode to Burst
c) write waveform1 to slotA
e) Initiate generation. slotA is generated.
f) write waveform2 to slotB
g) send a SW or HW trigger to jump to generate slotB
e) write waveform3 to slotA
f) send a SW or HW trigger to jump to generate slotA
...
...

This works on SMC-base arbitrary waveform generators such as the NI 5412, NI 5421, NI 5422, NI 5441 but would not work on the 5411 nor on the 5431.

Hope this helps!
Marcos
Marcos Kirsch
Chief Software Engineer
NI Driver Software
0 Kudos
Message 7 of 11
(9,839 Views)
There is one more thing you need to be aware of: before you can re-write new data to your waveform, you must call the Set Waveform Next Write Position function/VI and set the write position back to the beginning of the waveform.  Otherwise, you will get an error telling you that you cannot write beyond the bounds of the waveform (as the write position is at the very end after you filled it up the first time).
 
Neil F.
Principal Engineer
Modular Instruments
National Instruments
Neil Feiereisel
Principal Engineer, Modular Instruments, National Instruments
0 Kudos
Message 8 of 11
(9,811 Views)
Thank you guys.  Your tips are really helpful.  The switching between waveforms are really nice and smooth.  I suggest that you (NI) may want to include a similar example in the package since waveform online updating and switching might be interesting to a group of users. 

Many thanks, -Tony
0 Kudos
Message 9 of 11
(9,796 Views)
Does anyone know what the data download rate is to memory slot B when slot A is generating data?
0 Kudos
Message 10 of 11
(9,109 Views)