interfacing Matlab Simulink to app designer

5 ビュー (過去 30 日間)
Ismail Abasoomar
Ismail Abasoomar 2022 年 1 月 22 日
編集済み: Alagu Sankar Esakkiappan 2022 年 1 月 28 日
Hi
i need some assistance, my project is to build a temperature controller. i achieved this by building the model on Simulink. I interfaced Simulink with an Arduino and connected an LM35 temperature sensor to the Arduino. I have converted the singal to degrees celcius. when i connect a display to the signal in Simulink i am gettin the correct reading.
I need to get the Actual temperature reading from the LM35 sensor to display on my gui. i planned on showing it using a linear gauage. the problem is, i cant use the workspace because it dosn't allow for real time. any suestions would be helpful.
below is the code i am using on app designer.
function StartButtonPushed(app, event)
assignin("base","set",app.SetpointTemperatureSlider.Value);
set_param('Tempreture_controlled_oven','SimulationCommand','start');
app.PowerOnLamp.Color = 'g';
app.ActualTemperatureGauge.Value = '';

回答 (1 件)

Alagu Sankar Esakkiappan
Alagu Sankar Esakkiappan 2022 年 1 月 28 日
編集済み: Alagu Sankar Esakkiappan 2022 年 1 月 28 日
Hello!
I see that you're trying to interface between a Simulink Model with a Standalone App created by App Designer. You may refer to the following example shipped with MATLAB:
Hope it helps!

カテゴリ

Help Center および File ExchangeSimulink についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by