Filter löschen
Filter löschen

m script bus selector output

7 Ansichten (letzte 30 Tage)
Joseph Stalin
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

Akzeptierte Antwort

Fangjun Jiang
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')

Weitere Antworten (0)

Kategorien

Mehr zu Interactive Model Editing finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by