Contact Locking Motor Control

Download Project Files

= What You Need to Know Before Design =
 * DIGITAL INPUT
 * DIGITAL OUTPUT
 * BINARY FLAG
 * AND
 * NOT
 * Adding a Line Label

= Diagram Algorithm =
 * Motor right and left turn conditions will be checked.
 * If the motor turns to the left, it will not turn to the right, if it turns to the right, it will not turn to the left.
 * If you press left while turning to the right, it will continue to turn to the right, it will be the same in the left turning situation.
 * If neither of the buttons is pressed, the motor will not function.

= Diagram Solution = https://www.mikrodev.com/images/wiki/en/examples/contact_locking_motor_control.jpg
 * Turn left turn to the right: If the motor is turning to the left, a low signal will be sent to the AND block because that the 'motor left' tag is high and not for the receipt. Therefore, if the left movement of the motor is active, it will not turn to the right even if the right button is pressed. The controller has a cycle delay using binary flags so that it does not enter the endless loop.
 * The same situation in the upper part is also used to prevent turning to the left when turning to the right.
 * It is observed that there is no button pressed in the online monitoring screen above.
 * In the following example, the right turn of the motor is observed when DI0 is active.