Filter löschen
Filter löschen

How to Access Model Workspace Variables from the Graphic Canvas

1 Ansicht (letzte 30 Tage)
Ray Joseph
Ray Joseph am 2 Mai 2019
I would like to produce a signal with a specific slope and limited upper value to feed a block in Simscape. My intent is to provide for a user input to set the upper limit of the ramp and the ramp duration. The quotient of these two give the slope of the ramp line. Inputting this slope to an integrator (1/s) will give the correct ramp rate; inputting the upper limit into the interator's upper saturation limit provides the expected result.
If I use two constant blocks feeding a divide block, the calculation is performed every step; I don't see a sample time parameter on the divide block.
I have added two variables to the model workspace as RampLiimit and RampDuration and use these in another constant block parameter as RampLimit/RampDuration. Then input this to the integrator. This works fine.
I do not see how to include a user input on the Simscape graphic for a user to input a value for RampLimit and RampDuration to support the RampSlope calculation.
What might I use to provide for the user to input these two values?

Antworten (0)

Kategorien

Mehr zu Troubleshooting 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