LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PWM in Producer Consumer Architecture

Windows XP
Labview 7.1
DAQmx

Is it feasible to create a Pulse Width Modulation VI in the Producer/Consumer Architecture?

I would need the producer to continuously acquire an analog input on 1 channel of PCI-6036E at 100 Hz. This is meant to be the frequency of the pulse to modulate. This would be enqueued.

The consumer should run a pulse generator and analog output on 8 channels. The frequency of the pulse should be read from the queue whenever there is something to read. Otherwise, the pulse generator will keep on running merrily. The pulse that it generates must have an update rate of 800 kHz. (Note that the pulse phase should not be reset at each new frequency value; it should seamlessly carry over from the previous pulse train but with the new frequency.) The output VI will write this pulse sample to PCI-6713 at the same 800 kHz.

  1. Do you foresee any issues with this?
  2. How to size the buffers appropriately?
  3. More importantly, could you point to a relevant example? I have already seen some Produce/Consumer architecture examples. What I am looking for is an example of asynchronous input/output.

Thanks in advance for your help.

0 Kudos
Message 1 of 2
(2,546 Views)

Hi Aniruddha,

It sounds like you want to do frequency modulation, not PWM; as PWM is outputting a digital pulse of set frequency and varying duty cycle. When you say you want an update rate of 800 kHz, I naturally assume you want to output an analog signal.

If you need analog output, you should look at getting a frequency generator (FGen) at ni.com/signalgenerators. They have a technology called DDS that allows smoothly transitioning between frequencies.

If you need to talk to someone about configuring the right system, please visit ni.com/contact.

Feel free to post back if you want to clarify your system setup.

Mark E.
Precision DC Product Support Engineer
National Instruments

0 Kudos
Message 2 of 2
(2,520 Views)