A system for controlling the movement of a movable barrier, such as a gate, bar, door and the like, the system comprising: a motor with shaft which either is or can be coupled to said barrier through a reversible kinematic mechanism so that the rotation of the motor in one direction corresponds to a displacement of the barrier in one direction and that the rotation of the motor in the opposite direction corresponds to a displacement of the barrier in the opposite direction to control the opening/closing of said barrier by inducing the rotation of the motor either in one direction or in the opposite direction; a control device of said motor; an input for receiving a movement command of the barrier; a control unit in communication with said input and said control device, said control unit being configured to read the barrier movement commands from the input and correspondingly send actuation signals to said control device of the motor; a sensor which either is or can be coupled to the shaft of the motor or to a member which either is or can be connected to said shaft or to the barrier to detect a quantity related to the induced rotation on the non-driven motor shaft; a circuit for detecting the direction of the current generated by the motor when its shaft is put into rotation by effect of a displacement of the barrier when the motor is not driven, the control unit interfacing with said detection circuit and said sensor to send actuation commands to the motor so that said motor generates a counterthrust which opposes the rotation imposed by the displacement of the barrier according to the entity of displacement detected by the sensor and to the direction of rotation of the motor shaft as detected by the detection circuit, characterized in that the control unit is configured to set the control device to allow the current to flow into the motor either in one direction or in the opposite direction as a function of the desired direction of rotation when a rotation command is sent to the motor and to short-circuit the terminals of the motor when the motor is not driven to be able to detect the direction of any current generated by the motor as a result of manual movement of the barrier. a motor with shaft which either is or can be coupled to said barrier through a reversible kinematic mechanism so that the rotation of the motor in one direction corresponds to a displacement of the barrier in one direction and that the rotation of the motor in the opposite direction corresponds to a displacement of the barrier in the opposite direction to control the opening/closing of said barrier by inducing the rotation of the motor either in one direction or in the opposite direction; a control device of said motor; an input for receiving a movement command of the barrier; a control unit in communication with said input and said control device, said control unit being configured to read the barrier movement commands from the input and correspondingly send actuation signals to said control device of the motor; a sensor which either is or can be coupled to the shaft of the motor or to a member which either is or can be connected to said shaft or to the barrier to detect a quantity related to the induced rotation on the non-driven motor shaft; a circuit for detecting the direction of the current generated by the motor when its shaft is put into rotation by effect of a displacement of the barrier when the motor is not driven, the control unit interfacing with said detection circuit and said sensor to send actuation commands to the motor so that said motor generates a counterthrust which opposes the rotation imposed by the displacement of the barrier according to the entity of displacement detected by the sensor and to the direction of rotation of the motor shaft as detected by the detection circuit, characterized in that the control unit is configured to set the control device to allow the current to flow into the motor either in one direction or in the opposite direction as a function of the desired direction of rotation when a rotation command is sent to the motor and to short-circuit the terminals of the motor when the motor is not driven to be able to detect the direction of any current generated by the motor as a result of manual movement of the barrier.