As shown in the figure: pitch 5mm, motor resolution 1000, reduction ratio 5.
The requirement is to position 100mm and then return to the origin. How should the program be written?

Analysis: To position 100mm, how many pulses are needed?
Positioning distance = pulse count * movement per pulse
Movement per pulse = 5/1000/5 = 0.001
Therefore, pulse count = 100/0.001 = 100000.
The program is as follows

Positioning 100mm

Return to Position
