Parameter writer block use case issue

조회 수: 22 (최근 30일)
Sameer
Sameer 2024년 2월 9일
댓글: Nicolas 2025년 1월 15일
Added TEMP variable in Model workspace and assigned this variable to constant block.
Contant block is linked with Parameter Writer block to perform logic. after compiling the Model showing following error meassage:
Parameter Writer block /Initialize Function/Parameter Writer1' is unable to write to the parameter 'Value' of the block 'ModelTest/TEMP' because the block is initialized with a mask parameter or workspace variable on its dialog. Writing to such parameters using the Parameter Writer block is not supported

답변 (1개)

Mark McBroom
Mark McBroom 2024년 2월 17일
It sounds like the value for the Constant block is not TEMP. You need to double click on the Constant block and enter "TEMP" as the Constan block value.
  댓글 수: 2
Sameer
Sameer 2024년 2월 28일
Thank you Mark.
I'm encountering an issue while attempting to develop a model using the Parameter Writer block. Despite attempting to configure parameters through both Validate Parameter and Access Model Workspace settings, the problem persists. I have attached a dummy model for reference.
Parameter Writer block 'dummy/Triggered Subsystem/Subsystem2/Parameter Writer' is unable to write to the parameter 'Value' of the block 'dummy/Triggered Subsystem/Subsystem2/AsA22' because the block is initialized with a mask parameter or workspace variable on its dialog. Writing to such parameters using the Parameter Writer block is not supported
Nicolas
Nicolas 2025년 1월 15일
I have the same/similar issue right now. I have a Constant Block which uses a parameter from the Model Workspace, and I update this value and send it to a Parameter Writer Block which goes to the same parameter in the Model Workspace. This is the error I'm getting when trying to update the model:
"... is set to allow its parameter to be accessed by Parameter Writer blocks outside of Initialize, Reinitialize, Reset or Terminate Function block. Therefore, this block cannot have a constant sample time, or be placed inside a subsystem with a constant sample time"
Matlab R2024b Update 6
Is there another way to provide a workspace parameter to start the simulation and then have that parameter updated as the simulation moves forward?

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

카테고리

Help CenterFile Exchange에서 Event Functions에 대해 자세히 알아보기

태그

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by