Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

NI cDAQ9174 simultaneous Ao generation and Ai measurement of several samples.

Solved!
Go to solution

Hardware :

 

NI cDAQ9174 USB chassis

NI 9263 AO module

NI 9215 AI module

 

Hi All,

 

I'm working on a project which involves generating a stimulus sine wave signal and measuring the response of a system on 2 channels. The measurement part is working perfectly, however I get no output whatsoever at my Analog output device.

 

I really can't figure out what im doing wrong. Does anyone have any ideas? Part of the problem is that I'm developing this code for a client, and I dont have the hardware to test in front of me. - I'm sure its going to be something trivial!

 

Thanks,

 

stimulus.JPG

0 Kudos
Message 1 of 3
(3,012 Views)

Hello,

 

Thank you for posting this in the forums. Although immediately looking at it it is hard to see anything immediately wrong with the code, what I would recommend doing is to create a numeric indicator connected to the 'number of samples written per channel' output of the DAQmx Write VI. By doing this we will be able to see whether the issue is with the code or the device itself. If we receive a value for this, we will know that the problem is for the device whereas if no value is written to the indicator then we will need to examine the code further.

 

I hope that this helps.

 

Kind Regards

David B
Applications Engineer
National Instruments UK
Message 2 of 3
(2,998 Views)
Solution
Accepted by topic author mrcorlett

Problem solved!

 

It turns out, the DAQmx read was running to completion before the write block was starting, they werent starting simultaneously.

 

The "clear task" block was then running and killing the write within a couple of milliseconds of it begining, hence no signal at the output.

 

Solved by starting the stimulus DAQmx write block immediately before the DAXmx read.

 

Thanks.

 

stimulus2.JPG

0 Kudos
Message 3 of 3
(2,995 Views)