How to generate a real time measurement output in MATLAB?
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I am using a data logger with MATLAB shared library interface. I need to generate the real time measurement output of data logger. The code I am using only shows one measurement.
fullpathToDll = 'Z:\F1\2015_02_26_photometer_Datenlogger\PC-Software\CGMultChan.dll';
fullpathToHeader = 'Z:\F12015_02_26_photometer_Datenlogger\PC-Software\CGMultChan.h';
loadlibrary(fullpathToDll, fullpathToHeader,'alias','CGMultChanLib2');
m = libfunctions('CGMultChanLib2', '-full');
IP = calllib('CGMultChanLib2','CGMultChan_Connect','192.168.100.158');%Connect to Data Loger
if (IP == 0)
end
TI_ms = calllib('CGMultChanLib2','CGMultChan_SetIntTime',.02*1000);%Integration time
BufferSize=16;
pBuffer = libpointer('singlePtr',zeros(BufferSize,1));
measure = calllib('CGMultChanLib2','CGMultChan_MeasureAll',pBuffer);%Measurement
plot (result)
xlabel('time (s)');
ylabel('Illuminance (Lux)');
clear pBuffer
calllib('CGMultChanLib2','CGMultChan_Disconnect');%Disconnect from Data Logger
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!