05-16-2008 01:51 PM
Solved! Go to Solution.
05-16-2008 02:14 PM
CDancer,
Would it be possible to post the VI that you converted with the Math Interface Toolkit? Which versions of LabVIEW, DAQ, MIT, and MATLAB are you using?
Chris M
05-16-2008 04:14 PM
I can do that tomorrow. In the meantime, this is what I am doing, it's a finite analog output generation:
05-16-2008 04:46 PM
Hi Chris,
Once you have generated mex-functions out of each of the four VIs, how are you passing the DAQmx refnum(s) between them in MATLAB? One thing to try would be to create one single VI, then convert that with the Math Interface Toolkit. I realize it isn't what you ultimately want, but it would help to narrow down on the cause of the problem.
Chris M
05-16-2008 05:17 PM
05-19-2008 09:11 AM
OK, I fixed the problem. It seems that when you configure timing for a global virtual channel the timing setup, buffer allocation, etc. is lost as soon as a vi exits.
Instead I created a new task using DAQmx Create Task.vi with my global virtual channel wired into it and Auto Cleanup set to false. Then I used the task name when writing the buffer and running the generation. When converted to Matlab functions using MIT it works fine.