Notes on the MC_PowerStepper

The enables and the override for an axis are set with the MC_PowerStepper function block. An MC_Power block is used internally for this purpose. The MC_PowerStepper also detects the stall situations that occur in stepper motors if they are overloaded, and offers suitable counter measures. The status bits of a KL2531 or KL2541 terminal are monitored, and the errors indicated there are reported to the NC.

Stepper motor and synchronous servo: similarities and differences

Both types of motor use an electromagnetic field and the field of a permanent magnet in order to generate a driving force through their interaction. Whereas, however, the servomotor makes use of an expensive system of sensors in order to make specific adjustments to the alignments of the fields (current supplied dependent on the rotor position), this position-dependent control is not used for the stepper motor. This makes it possible to save considerable costs. There is, however, a possibility that some external force will push the motor beyond the position where it is able to generate the maximum torque. Because the electrically generated magnetic field does not take this into account, the restoring torque generated will fall as the excursion increases. As a result of this, if the excursion is more than the one half of one pole step then the corrective torque will change sign, pushing the motor on in the direction of the next pole position. Depending on the conditions that now apply, the motor may now latch into the new position (which means that a complete step has been lost), or the whole process may be repeated again here. The latter case is referred to as stalling, and is most likely to occur when current is fed to the motor at the typical frequency of the active drive operation.

Example 1: A stepper motor fitted with an encoder is operated with the NC PTP using the parameters typical for servos.

Notes on the MC_PowerStepper 1:

Notes on the MC_PowerStepper 2:

After about 1.8 seconds, the axis is briefly blocked by an obstacle. Although the axis is then able to move freely, it is unable to follow the set value of the velocity, but will remain stationary, making considerable noise but without generating any detectable torque. Only after the profile generator has reached its drive destination does the total of the set and correction velocities fall. In this example, the motor moves in an irregular manner. Even a small load torque will, however, prevent this. The only solution here would be to issue an MC_Reset and to allow an appropriate settling time to pass. The axis would then have to be restarted by the application. A variety of state bits in the axis interface would react here. This must be appropriately considered in the application, as otherwise incorrect reactions may occur in the machine control process.

First corrective step: controller limitation

If, in the situation described above, the output of the position controller is limited to a sufficiently small value such as, for instance, 2%, the following pattern results.

Notes on the MC_PowerStepper 3:

Here again, for the remaining period of profile generation, the set speed is too high for the stepper motor to be able to follow the set movement properly. When the end of the set profile has been reached, the stepper motor is now brought to its destination by the position controller, at a working frequency that it is able to follow without the ramp. It generates a very high torque as it does this. The time required for this corrective measure is, however, very long.

Detection and handling of stall situations using an encoder

In order to be able to take appropriate counter-measures, it is first necessary to detect the problem. The following pattern results if an MC_PowerStepper block is used. It has a parameter structure of type ST_PowerStepperStruct, in which PwStDetectMode_Lagging is entered as the DestallDetectMode. The block uses the following error of the axis as the basis of its decision, making use of the threshold value and the filter time from the NC axis data for the following error monitoring that is to be deactivated here. In this example, PwStMode_SetError is entered as the DestallMode. Initially, the only difference from the following error alarm is the different error code.

Notes on the MC_PowerStepper 4:

If PwStMode_UseOverride is entered as the DestallMode, the MC_PowerStepper block uses the override to halt the profile immediately. Because, however, this halt does not abort the profile, yet does at the same time prevent the end of the profile from being reached, there is no effect on any status bits. The controller output, limited here to 2%, brings the axis to within the following error threshold of the current set position of the profile. Then the override is then returned to the value specified by the application.

Notes on the MC_PowerStepper 5:

As a result, a significantly greater proportion of the overall profile is travelled at the specified speed, and the destination position is reached correctly. The status information for the axis is generated correctly.

Combinations of stall detection and handling

The following table illustrates the combinations of the supported modes for stall detection and handling.

 

PwStMode_SetError

PwStMode_SetErrNonRef

PwStMode_UseOverride

PwStDetectMode_Encoderless

Comment 1

Comment 2

not suitable

PwStDetectMode_Lagging

Comment 3

not useful

Comment 4

Comment 1: Useful for axes without encoder that are not referenced.

Comment 2: Useful for axes without encoder that are referenced with the aid of the terminal's pulse counter and, for instance, an external sensor.

Comment 3: The resultant behaviour largely corresponds to following error monitoring.

Comment 4: Useful for axes with encoder.