Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

9188 PFI lines

By "record", I'm assuming that you need to know when the trigger is received.

 

 

The following code does this in terms of samples from the 9237.  It uses the counter to count the ticks of the sample clock from the 9237.  The count register is sampled based on your external trigger.

 

 

 

2011-10-11_131255.png

 

You'll have to be creative with when you call DAQmx Read--you should poll Available Samples Per Channel or use the Every N Samples Event to determine when the counter sample is available.

 

 

Best Regards,

John Passiak
0 Kudos
Message 11 of 14
(1,156 Views)

I'm trying to understand what you have written.

I have just read NI 9188 manual and I think that I can relate your example with Single Point (On-Demand) Edge counting, right?

 

Thank you very much.

 

 

0 Kudos
Message 12 of 14
(1,147 Views)

Hi teoprimo,

 

It is very similar to that, but actually I would recommend using Buffered (Sample Clock) Edge Counting (page 86 in the manual).  The idea is that your external digital event is the "clock", which is what is used to actually sample the count register.  It sounds like there will be only a single event anyway, but you still use this as the clock so the sampling of the count register will occur precisely when the event occurs.

 

 

Best Regards,

John Passiak
0 Kudos
Message 13 of 14
(1,140 Views)

Perfect! I will try your solution as soon as possibile.

 

Many thanks!

0 Kudos
Message 14 of 14
(1,136 Views)