I have a model in which the name of the signal entering a Bus Creator is not available as the signal is coming from a Subsystem and the name of the signal is not propagated. The 'Show propagated signals' property cannot be changed as it is included in a subsystem inside a library.
The name of the signal is still available under 'Signals in the bus' in the Function Block Parameters dialog box of the Bus Creator. But it is not available when using the 'PropagatedSignals' property of the Inport of the bus, before the model is updated, as shown in the following code snippet:
busCreator = 'model2/Subsystem1/Bus Creator1';lh = get_param(busCreator,'LineHandles');srcPort = get_param(lh.Inport(1),'SrcPortHandle');get_param(srcPort,'PropagatedSignals') ans = ''
The code snippet returns the correct name of the signal when the model has been updated. But it is impractical to update the diagram before extracting the name of the signal due to the time taken to update the model. Thus I want to retrieve the name of the signal from the command line without having to update the model.
Best Answer