How to input an array in my simulink model?
13 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I want to use an array as a parameter of my c function caller and have it as a bus element. I try to define it in my data dictionary but it does not show up as a data type for my bus element.
How do I properly define an array in simulink modeling?
0 Commenti
Risposte (1)
Aabha
il 28 Feb 2025
I understand that you want to pass an array into a C function block within a Simulink model, and this array is part of the bus structure defined in the data dictionary.
The “C-Caller” block allows to configure input ports and parameters based on the data types that are passed as input arguments to the blocks. In order to pass a “bus element” to a block, the “Type” field in the “C-Caller” interface needs to be configured as a Bus object.
Alternatively, if the data needs to be passed as an array, and not as a bus element, the “Bus Selector” block can be used. Configure the input of the “Bus Selector” block as the bus object and configure the output as the desired array. The output of the “Bus Selector” block can then be connected as an input to the “C Caller” block.
Please refer to the following documentation links for more information about the “C-Caller” and the “Bus Selector” block.
I hope this helps.
0 Commenti
Vedere anche
Categorie
Scopri di più su Simulink Functions in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!