필터 지우기
필터 지우기

Why do I get Block error while updating model? Calling a simulink function with bus type as input argument.

조회 수: 7 (최근 30일)
Hello All,
I get this following error while updating the model, Expression 'PacketHandle(1)' for block 'Scheduler/AddPackage/QueueClass1/If Action Subsystem/If Action Subsystem1/Function Caller' returns a Simulink.Bus object whose property values need to be evaluated. This object should be instantiated in a workspace and referenced by name in Simulink.
In this model a simulink function is defined with input argument of Bus Type: Packet Handle, when this function is called in modle using a function caller and updating the function caller block input argument as seen below
Although the input argument type is explicitly mentioned, I get an error while the model is updated
Expression 'PacketHandle(1)' for block 'Scheduler/AddPackage/QueueClass1/If Action Subsystem/If Action Subsystem1/Function Caller' returns a Simulink.Bus object whose property values need to be evaluated. This object should be instantiated in a workspace and referenced by name in Simulink.
Could anyone kindly provide any counter actions or suggestions to overcome this error?

답변 (1개)

Pavan Sahith
Pavan Sahith 2024년 2월 12일
Hello Srikar,
I see that you've encountered a challenge with specifying the input argument for the 'function caller' block in Simulink, particularly when passing a bus object.
It appears that if 'PackHandle' represents your Bus Object, simply using the name of the Bus Object ('PackHandle') instead of PacketHandle(1), in the input argument specifications should be adequate. This approach is likely to resolve the error you're experiencing.
For a more detailed understanding of how to specify input arguments for Bus Data Types and the use of the 'function caller' block, you can refer to the following MathWorks Documentation:
Hope this will help

카테고리

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

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by