I'm required to use MATLAB to control an NI DAQ software, and set parameter for NI, can it be done by Matlab programming alone or better to call another C or C#? And how?
Asked
Active
Viewed 225 times
0
-
4If you don't want your question to get down-voted please provide more information about your actual development . Include code your are working with, and avoid asking opinion based questions. – Piotr Dajlido Mar 22 '15 at 14:45
1 Answers
1
Are you in possession of the data acquisition toolbox? If yes, it's pretty straightforward, see Matlab help. If not, you can use .NET NI libraries and directly call the needed functions from Matlab using something like:
calllib(ni, 'DAQmxWriteAnalogScalarF64', ...);
Note: sometimes you need C's null value. It can be constructed using
NULL = libpointer('uint32Ptr', []);

texnic
- 3,959
- 4
- 42
- 75