Error #15300: No compiled data for the block available while generation code with target link which model includes user libraries.

조회 수: 6 (최근 30일)
-> I am doing automation on simulink model which includes targetlink blocks(which also have user defined library blocks). As per my requirement I am editing library model as well and trying to generate code. If my model includes Library models which have function block the code genetation is not happening and throughing Error #15300 error. I have crosschecked my libraries are saved correctly and all the links are correct in model as well.
I fould some unintentional changes on inport and outport blocks after I run my script on model.Please find below higlighted properties which are updating without intention.If I retaine these chages and generating code its susscessfully generating.
Could any one please help how these settings are getting modified and how can we access these propertis trhough script. Info:these are targetlink port used inside simulink model.

답변 (1개)

Karan Singh
Karan Singh 2024년 6월 20일
Hi Aruna,
While I am unsure about how your script changes the configuration settings, which would require a deep analysis of your script, I can guide you on how to access and modify a property within your script.
  • First, you need to identify the "inport" and "outport" blocks in your Simulink model. This can be achieved using the "find_system" function or by iterating through the blocks in the model
% Example to find all inport blocks
inports = find_system('YourModelName', 'BlockType', 'Inport');
  • Once you have identified the ports, you can access and modify their properties using the "get_param" and "set_param" functions.
% Example to get and set properties of an inport block
portHandle = get_param(inports{1}, 'Handle');
currentDataType = get_param(portHandle, 'DataType');
% Modify properties if needed
set_param(portHandle, 'DataType', 'double'); % Example modification
For further reading and to understand more about how to use these functions, here are the documentation links you can access:-
  1. https://www.mathworks.com/help/simulink/slref/find_system.html
  2. https://www.mathworks.com/help/simulink/slref/get_param.html?s_tid=doc_ta
  3. https://www.mathworks.com/help/simulink/slref/set_param.html?s_tid=doc_ta
Hope it helps!
  댓글 수: 1
Aruna
Aruna 2024년 6월 24일
Thanks for you hint. I am aware of find_system and get_param and using in other script as well, but with these funstions I am not able to get above mentioned properties of block. It will be helpfull if you provide, how can I get above mentioned(DataTypeExpr,DimentionExper) properties of input and output blcok .

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

카테고리

Help CenterFile Exchange에서 Programmatic Model Editing에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by