09-28-2015 04:59 AM
Hello all,
I'am working on a Pulse Width modulation VI which should automatically adjust the Duty cycle via a Sinus.
When i turn on the VI the Duty cycle doesn't adjust automatically, is there any possibility how to adjust the Duty cycle automatically without stopping the task?
I've attached the VI.
Thanks very much!
09-28-2015 05:02 AM
Hi Liggias,
I didn't install LabVIEW 2015 yet.
Could you sent the VI in version 2014?
Best regards.
09-28-2015 05:09 AM
Hello,
I've saved the VI as LV12 version. I hope you can open this 🙂
Thanks
09-28-2015 05:45 AM
Hi Liggias,
When i turn on the VI the Duty cycle doesn't adjust automatically, is there any possibility how to adjust the Duty cycle automatically without stopping the task?
Right now your VI waits on a user event (value change of Frequency) before it will update the PWM output.
Either get rid of the event structure - or create events when needed…
09-28-2015 06:24 AM
Hello GerdW,
Thanks for your time, but I am quite new to LabVIEW so I do not understand exactly what you mean. Could you please elaborate?
Thanks in advance
09-28-2015 06:56 AM
Hi Liggias,
"quite new" forces me to recommend all th FREE online courses offered by NI for LabVIEW beginners… 😄
The event structure in your VI waits until one of the events happen. Then - only then - new parameters are set for your PWM task!
Why don't you open the simple PWM example from LabVIEW Example Finder?
09-28-2015 07:58 AM - edited 09-28-2015 08:05 AM
Hey GerdW,
This VI comes from the labview example Finder.
I just want the duty cycle to be adjusted in a sine, from 1% to 99% and then back to 1% etc. If i put a formula which generates numbers from 0.01 to 0.99 in this VI, is it possible to link it to the Duty cycle knob so that the event will change and the values will be changed?
Thanks
09-28-2015 08:15 AM
Hi Liggias,
LabVIEW basics: controls are data sources, indicators are data sinks. Did I mention the LabVIEW Basics courses?
Once you change your "duty knob" to be an indicator you can connect the output of your formula to this indicator…
09-28-2015 08:27 AM
Yes take the free training. Also I did something similar with 8 slot cDAQ chassis using one of the front BNC connectors. Here is my example doing a hardware timed frequency sweep using it. It could be modified to do a duty cycle sweep. This can also be done with a buffered analog or digital out, either stopping and restarting the task, or updating the values on the buffer but that method would only work on a duty cycle sweep, not frequency because the number of points in the buffer can't change.
https://decibel.ni.com/content/docs/DOC-32352
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
09-28-2015 08:33 AM
Hello GerdW,
I do know that if i change a control to be an indicator that i could connect a formula to it, i'm not that new..
I already tried this days ago but the values won't change, and i have no idea why. The formula works but the duty cycle stays at one number, while it should variate between 1% and 99%.