Exporting signal of bus creator blocks to excel.
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Antimo
el 3 de Feb. de 2025
Editada: praguna manvi
el 11 de Feb. de 2025
I have a fairly complex model with several subsystems. The number of these subsystems is not fixed, and some have different structures. Each subsystem includes both an input and output stage (which are also subsystems), where multiple signals are aggregated using a bus creator. I would like to automate the process of exporting the names of all signals in the generated buses.
I haven’t found much information on this, except for some MATLAB code that seems to work only if the names of the subsystem containing the bus creator and the bus creator itself are well known.
0 comentarios
Respuesta aceptada
praguna manvi
el 11 de Feb. de 2025
Editada: praguna manvi
el 11 de Feb. de 2025
As I see, you are trying to programmatically access the names of all signals aggregated at different "Bus Creator" blocks. To perform this you could use "find_system" function as follows :
busCreators = find_system(bdroot, 'BlockType', 'BusCreator');
The above command finds all "Bus Creator" objects at various levels within the model. By default "find_system" searches at all levels for a "BlockType". The names of input signals or any other properties can be accesed using the "Handle" as followes:
busCreatorHandle = get_param(busCreators{1}, 'Handle'); %first busCreator object
signalNames = get_param(busCreatorHandle, 'InputSignalNames');
For more information on "get_param" and "find_system" functions, refer to the below documentation links:
Hope this helps!
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Subsystems en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!