- Argument Specification for Simulink Function Blocks - https://www.mathworks.com/help/simulink/ug/argument-specification-for-simulink-functions.html
- Function Caller- https://www.mathworks.com/help/simulink/slref/functioncaller.html
Why do I get Block error while updating model? Calling a simulink function with bus type as input argument.
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1602011/image.png)
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?
0 Kommentare
Antworten (1)
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
0 Kommentare
Siehe auch
Kategorien
Mehr zu Simulink Functions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!