04-14-2011 07:22 PM
Hi everyone, first post here.
I'm having a problem building a PWM circuit (USB 6351 X series). I need to have two outputs, both with same frequency and same DC, but CH1 time-delayed by 1/2 cycle. I have a working VI where CH1 is a finite, single pulse, retriggerable counter with the proper initial delay that syncs on every rising edge of CH0.
Output looks like this:
CH0 -___-___-___
CH1 __-___-___-_
I also need to be able to change frequency and DC on the fly. Problem is whenever the daqmx write block is executed on CH1, it starts synching somewhere else. There is no way to change the initial delay parameter on the fly. But as a test, If frequency is changed and then returned to the initial value CH1 will go out of sync. Also if I stop the task and reset the initial delay value CH1 will skip a few pulses.
Ive attached the sample VI. Im using 'high and low' times instead of freq and DC (same thing tho). Any ideas how to accomplish this?
04-14-2011 08:10 PM
Nevermind, found a way to do it. Had to stop, restart and rewrite all parameters on CH1 inside an event triggered by a frequency or DC change.