How to add event listener in SimPowerSystem block?

1 Ansicht (letzte 30 Tage)
Avishek Paul
Avishek Paul am 21 Nov. 2016
Bearbeitet: Avishek Paul am 21 Nov. 2016
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

Antworten (0)

Kategorien

Mehr zu Model, Block, and Port Callbacks 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