ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

Multifunction DAQ

取消
顯示結果 
搜尋替代 
您的意思是: 

Generating two synchronized pulse trains from NI 9402

I have a 9402 C-Series module in a 9188 cDAQ chassis.   I want to generate two pulse trains of the same frequency on two different lines- and they should be synchronized.  One would think this would do it:

 

ctr.png

 

but instead, the two pulse train start at arbitrary times, never consistently in sync with each other.  What gives?  I have also tried two separate tasks with various methods of trying to tie one task's start trigger to the other, with no luck.  Anyone know how to do this?  It seems like it should be simple, since I assume both pulse trains implicitly use the same timebase...



0 積分
1 條訊息(共 4 條)
3,910 檢視

Garvacious, 

 

If you have two tasks you are trying to synchronize, you will need to use a start trigger. However, since you are doing one task, you do not need the start trigger. 

 

If you look at the detailed help for DAQmx Timing Implicit, it states that it "sets only the number of samples to acquire or generate without specifying timing" (emphasis mine). You will want to set your timing VI to sample clock. The sample clock "sets the source of the Sample Clock, the rate of the Sample Clock, and the number of samples to acquire or generate". By setting these, you should be able to accomplish what you want. 

 

You also may want to look at the example Gen Dig Pulse Train-Buff-Ext Clk-Cont.vi that can be found in the example finder. 

 

Let me know how it goes!

 

Katie

Katie Collette
National Instruments
0 積分
2 條訊息(共 4 條)
3,893 檢視

Thanks Katie,

 

I was able to get it to work by triggering one counter's start from the internal output of the other counter.  This may be more complicated than necessary but it does work.  Notice I still use the "Implicit" timing setting. Once started, the two pulse trains seem to remain in sync.   Haven't tried the Sample Clock method yet. 

 

 

Counter solution.png



0 積分
3 條訊息(共 4 條)
3,879 檢視

Hello this is an old thread but I am trying to do the exact same thing with one ni9402 on a ni 9178

Which sample clock can I use to synchronize my pulses?

DO i need to route one of the clock from the 9178?

if Yes cam some one tell me how to do that?

I Have tried several things from the documentation but cannot find the way tomake the clock available to the module

I am using nidaqmx with python

Thanks

0 積分
4 條訊息(共 4 條)
2,481 檢視