Is it possible to share C++ object created in one S-Block to another S-Block ?

조회 수: 2 (최근 30일)
KS Madhukumar
KS Madhukumar 2017년 5월 15일
답변: Ed Marquez 2017년 5월 18일
Hi, I want to share C++ object created in one s-function block with other s-function blocks, is this possible ?
Using m-script and Level-2 matlab s-function, am able to share Matlab class object between different S-function blocks by storing the object created in configuration block into base workspace and accessing from other blocks wherever required from base workspace.

답변 (1개)

Ed Marquez
Ed Marquez 2017년 5월 18일
Hi KS Madhukumar,
I believe the MATLAB Answers post below has an answer and possible workaround to you question:
https://www.mathworks.com/matlabcentral/answers/100801-how-can-i-access-a-single-instance-of-my-c-object-from-several-s-functions-in-simulink-7-1-r2008a

카테고리

Help CenterFile Exchange에서 Block and Blockset Authoring에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by