m script bus selector output

6 vues (au cours des 30 derniers jours)
Joseph Stalin
Joseph Stalin le 28 Fév 2018
Modifié(e) : Fangjun Jiang le 28 Fév 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

Réponse acceptée

Fangjun Jiang
Fangjun Jiang le 28 Fév 2018
Modifié(e) : Fangjun Jiang le 28 Fév 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')

Plus de réponses (0)

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by