I'd like to modify the physical input of my Simscape model during the simulation but I don't know how to do it.
The mechanical translation block in the picture below is used to convert the rotational input into a translational movement (by mean of a pinion and rack mechanism). The rack is then connected to the rod of a piston. As the piston moves, it compresses a hydraulic fluid in a reservoir (not displayed below for sake of clarity). The physical input of the model is an ideal rotational velocity source.
For now, the whole compression process happens for 1 second and then the pressure in the circuit can't drop as the input velocity is set to zero (signal 2 is a pulse).
What I would like to do however is to compress the fluid for a given amount of time and then remove any conditions on the input shaft so that it can rotate freely as to simulate the decompression in the hydraulic circuit.
Better : remove the condition when the pressure in the circuit has reached a given value.
How can I accomplish that in Simulink ? What block shall I use for that purpose ?
Thanks.