Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Simultaneous AI From two DAQ cards

I have an application written in VB.NET that uses two DAQ cards to acquire data from 64 differential channels, thus the two DAQ cards.  I am using the PCI-6255 cards and have been finding that if I monitor just 4 AI channels per card at the same time that I get some sinusoidal pulses periodically in my data.  I have created a Board class that represents one A2D card.  I use a thread for each separate card to acquire data continuously for an hour or two.  If I run a single unit or two units on the same card, I don't see the problem with the pulses in the data. 

 

Any suggestions on how to take data simultaneously from both cards, but not run into this pulse in the data lines.  Is it possible to synchronize the two cards together?  

 

Thanks in advance,

Mike

0 Kudos
Message 1 of 10
(4,731 Views)

Mike,

 

Are both of these cards in the same system (and both PCI-6255)?  Is it only when you are using 4 channels, or is it that when you use more than 4 channels total you are seeing this pulse on the lines? How are you currently setting up these tasks to acquire the data? (i.e. Configuration, Finite/Continuous, etc)

 

To sync the cards, we should just need to share a trigger and clock source for the different input tasks, but I there shouldn't be anything in those tasks (unless explicitly generated) that would be generating a pulse on the lines as you describe. Could you give me some more information about the computer and measurement setup? What kinds of signals are you measuring here?

 

 

Timothy S.
Senior Technical Support Engineer
0 Kudos
Message 2 of 10
(4,714 Views)

I have 4 channels setup on each of the two separate PCI-6255 cards.  If I setup 8 channels on one card, I am not seeing the same response.  I am performing a continuous sample acquisition that can potentially go on or hours depending on the test.

 

Here is how a card with the channels to scan are being created:

 

m_AITask = 

New Task()

m_AITask.AIChannels.CreateVoltageChannel("Dev" & BoardNum _

& "/ai" & ChansToScan(iChan).ToString(), & "Chan" & ChansToScan(iChan).ToString()  _

, AITerminalConfiguration.Differential, m_Ranges(iChan).MinValue _

, m_Ranges(iChan).MaxValue, AIVoltageUnits.Volts)

 

The CreateVoltageChannel is actually in a For Next loop that steps through all of the channels (iChan) to scan.

m_AITask.Timing.ConfigureSampleClock(

, SampleQuantityMode.ContinuousSamples, Convert.ToInt32(10000))

m_AITask.Stream.ReadAllAvailableSamples =

"", ScanRate, SampleClockActiveEdge.Rising _True

m_AITask.Control(TaskAction.Verify)

m_AIReader =

m_AIReader.SynchronizeCallbacks =

New AnalogMultiChannelReader(m_AITask.Stream)True

m_AIReader.BeginReadMultiSample(-1,

This is in a thread that is looping and looking for data:

Nothing, Nothing)

Data = m_AIReader.ReadMultiSample(-1)

Then when done:

m_AITask.Stop()

m_AITask.Dispose()

Hope this helps.

Mike

0 Kudos
Message 3 of 10
(4,711 Views)

Mike,

 

I'll be looking through this code to see what I can find, but I did have another question or two.

 

Is this behavior only being seen on one particular card's measurements, or is it showing up on each measurement channel?

Also, does the behavior change based on which 4 or 8 channels on the cards you are using? I am trying to identify if there could be an issue with a specific channel on one of the cards as opposed to an issue with the program itself.

 

Timothy

 

 

Timothy S.
Senior Technical Support Engineer
0 Kudos
Message 4 of 10
(4,696 Views)

The problem is showing up on both cards.  But I have a simple setup so I only can test two units (4 channels per unit).  I ran a signal generator through channels 4-7 on one of the cards and did not see the problem.  I am going to attempt to monitor only the signal generator on one card and one of our units on another card.  Trying to determine if this is an interaction with our units or is this happening on the first channel no matter what...

 

0 Kudos
Message 5 of 10
(4,693 Views)

Here is some more information for you.  Upon further testing, this has been happening in the first channel being monitored on the card.  Our sampling rate is 1kHz.  To test this I wired up a signal generator up to the connector block and set the signal for 0.5Volts.  When it was the second "unit" being monitored on that DAQ card, the signal was clean for the duration of the run.  The first unit had some signal issues in several of the data lines.  The next test I ran the signal generator was the only thing being monitored on the one card, and the channels were the same as the prior test (AI4-AI7). I was able to reproduce this sinusoidal pulse that dampens out within a 1/2 to 3/4 of a second.  Now if I run the test with only one DAQ card, I don't see this happening.  Only when I run both cards at the same time do I see this periodically.  Here is the data plotted for the signal generator (AI4) about 108 seconds into the test attached in an Excel sheet (without the raw data because it was a rather large data file.

 

0 Kudos
Message 6 of 10
(4,655 Views)

I tried opening the spreadsheet file you posted and I wasn't seeing any data. Could you either repost it or ensure it has the correct information in it so I can get a better impression of what you are seeing?

Is this a recurring pulse that you are seeing, or is it a one shot-occurrence when you start the tasks?

Do you have another system that you could do the same test with these cards in? I'd like to see if the issue we are seeing is a computer specific, card specific, or code specific issue.

Timothy S.
Senior Technical Support Engineer
0 Kudos
Message 7 of 10
(4,638 Views)

I had only included a chart in the spread sheet.  The data files are in 12MB size so I didn't want to send something that big. I can supply it if you would like.

 

I have also opened up a Service Request on this topic (1656147).

 

I have repeated this signal using the AO on the same card, so it was not the signal generator.

 

I am in the midst of setting up another workstation to test this out on as well.

0 Kudos
Message 8 of 10
(4,635 Views)

It appears that I had a ground loop in the system.  The power supply ground was being tied to the AI ground and that was a problem.  I tied the unit signal ground to AI ground and that fixed it.  I am trying now without using the AI ground at all and just using the differential channels themselves.

 

Thought I'd let you know.  Thanks for the help.

 

Mike 

0 Kudos
Message 9 of 10
(4,616 Views)

Mike,

 

Thanks for the update on your system. I'll get in contact with the engineer on our side to confirm what the current status is. I'll try to ensure that once the service request is resolved that we can get a good solution to the issue posted here. For now, please continue to work with the engineer you are working with on the phone, as it sounds like the two of you are making some good progress. Thanks.

 

Timothy S.
Senior Technical Support Engineer
0 Kudos
Message 10 of 10
(4,610 Views)