Problem while building model (Non-virtual bus problem); Error shows - "Both name and the data type of the element 'xyz' in the bus type 'bus_obj_name' are the same".
12 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hi, I'm trying to build a model in grt.tlc target. But there's this error - "Both name and the data type of the element 'xyz' in the bus type 'bus_obj_name' are the same. Consider specifying a different name for the element or its data type". Now the thing is, I have a from workspace block which fetches a MATLAB structure which has four nested structures inside. The bus object that I've created for this, is inside the init fcn callback of the model inside model properties -> calbacks -> Init Fcn. At the first line of the init fcn is clear command to clear the base workspace and start fresh everytime. Later, it loads the .mat file which contains a structure and inside are the nested structures . Then I perform a Simulink.Bus.createObject function on that main structure with nested structures which in turn creates 'slBus1' which is later assigned to the name 'bus_object_name' by bus_obj_name = slBus1; and the slBus1 is cleared with 'clear slBus1' cmd. The 'bus_object_name' is already loaded inside the from workspace block.
Any suggestions are welcome! I'm just not that flexible in deleting the from workspace block, but if there's an alternative, do tell!
0 Commenti
Risposte (0)
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!