Import a signal from workspace to simulink

조회 수: 4 (최근 30일)
Darren
Darren 2023년 5월 3일
편집: Andreas Goser 2023년 5월 3일
I am doing motion control and I have imported a signal from SPiiPlus MMI Application into .m file to do a simulation
It is a position reference and i need to use that reference position for my simulation
i tried 'From workspace' block, 'Signal from workspace' block and output to the 'scope' block and I am unable to get the desired reference result

답변 (1개)

Andreas Goser
Andreas Goser 2023년 5월 3일
편집: Andreas Goser 2023년 5월 3일
My guess is the From Workspace block is missing time values as your variable CH3 only has data values.
  댓글 수: 2
Darren
Darren 2023년 5월 3일
I see. If my period is 100sec, is there anyway to insert it in? Or are there a different way to get the position profile?
Andreas Goser
Andreas Goser 2023년 5월 3일
편집: Andreas Goser 2023년 5월 3일
There are multiple options, see https://www.mathworks.com/help/simulink/slref/fromworkspace.html. Assuming your measurements are equidistant, you could create a time vector with the same size as CH3 and then concatenate both to a matrix the From Workspace block understands.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by