Block diagram of reverse logical control of linear movement actuators on stepper motors and ready-made modules, without feedback with the launch of the algorithm signal of the through one logical output, bypassing the control buttons of the popular MKS PWM generator.
After logical “1” is applied at the output to the trigger state, the motor rotates clockwise, the clutch - the carriage moves forward, the TTL induction extreme position sensor, upon reaching the carriage, sends a signal to the trigger switch, at the same time the direction of rotation of the motor changes and the carriage begins to move in the opposite direction to the 2nd similar position sensor and stop, the logical level at the output goes to “0”, the entire circuit returns to its original state.
I needed this logic in a vending machine to transport a product.
Ready-made modules are used as automata, which remain in certain states until the next event: