Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Analog and digital Acquisition with CDAQ9172

Hello,

 

I am using a compactDAQ 9172 with:

  • 5 modules NI 9215
  • 1 module NI 9211
  • 1 module NI 9401
  • 1 module NI 9403

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:

 

  • 1 to measure analog inputs (voltage with NI 9215 and thermocouple with NI 9211)
  • 1 to measure digital inputs from NI 9401
  • 1 to measure digital inputs from NI 9403

 

 

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

0 Kudos
Message 1 of 2
(6,108 Views)

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.

0 Kudos
Message 2 of 2
(6,086 Views)