How can I solve (control by position) a project with two mechanical sets where one is rotating at positive speed and another at negative speed?

In such case, the scenario that is controlling the position should be defined with respect to the mechanical set rotating at negative speed.

Ex. Motor with two mechanical sets rotation with imposed speed (positive and negative) defined as follows:

The solving scenario that controls the position of mechanical set should be defined as follows: