News:

SMF - Just Installed!

Main Menu

Issue – Motion Block Direction Inversion

Started by Lino.castanheira, July 08, 2025, 03:23:22 PM

Previous topic - Next topic

Lino.castanheira

Dear Nirtec Support,

I would like to report an issue I encountered with the motion block in Machines Simulator when moving an object along a defined axis using an analog speed input. The behavior appears to be inconsistent, particularly in how the system determines the movement direction relative to the destination value and the sign of the speed input.

Scenario:
The movement axis is set to X.

The destination position is set to -4.

The speed input is controlled by an analog variable.

Problem:
When the speed value is positive, the object moves in the negative direction of the X axis.

When the speed is negative, the object moves in the positive direction — which is the opposite of what is expected.

Furthermore, if I change the destination value from -4 to -10, the movement direction inverts again, even though the axis and input signal remain the same.

This behavior causes confusion when using dynamic speed control, as the object does not move consistently in the direction of the destination depending on the sign of the speed.

EasyPLC_Master

The behavior you describe is likely caused by the element's orientation relative to the higher-level element.
Movements are not absolute, but relative, and depend on the specific configuration of each component. This must be taken into account when programming the movements.
In any case, we need an example (the .maq file, which you can send to info@nirtec.com) so we can analyze whether it is a malfunction or an incorrect interpretation.

EasyPLC_Master

We've already analyzed your code, thank you for sending the file, and as indicated, it is not a software error.
The behavior you indicate is due to the fact that the X axis of the component that moves is modified because the parent components have rotation, therefore the element when moving has the X axis (locally) rotated with respect to the X,Y,Z axis of the world.
To solve this problem, you must either set all rotations of the parent components to zero (and rotate only the model assigned to the component) or take into account the rotations of the parents to know the exact local axis of the child that you want to move.