Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Can DAQmxRegisterEveryNSamplesEvent function be used for the Counter Input Channels

Solved!
Go to solution

But if I can reference both lines like (e.g. "Dev1/port0/line0:1"). I can't tell the edge changing is from line 0 or line 1.

 

 

Regards,

 

Yang

0 Kudos
Message 11 of 13
(2,834 Views)

That's true, to tell which edge has changed you would have to read the value of the lines back (you can only have one DI change detection task on a device).

 

You need to clarify your application, I don't think you should be using change detection anyway.


@slowsheep wrote:

My concerned is that if the callback function can be executed on time on each rising edge of pulse, especially when the system is busy.


This is a valid concern... there are no guarantees when it comes to software-timed execution.

 

 

 

Best Regards,

John Passiak
0 Kudos
Message 12 of 13
(2,826 Views)

Thanks for your immediate reply.

I didn't notice that I can only have one DI change detection task on a device. Because my application has two indepedent external signal inputs for the NI card. They are from sensors on the left side and on the right side.

If there is only one DI change detection task for a device, I will try DAQmxCfgSampClkTiming and DAQmxSetCICountEdgesTerm function to see if I can get good result. Thanks

 

Regards,

 

Yang

0 Kudos
Message 13 of 13
(2,823 Views)