How to generate a real time measurement output in MATLAB?

5 Ansichten (letzte 30 Tage)
Farha Tamanna Islam
Farha Tamanna Islam am 11 Mär. 2016
Bearbeitet: Walter Roberson am 11 Mär. 2016
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

Antworten (0)

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by