as per the motor dynamics it is not possible to rotate motor for that much less time as you said 0.5 sec.
it is also not possible to reverse motor in 0 time. you have to allow motor to rest for atleast 2 sec in between. because when motor is rotating at higher RPM it has some moment of inertia that will keep it moving is same direction for some time (say 1 sec). also it is required to use DBR – dynamic breaking resistance because when motor is suddenly stops and reverses it generates large back EMF