필터 지우기
필터 지우기

running a simulink desktop real-time model as .m file

조회 수: 4 (최근 30일)
Ali Albaidhani
Ali Albaidhani 2022년 7월 28일
Hello everyone,
So i have made a controller as a simulink model and im trying to run it from matlab editor. The simulink model runs in simulink desktop real-time, and it's output is connected to a hardware and the input is connected back to the software.
The problem is that when i run the simulation from simulink, the controller works fine and it does it's job, but when i run it from matlab editor, it goes crazy. The controlled variable keeps rising and the controller does not work.
Im using the following code to run the simulation:-
clc
clear all
x=0.004
simout = sim('PI_Controller.slx');
Im guessing the problem is with sim command. Maybe there is a different command for running a simulation that runs in ream-time?
Im attachment is a Photo of my Model.
What am i missing here?
Regards
Ali

답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with Simulink Desktop Real-Time에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by