07-06-2005 11:16 AM
08-02-2005 08:45 AM
Hi,
there is - you have to interface the NIDAQMXBASE.dll. Actually it works in a way, but it seems that only the basic functions are supported. NI obviously has to release few versions of BASE driver before they get to the level of NIDAQ drivers (which are great by the way).
We have rewritten the header file for use in Delphi, if you are interested.
Jure
08-19-2005 04:47 AM
08-19-2005 05:21 AM
Hay
I didn't see your post before now. Well I written my own interface to the NIDAQMXBASE.dll.
But only partial ( just translated the parts I needed). But I you have a complete translation I be very grateful for it.
Regards Martin
08-22-2005 05:25 AM
08-28-2005 04:56 AM
03-18-2006 08:20 PM - edited 03-18-2006 08:20 PM
Hi,
I'm try use Delphi 6 and 7 with NI-DAQmx USB 6009.
But I have problems to pass a a reserved null parameter to a function call.
Can someone help me?
This is a exemple of I doing:
uses ...., NIDAQMXBASE;
....
function DAQmxWriteDigitalU8 (taskHandle: TASKHANDLE;
numSampsPerChan: INT32;
autoStart: BOOL32;
timeout: FLOAT64;
dataLayout: BOOL32;
writeArray: PUINT8;
var sampsPerChanWritten: INT32;
reserved: PBOOL32): INT32; stdcall; external 'nicaiu.dll' name 'DAQmxWriteDigitalU8';
.....
procedure TForm1.Button1Click(Sender: TObject);
var
error: longword;
taskHandle: TASKHANDLE;
numSampsPerChan: INT32;
autoStart: BOOL32;
timeout: FLOAT64;
dataLayout: BOOL32;
writeArray: UINT8;
sampsPerChanWritten: INT32;
reserved: BOOL32;
begin
writearray := $01;
try
error := DAQmxCreateTask('saida',taskHandle);
showmessage(inttostr(error));
error := DAQmxCreateDOChan(taskHandle,'Dev1/port0/line0','teste',DAQmx_Val_ChanForAllLines);
showmessage(inttostr(error));
error := DAQmxStartTask(taskHandle);
showmessage(inttostr(error));
error := DAQmxWriteDigitalU8(taskHandle, 1, 1, 10.0, DAQmx_Val_groupByChannel, @writearray, sampsPerChanWritten, @reserved);
edit1.text := inttostr(error);
except
showmessage('Nao deu certo!');
end;
end;
The three error messages are zero, but the last show the error code: ErrorCAPIReservedParamNotNULL = $FFFCF0D4; 4294766804;
Thanks
Message Edited by Josemar on 03-18-2006 08:23 PM
03-20-2006 02:33 AM
Hi,
To me it seems you just need to pass nil as the last parameter, not @reserved.
Gabriel
03-20-2006 08:58 PM
03-29-2006 09:06 AM