MATLAB: How to display the value of Display block in App Designer

app designerexport dataMATLABsimulink

I want to get the value displayed on Display block and display it on Edit control in App Designer.
Here's what i tried
  1. using get_param
  • I thought I can get the displayed value but I couldn't find what parameter I should use.
2. get InputPort data
  • instead of finding around for a parameter having displayed value, I decided to use InputPort data.
I got RuntimeObject handle and printed InputPort data but it returned empty string.
but when I checked signal data on simulink screen, the signal wasn't empty.
so I tested String to ASCII block (see the code below)
My question is
  1. Is there parameter I can use to do this?
  2. Is it impossible to get string signal from simulink? If it's possible, please let me know how to do.
rto = get_param([String to ASCII block path], 'RuntimeObject');
rto.InputData(1).Data
ans =
""
rto.OutputData(1).Data
ans =
72 101 108 108 111 33

Best Answer

It was only quite recently that Simulink became able to have character signals. Your signal is probably not character.
Have look at
char(rto.OutputData(1).Data)