Hello,
I've created a Simulink file which contains ~5 blocks with permanently changing data. Now, I'd like to create an event listener for each block.
I've generated the following code for each block's startfcn:
%The GUI handles are by default hidden, turn them on
set(0,'ShowHiddenHandles','on'); %Set up the arguments that will go into the block event callback listener
blk_SpO2 = 'Parameter_Final/SpO2'; event = 'PostOutputs'; listener = @Gruppeneinteilung; %Create the listener
h = add_exec_event_listener(blk_SpO2, event, listener);
and
%The GUI handles are by default hidden, turn them on set(0,'ShowHiddenHandles','on'); %Set up the arguments that will go into the block event callback listenerblk_BD = 'Parameter_Final/BD'; event = 'PostOutputs'; listener = @Gruppeneinteilung; %Create the listener h = add_exec_event_listener(blk_BD, event, listener);
…
My problem is, Simulink only creates a listener for one of the 5 blocks. If I delete that block another one will have a listener and so on. But I'm not able to execute all these listeners at the same time.
Is there anyone who can help me?
greetings, franzi
Best Answer