Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Collecting multiple channels with USB6008

I am collecting 3 analog channels of data from a USB6008 in RSE mode. The DAQmx is set to collect in waveform mode and this is later output as a cluster of arrays for later processing. One channel is a square wave the other dc voltage.  I am using the third channel as a trigger to collect the other two it goes high,5v, for the duration of the sequence . My problem is that it only collects the correct data about half of the time and from the data i can see that it appears to be switching the information in the waveform sometimes resulting in only pulse worth of data being collected.
 
Hope someone can help
Regards
colin  Smiley Sad
  
0 Kudos
Message 1 of 8
(2,558 Views)
Is it possible to post the code you have been working on?
0 Kudos
Message 2 of 8
(2,548 Views)
Seasons greetings SR
 
Attached is the VI. Since my request for help have reordered the physical channels, now Dev3/ai1, Dev3/ai2, Dev3/ai3 and reconnected the inputs so that the trigger is on ai1. This has helped and it ran ten times without.
 
 
regards
 
colin
 
 
 
0 Kudos
Message 3 of 8
(2,545 Views)

Hi Colin,

Could I get some more information about your VI please?

First of all, could you post the Find Experiments VI?
 
Could you explain to me a bit about the architecture of the VI. Is it part of another VI (ie. is it a SubVI)? Is this controlling the enumerated control?
 
Could you descride a bit more about the configuration of your analog channels. Do you want the 3rd channel to trigger the other 2 when it goes high? If this is the case if may be more efficient to use the digital trigger on the 6008.
 
The channels are configured to read differentially while you mentioned you wanted to read them in RSE mode.
 
The outer while loop is wired to a constant true, in which case the inner case structure will only run once before exiting the code.
 
Thanks
Sarah
 
 
Sarah

Applications Engineer | National Instruments | UK & Ireland
0 Kudos
Message 4 of 8
(2,525 Views)

Sarah

It is part of a much bigger program so i have included the whole library.  You should look at non streaming smac .vi as data collection is in here. The RS232 control operates the SMAC VCA very well so no problems there.  I have been experimenting rewiring the analog data so that thr trigger is on ai1 this seems to help. also increasing the sample rate seems to help but it stil misses some data.

I have noticed that when it mal functions it gets the data from a high on the ai2 when it goes low it stops. and also when the patient data is below 2.5v, trigger voltage, it does not collect data this indicates that the data is getting mixed up in some way .

In answer to your questions

Could you explain to me a bit about the architecture of the VI. Is it part of another VI (ie. is it a SubVI)? Is this controlling the enumerated control?

Yes it is a subVI and the enum is selected in three ways open, poll and close. This Vi polls the analog data and providing the trigger is high ( now ai1) it collects data on ai2 and 3. so when the sequence finishes data outputs to non streaming smac.vi and to the top level, Automated von frey on dec08.vi

Could you descride a bit more about the configuration of your analog channels. Do you want the 3rd channel to trigger the other 2 when it goes high? If this is the case if may be more efficient to use the digital trigger on the 6008

This has been modified so that ai1 is the trigger and this goes high for the duration of the sequence i.e. a set number of pulses at a frequency, up to 5 hz,. ai2 and ai3 now acquire the data i want to keep, frequency and patient feedback. On the USB 6008 you cannot use the digital trigger to collect analog data, a Labview engineer told me.  

The channels are configured to read differentially while you mentioned you wanted to read them in RSE mode

Yes  I was trying something, it does not matter if differential or RSE as the ai5,6 and7 are grounded so that differential is possible.

Thanks very much for your help  Smiley Happy

0 Kudos
Message 5 of 8
(2,518 Views)
Hey Colin,

Just wanted to let you know that digital triggering is supported with the 6008 under DAQmx. There is only one PFI terminal and this must be used for the digital trigger, this terminal is also used for counter operations so if you are making use of the counter, you will not be able to trigger.

I've attached some example code that works perfectly with my 6008 (LV7.1 format), is there any way you can use this, as I'm struggling to see exactly how your code implements the triggering that you mention. On a side issue, although I haven't fully gone through your code, is there any chance of eliminating the use of local/global variables and use direct wiring instead (you may have to make use of shift registers)? This will make the code more efficient and it may also reveal the problems that yo uare experiencing.

Merry Christmas!
0 Kudos
Message 6 of 8
(2,507 Views)
SR
 
I will give it a try, thanks for all your help. NI definitely told be that PFI on the 6008 could not be used to Analog triggering still not everyone can know all so that particular person may be wrong.
 
Merry Christmas
 
colin
Smiley Very Happy  
0 Kudos
Message 7 of 8
(2,506 Views)
Apologies Colin, it cannot carry out Analogue triggering, its digital only, so if the 5V pulse you mention isn't TTL based, you quite rightly won't be able to use it. That is a shame!
0 Kudos
Message 8 of 8
(2,502 Views)