Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Noise from adjacent wireless nic card causing problems for 6602 counter card

I have a problem when I try running a program that I wrote in C#. I have 4 channels setup for reading encoders. Three of the channels are using DMA and one channel is setup for Interrupt. The problem is when I run the software, I always get error -200141, Data was overwritten before it could be read. I have tried different ways of reading this, but always get this error on the channel that uses interrupts only. Software works fine when using the DMA channels only.

 

During the troubleshooting, I decided to disable the driver of the wireless n network card. After doing that, the software was able to run without any problems, but would fail as soon as I re-enabled the NIC card. My guess is noise is causing the buffer to fill up before I read the data. Does anybody have any suggestions on filtering this noise besides just turning off the device? I setup the channel like this:

 

myEncoderChannel5 = new Task();

myEncoderChannel5.CIChannels.CreateAngularEncoderChannel(deviceNumFmt + "ctr5", "Channel 5", CIEncoderDecodingType.X4,          false, 0, CIEncoderZIndexPhase.AHighBHigh, 1, 0, CIAngularEncoderUnits.Ticks);                myEncoderChannel5.Timing.ConfigureSampleClock(deviceNumFmt + "RTSI0", sampleRate, SampleClockActiveEdge.Rising,

SampleQuantityMode.FiniteSamples, num_pts);

myEncoderChannel5.CIChannels.All.DataTransferMechanism = CIDataTransferMechanism.Interrupts;

 

Thanks!

0 Kudos
Message 1 of 5
(3,111 Views)

Hello sledstorn25,

 

What's probably happening is that traffic over the Wireless N network card is taking up the resources needed to keep up with the task set up to Interrupts.  DMA doesn't have the same requirements for constant attention that Iterrupts do, so they aren't affected.  However, to keep up with a higher rate Interrupt task, the system will need to devote considerable CPU and PCI bus resources to that operation.  I'd wager that the Wireless N card either using too much of the CPU or of the PCI bus resources.

 

Unfortuantly, there isn't really a way to fix that in software, short of reducing the rate that the task is running.

 

Regards,

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 2 of 5
(3,108 Views)

Seth,

 

Thanks for the reply. Do you think it would matter what kind of processor the computer has? This is a brand new i7. I would think that the computer is plenty fast to handle both, but maybe not.

0 Kudos
Message 3 of 5
(3,104 Views)

It's unlike that the CPU itself is the limitaiton, but rather the PCI controller or something of that nature.  Depending on how the the Wireless N card is handled, it may just be that the PCI controller or CPU is spending a lot of time switching between the two.  If I had to pick a bottleneck, I'd bet it's something with the motherboard.  Either shared PCI lanes, PCI controller, a PCI-to-PCIe bridge, or something like that.

 

One thing that'd probably help is a USB wireless card instead of PCI.

Seth B.
Principal Test Engineer | National Instruments
Certified LabVIEW Architect
Certified TestStand Architect
0 Kudos
Message 4 of 5
(3,101 Views)

Thanks!

0 Kudos
Message 5 of 5
(3,099 Views)