How to add event listener in SimPowerSystem block?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to add an event listener in a SimPowerSystem model. Follwoing is the code I wrote in matlab StartFcn
blk = 'IEEE39_EKF_Restart_AVR_EXC_TG_param_estimate2/SS_Subsystemtwo/Subsystem 34/G34';
h = add_exec_event_listener(blk,'PostOutputs',@testing);
Testing function is just to validate the working of listner
function testing( block,eventdata )
disp('Working');
end
However I am getting the following error.

I can assure the path is proper as I ma able to retrieve the parameters of the same block using get_param.
I tried the same thing for a scope block by modifying StartFcn to
blk = 'IEEE39_EKF_Restart_AVR_EXC_TG_param_estimate2/SS_Subsystemtwo/Subsystem 34/Scope';
h = add_exec_event_listener(blk,'PostOutputs',@testing);
It is working properly for the scope block. Kindly help

0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Event Functions in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!