How to Access Model Workspace Variables from the Graphic Canvas

1 view (last 30 days)
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?

Answers (0)

Products

Community Treasure Hunt

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

Start Hunting!