Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Interfacing PXI-6551 with Agilent DSO5034A and Visual Basic 6.0

Hi All,

 

I have a PXI-6551 interfaced with Visual Basic 6.0.  In addition, the same computer is connected via GPIB to an Agilent DSO5034A - digital storage oscilloscope.

 

I have simultaneous write and read functions in the PXI-6551 that cause the DUT to generate waveforms displayed by the DSO5034A.

 

I have included the visa32.bas module supplied by Agilent in the same project as the PXI-6551 routines and also include the 'VISA Library" while configuring the project in VB.

 

However, after the very first write and read, if the oscilloscope is queried, the PXI-6551 stops reading.  Write functions (generation in 6551 jargon) continue to be successful.

 

What might be the problem?  Are there other NI drivers or modules that should be included?  Separating the 6551 and DSO5034A VB6 projects will probably work but is not an elegant solution.  Please advise.

 

Anand

0 Kudos
Message 1 of 8
(4,670 Views)

Hi Anand,

 

I am just guessing here, but there might be a conflict resolving the function names of the 2 drivers, I'm not falimiar with the driver for the scope, but there is a chance that both drivers have a function called "fetch" or "read"that if they are not quelified with something like "HSDIO_Fetch"  and "DSO50XX_Fetch" you may get strange behavior. You can check the VB wrappers for the drivers to check. If this is the case you'll need to modify the driver's wrapper to avoid conflicts.

 

I hope this helps, let me know if you have any further questions.

 

Juan Carlos

National Instruments

0 Kudos
Message 2 of 8
(4,658 Views)

Hi Juan,

 

Many thanks.  I also agree that there might be a driver conflict between 'niHSDIO.dll' and 'visa32.dll' viz-a-viz the wrappers HDSIO.bas supplied by NI and visa32.bas supplied by Agilent. 

 

Things work ok if the HSDIO functions and the DSO5034A functions are in separate projects - somewhat of a pain.  Let me know if NI has any other tips for me.  I will look into the VB wrapper and redefine the function call.

 

Anand

Message Edited by ajog on 08-14-2009 02:55 PM
0 Kudos
Message 3 of 8
(4,637 Views)

Anand,

 

I did some searching and found something interesting. The first VB wrapper that we created did not qualified the functions with the niHSDIO prefix; however when we revised the wrapper, we added the HSDIO prefix. Here's a link to the latest VB wrapper. If you developed your application originally with the old wrapper, you can consider porting to the new one with the decorated function names.

 

 

I hope this helps.

 

Juan Carlos

0 Kudos
Message 4 of 8
(4,632 Views)

Hello Juan Carlos,

 

Yes, I do observe that I have been using the older VB wrapper all along - most probably so as to be able to use the existing examples initially.  I will attempt the new VB wrapper.  Maybe it will also solve some of the strange issues I've been observing with triggering and logic levels.

 

E.g

1.  Unable to achieve triggered multi-record acquisition while simultaneously generating using scripts.

2.  Requiring the generation high logic level to be equal to the acquisition high logic level during simultanous acquisition generation.

3.  Unable to sometimes hardware trigger (PFI pins) generation tasks.

 

Lets see ...

 

Anand

Message Edited by ajog on 08-27-2009 05:35 PM
0 Kudos
Message 5 of 8
(4,534 Views)

Hi Juan Carlos,

 

I tried the new wrapper.  No luck.  This seems to be a driver/VISA32.bas module conflict for sure.  The VISA32.bas module I'm using has the following comment lines

 

' -------------------------------------------------------------------------
'  Distributed by VXIplug&play Systems Alliance
'  Do not modify the contents of this file.
' -------------------------------------------------------------------------
'  Title   : VISA32.BAS
'  Date    : 04-14-2006
'  Purpose : Include file for the VISA Library 4.0 spec
' -------------------------------------------------------------------------

 

Please advise.

 

Thanks.

 

Anand

 

Due to the file size limit I cannot attach the entire file.  How may I send it to you?

 

Thanks.

 

0 Kudos
Message 6 of 8
(4,295 Views)

Hi All,

 

Here's a workaround (pending a more robust solution).

 

At launch of the VB6 project the following steps are needed.

 

1.  Project -> References -> VISA COM 488.2 library

2.  Ensure modVISA.bas is NOT present in the module list.

3.  Write and read once to HSDIO just to make sure HSDIO is communicating.

4.  Add modVISA.bas to the module list by right clicking modules -> add -> existing - > modVISA.bas

5.  Verify that the same VB6 project is now able to access both HSDIO as well as all GPIB devices.

 

I wonder why it works when I try the above and not when modVISA.bas is already present in the module list at launch.

 

Anand

0 Kudos
Message 7 of 8
(4,252 Views)

Hi All,

 

Could this have something to do with my installation of the Agilent VISA drivers as the primary VISA after all the IVI (national instruments) drivers had been installed ?

 

Please advise.

 

Anand

0 Kudos
Message 8 of 8
(4,246 Views)