Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

NI 9411 AI-DI synchronization

Hi all,

 

I am using a cDAQ-9188 with two analog input modules (9234, 9215) and one digital input module 9411. I need to measure the frequency of a TTL signal with the 9411 and to synchronize this acquisition with the ones of the analog modules. I assigned the 9234 onboard clock to the daqmx timing.vi of the analog task and I shared it with the timing.vi of the digital task. By this way I should be able to synchronize the two tasks but running the vi I get this error:

 

"Error -201314

Multiple Sample Clock pulses were detected within one period of the input signal. Use a Sample Clock rate that is slower than the input signal. If you are using an external Sample Clock, ensure that clock signal is within the jitter and voltage level specifications and without glitches."

 

How can I solve this problem?

 

Thank you for any assistance you can provide.

 

 

 

0 Kudos
Message 1 of 3
(6,920 Views)

Hello AntonioD,

 

first of all thank you for posting your question in this forum! 

 

The error message that occurs (201314) means that probably you use a clock frequency higher than your input signal frequency. In other words you try to measure the frequency before the input signal complete a period. So  there comes the error. 


As you'll see in the attached VI that I am sending you, I made a modification. I seperated the while loop into two parts. In this way you will avoid having

another error that has to do with  not reading fast enough the samples out of the buffer that you configure (error 200279).

 

One thing you have to pay attention at is that you should use the same data type in DAQmx Create Channel and DAQmx Read. So if you choose Counter Input Frequency in DAQmx Create Channel, you have to Read Counter DBL value (Single sample or Multiple samples) on DAQmx Read. On the other hand if you want to Create Channel-->Counter Input Pulse Measurement Frequency you have to read Counter (Single or Multiple Samples) Pulse Frequency if you want to have the expected results.

 

Let me know if it works!!

 

Best regards,

 

 

Antonios
Message 2 of 3
(6,874 Views)

Hi,

 

I have same kind of issue to solve. This helped a lot.

 

Is there a good way to graph measured frequency and measured analog value in same picture. I need to see how measured analog value change in function of speed.

 

Thank You

Marko

Message 3 of 3
(6,770 Views)