Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB class device is ambiguous

Hello,
 
I am using Visual Basic.Net to program a PXI system and trying to talk to GPIB instruments using the code, but when I dimension the variable as the Class Device, which contains the IEEE-4882 functionality, I get an error. The statement, taken from one of the .NET examples, reads  "Private GPIB Device as Device". The error reads - 'Device' is ambiguous, imported from the namespaces or types 'NationalInstruments.NI4882, NationalInstruments.DAQmx'.
 
If I remove the DAQmx information (Imports NationalInstruments.DAQmx), then the error goes away. Also, it seems I can communicate with my GPIB instruments when I go into MAX under the GPIB information. I can query the instruments under "Communicate with Instruments" and they return the proper information.
 
Is there something that I am missing? Any help would be appreciated.
 
Thanks,
Mike
0 Kudos
Message 1 of 2
(6,987 Views)
Hi Mike,

It seems that both DAQmx and NI 488.2 define something as a device, and they don't agree on that definition.  The best practice would probably be to have sepearte assemblies run the DAQmx and NI 488.2 code segments, and avoid having the conflict that way.  If there is a particulare reason that you need to have the code segment in the same assembly I am fairly certain if you explicity define the class path by placing.

Global.NationalInstruments.NI4882.Device

Instead of just device that you should be able to run the code.  I would recommend just removing Imports NationalInstruments.DAQmx and implementing it in a seperate piece of code.  Let me know if this is still causing trouble.

Have a great day,

Michael D
Applications Engineering
National Instruments
0 Kudos
Message 2 of 2
(6,974 Views)