Simulink output matrix in real time
이전 댓글 표시
Hello everyone, I try to use Simulink to output matrix recorded in workspace in real time.
For example, my matrix is 4*6 matrix.
The first second, the output is first row of my matrix, which is 1*6 matrix.
The second second, the output is second row of my matrix, which is 1*6 matrix.
...
Until every row in my matrix is finished to be read.
Does anyone know how to realize it? Any ideas is appreciated!!
댓글 수: 4
Walter Roberson
2017년 9월 18일
Outputing to the workspace implies that something is running that could read it, but Simulink keeps running unless you ask for it to pause. What were you hoping to be able to do with the variable written in real time?
xuxin wang
2017년 9월 19일
xuxin wang
2017년 9월 19일
Walter Roberson
2017년 9월 19일
The robot would not be able to read the data from the workspace until Simulink stopped running. If you have the I/O for the robot running in a parallel thread then the data would have to be sent to that parallel thread, which can be done by a MATLAB Function Block
You should be considering using the Robotics toolbox to send messages to the robot, or using the a MATLAB Function Block to fprintf() to the device the robot is listening on.
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Publishers and Subscribers에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!