I am new to robotics. I want to understand how gears state is preserved as the gears turned to same positions repetitively. I have a bevel gear and a step motor connected to one gear. This gear will turn 45*n = degrees. That is to say there are 8 states gears will stay in. The problem here is there will be force on the gear, which is not connected to motor, in any direction. That force must not change worm position even in micrometers. I think there should be a locking mechanism. Is there any applications of that you can give example of?
A complete answer isn't possible without details of your requirements for rotation rates, torque, tolerance, budget, mechanical layout, allowances for calibration or adjustment, and directions of motion. That said, I will mention some relevant topics for gungor to study.
First, read about backlash. Here's a brief overview from wikipedia:
In mechanical engineering, backlash, sometimes called lash or play, is clearance or lost motion in a mechanism caused by gaps between the parts. It can be defined as "the maximum distance or angle through which any part of a mechanical system may be moved in one direction without applying appreciable force or motion to the next part in mechanical sequence".
Next, read about anti-backlash mechanisms. An article in machinedesign.com has an overview of some common methods, including use of precision gears; adjusting positions of gears (either manually or automatically) for minimum lash; and special designs. With so little context given in the question, one can't say which technique would be best.
Also consider using limit switches or an encoder. A set of eight or sixteen switches could be installed and calibrated so that different combinations of switch readings correspond to go and nogo rotations.
A rotary table or an indexing fixture would allow precise and solid positioning, but can be expensive, heavy, and in some forms difficult to use in automated systems. However, if you use a machinist's indexing or dividing plate with a multiple of eight holes, repetitive rotary positioning accurate to a few arcseconds (comparable to a few microns at a radius of a few cm) is easy to achieve.