How to add event listener in SimPowerSystem block?

1 view (last 30 days)
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

Answers (0)

Categories

Find more on Event Functions in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!