How to find a source block that goes through a goto/from block?
Mostrar comentarios más antiguos
I am trying to write a script that will list out all elements on a bus that are consumed within a model. To do this, I used find_system to find all the bus selector blocks. I was able to get all the elements being selected. I am assuming buses are inputs to the model and aren't created and read from within the same model. To trace from the bus selector back to the input port, I was using:
portC= get_param(busSelectors(i),'PortConnectivity');
busSelSrc = portC{1}.SrcBlock;
However, 'From' blocks only appear to have DestBlock field filled in and source is empty. I'm not sure how to trace 'From' -> 'Goto' block from a script.
Here is an example output where CL_e2a_sl is model name. aiAD is bus name and signal impact_press_sel from that bus is getting read in that model.
****************************
Processing: CL_e2a_sl
aiAD.impact_press_sel
aiPF.body_lat_accel_compl_filt_e4
aiSM.along_track_accel_sel
aiSM.cross_track_accel_sel
******************
I am using Matlab2017a right now if that helps.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Programmatic Model Editing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!