From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-19-2013 06:53 AM
i want to generate a digital pulse every rising edge of my counters pulse. it should have a variable duty cycle. till now i have been able to generate digital output but i cant change its duty cycle.
pls tell the ways in which i should proceed??
thank u in advance..
Solved! Go to Solution.
09-19-2013 07:10 PM
If you use DAQmx on counter channel, just use DAQmx write to write a new duty cycle to channel.
09-20-2013 06:43 AM
thank u KateB,
yes, i am using daqmx.
but i want to vary the duty cycle of my DO(digital output channel which is synchronised with counter output pulse train)..
09-24-2013 11:53 AM
is this relevant to what you want to do?
http://digital.ni.com/public.nsf/allkb/82C9F3C15F62974E86256EBA0058CAF5
09-26-2013 11:15 PM
thanks Wan L,
but changing the duty cycle of counter output is not useful to me as i am using it as a clock(rising edge) to generate digital output.
i want to change the duty cycle of the digital output of my ni6221 module.
thanks any way. i am still working on that..
09-27-2013 06:16 PM
Is there a reason why you don't want to use a counter out task?
09-29-2013 01:26 AM
thanks WanL,
yes, i do want to use counter for generation of two digital pulse trains. and i m using this counter output for changing frequency of two digital pulse trains.
as there are 2 counters on my pci6221.
And requirements are:
one counter for counting.
two digital pulse trains having variable duty cycle and frequency.
so i hv to use one counter for genration of 2 digital outputs..
09-30-2013 01:43 PM
You want to use one counter to generate two pulse trains with different frequency and duty cycle? I don't believe that's possible.
10-03-2013 01:28 AM
WanL,
i have seen some posts on this forum and a few examples which assures that the digital output channels can be used to generate pulses. using one of my counter as clock to both these channels i could generate two pulse trains.
example>>cont write digital port- ext clk.vi
i just want to vary the duty cycle of each digital output pulses.
10-03-2013 05:35 PM
That technique requires you to supply your own waveform to the digital write function. In general, you don't HAVE to use a counter as a clock source. If you want to vary the duty cycle, you will need regeneration, and you have supply a new waveform on each interation of the loop.