Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Using DLL for product NI USB - 6501 in VB

HI,

 

I'm developing an application in VB6 to control a NI USb - 6501 device. I follow all example that I found in  the NI website but with no success.

My problem is that I can't use a dll to reference in VB6.

I had follow the steps and example in https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019MiWSAU&l=en-US and another example that show how I must proceed to create a wrap dll. My problem always is the same, i get error that show to me that the dll can't be found. I already copy to the system32 folder...

 

Attached, the last example that I follow. I appreciate if somebody could help me.

 

0 Kudos
Message 1 of 13
(8,034 Views)

Hello,

 

      When you install NI-DAQmx driver you place a checkmark to install VB support? If not, you will need run NI-DAQmx installer and install VB support.

 

Best regards,

 

Abel Souza

Applications Engineering

NI Brazil

Abel Souza
Engenheiro Eletrônico
LabVIEW User since 8.5
0 Kudos
Message 2 of 13
(8,024 Views)

Hi Abel,

 

Tks for support me. Yes, I enabled the Vb Support. I Can't understand why the program can't find the dll, I know that all these DLL are based in C, and I can't registry then use the command "regvsvr32". Did you check the source code attached, maybe you can take a look in .bas file, that make the reference to the dll.

 

Best Regards,

 

0 Kudos
Message 3 of 13
(8,020 Views)

I saw you are using DAQmx Base, but to use your board with VB you need use NI-DAQmx, they are differnt drivers.

 

https://www.ni.com/en/support/downloads/drivers/download.ni-daq-mx.html

 

Regards,

 

Abel Souza

Abel Souza
Engenheiro Eletrônico
LabVIEW User since 8.5
0 Kudos
Message 4 of 13
(8,018 Views)

Hi Abel,

 

Tjs again for support me. I Download the program and installed in my PC. But, I'm still getting the same error.... "File not found" see picture attached. 

Can you help pls?

 

 

0 Kudos
Message 5 of 13
(8,004 Views)

Try rebooting your PC after a software install.

 

Also do a search for that file.

0 Kudos
Message 6 of 13
(7,997 Views)

Hi Abel,

 

Yeah, I already reboot my PC ... I can see the file in my system32 folder. 

Attached the picture from  my system32 and the dll there.

0 Kudos
Message 7 of 13
(7,991 Views)

I saw in your picture the DLL is from DAQmxBase and not from DAQmx. I suspect you are using a function from DAQmxBAse in place of functions DAQmx.

I suggest you go to Start>>All Programs>>National Instruments>>NI-DAQ>>Text Language Support and run a VB code example and check if you receive the same error.

 

Best regards,

 

Abel Souza

Abel Souza
Engenheiro Eletrônico
LabVIEW User since 8.5
0 Kudos
Message 8 of 13
(7,985 Views)

Hi Abel,

 

I'd like to use the dll for Measurement Studio, I think this is similar than use an API. And in the example just have using anoter dll "Nidaq32.dll".

 

I want to develop my application following the example: http://www.ni.com/swf/demos/us/mstudio/vb6daq/default.htm 

 

But, as I describbed my program report that can't find de DLL. If you had some example, I appreciate.

 

Best Regards

0 Kudos
Message 9 of 13
(7,979 Views)

What is your measurement studio version?

Abel Souza
Engenheiro Eletrônico
LabVIEW User since 8.5
0 Kudos
Message 10 of 13
(7,972 Views)