LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I access the ver 1.1 USB-8451 API functions from a .dll?

I have created a dll using vendor provided C-source code, but the source only provides stub functions for I2C read and I2C write.  The vendor insists I use their source to create a dll to control their device.  I think I've figured out how to export the dll functions and how to use the Call Library Function VI interface the dll to my labview test program.
 
I'd like to use the USB-8451 API functions listed in the new ver 1.1 USB-8451 API to complete the vendor supplied I2C read and I2C write stub functions and route the I2C data between the dll and the vendor's IC thru the USB-8451 hardware. I'm not sure how to make the USB-8451 API functions available to the vendor supplied dll. 
 
First, is this possible, and second, do examples exist that show how to set up complier directives or a Visual C++.net project to allow the the vendor supplied dll to access the ver 1.1 USB-8451 API functions?
0 Kudos
Message 1 of 8
(4,263 Views)
This is not possible as you can use NI drivers with NI instruments only i.e you will have to purchase a USB-8451 to be able to use NI API
Regards
 
Arjun K
National Instruments
Applications Engineer
0 Kudos
Message 2 of 8
(4,242 Views)
I have a USB-8451. I would like to access the USB-8451 API functions from my C program, but I can't find any reference in the documentation for the new USB-8451 API for a USB-8451 dll or other USB-8451 library that I can link to from my C code. Does such a dll or library exist?
 
Why would NI provide all the documentation for the USB-8451 API function names and parameters if they didn't want us accessing the functions from our own code?
0 Kudos
Message 3 of 8
(4,235 Views)

Hi,

Once you install the NI-845x driver, you can find the dll called ni845x.dll in the C:\Windows\System32 folder in Windows.  Version 1.1 of the NI-845x driver introduced support for LabWindows/CVI 7.1 or later and for Microsoft Visual C/C++ 6.0. Please make sure that you select the LabWindows/CVI support during installation. Sometimes they are tricky to find!  Anyway, yes, the ni845x.lib contains calls to the functions in the ni845x.dll.  The ni845x.dll contains all the functions for the 845x device.  Once you install the drivers, you can find the 845x Software User Manual at Start>>All Programs>>National Instruments>>NI-845x.  This lists all the functions and detailed descriptions of what they do.
 
Hope this helps and please feel free to post any comments you may have.
 
National Instruments
Applications Engineer
0 Kudos
Message 4 of 8
(4,219 Views)

Arjun K,

Found the ni845x.dll, with your help...thanks.

Your answer does raise another question for me.  I have the Labview PDS version 8.2.1.  I don't have Labwindows/CVI, but ni845x.dll appears to have installed anyway.  I have been using VC++.net 2003 to  build my device dll from the vendor-provided source.  Do I need either Labwindows/CVI or VC++ 6.0 to build the device dll and access the ni845x.dll functions?

Thanks again.

0 Kudos
Message 5 of 8
(4,212 Views)

Hi,

That is correct, you will need either of the two programs.

Thanks

Arjun K

National Instruments
Applications Engineer
0 Kudos
Message 6 of 8
(4,199 Views)

Dear All,

        I am trying to use USB-8451 I2C functions via MAX (Measurement & Automation Explorer) VISA Test Panel. Does anyone of you have experience ? How can I access USB-8451 I2C functions via MAX (Measurement & Automation Explorer) VISA Test Panel ? Your help is highly apprecaited.

        By the way, I tried to use compiled function (*.dll) to control USB-8451. I followed the examples to execute I2Cwrite function and I got correct return value (0). Why can't I see any signals coming out from SDA or SCL port using a oscilloscope ? Is there anything wrong ? How to access the USB-8451 I2C functions correctly ? Thank you very much.

0 Kudos
Message 7 of 8
(3,998 Views)

Duplicate post.

Fourth time you've asked the same question.Smiley Mad

0 Kudos
Message 8 of 8
(3,994 Views)