Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use USB 6008 with Borland C++ Builder v6.0 ?

Hi

Earlier I have used the Ni DAQmx driver to  programme my USb 6008 device.  Now I would like to use Borland Builder C++ v6.0 to programme my device. Is this possbile and if it is what should I download/print to get myself straded with the programming ? (drivers, manuals etc)

Regards
Daniel Holmqvist
0 Kudos
Message 1 of 18
(9,479 Views)
Hi Daniel,
 
The USB 6008 device was recently added to NI-DAQmx support in version 7.5.  However, NI-DAQmx isn't officially supported in Borland Builder C++ v6.0.  Some customers have had moderate to good success using our CVI import library for Borland to compile DAQmx code.
 
You can download it here:
 
 
You MUST have NI-DAQmx 7.5 installed on your machine and use the version 7.5 library from the KB.
 
Please note that I just updated this KB to include the NI-DAQmx 7.5 library.  It may take a day before the change propogates to the web.
 
Good luck,
Sal
0 Kudos
Message 2 of 18
(9,470 Views)
Hi

I tried to use the lib in the KB but I keep getting the same error message saying(see attached picture):

Error: Unresolved external "SAQmxStartTask" referenced from c:\program files\borland\cbuilder6\bin\daqmxao.obj

Where daqmxao is the name of my c source code. Now I'm really a beginner when it comes to Borland and I my guess is that this has something to do with the Lib file that I oerhaps doesn't use proberly. Can you help my explain what I'm doing wrong or what the error message means?

Regards
Daniel


0 Kudos
Message 3 of 18
(9,458 Views)
Hi again

Another question is which C++ enviroment you  would suggest to use when programming my DAQmx  application in C code ?

Regards
Daniel
0 Kudos
Message 4 of 18
(9,456 Views)
Hi Daniel,
 
We suggest that you use Microsoft Visual Studio 6 for C programming.  We also support Microsoft Visual Studio 2003 .NET for C#.NET and VB.NET programming.  These are the languages that are most throroughly tested.  Our DAQmx C API should work with most any ANSI C compiler, however customers usually have the best luck with the Microsoft development programs.
 
-Sal
0 Kudos
Message 5 of 18
(9,451 Views)
Hi again

Ok I will take that under consideration. o you have any suggestions on have I could solve my problem :

I tried to use the lib in the KB but I keep getting the same error message saying(see attached picture):

Error: Unresolved external "SAQmxStartTask" referenced from c:\program files\borland\cbuilder6\bin\daqmxao.obj

Where daqmxao is the name of my c source code. Now I'm really a beginner when it comes to Borland and I my guess is that this has something to do with the Lib file that I oerhaps doesn't use proberly. Can you help my explain what I'm doing wrong or what the error message means?

Regards
Daniel
0 Kudos
Message 6 of 18
(9,444 Views)

Hi,

Assuming you are using NI-DAQmx 7.5 and the DAQmx 7.5 library from the KB, you should be able to compile your code.  Those "unresloved external" errors typically mean that your compiler is not finding the library or header file.  I would suggest putting an include statement at the top of your code to include the nidaqmx.h file (located in C:\Program Files\National Instruments\NI-DAQ\DAQmx ANSI C Dev\include).  And you will also have to tell the compiler where the library file (NIDAQmx.lib) is.  I'm not that familiar with Borland so you may have better luck getting that question answered on a Borland forum. 

Good luck,

Sal

0 Kudos
Message 7 of 18
(9,434 Views)
Error: Unresolved external "SAQmxStartTask" referenced from c:\program files\borland\cbuilder6\bin\daqmxao.obj



Maybe it's just a type, but since you posted the same thing twice, maybe it's your mistake: change your call to "SAQmxStartTask" to a call to "DAQmxStartTask". Note that first letter...
John Weeks

WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
www.wavemetrics.com
0 Kudos
Message 8 of 18
(9,432 Views)
Hi

ahh sorry it's just a type. When I compile my code, which is the example that comes with NI DAQmx 7.5 called VoltUpdate (AO), I use the header file and the lib file from the KB and the stdio.h, and they are all placed in the same folder on my hardrive C:\borland. To me this is all the files I need to compile this program, or am I wrong ?. I then use Borland C++ Builder in order to compile the file and the error message above is stated for everyone of the Mx functions I call. And that is with a D in the beginning of DAQmx not a S, my fault sorry.

Anyone who have any suggestion in how to solve my problem or any other simple  compiler I can use ?  tried to use the  Microsoft Visual C++ Toolkit 2003 but generated exactly the same error message as I got from Borland .....

Heeelp ! Smiley Sad

Regards
Daniel
0 Kudos
Message 9 of 18
(9,423 Views)
Hi again 

I have finally solved my problem with the compilation and everything works great right now. Thanks for the help along the way !

Regards
Daniel
0 Kudos
Message 10 of 18
(9,222 Views)