use Of constant in simulink

4 Ansichten (letzte 30 Tage)
Alessandro Matteucci
Alessandro Matteucci am 18 Sep. 2020
Beantwortet: stozaki am 20 Sep. 2020
Hey everyone, I’m searching how to use the constant block for introducing a constant degree(angle) in simulink. Thank you for your help
  3 Kommentare
stozaki
stozaki am 18 Sep. 2020
Do you want to set the angle value in the Constant block and set the "angle unit" ?
Alessandro Matteucci
Alessandro Matteucci am 20 Sep. 2020
Yes. Thank you.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

stozaki
stozaki am 20 Sep. 2020
Hello
Thank you for your reply.
If you give an immediate value to a Constant block, you cannot set the "unit" attribute to that value. If you want to set the "unit" attribute, use the Simulink.Parameter object.
I created a sample model with R2020a. You should open this model and update the model (Ctrl + D). Then you can see that the model has "units" set. At this time, set the output data type of the Constant block to Inherit: Inherit from'Constant value'.
Regards,
stozaki

Kategorien

Mehr zu Programmatic Model Editing finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by