04-28-2009 02:52 AM
Hello,
I am using a compactDAQ 9172 with:
in order to measure analog ( voltage and thermocouple) and digital inputs.
I have to create 3 tasks with C++(Visual 2008) and DAQmx 8.5 functions:
The sampling rate for digital inputs (NI 9401) should be 20 kHz. As it is written on the documentation I can connect the AI Sample Clock on this module to make continouous acquisition (slot 1 to 4).
In that case is it possible to have a different sampling rate for analog inputs (NI 9215) and digital inputs (NI9401) ? or is it necessarily the same?
Concerning measurement with NI 9403. it is only possible to measure samples one by on. if i want a specific sampling rate Shoud I do it in my C++ programm?
Is it possible to launch all the tasks in the same loop even if I should create a specific sampling rate for digital inputs of NI 9403?
Is there an another way to do it?
Thanks for your answers
Carine
04-29-2009 06:43 AM
Hello.
The 9403 module can't be used for a hardware timed digital operation.It means that you have to do your acquisition point after point and time your while loop in order to have a software timed digital task.
Concerning the 9401, you have to place it in slot 1 to 4, and provide an external sample clock. If this external sample clock is the AI sample clock from another analog input module, the digital and analog tasks will operate at the same rate. But you also can provide an external clock from an external TTL generator, and you will be able to choose the sample rate you want for the digital input task.
Regards.