Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

PCI-GPIB Performance Slow on Vista

Greetings,

I am working on porting an old Pascal program to Win32 C++ (the application reads data from a digital multimeter and writes it to disk.) I am hitting some very surprising performance issues in this process. On the old DOS box, using the Pascal application, I collected 9000 samples from the DMM in approximately 3.5 minutes. Using the exact same SCPI commands (":READ?" or ":MEAS:VOLT:DC?") in Vista and C++ it takes me approximately 51 minutes to gather the same 9000 data points!

I have an NI PCI-GPIB card. I have connected an HP/Agilent 34401A DMM to this card. Originally I suspected that the performance issues were due to the third-party GPIB library I was using to interface with the card. However: I tested the performance of the card using the Interactive Control tool to perform ibwrt and ibrd commands, storing 100 samples on the DMM and retrieving them via Interactive Control takes 34 seconds. The exact amount of time required for the code I wrote to collect 100 samples. This leads me to believe that the performance bottleneck is either in the NI PCI-GPIB card or in the drivers I am using. Are there any known performance issues with either of these? Especially considering I am using Vista?

Let me know if you require any further information, I'll be happy to provide whatever I can.

Thanks in advance for any assistance!

Warm Regards,
-Josiah

0 Kudos
Message 1 of 7
(3,961 Views)
Howdy josiah,

Just out of curiosity, what version of NI-488.2 do you have installed on your Vista machine? Version 2.5, available here, supports Vista. I could not find errata involving the 34401A DMM with older PCI-GPIB cards in DOS or the 34401A DMM under Vista.

Let's try first verifying the NI-488.2 driver version you have installed and then performing an NI-Spy capture log of the communication to your DMM through GPIB messages. Perhaps we can review the NI-Spy capture log and see what the hold-up is.


Message Edited by pBerg on 03-19-2008 03:20 PM
Warm regards,

pBerg
0 Kudos
Message 2 of 7
(3,926 Views)
Greetings pBerg,
 
Thanks for your time and your response!
 
My NI-488.2 driver is listed as version 2.52.
 
Attached you will find a SPY capture made during the use of the Interactive Control tool to pull 100 values from the DMM.
 
Warm Regards,
-Josiah
0 Kudos
Message 3 of 7
(3,904 Views)
Howdy josiah,

Does each ibrd always take around 15 seconds? Judging from the short NI Spy log, it looks like both ibrd's timed out at 15-16sec, which indicates that the returned value is either (a) shorter than expected or (b) not terminated properly. Try decreasing the timeout period and/or adjusting the EOS. You can refer to the NI-488.2 help for documentation on the idev() function, adjusting the timeout value, and Terminating Data Transfers.


Message Edited by pBerg on 03-21-2008 11:02 AM
Warm regards,

pBerg
0 Kudos
Message 4 of 7
(3,886 Views)
Hello again pBerg,

Thanks once again for your reply.

I had been setting my timeout to 13 (10 seconds) - any decrease in this value results in "err timo cmpl" during my ibrd - the ibrd cannot pull all of the data from the device in 3 seconds.

Any suggestions? I'm working on a solution that does not try to pull the data from so many reads at one time, but the overhead of ibrd, ibwrt, ibrd, ibwrt, etc. seems to slow the process equally.

Thanks!

Warm regards,
-Josiah
0 Kudos
Message 5 of 7
(3,851 Views)
Howdy Josiah,

In addition to your idea, maybe reverting to an older version of NI-488.2, the GPIB driver, will yield better performance. You mention using the PCI-GPIB card in a DOS environment, which makes me assume that the card is a bit older. I could not find any reported cases where an older rev PCI-GPIB card performs differently on a newer version of the driver, but it might be worth a shot.

Another thing you might want to do is quadruple check to make sure the PCI-GPIB settings under your Vista OS perfectly match what they were under DOS (EOI, EOS, Bus Timing, etc). Any discrepancy in GPIB settings could cause problems. You will want to verify these PCI-GPIB settings both in MAX (Start»Programs»National Instruments»Measurement & Automation) and the GPIB Configuration Utility (\National Instruments\NI-488.2\Bin\GpibConf.exe).
Warm regards,

pBerg
0 Kudos
Message 6 of 7
(3,833 Views)
Josiah,

Err, scratch the idea of reverting to an older version of NI-488.2. Only version 2.5 and higher are supported under Vista.

I do, though, feel confident that verifying the port settings in MAX will yield an improvement in performance. Especially make sure that the bus timing setting is as fast as possible.
Warm regards,

pBerg
0 Kudos
Message 7 of 7
(3,808 Views)