![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1463037/image.png)
I'm having trouble generating a pil command block from the given code. I want to use a block created in matlab simulink to create a PIL block.
조회 수: 7 (최근 30일)
이전 댓글 표시
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 '/system1'])
%Error using pilcontriller (line 10)
Changing property 'CreateSILPILBlock' is not allowed
댓글 수: 0
답변 (1개)
Anjaneyulu Bairi
2023년 8월 23일
I understand that you are getting an error which says changing “CreateSILPILBlock” is not allowed.
Please try below given troubleshooting steps and see if the issue resolves.
1.Open model settings.
2.Using search option, search for “CreateSILPILBlock”
3.Change it None if it is not None
4.You can find this option under “Code Geneartion” -> “Verification”.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1463037/image.png)
Hope it helps.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!