How to get all block parameters from a simulink block?
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am trying to convert a model cointainign TargetLink blocks to there corresponding simulink blocks. Currently I am using:
param = get_param(targetLinkBlock, 'Param');
Then replacing and setting the paramaters of the new block using:
simulinkBlock = replace_block(model, 'Name', block_name, type);
set_param(simulinkBlock, 'Param', param);
Although this does work, it seems a very tedious way to do this, especially as some blocks such as lookup tables have well over 10 parameters.
Is there a better way to do this, by getting and setting all parameters in a single command, or just a simpler way to unlink/mask the target link blocks?
0 Kommentare
Antworten (1)
Fangjun Jiang
am 7 Okt. 2022
Use the function that is provided by TargetLink. I used it before but can't remember the name, something like tl_clear_system()?
TargetLink provides the capability to do Simulink <--> TargetLink conversion both ways, and API too.
0 Kommentare
Siehe auch
Kategorien
Mehr zu Programmatic Model Editing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!