MATLAB Answers

How to log a block in simulink-model programmatically?

1 view (last 30 days)
joe
joe on 5 Sep 2019
Answered: Abhisek Pradhan on 19 Sep 2019
Hi everyone,
is there any way to log a block in simulink-model programmatically
this is how i log signals on and off
selectObj = find_system(gcs,'findall','on','selected','on','Type','line','parent',gcs);
sourcePortArr = get(selectObj,'SrcPortHandle');
set_param(sourcePortArr,'DataLogging','off'); % or set_param(sourcePortArr,'DataLogging','on')
MATLAB R2018b
is there any way like this ?
thank you in advance

  0 Comments

Sign in to comment.

Accepted Answer

Abhisek Pradhan
Abhisek Pradhan on 19 Sep 2019
Simulink doesn’t support block logging. Rather one can log the signals coming out of the blocks for all required purposes.

  0 Comments

Sign in to comment.

More Answers (0)

Sign in to answer this question.


Translated by