Power Plant,Power Industries,Power Generation,Diesel Power Plant Jinan Boiler Group Co., Ltd. , https://www.jinanboiler.com
hbspt.cta._relativeUrls=true;hbspt.cta.load(2284573, 'e351278a-3f10-4402-bda5-5b8829eac7d0', {"useNewLoader":"true","region":"na1"});
**The Loop Function**
A common motion sequence in stepper motor applications involves repeating the same movement in the same direction and distance every time. This is known as a loop subroutine in programming. The instructions inside the loop are executed repeatedly, either indefinitely or until a condition is met. Once the loop finishes, the program returns to the main sequence.
According to the AZ series functions manual:
> *“The loop function is used to repeat the operation of the linked operation data number for the number of times set.â€*
> *“The operation is repeated from the operation data number where the 'Loop count' is set to the operation data number where the 'Loop end number' is set for the number of times specified in the 'Loop count.' When the operation for the set number of times is completed, the operation transitions to the operation data number set in 'Next data number.'â€*
In simple terms, the loop function repeats a specific motion based on the number of times you set. It's particularly useful in applications requiring consistent movement, such as ticket feeders or robotic arms.
**Application Example**
Imagine a robot that performs a dance routine whenever someone walks by. You could use an AZ motor for the arm joints, link three different moves (No. 0, No. 1, No. 2), and loop them three times. After the loop, the robot would move to the next sequence (No. 3) and hold the final position.
Here’s what we want to do:
- Perform No. 0 motion
- Perform No. 1 motion
- Perform No. 2 motion
- Loop No. 0, No. 1, and No. 2 motions 3 times
- Perform No. 3 motion

**How to Program It**
Using the MEXE02 software, you only need three data sets (#0, #1, #2) for this sequence. One benefit of the MEXE02 software is that once a move is programmed and saved, it doesn’t need to be reprogrammed. The key is in the second image showing "Next data No.", "Loop count", and "Loop end No."—these tell the software how to execute the sequence.

Once everything is set, just save your work. Here’s what the motion looks like when plotted:

**Why More Driver Intelligence Matters**
Traditional stepper motor drivers are not very intelligent—they simply convert pulse commands into motion. The real intelligence lies in the host controller, like a PLC, which handles complex motion sequences. However, the AZ series driver offers advanced motion programming capabilities, allowing it to operate independently in some cases.
With up to 256 stored moves in non-volatile memory, the AZ series reduces the need for a PLC. This leads to simpler designs, reduced costs, and more efficient control. Plus, since these motors include built-in mechanical absolute encoders, there's no need for external sensors or batteries.
**Benefits of Stored Data Programming**
- Saves space
- Simplifies design
- Reduces the burden on the host controller
Another example is a linear slide application where repeated feeding is required.


Want to learn by watching? Check out this video to see how it works.
hbspt.cta._relativeUrls=true;hbspt.cta.load(2284573, '3257c162-1fd0-4923-a205-57699545d6e5', {"useNewLoader":"true","region":"na1"});
For more information about the AZ series family of motors, actuators, and drivers, click the button below. The same dedicated drivers and MEXE02 software are used across all products.
hbspt.cta._relativeUrls=true;hbspt.cta.load(2284573, 'c9cd6ed1-0aa4-4485-aba4-c8a4b3128d90', {"useNewLoader":"true","region":"na1"});
Don’t forget to subscribe!
No matter how many features a product has, without intuitive and easy-to-use software, those features can be challenging to implement. Oriental Motor simplifies the process for its customers by offering a universal MEXE02 support software compatible with multiple product series. Each product has unique functions, so the software format adapts accordingly. A consistent user interface across different products helps reduce programming time for motion sequences on each axis.
The loop function is available when using any AZ series products with the MEXE02 software. It allows users to repeat specific motion sequences multiple times, making it ideal for applications that require precise, repeated movements—such as paper feeding systems or rotary index tables.
For an overview of the MEXE02 software, read this blog post or click on the image below.