Appdesigner Real Time Data Acquisiton&Dİsplay

조회 수: 3 (최근 30일)
mehmet kelleci
mehmet kelleci 2020년 4월 1일
Hello Dear People,
I have been working on a gui on appdesigner that receives data from a TCIP instrument and displays it in real time. For example, I receive a data in every 50ms, I am going to receive 100 pieces of information in 5 seconds this make(hello yoda). This calculation holds in my code if i wait until the end of receiving then plot. If i plot the data the moment I receive it, this calculation does not hold and time extensifies by three times.
So, I can write codes that handle my needs of engineering, however optimization&efficient coding, I have lots of stuff to learn. You can see the related part of the code below. Can you help with speeding up this piece? I am waiting for your precious comments dear comrades :)
Graf = animatedline(app.UIAxes);
tic;
for i = 1:app.TerminationFrequencyEditField.Value
fprintf(SG382,strcat(parameter,num2str(WrittenFrequency),unit));
Time(Index) = toc;
addpoints(Graf,Time,Frequency);
drawnow;
WrittenFrequency = WrittenFrequency + 1;
Frequency(Index) = WrittenFrequency;
java.lang.Thread.sleep(app.MilisecondstoWaitEditField.Value);
end
%% Terminate the connection.
fclose(SG382);

답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by