11-15-2011 08:55 AM
I just purchased a few USB-6501's with the intention of interfacing with them using Delphi (first choice) or Visual Studio 2010 using C++ (second choice). Before ordering I had seen this forum and some examples, so I thought it would be easy to get started.
I received the devices yesterday, and installed the software on the CD, but after doing so, there are no examples to be found in my installation (Windows 7 x64), and I can't find any dll on my system that starts with "nidaq". (At least one of the C# examples I've found on this site imports "nidaqxmbase.dll", but I can't find that file anywhere in my installation.)
I found one page here that has some Delphi attachments but none of them work -- they're full of <Not Supported> tags, as if they were edited at some point after being posted.
Can one of you Knights of NI come to my rescue? I hope I don't have to return these devices, I had so much hope for them.
ted
11-16-2011
01:21 PM
- last edited on
04-23-2025
12:46 PM
by
Content Cleaner
Regarding Delphi, although National Instruments does not officially support Delphi with the NI-DAQmx driver, you can refer to the following links for information on how to call NI-DAQmx from Delphi:
- How Can I Use The NI-DAQmx ANSI C Function Library With Borland C and Delphi?
Regarding C++, since this is supported there are more resources available, you can find examples in the following default directory location: C:\Documents and Settings\All Users\Documents\National Instruments\NI-DAQ\Examples\DAQmx ANSI C.These examples are available by installing the NI-DAQmx driver. For more reference please visit the following link:
- Using NI-DAQmx in Text Based Programming Environments
I hope this can help
11-18-2011
09:41 AM
- last edited on
04-23-2025
12:47 PM
by
Content Cleaner
Thanks Alajendro.
I got my project working (in Delphi 7.0), and I was going to post here a summary of what I did to make it work, however, the original page on ni.com that had the Delphi code that I downloaded has been edited, and the materials are no longer there!
I'm referring to this page, edited on 11/16/2011: http://digital.ni.com/public.nsf/allkb/A6715AA42405ACD786256F0A00633B8F
I'm a little distressed that I can't find that code any longer, but that's another matter.
In short, I had to:
1) Uninstall driver version 9.2.5, install driver version 8.6, and grab the C library therefrom and save it off, then re-install 9.2.5
2) Edit the Delphi code (nidaqmx.pas and NIDAQmxCAPI_TLB.pas) from the now-missing link, replacing occurences of P<Not Supported> with properly defined types, e.g. I added "type bool32 = longword;" and replaced "P<Not Supported>" with "bool32" in all the places where the C API expects a "boolean32"
The resulting nidaqmx.pas compiles and works and I can use it to interface with my USB-6501.
(Except that I can't use DAQmxCreateDOChan() to create single-line channels ... I get no error, but it just doesn't work ... I have to create one channel for all lines on the port and do a lot of bit-twiddling in my code.)
-ted