Simulink "Edit" Dashboard block - but for strings?

조회 수: 4 (최근 30일)
Julian
Julian 2024년 1월 18일
댓글: Benjamin Thompson 2024년 1월 27일
Hey folks,
I am using Simulink to develop a data collection and (very low rate) control system for a piece of experimental apparatus. As part of our experiments, I would like to be able to record timestamped text notes about the experiment ("2024-01-18 11:03:23: released magic smoke", that sort of thing)
I already have a fairly sophisticated dashboard developed for my control system. I would love to have a Dashboard "Edit" block that I can type text into, and - when I hit a trigger button - have that text saved into my larger output file. However, it appears that the Edit block can only be used with scalar signals.
Has anyone developed a Simulink block that can do what I'm describing? Or, alternatively, is there a different approach that I could take to do this?

답변 (1개)

Benjamin Thompson
Benjamin Thompson 2024년 1월 20일
If you are not really trying to "link" the dashboard block to other blocks, then maybe the "String Constant" source block would work? The value of this block is tunable during runtime. Then use a MATLAB Function block to look for a change to the string and display it how you like.
  댓글 수: 2
Julian
Julian 2024년 1월 24일
@Benjamin Thompson - thanks for your thoughts here. That's not a bad idea - I could have the user just write into the String Constant block, and then whenever they update it, have a callback run that saves it to file. I'll do that for now, and will figure out a more elegant way to do this when I re-architect the system to separate the "control" functions from data collection, experiment operation, etc. (related question: https://www.mathworks.com/matlabcentral/answers/2072026-best-practices-for-stream-save-simulation-data-to-file-while-model-is-running).
If anyone else has other suggestions for how to do this, let me know!
Benjamin Thompson
Benjamin Thompson 2024년 1월 27일
If your question has been answered please mark as accepted.

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

카테고리

Help CenterFile Exchange에서 Control Simulations with Interactive Displays에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by