I get the error 'Changing property 'UnconnectedLineMsg' is not allowed ' when using a block from the MATLAB and Simulink Robotics Playground

38 次查看(过去 30 天)
When creating or running a model using the MATLAB And SImulink Robotics toolbox, I get the following error:
Error evaluating 'InitFcn' callback of block_diagram 'untitled'. Callback string is 'RPInit'
Caused by:
  • Changing property 'UnconnectedLineMsg' is not allowed

采纳的回答

MathWorks Student Competitions Team
To fix the error, go to the Simulink model settings and set the UnconnectedLineMsg connectivity diagnostic to 'none'. See how to do it in the picture below:

更多回答(1 个)

Sorawit
Sorawit 2023-5-1
clc; clear all
model = 'bright2';
close_system('model',0)
open_system(model)
setpref('MathWorks_Embedded_IDE_Link_PIL_Preferences','COMPort','COM4');
setpref('MathWorks_Embedded_IDE_Link_PIL_Preferences','BaudRate', 115200);
setpref('MathWorks_Embedded_IDE_Link_PIL_Preferences', 'enableserial', true);
set_param(model, 'CreateSILPILBlock', 'PIL');
close_system('untitled',0)
rtwbuild([model '/Brighttest'])
Error using pilcontriller (line 10)
Changing property 'CreateSILPILBlock' is not allowed
I found an error and would like to ask how to fix it.

类别

Help CenterFile Exchange 中查找有关 Code Generation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by