MATLAB: How to run mutliple instances of Simulink blocks at the same time without naming errors

autocodegotoloopsMATLABmultiple instancesmutliple gotossimulink

Hello all,
How I can run multiple instances of a self-created Simulink block within a simulation model that is being looped within MATLAB without naming errors? MATLAB presently gives an error in the command window in regards to my using multiple gotos of the same name within the Simulink block instances.
Is there a way easier than going through each block and labeling each component as component1, component2, …. ?
Thanks, Joshua

Best Answer

It's not clear how/if you want the multiple instances to be resolved, but if each Goto (and the corresponding From blocks) is inside a different subsystem, you can set the "Tag Visibility" to Local. If this is not possible, then you do need to manually/programmatically (using MATLAB code and the SET_PARAM command) rename the tags.