How to generate a real time measurement output in MATLAB?
5 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!