Merge Block Initial Output Warning

조회 수: 4 (최근 30일)
Claudia Jazowski
Claudia Jazowski 2022년 4월 21일
답변: Brahmadev 2023년 9월 22일
Getting the error:
The 'Initial output' parameter of Merge block 'XXX' can no longer be specified by signal object in the simplified initialization mode. You can still use signal objects to initialize the input or the output signals for Merge blocks, but the initialization results may be overwritten by those of the Merge blocks.
Any tips on how to get rid of this?
  댓글 수: 1
John Hosford
John Hosford 2022년 5월 2일
I'm seeing it too. I came here for a solution, but I'll just leave this here to let you know you're not the only one seeing it

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

답변 (1개)

Brahmadev
Brahmadev 2023년 9월 22일
Hi Claudia,
I understand that you are trying to use the merge block and facing the aforementioned warning. This warning is caused due to the "InitialValue" parameter of the 'Simulink.Signal" object connected to the input port of the "Merge" block. You can manually set the "InitialValue" parameter to an Empty String to resolve the warning. Kindly refer to the following code as an example
InputName.InitialValue = 0; % Replace "InputName" with the name of your Simulink.Signal object
If you face any issue in this, follow the workflow below to connect a "Simulink.Signal" manually to the Input Signal of your "Merge" block.
>> y = Simulink.Signal
>> y.CoderInfo.StorageClass = "ExportedGlobal";
>> y.CoderInfo.Identifier = "y"
>> y.InitialValue = ""
Then, right click on the input signal to the Merge block and navigate to
Properties >> Signal name = y, then the Signal name must resolve to signal object.
Hope this helps in resolving your issue!
Best Regards,
Brahmadev

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by