The equations for the Gripper component are given below.
Reaction Forces:
$\mathbf{F}\mathbf{}equals;\mathbf{}\mathbf{}{K}_{s}\mathbf{\cdot}\left(\mathbf{r}{\mathbf{r}}_{0}\right)\mathbf{}\mathbf{}{K}_{d}\mathbf{\cdot}\mathbf{v}$
where

$\mathbf{F}$$\=\u27e8{f}_{x}\,{f}_{y}\,{f}_{z}\u27e9\,$is the reaction force vector,
$\mathbf{r}\={\mathbf{r}}_{b}\mathbf{}{\mathbf{r}}_{a}\=\u27e8\left({x}_{b}{x}_{a}\right)\,\left({y}_{b}{y}_{a}\right)\,\left({z}_{b}{z}_{a}\right)\u27e9$, is the relative displacement vector,
${\mathit{r}}_{0}$, is the undeformed distance to frame_b from frame_a expressed along the inboard frame (frame_a), and
$\mathbf{v}\=\frac{d}{\mathrm{dt}}\mathit{r}\,$is the relative velocity vector.



Reaction Torques:
Reaction torques are applied only when $\mathrm{Use}\mathrm{Torque}\mathrm{Reactions}equals;\mathbf{true}\mathit{period;}$
$\mathbf{M}equals;{K}_{\mathrm{theta;}}\mathbf{\cdot}\left(\mathbf{theta;}\mathbf{}{\mathbf{theta;}}_{0}\right)\mathbf{}{K}_{\mathrm{omega;}}\cdot \mathbf{omega;}$
where

$\mathbf{M}equals;\u27e8{\mathrm{\tau}}_{x}comma;{\mathrm{\tau}}_{y}comma;{\mathrm{\tau}}_{z}\u27e9comma;$is the reaction torque vector,
$\mathbf{\theta}$$\={\left[{\mathrm{\θ}}_{1}\,{\mathrm{\θ}}_{2}\,{\mathrm{\θ}}_{3}\right]}^{T}\,$are the Euler angles  defined by the Rotation Sequence [1,2,3] and calculated from the relative rotation matrix of frame_b with respect to frame_a (see Euler Angle Sensor),
${\mathbf{\theta}}_{0}$, designates the undeformed rotation of frame_b with respect to frame_a, and
$\mathbf{\omega}$$\=\u27e8{\mathrm{\ω}}_{x}\,{\mathrm{\ω}}_{y}\,{\mathrm{\ω}}_{z}\u27e9\,$is the relative angular velocity vector.



Activation:
The actual reaction forces and torques applied depend on the values of $\mathrm{active}$ (Boolean Signal Input, see below), $\mathrm{Use}\mathrm{Torque}\mathrm{Reactions}$, and $\mathrm{In}\mathrm{Place}$ (Boolean Parameter, see below). See the section Modes of Operation, below, for details. The reaction forces and torques are turned on and off according to the parameter $\mathrm{T\_\_on/off}$ and the value of $\mathrm{active}$. This is controlled internally by an integer variable $\mathrm{state}$ described below.
State Value

Description

1

ON state.
The state of the Gripper when $\mathrm{active}\mathbf{\=}\mathbf{true}$ at initialization or $\mathrm{T\_\_on/off}$ seconds have passed since $\mathrm{active}$ became true during simulation. In this state the reaction forces and torques are applied as described above.

2

ON2OFF state.
The state of the Gripper when less than $\mathrm{T\_\_on/off}$ seconds have passed since $\mathrm{active}$ became false during simulation. In this state the reaction forces and torques are multiplied by an internal variable $\mathrm{onoff}$ that decreases linearly from 1 to 0 over $\mathrm{T\_\_on/off}$ seconds. Changing the value of $\mathrm{active}$ while in this state has no effect.

3

OFF state.
The state of the Gripper when $\mathrm{active}\mathbf{\=}\mathbf{false}$ at initialization or $\mathrm{T\_\_on/off}$ seconds have passed since $\mathrm{active}$ became false during simulation. In this state there are no reaction forces and torques applied.

4

OFF2ON state.
The state of the Gripper when less than $\mathrm{T\_\_on/off}$ seconds have passed since $\mathrm{active}$ became true during simulation. In this state the reaction forces and torques are multiplied by an internal variable $\mathrm{onoff}$ that increases linearly from 0 to 1 over $\mathrm{T\_\_on/off}$ seconds. Changing the value of $\mathrm{active}$ while in this state has no effect.



Note: If ${\mathrm{T\_\_on/off}\le 1e}^{12}$then the ON2OFF and OFF2ON states are never activated and $\mathrm{state}$ will only switch between the ON and OFF states.