P-H diagram in Axes tool of App designer

조회 수: 8 (최근 30일)
Mauricio Bassallo
Mauricio Bassallo 2021년 7월 6일
댓글: Abhinaya Kennedy 2024년 6월 6일
Hi,
I want to reproduce the p-h diagram in App designer usin the 'Axes' component during the simulation of my simulink refrigeration model. My model has sensors elements from Simscape which provide the respective outputs of pressure and enthalpy necessary for the p-h diagram. However, I do not know how the code should be in UIAxes callback in order to take the live data from the sensors and then plot it in the 'Axes' component.
does anybody know how to do it?
Thanks in advance for your comments!
  댓글 수: 1
Abhinaya Kennedy
Abhinaya Kennedy 2024년 6월 6일
To create a p-h diagram in App Designer:
UIAxes Callback: Write a callback function (e.g., "updateAxes") to:
  • Access latest pressure/enthalpy using "get_param('SimulinkModelName','SimulationState')".
  • Update "XData" and "YData" of the Axes component with retrieved values.
Triggering the Callback: Use a timer object in your App code or a Simulink "Update Diagram" block to call the callback function regularly during simulation.
This approach allows for a real-time p-h diagram reflecting your Simulink refrigeration model's behavior.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by