Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Control of Infiniium 54833D using VC & PCI-GPIB

We interfaced the above Agilent Oscilloscope to a PC through the specified GPIB Card. A simple program is written in VC++ to capture the Waverform parameters
measured in the Scope to the PC. We tried to measure the Frequency of a signal from the scope to a PC and it takes approx 16 to 17 sec for taking one frequency measurement correctly. However if we use the Labview Software it takes only mS to capture the same measurement. Due to the constraint of using a general VC++ coding, we have to use the VC++ software only. Hence please advise how the capture time can be brought down to mS using VC++ software coding also.
The codes we have used is attached herewith as 3 files.

Software Details: Visual C++
version N/A
NI Hardware : GPIB/IEEE 488 device PCI-GPIB+
Driver Version : 1.40
Operating System: Windows NT
Download All
0 Kudos
Message 1 of 3
(3,407 Views)
A performance degradation of 500000% is pretty surprising. In general, the C API for GPIB is at least as performant as the LabVIEW API. From the code you posted, I don't think we can pinpoint what's slowing down your system. It's not clear from the code what you're actually using to communicate with the devices - I'm assuming it's the NI-488.2 C API wrapped up in your custom GPIB class. It's possible that the bottleneck is in the implementation of that class. I noticed that the methods you're using to write and read all take a deviceId as an argument - where is that value (32256) coming from, and how is it being used inside those methods? Does the LabVIEW code to which you're comparing this also do all of the test result validation and logging that this code a
ppears to be doing?
0 Kudos
Message 2 of 3
(3,407 Views)
The problem got resolved when we changed the mode of reading from ASCII format to word format,
0 Kudos
Message 3 of 3
(3,407 Views)