From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

AI Group Config

Hi,

I'm trying to find an example for using AI groups, but haven't been
successful. Using a PCI-6071E (E-series) DAQ Card, I want to start two
analog input collections - one running at 100Hz using some of the
channels, and the other with the remaining channels at 1000Hz. On
starting the second acquisition I get error -10609 at AI Control. I'm
doing:

AI Group config (group 0) -> AI Clock Config -> AI Control (to start)
-> LOOP (to collect data) -> stop

AI Group config (group 1) -> AI Clock Config -> AI Control (to start)
-> LOOP (to collect data) -> stop

i.e. two separate threads. Any examples / tips?

To complicate matters, I'm going to use the second acquisition (1000Hz)
with DAQ Occurrences so that I can count transitions on a part
icular
analog input channel. I haven't got as far as this as the above error
happens before I get there.

Any help would be greatly appreciated.
--
Tim
0 Kudos
Message 1 of 2
(2,615 Views)
Hi,
You can configure as many groups as you want, but you can only do one
transfer at a time.
There are two ways to do the 100Hz/1kHz scan simultaneously:
1. Scan all channels at 1kHz, separate the columns of the 2D waveforms into
1D arrays (one per channel).
Then use decimate on the column arrays that need to be scanned at 100Hz
to reduce their size.
2. Scan all channels at 1kHz, but put the 'fast channels into the scanlist
10 times as often as the slow channels.
The resulting data will be somewhat messy: you have to find the right
locations in the array for each sample.
search for 'multirate' at zone.ni.com. (Requires some direct NIDAQ
calls)

Counting transitions:
If your card contains Hardware analog triggering you can route the output of
your trigger
circuitry to an onboard counter that counts events.
all MIO-E-3 and E-1 cards can!
Tim Pragnell wrote in message
news:396CA0FA.FBE3CD97@physiol.ox.ac.uk...
> Hi,
>
> I'm trying to find an example for using AI groups, but haven't been
> successful. Using a PCI-6071E (E-series) DAQ Card, I want to start two
> analog input collections - one running at 100Hz using some of the
> channels, and the other with the remaining channels at 1000Hz. On
> starting the second acquisition I get error -10609 at AI Control. I'm
> doing:
>
> AI Group config (group 0) -> AI Clock Config -> AI Control (to start)
> -> LOOP (to collect data) -> stop
>
> AI Group config (group 1) -> AI Clock Config -> AI Control (to start)
> -> LOOP (to collect data) -> stop
>
> i.e. two separate threads. Any examples / tips?
>
> To complicate matters, I'm going to use the second acquisition (1000Hz)
> with DAQ Occurrences so that I can count transitions on a particular
> analog input channel.
I haven't got as far as this as the above error
> happens before I get there.
>
> Any help would be greatly appreciated.
> --
> Tim
0 Kudos
Message 2 of 2
(2,615 Views)