How to edit font size of number value inside Simulink dashboard block such as a constant or gain block?

15 visualizzazioni (ultimi 30 giorni)
I have seen this question asked several times over the years and the latest answer I read was it was to be avaiable in Simulink Release 2021a.
I am using Simulink 2021a and cannot find how to change the numerical value "inside" of a Simulink block such a Constant or Gain block. The Format Font on appies to the texr of the Name outside the block.
Is there a difernt command besides right click on hte block >Format > Format Style for Selection (which only edits the font for the text of the name outside the block) ?

Risposte (2)

Guru Kumaresan
Guru Kumaresan il 6 Set 2022
You can try the following steps:
  • Given some constant block, create a mask for it (CTRL-M or right click and select Mask -> Create Mask).
  • In the "Icon & Ports" tab of the mask edit menu, enter the desired text as an input to the "disp" function into the "Icon drawing commands". For example, if you want your block to say value of the constant block (say 5) enter "disp(5)".
  • Now you should be able to change the block format like other blocks through the right click context menu (Format -> Font Style for Selection).

John Tsinetakes
John Tsinetakes il 6 Set 2022
Thanks
The Create Mask works to change the Font size.
There is now a new problem. I would like to keep the value displayed as "1/68e-6" to show that this is the reactance value of a 68e-6 inductor in the system.
But using the Mask, it changes the display to the value of 1/68e-6 = 14705 instead.
Is there a way to have the Mask not do this and dispaly the number explicitly the way it was entered?

Categorie

Scopri di più su Simulink Environment Customization in Help Center e File Exchange

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by