12-22-2009 08:11 AM
Hello,
I developed DAQ software using Delphi 6, but trying to use one and the same project with Delphi 2010 get Error calling the very first function call
DAQmxRestDevice(PChar('DEV1')) ; --> results error -20020 "unknown device"
I started "NI Spy" and see calling this function in Delphi 2010, just the the first char of the string is passed like " DAQmxRestDevice('D'))". Both Applications use the same file "nidaqmx.pas" which calls "nicaiu.dll". I checked also are compiler options but find no reason why it works with Delphi 6 and not by Delphi 2010.
Any idea is greatly welcome
hassan
12-23-2009 02:47 AM
Hi Hassan,
unfortunately the actual versions of the DAQmx driver software do not support Delphi anymore. Nevertheless there's a NI-DAQmx C import library for Borland, please see this link
Regards,
Bernd
12-23-2009 08:34 AM
The found the following convertion which helped:
DAQmxRestDevice(PChar(PAnsiChar(AnsiString('DEV1'))))
i used just "nidaqmx.pas".
Regards,
Hassan
01-28-2010 11:32 PM
04-09-2017 09:46 AM
Where do you find nidaqmx.pas ?
I have application in Delphi XE which using different ADC devices (not NI) to make analog mesurements, and now I need to extend functionality by adding cDAQ9178 with 9203 module. Broadly speaking, i set up sampling frequency, measuring time and read channels data, thats all. What is the simplest method to do it in Delphi?
I have read suggested idea with NET-assembly but im not familiar with Visual studio and NET, and i Believe there should be easy solution, for using just couple functions (configure channels and read).