03-22-2012 06:27 AM
I'm heavily stuck to a difficult problem:
Currently I work on a project that is realized in Matlab. So I have Matlabcode that needs to access a NI acquisition card. This is done via MatlabExecutable (short: mex). This just creates a dll file from a cpp file:
Matlab code -> C file-> NI card.
The problem is that normally - in a single c file - you create a task, configure it, start acquisition, check for errors, exiting c code.
BUT, I have following situation:
Matlab -> create_task (configure, etc) -> NI
Matlab -> start_acquisition -> NI
Matlab -> cleanup -> NI
So I need to get the taskHandle from each step. And here I'm stucked. It doesnt work.
Matlab -> create task -> NI: everthing is fine I got all parameters created and I receive the task Handle back to Matlab
Matlab -> start_acq -> NI: I hand over the task Handle but the function DAQmxLoadTask(handle) doesnt work.
Besides my implementation, would it work?? Will the task still be in the system if the c file runs through without cleaning/destoying the task?
And could the DAQmxLoadTask function retrieve it?
Regards
Rked
03-29-2012 09:21 AM
Hi Rked,
how does the "doesn't work" show? Is there an error message? A crash / hang?
Regards,
Stefan