MATLAB: How to control the parameter of a Simulink/Simscape block using input block

parametersparameters controlSimscapesimulink

I am designing a mechatronic system in Simulink using Simscape blocks. My system uses Rotational Hard Stop block in order to simulate obstacle. Moreover, I planned to use this block to simulate locking system: when mechanism is locked lower and upper bounds should be equal ~0.1 rad, when unlocked – higher value.
My question is about possible options how to control Upper bound and Lower bound parameters in Rotational Hard Stop block. Is there any chance to control this values using Input block/Constant block? An option with an input block woud be the most appropriate, because whole system has to be exported as FMU and distance to the obstacle (value of Upper bound) and Locked/Unlocked state (value of both upper and lower bound) are my crucial input parameters.

Best Answer

Ok I can answer my own question now.
I managed to edit Simscape library by modification of Rotational Hard Stop source code and then rebuilding library by command ssc_build. Rotational Hard Stop now has two inputs: R and upper_bound.