Create and fill an array in simulink
    조회 수: 13 (최근 30일)
  
       이전 댓글 표시
    
Hello,
I've got a question about Simulink. I got a signal in Simulink which changes every 1 ms.
Now, while the simulation is running, I want to save this signal every 1 ms for 10 ms when a trigger arrives. So afterwards there should be an array filled with 10 values.
I dont want to use a vector in the workspace, because I will eventually compile this simulink-model to a Electronic Control Unit through DSpace TargetLink. That's the reason why I want to have everything done in Simulink.
Anyone knows a method/ or block for simulink which can do this datalogging functionality?
Thanks for your help in advance
댓글 수: 0
채택된 답변
  TAB
      
 2012년 4월 11일
        Try usign Discrete/Tapped Delay block. It outputs all the collected samples.
댓글 수: 4
  TAB
      
 2012년 4월 12일
				Agree with Govind's solution.
Use "Enabled Subsystem" and enable the logging for 10ms using a control signal.
  Swati Poduval
 2020년 5월 20일
				Hello 
I know this is a reallly old link, but I dont see any new related question.
I wanted to know if there a way to give the "Number of delays" externally in the tapped delay function.
My idea is, the user should be able to connect an input port and this port gives the number of delays that the tapped function needs to have. So as to make it dynamic and not static where I set the number of delays during development phase itself.
Thanks
추가 답변 (2개)
  Umut SEN
 2018년 2월 2일
        Hi!
I came accross this page while i was looking for a solution for more or less the same problem as you did.
I need to store data in Simulink and I cannot use matlab function block or tapped delay block because of some model standards.
Is there any other way I can store data in an array for processing?
Thanks in advance,
Umut
댓글 수: 0
  viyils Sangregorio
 2021년 10월 27일
        Iam coming here with the same question....Until 2021 do we have any solution for that ?
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Schedule Model Components에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!





