MOD --- .. figure:: ../media/image1023.png :figwidth: 3.54167in :align: center **Purpose** Computes the modulo of a number for a given divisor. **Procedure** The MOD component returns the remainder when the input value is divided by a specified divisor: .. math:: y = x - floor(x/c) \cdot c where *x* is the input signal, *c* is the divisor, and *floor(x/c)* is the greatest integer less than or equal *x*. **Parameters** ========= ===== ==== ===== ======= ================ Parameter input unit range default remarks ========= ===== ==== ===== ======= ================ divisor real must be non-zero ========= ===== ==== ===== ======= ================ **Remarks** If a signal line is connected to the second input channel, the value of that signal line is used as divisor. Otherwise, the value specified in the component properties is used. The result has the same sign as the divisor (See examples). **Examples** .. figure:: ../media/image1024.png :figwidth: 7.28125in :align: center .. include:: substitutions_control.rst