LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Phaseshifted PWM-Signal with varying Frequenz around 100kHz

Hello all,

 

i am working on a project where i want to controll a full bridge push pull converter in different modes.

 

Mode 1: Phaseshifted 100kHz PWM with regulated duty cycle.

I realized this one with 2 synchronized counter outputs. This works without any problem.

 

Mode 2: Here i want the signals to have a constant off-time and only the on-time should be influenced by the regulation.

i already tried this by changing the duty cycle and the frequency as you can see in the attached VI.

But due to the phase shift only beeing set at the beginning of the program the phaseshift is set to be shifted 180° at 100kHz and changing the frequency does not give me the result i want.

So is there a way to change the phase shift on the fly?

Or maybe to controll the outputs like this:

 

Output 1 High

wait 50ns

Output 1 Low

wait 5ns

Output 2 High

wait 20ns

Output 2 Low

wait 5ns

Output 1 High

wait 50ns

...

i hope i explained my problem properly and you can help me out.

have a nice day!

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

1. Your present scheme isn't foolproof for "Mode 1" either.  What's correct is that the 2 PWM tasks are configured to use the same trigger signal and that they have different "initial delay" values.   What's incorrect is that you haven't done anything to enforce sequencing to make sure both PWM tasks have been started *before* you issue the triggering signal.   

    You probably aren't noticing any startup anomalies because your triggering signal task is set for continuous generation.  Sooner or later both PWM tasks will be triggered, but probably not at the same instant.

 

2. Attempts to change pulse parameters on the fly will be software calls to DAQmx.  I don't think you can force the tasks to change their "on-time" at the same instant.

 

3. If your board supports buffered pulse generation (such as an X-series MIO board), you might have a chance at keeping the on-time changes in sync across the 2 PWM tasks.  It'll be more involved and you'll probably have more latency between when you *decide* to change the on-times and when the change actually takes place.

   You would need to define a buffer full of on-time and off-time settings and (probably) set the task to be able to regenerate.  When it's time to change settings, you'd need to define another whole buffer full of the new settings and write them to the task.  If your buffer is too small, you're liable to get DAQmx errors.  As you make it larger, you get more latency before the parameter changes take effect.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 2
(1,777 Views)