LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use AI functions rather than DAQ assistant?

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 

0 Kudos
Message 1 of 13
(3,500 Views)
Where can I find out what the device number is for my DAQ board?
0 Kudos
Message 2 of 13
(3,491 Views)

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 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 3 of 13
(3,487 Views)

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 

0 Kudos
Message 4 of 13
(3,486 Views)

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 

0 Kudos
Message 5 of 13
(3,481 Views)

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 

0 Kudos
Message 6 of 13
(3,464 Views)

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 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 7 of 13
(3,456 Views)

Norbert, 

 

Cheers, got it sorted. Lastly, could you explain what you mean by the 'producer/consumer approach', were can I find examples?

 

Sam 

0 Kudos
Message 8 of 13
(3,451 Views)

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 

0 Kudos
Message 9 of 13
(3,443 Views)
You do it the same way that you did with the DAQ Assistant - set the number of samples per second.
0 Kudos
Message 10 of 13
(3,437 Views)