cancelar
Mostrando resultados para 
Pesquisar então 
Você quer dizer: 

complementary counter signals

Resolvido!
Ir para a solução

Hi.

 

I need to generate two complementary signals of 200KHz and 45% dduty cycle 180° out of phase from each other.

 

I currently have CTR6 and CTR7 as outputs, with PF3 one connected to CTR6. I then configured CTR7 to be triggered off of PFI3, but I cannot get them to be 180° out of phase from each other. Any help is appreciated.

 

Thanks,

Joemar

0 Kudos
Mensagem 1 de 12
4.843Exibições

Joemar-

 

I think it may help to know what device you are using.  What is your physical setup?

 

Thanks,

 

Sean N

Applications Engineering Specialist - Semiconductor Test
National Instruments
0 Kudos
Mensagem 2 de 12
4.830Exibições

You need to pre-load one of the counters with an initial value, corresponding to the difference in phase, prior to starting the counter.  You might be able to find sample code for this by searching the NI site for "pulse train delay."

0 Kudos
Mensagem 3 de 12
4.824Exibições

I am using a PXI-6602 and using CTR6 and CTR7 as outputs. Thanks

0 Kudos
Mensagem 4 de 12
4.811Exibições

Thanks for the delay suggestion. Tried it unfortunately the problem looks like both counters do not start at the same time. If I press RUN and STOP repeatedly, the counter the difference between the two pulses change.

 

I am running them in series in a single task, so I assume it is using the same clock.

 

Thanks

0 Kudos
Mensagem 5 de 12
4.809Exibições

You could feed that output of a single counter to a tansistor or TTL inverter gate (7404) to obtain and inverted signal.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Mensagem 6 de 12
4.803Exibições

Thanks, unfortunately I need some deadtime in between the two signals.

0 Kudos
Mensagem 7 de 12
4.799Exibições

It sounds like you may need to try a master-slave setup so that one task is waiting for the other to begin.  Once they are both started at the same time, then you can implement a delay.

 

Thanks,

 

Sean

Applications Engineering Specialist - Semiconductor Test
National Instruments
0 Kudos
Mensagem 8 de 12
4.784Exibições

Here, try this.  The error routing isn't pretty but it'll do the job to help with sequencing.  The keys are to

use "arm start triggering" to sync their start times and to specify 1/2 period difference in their initial delay

times.

 

You'll need to adjust the device names for your board and may need to use a different DO / PFI pair

to do the arm start triggering.

 

-Kevin P

 

synced_delayed_pulsetrains.png

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Mensagem 9 de 12
4.763Exibições

Thank you guys for the suggestions. Special thanks to Kevin for creating the VI. Solution looks elegant but it a little bit more complicated than I would like, considering the PCB is already assembled and would not like to make changes if not absolutely necessary.

 

Initially I had CTR7 triggered on PFI3 (which is physically connected to CTR6) but that did not work for some reason, dont know why because that to me seems exactly the same as what I have below. Then I read somewhere that when you right-click on the I/O constant, there is an advanced option that allows you to pick CTR Internal Outputs. Now even if the two counters are on a different task (different clocks), they are in sync every time.

 

FYI, this is not the exact implementation I have since I needed to turn the counters ON/OFF at different times in the software, but this is essentially how I did it. I also changed the duty cycle to less than the original 45% spec.

 

Thanks again.

 

-Joemar

 

0 Kudos
Mensagem 10 de 12
4.751Exibições