08-28-2009 04:12 AM
Can I use AI config, AI start, etc. instead of DAQ assistant to read values from accelerometers connected via an A/D card?How do the AI functions work?Lastly will switching to AI functions result in a quicker program?
Cheers
Sam
08-28-2009 04:47 AM
08-28-2009 04:56 AM
Sam,
from your second point i take it that you are starting to browse examples. The device number (as numeric value) is a parameter you have to use when working with traditional DAQ. NI does not recommend to use traditional DAQ anymore except if there is no other solution (e.g. hardware which is not supported in DAQmx).
Since you already worked with the DAQ assistant, your hardware has to support DAQmx.... so you should look into the DAQmx examples.
Another hint:
You can exchange the DAQ assistant by DAQmx code simply by rightclicking on the assistant and select "Generate DAQmx Code". This will result in DAQmx code doing what you configured in the assistant (please note that the assistant is getting replaced, so it is not available on the blockdiagram after this). Study this code. As a general framework, this works out very good.
hope this helps,
Norbert
08-28-2009 05:03 AM
How do you configure a A/D board (specifically PCI-6010) in measurement and automation explorer. It should have 3 voltages (AI0-2). It was working fine with DAQ assistant, but AI config, gives a -10401 error when I try to read using the below circuit?
Cheers
08-28-2009 05:11 AM
Norbert,
I took your advice and created the DAQ.mx code from the assistant. However the only output is a 1D array, I should be reading three different voltages one from each of the accelerometers.What do I use to split them?
Cheers,
Sam
08-28-2009 05:49 AM
Ive got that sorted now, thanks. I dont suppose there is an easy way to create code for the job I/O assistant is doing (reading from serial port)?
Cheers
Sam
08-28-2009 06:17 AM
Sam,
there is an easy way for the instrument io assistant as well. Just rightclick on it and select "open frontpanel". Please read the upcoming dialog carefully: after you converted the assistant, you will not have access to the configuration dialog anymore....
Norbert
08-28-2009 06:22 AM
Norbert,
Cheers, got it sorted. Lastly, could you explain what you mean by the 'producer/consumer approach', were can I find examples?
Sam
08-28-2009 06:34 AM
Also, is there a way to control the scan rate of the DAQ.mx? Thats why I tried to change to the traditional functions such as AI config and start, etc.
Please see wind7 attached above.
Cheers
08-28-2009 06:43 AM