Effacer les filtres
Effacer les filtres

how to send data saved in "out1" block to display it to the GUI label element

4 vues (au cours des 30 derniers jours)
Joshua Kalima
Joshua Kalima le 1 Jan 2022
Commenté : Image Analyst le 1 Jan 2022
hello i am trying to send data saved in the out 1 block to a GUI label element to display it. i am getting an error when i am using this:
properties (Access = public)
Property % Description
Set=0;
temp=0;
end
% Callbacks that handle component events
methods (Access = private)
% Code that executes after component creation
function startupFcn(app)
clc;
clear all;
close all;
instrreset;
sim('PID_control_of_the_SOPDT_PID_testing2');
%%%
app.temp = get_param('PID_control_of_the_SOPDT_PID_testing2/Out1','RuntimeObject');
app.Label_2.Text=num2str(app.temp);
end
the error that i am getting is
Invalid or deleted object.
Error in Project_GUI (line 364)
runStartupFcn(app, @startupFcn)

Réponses (1)

Image Analyst
Image Analyst le 1 Jan 2022
Yes, because you deleted them when you called clear and/or close. Get rid of these lines:
clear all;
close all;
  2 commentaires
Joshua Kalima
Joshua Kalima le 1 Jan 2022
yes i did that sir/ma'am but it is still showing the same error.
Image Analyst
Image Analyst le 1 Jan 2022
Then I don't know and I don't have Simulink. Try calling tech support.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Simulink Functions dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by