Masking a variant subsystem using Label control
古いコメントを表示
I want to mask a variant subsystem consisting of two subsystems using mask initialization and the following code derived from "slexMaskingExample". I want to set the mode to speed or torque control and thereby use either of the speed or torque controllers to fulfil my purpose. I expect this to reduce my simulation time as the other block shoudl be inactive during the simulation as described by the Label Mode Active Variant in the Block parameters of the Variant subsystem.
But the problem is the underlying code does not make the other controller inactive while simulation. During simulation, both the subsystems are runnning. DUring editing, the results are as desired.
The mask initialization code is as follows:
simulationStatus = get_param(bdroot,'SimulationStatus');
choice = get_param(gcb,'Mode');
Blk = gcb;
if strcmp(choice,'Speed')
set_param(Blk, 'LabelModeActiveChoice', 'SpeedC');
else
set_param(Blk, 'LabelModeActiveChoice', 'TorqueC');
end
Kindly help
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Variant Hierarchical Components についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


