Using PLC to control stepper motors

другие контроллеры
jonny22
Posts: 1
Joined: Thu Sep 26, 2024 8:05 am

Using PLC to control stepper motors

Post by jonny22 »

Hi there,

I'm trying to generate pulses to control a NEMA 17 stepper motor using a PLC.

The motor has a driver that converts the pulse/direction signals into the correct A and B phase signals for the motor. I programmed the PLC to output a series of pulses on an output pin to move the motor. The problem is that when the motor makes a stepping motion, it makes loud noises, like it's shaking violently. Also, the motor turns a few steps in one direction and then either misses a step or two or turns a few steps in the opposite direction. I left the DIR signal as is.

I've read about acceleration and deceleration ramps to keep the motor running smoothly and initially thought this might be the problem, although the same thing happens even if I only send a pulse to the driver every second or two. So for a single step motion, there is no possible acceleration/deceleration ramp (right??).

I have tested the same stepper motor and driver with a PC controlled system (running Mach3 software) and it runs smoothly and does not produce the noise or vibration I am getting during single step movements.
Dfcz
Posts: 878
Joined: Tue Dec 26, 2006 5:21 am
Location: Russia

Re: Using PLC to control stepper motors

Post by Dfcz »

If the stepper motor does not work well: approximately as described in your case, then this indicates an incorrect setting of the driver and motor, which includes both the load on the motor and the pulse frequency, and more. At the same time, we can say that there is no problem with the PLC, although the stepper motor works well with another PLC.
Dfcz
Posts: 878
Joined: Tue Dec 26, 2006 5:21 am
Location: Russia

Re: Using PLC to control stepper motors

Post by Dfcz »

One of the typical reasons for the poor performance of a stepper motor is the incorrect marking of the windings. To check the correct marking of the motor windings, I do this. I connect only one phase A-A to the driver and rotate the engine very slowly (with the program). The motor shaft must always have a holding torque.
then I repeat with the B-B phase.