02-12-2009 02:48 PM
Regards,
Dan King
02-13-2009 04:23 PM
OK, now I've got it REALLY almost working. I'm using burst mode.
I'm trying to transmit a 404-sample block using WriteMultiSamplePort(), followed by WaitUntilDone() on port 1. The samples are 16-bits, sent from port 1 to port 2. ACK1 (pin 3) is connected to REQ1 (pin 2). I set up the frequency to 1.5 MHz, which created a PCLK1 period of 700 ns.
Port 2 is set up as a change detection read beforehand, and one of the bits from port 1 is used to clock in data from a unit under test, so the sequence of statements is:
ReaderAsyncResult = TheReader.BeginReadMultiSamplePortUInt16(69, null, null);
TheWriter.WriteMultiSamplePort(true, TxBuff); // Ushort buffer.
//***** This statement times out.
TheWriteTask.WaitUntilDone(TimeSpan.FromSeconds(WayMoreSecondsThanAreNecessary));
TheWriteTask.Stop();
while(!ReaderAsyncResult.IsCompleted)
{
System.Threading.Thread.Sleep(1);
}
RxBuff = TheReader.EndReadMultiSamplePortUInt16(ReaderAsyncResult);
I'm testing this on two systems.
System 1 (desktop).
This system has a 6533 and a 6534. Regardless of which card I use, this works. ACK1 is asserted for 282.8 usec, i.e. 404 sample times.
System 2 (laptop).
This system has a 6533. ACK1 is asserted for 282.1 usec, i.e. 403 sample times. WaitUntilDone times out and throws an exception (-200560).
This 6533 was tested in the desktop system, where it worked correctly.
If I test the 6534 in the laptop, it works correctly, sort of. For some reason, port 2 sometimes doesn't see all the transitions from port 1, but that's another problem for another day; I want to get the 6533 working in the laptop.
The desktop has DAQmx 8.6.0f12.
The laptop has DAQmx 8.6.0f5.
Both are running Windows XP SP2.
Thanks.
02-16-2009 11:42 AM - edited 02-16-2009 11:43 AM
Regards,
Dan King
02-16-2009 02:56 PM
The 6533 is connected to the laptop using a PCI expansion chassis that is an available accessory for the laptop. I just wrote a test program that does nothing but configures the write task and does a write. This is in C#, so I don't have any actual VIs. Nonetheless, I added a line to get the available samples. So now the code is:
TheWriter.WriteMultiSamplePort(true, TxBuff);
AvailableSamples = TheWriteTask.Stream.AvailableSamplesPerChannel;
TheWriteTask.WaitUntilDone(TimeSpan.FromSeconds(WayMoreSecondsThanAreNecessary));
AvailableSamples is always 1, regardless of whether I test it on the desktop, where it works, or the laptop, where it fails.
02-16-2009 03:40 PM
One more thing: my test program lets me set the speed and size of the write. If the size is over 19 samples, the write fails regardless of the rate- even if I set it to 1000 samples/second.
If I configure the task using ConfigureSampleClock(), the write fails with error -200621 (Onboard device memory underflow).
If I configure the task using ConfigureHandshakingBurstExportClock(), the write fails with error -200560 (Wait Until Done did not indicate that the task was done within the specified timeout).
The failures only occur on the laptop. On the desktop computer, there are no failures except an underflow at high rates when using ConfigureSampleClock(). I have eliminated the breakout box and cable as a source of the problem by testing them on the desktop computer.
Remember that the 6533 card that is failing in the laptop worked fine in the desktop. Self-test of the card under MAX in the laptop also works.
02-17-2009 10:55 AM
Regards,
Dan King
02-17-2009 11:35 AM
The breakout box is the SCB-68, complete with the official National Instruments cable to connect it to the 6533.
The laptop is a Promark A770 with a 1.6 MHz Pentium M, running Windows XP SP2. The PCI expansion unit is an available option, and is attached to the underside of the laptop.
I assume the expansion unit does support DMA, because the card actually outputs all the data, except the 17th sample (see below). If DMA weren't supported, it wouldn't do this.
I just did some more testing, and here's what I found out:
02-18-2009 04:54 PM
Regards,
Dan King
02-19-2009 08:22 AM
I'm now running my test utility on a Dell Precision 490 desktop with a PCI-6533 card.
I am writing a buffer of 800,000 16-bit samples using burst handshake mode.
The sample rate is 1.5 MS/sec (actually a 700ns sample time).
ACK1 is looped back to REQ1 in an SCB-68.
Usually this completes within a second, but sometimes WaitUntilDone() times out (I gave it about 7 seconds), and I get a status code of -200560.
I just did 32 writes with 6 failures.
02-20-2009 04:16 PM - edited 02-20-2009 04:16 PM
Hello Ron,
I would like you to try a couple of things.
We need to do the second step to try to remove the error condition. Once we get the error condition taken care of we can work backwards to get your application working.
Regards,
Dan King