‎07-27-2005 11:31 AM
Jens,
Finally it works! I tested with MatLab 7.0 and now I can use all these call functions. yupeee!
There is one last thing I cant figure out:
[a,b,c,d] = calllib('nicaiu','DAQmxCreateDOChan',get(taskh1,'Value'),...
'Dev1/port0','',DAQmx_Val_ChanForAllLines)
gives
??? Error using ==> calllib
No method with matching signature.
Error in ==> DAQmx at 58
[a,b,c,d] = calllib('nicaiu','DAQmxCreateDOChan',get(taskh1,'Value'),...
So analog in works, but not the digital out . I am using the PCI-6143 card with 8AI and DIO.
Ever tried to set tasks up in MAX and then call them via Matlab?
Regards
Wendelin
‎07-27-2005 11:53 AM
‎07-27-2005 01:30 PM
Hi Jens,
Ok, I am probably one of the worst Matlab programmers:
[a,b,c,d] = calllib('nicaiu','DAQmxCreateDOChan',get(taskh1,'Value'),...
'Dev1/port0','',DAQmx_Val_ChanForAllLine
[a,b,c,d] were the same types as already defined above by other function calls, this gave a mismatch, as I didnt clear them .
By any chance one last question:
reserved=libpointer('uint32Ptr',[]);
digidata=uint8([0,1,0,1,1,1,1,1]);
write = libpointer('uint8Ptr',digidata);
[aDset,bDset,cDset,dDset] = calllib('nicaiu','DAQmxWriteDigitalLines',get(taskh1,'Value'),...
uint32(1),uint32(1),double(10.0),DAQmx_Val_GroupByChannel,write,reserved,reserved)
%[int32, uint8Ptr, int32Ptr, uint32Ptr] DAQmxWriteDigitalLines(uint32, int32, uint32, double, uint32, uint8Ptr, int32Ptr, uint32Ptr)
% int32 DAQmxWriteDigitalLines (TaskHandle taskHandle, int32 numSampsPerChan, bool32 autoStart, float64 timeout, bool32 dataLayout,
% uInt8 writeArray[], int32 *sampsPerChanWritten, bool32 *reserved);
gives me
??? Error using ==> calllib
Pointer types must match data type.
Error in ==> DAQmx at 99
[aDset,bDset,cDset,dDset] = calllib('nicaiu','DAQmxWriteDigitalLines',get(taskh1,'Value'),...
I had thought I had figured that out...but...
Any hint!
Thx again and sorry for bothering so often....
Wendelin
‎07-29-2005 05:59 PM
‎07-29-2005 06:44 PM
‎10-25-2006 08:59 AM
Hi,
is it possible with R-serie in Matlab?
thanks
befaiz
‎10-25-2006 09:39 AM
‎10-25-2006 09:54 AM
‎10-25-2006 01:53 PM
‎10-26-2006 06:02 AM
Hi StimOr,