Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Using USB-8451 using VISA (.NET) and MS/VB2005

I am familiar with communicating with GPIB instruments using MS/VB2005 and NI VISA (.NET). I recently purchased a USB-8451. MAX can see the device. I can't figure out how to communicate with it; what the protocols are. I looked at the 8451 Doc's, VISA Doc's, etc. All of the examples I can find talk about using LabView. Any examples using native VISA (.NET) calls to a USB device would be VERY helpful.
 
Regards, Cernek
0 Kudos
Message 1 of 11
(5,550 Views)
Cernek,

Currently there is no .NET support for NI-845x, though you can use Microsoft C/C++ in Visual Studio to get in the back door of a .NET project.  VISA, on the other hand, is available in .NET so if you may attempt to make low level VISA calls.

You can find the VISA examples for Windows 2000/XP here:



And for Vista:

-Marshall R
0 Kudos
Message 2 of 11
(5,533 Views)

Hi Marshall, Thank You.

I can do the VISA .Net stuff from MS/VB2005 without difficulties, as witnessed by the attachment.

Note that one of the devices is "USB0::". How do I communicate with this device?

Regards.

 

0 Kudos
Message 3 of 11
(5,524 Views)
Cernek,

You can program the NI-841x device in Visual Studio in the C/C++ non-managed code environment. You can then either, have an un-managed project and have all your code in there. The other option it to create a DLL from this code and call it in your .NET project. You could also create this DLL in CVI/LabWindows or LabVIEW.


-Marshall R
0 Kudos
Message 4 of 11
(5,503 Views)

Just to be clear, What I am hearing is that the ONLY ways to talk to the USB-8451 are 1) Use LabView on top of VISA or 2) use the libraries (*.lib, *.dll) that come on the accompanying CD. Specifically, I CANNOT use VISA .Net, directly, to talk to it.

Since LabView can talk to it, through VISA, why can't I be given the low-level protocols so that I can talk to it directly through VISA myself? Or, does LabView NOT use VISA to talk to it?

Regards, EdC

0 Kudos
Message 5 of 11
(5,501 Views)
Pardon me if I was not clear earlier.

NI-845x supports development in:
1) LabVIEW
2) LabWindows\CVI
3)Microsoft C\C++

Though it does utilize VISA, we do not publish what those commands are because the driver is highly complex.

The best option for you seems to be to develop in one of the other development environments, and create a DLL to include in your .NET project. You can call the ni845x.dll C dll from inside .NET but it may not be trivial.
-Marshall R
0 Kudos
Message 6 of 11
(5,476 Views)

Hi,

 

Has this situation changed since 2008?

Like the original poster, I'm also interested in using .Net with VISA and the USB-8451.

 

Regards,

Jan

 

0 Kudos
Message 7 of 11
(4,399 Views)

Hi Jan,

 

The newest driver for the USB-8451 is NI-845x 1.1.4. Looking at the readme, the driver does not natively support any .NET programming languages, but supports up to Visual C++ 6.

 

The NI-845x Software User Manual has sections dedicated to both how to communicate with the 8451 from LabVIEW as well as how to do so from C.

 

 

Eric S.
AE Specialist | Global Support
National Instruments
0 Kudos
Message 8 of 11
(4,377 Views)

Hi,

 

has this been updated since 2010? I've downloaded version 16 of the drivers.

 

What's the best way to talk to the 8451 from c#?

 

Rich

0 Kudos
Message 9 of 11
(3,286 Views)

Hi Rich,

 

The supported environments are the same in version 16 as in this post. Thus, the best way to communicate with the 8451 from C# will still be with one of the methods mentioned above, either by using the C DLL, or by developing a DLL using one of the supported environments.

 

Regards,

Regards,

Michael Whitten
Senior RF Applications Engineer
0 Kudos
Message 10 of 11
(3,270 Views)