Thank you aeu.
Actually I already tries to do that. This works for one channel (but I only can acquire one data.. whgich is quite low...) I probably could use the clock of the PC to acquire more data.
But the problem is that, when I want to record to counter, I can't. indeed, here is what I do:
s = daq.createSession('ni');
s.addCounterInputChannel('cDAQ1Mod5', 0, 'EdgeCount');
s1 = daq.createSession('ni');
s1.addCounterInputChannel('cDAQ1Mod5', 1, 'EdgeCount');
and I have again my error -201133 message !!!
NI Error -201133:
Device cannot be configured for input or output because lines and/or terminals on this device are in use by another
task or route. This operation requires temporarily reserving all lines and terminals for communication, which
interferes with the other task or route.
If possible, use DAQmx Control Task to reserve all tasks that use this device before committing any tasks that use
this device. Otherwise, uncommit or unreserve the other task or disconnect the other route before attempting to
configure the device for input or output.
Device: cDAQ1Mod5
Digital Port: 0
Lines: 0
Task Name: _unnamedTask<1A>
Status Code: -201133
I still can't find the solution. I am afraid I will not be able to do so using Matlab??? Because I don't know how to reserve a task with matlab in order to use 2 counters input in the same time with the NI9401...