Simulink split system objects

조회 수: 1 (최근 30일)
Joel
Joel 2016년 11월 30일
Hello folks,
I have a regular Matlab class named Server that is a convenience class built around webread() and webwrite() that allows communicating with a RESTful webservice. Inside Matlab everything works great. Now I am in the process of creating a Matlab.System class so I can create a Simulink block out of it. I have everything in Simulink as well. My question is the following: I'd like to split the functionallity of that Server Simulink block up into multiple blocks. Ideally I'd like to have one Control block that gives information about the connection status, the number of available measurements and so on, one Input block to GET data from the webservice via the Server class and one Output block to POST data to the webservice via the Server class. Is that possible?
The problem I am facing is that all of these blocks would have to use the same instance of the Server class. In my current Matlab.System class that I use in Simulink I have an instance of that Server class as a private property. Is there any mechanism that allows me to share a property across multiple Matlab.System classes or is there a different mechanism provided by Simulink itself to split functionality of a Matlab.System class up into multiple blocks?
Thank you very much for your help.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by