hexagon logo

How can I control the value of a "Parameter Variable" during the simulation?

I need to control a parameter variable during the simulation. For example, when a state variable exceeds 1, the specified "Parameter Variable" is 1. On the other hand, when the state variable is lower than 1, the specified "Parameter Variable" should be 0. Matlab Simulink and Adams Solver solutions are available for that.