How to generate a real time measurement output in MATLAB?

5 ビュー (過去 30 日間)
Farha Tamanna Islam
Farha Tamanna Islam 2016 年 3 月 11 日
編集済み: Walter Roberson 2016 年 3 月 11 日
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 件)

カテゴリ

Help Center および File ExchangeGet Started with MATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by