Filter löschen
Filter löschen

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

2 Ansichten (letzte 30 Tage)
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?

Antworten (1)

Pavan Sahith
Pavan Sahith am 12 Feb. 2024
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

Kategorien

Mehr zu Simulink Functions finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by