LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pwm pulses using counter and analog input

Hello, 

     I am referring to one of the available exmaples avilable in Labview "PWM counter output",It is basicall duty ratio ratio variation according to change in analog input ,i want to know how to change the analog input to RSE i.e with referred to ground because it is differential in this case .

0 Kudos
Message 1 of 10
(4,850 Views)

You can configure the analog input configuration by inserting a DAQmx Channel Property Node between "DAQmx Create Channel" and "DAQmx Timing."  Choose the property Analog Input -> General Properties -> Input Configuration -> Terminal Configuration.  Change the property to Write and create a constant set for the configuration you want.

Set Terminal Configuration.png

0 Kudos
Message 2 of 10
(4,844 Views)

Sir, 

  thank u so vry much for the solution bt i tried doing that bt the node is avilable as i/p not o/p .I have attached the VI plz check and let me know .Thanking you

0 Kudos
Message 3 of 10
(4,835 Views)

Right click on the property node and click Change To -> Write.  You want to change the analog input configuration, so why did you put the property node on the digital output channel?

0 Kudos
Message 4 of 10
(4,829 Views)

Dear nathand,

I used USB 6251 NI device to control the PWM with the example in the attachment. Now I can change the duty cycle dynamically but the peak to peak voltage value of the pulse is quite low, only 0.5V. I want to change the pk to pk voltage dynamically also. Would you please suggest me how to do it?

Thank you very much.

Univer

0 Kudos
Message 5 of 10
(4,782 Views)

@univer_solar wrote:

I used USB 6251 NI device to control the PWM with the example in the attachment. Now I can change the duty cycle dynamically but the peak to peak voltage value of the pulse is quite low, only 0.5V. I want to change the pk to pk voltage dynamically also. Would you please suggest me how to do it?


The peak to peak voltage should be around 5V (or at least over 3.3V).  What are you driving with the output?  Perhaps you're overloading it; the counter outputs are not designed to drive much current.  There is no way to change the voltage dynamically, because it's a digital output which means only two states: on and off.  To create a PWM with variable voltage, you would need either to use an analog output and generate the PWM signal yourself, or connect the existing PWM output to a relay that would switch some variable voltage.

0 Kudos
Message 6 of 10
(4,772 Views)

Hi nathand,

Thank you for your reply. Now the output is 5V.

One thing I need to develop is like this: I want the PWM run based on the synchronous signal. For ex, PWM can only run when the SYNC signal is low. Would you please suggest me the modified solution?

I appreciate for your help. Thanks in advance.

0 Kudos
Message 7 of 10
(4,758 Views)

Please search the examples.  I believe the "Gen Dig Pulse Train-Continuous-Pause Trigger" example demonstrates how to do what you are asking.

0 Kudos
Message 8 of 10
(4,753 Views)

Hi nathand,

I already search an example you suggest and modified it. Now I can change the duty cycle and read an external signal but the synchronization is not the one I expect. I want to PWM only valid when the external signal is high for a long time (ms), for example. The frequency of external signal is very low (Hz) while the PWM is KHz.

In my design, I used the DAQmx Trigger and used the Pause function so that the PWM pause and it still kept the former value. I want it becomes 0 when the external signal is low.

I attach the file. Would you please give me some advice?

Thanks in advance,

 

0 Kudos
Message 9 of 10
(4,723 Views)

Sorry, I'm not enough of a DAQmx expert to know how to do this, if it can be done.  Fortunately there are many other knowledgeable people on this forum so perhaps someone else will make a suggestion.  You might want to start a new thread with a more accurate description of your goal, since your question is somewhat off-topic from the message that started this thread.  I'm also not an electrical engineer but I'd think there's some sort of digital AND gate equivalent (a simple transistor or relay) that you could insert between the external signal and the PWM output that would keep the output low when the external signal is low.

0 Kudos
Message 10 of 10
(4,716 Views)