m script bus selector output
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Joseph Stalin
am 28 Feb. 2018
Bearbeitet: Fangjun Jiang
am 28 Feb. 2018
Hi, I am writing a m-script to create a bus selector , getting an input bus and select a particular bus as a output bus. by the following line..
helpdlg('Connect the main bus to CCF routing SS'); %this connects the main bus to the input of the bus selector set_param(CCF_Controller_base_path_2,'OutputSignals', 'GWM_FR_BCM_A_BUS');
but I am getting an error that the 'GWM_FR_BCM_A_BUS' bus is not in the input bus. I have confirmed that the Inut bus is connected before executing the set_param line.. but still I am getting the error..
Anybody can help me to understsand the issue or better coding technique?
regards, Joseph
0 Kommentare
Akzeptierte Antwort
Fangjun Jiang
am 28 Feb. 2018
Bearbeitet: Fangjun Jiang
am 28 Feb. 2018
'GWM_FR_BCM_A_BUS' should be an immediate element of the input bus, not the input bus itself, right?
In any case, I would suggest you making the connection and selection manually first and then run get_param(CCF_Controller_base_path_2,'OutputSignals') to see what is the output.
Sometimes in a large model, the content of the bus is not immediately available after the BusSelector block is connected with the input bus. Maybe that is the cause in your case. You need to do a model update to make the content available. You can do this by
set_param(YourModelname,'SimulationCommand','update')
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Sources finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!