PLC with stepper motor driver

suzusku

Member
Join Date
Sep 2012
Location
Singapore
Posts
8
Hi folks,

I'm a newbie here and I have a question that I have been trying hard to find an answer.
Currently I have a Keyence plc (transistor output) that I wished to control the stepper motor driver. The driver has 3 particular terminals namely "step", "dir" and "gnd". I understand that I'm supposed to input pulses into the step and dir but how does it really work?

Do I input digital pulses to the "step" to ramp motor up/down?
What about dir? Input 0 to turn ccw and 1 to turn cw?

appreciate any help please!
 
You did not mention what stepper drive you are using, but generally they all work the same way.
The direction signal is typically ON for one direction of rotation and OFF for the opposite direction. Which direction that actually is (CW or CCW) depends on the drive, motor, and wiring.
The step signal is a pulse train which determines the motor speed. The faster the pulses are, the faster the motor goes. The drive will typically have switch settings for the number of pulses per revolution. If the drive is set for 2000 pulses per revolution, you must issue 2000 pulses to turn the motor 1 turn.
 
Also keep in mind that you need a PLC with "high speed output" functionality. This goes beyond just having transistor outputs; the controller needs special hardware that allows the output to pulse independent of PLC scan time, typically in the kHz or even MHz range.
 
Thanks for the help guys. The plc I'm using is Keyence and the driver is schmalzHaus easy driver. Keyence plc pulse output can reach frequency up to 50khz. I believed its consider good enough for my app right? I dun need fast speed for my app.

Another thing is that can I tap voltage from 24v main power supply to my easydriver? My plc is also tapping from the supply. Has anyone tried using plc on a easydriver? It shouldn't have any issue right?
 
Thanks for the help guys. The plc I'm using is Keyence and the driver is schmalzHaus easy driver. Keyence plc pulse output can reach frequency up to 50khz. I believed its consider good enough for my app right? I dun need fast speed for my app.

Another thing is that can I tap voltage from 24v main power supply to my easydriver? My plc is also tapping from the supply. Has anyone tried using plc on a easydriver? It shouldn't have any issue right?
That circuit board might be OK for a hobby project, but is not something I would even consider for industrial use.
I suggest using a different 24 volt supply to run the motor. There is a risk that the driver will cause noise on the supply that could cause problems for the PLC.
That driver board appears to need 5vdc signals for the step and direction. You PLC outputs are probably 24 volts so that could be a problem.
 
That circuit board might be OK for a hobby project, but is not something I would even consider for industrial use.
I suggest using a different 24 volt supply to run the motor. There is a risk that the driver will cause noise on the supply that could cause problems for the PLC.
That driver board appears to need 5vdc signals for the step and direction. You PLC outputs are probably 24 volts so that could be a problem.

According to keyence plc specs, it stated "A 1.6 kΩ current limiting resistor is built in each output of R500 to R502 (to connect a motor driver)". Is the resistor supposed to drop the voltage down? if it's not, what can i do to make the output to become 5vdc? is 5vdc the same as logic TTL here?

another question is that i cannot understand how we can do microstepping using a plc. On a microcontroller C programming language, i can type the command for microstep but for plc i cannot figure it out how. is it possible with plc?

As for power supply, yes i think i will use a different power source for the driver to prevent all sort of interruption.
 
According to keyence plc specs, it stated "A 1.6 kΩ current limiting resistor is built in each output of R500 to R502 (to connect a motor driver)". Is the resistor supposed to drop the voltage down? if it's not, what can i do to make the output to become 5vdc? is 5vdc the same as logic TTL here?

another question is that i cannot understand how we can do microstepping using a plc. On a microcontroller C programming language, i can type the command for microstep but for plc i cannot figure it out how. is it possible with plc?

As for power supply, yes i think i will use a different power source for the driver to prevent all sort of interruption.
If the Keyence PLC has current limiting resistors built in then you should be OK on the stepper inputs.
The stepper drives that I use have the micro stepping is built into the drive and preset with dip switches. I don't know if your drive has a microstepping capability.
 
If the Keyence PLC has current limiting resistors built in then you should be OK on the stepper inputs.
The stepper drives that I use have the micro stepping is built into the drive and preset with dip switches. I don't know if your drive has a microstepping capability.

I saw that on the driver,there is two terminals "ms1" and "ms2". It belongs to micro stepping input terminals. You need to make Changes to these input according to the format given. For instance to obtain an eighth step, both need to be "high". My question is whether the input is gonna be a pulse input from plc again? How do I make a pulse high in a plc?

Could you advise me?
 
From your description, it sounds like MS1 and MS2 should not be connected to the PLC, unless you need to change the step resolution on the fly. Just hardwire them to voltage or common to set whatever microstep resolution you want (with current-limiting resistors if needed).
 
I happened to do some search and found that by default, both ms1 and ms2 are already at "high" and is thus at 8th microstep. It says that you need to pull either or both to ground to select the other modes. Now I know that I can use a dip switch to set the pins to off (low) or on (high).

I saw that for some other cases, there are people who pull a dir/step pins up to gnd by a 10k resistor. what actually is the purpose of the resistor? Do I need that for ms1 or ms2 pins?
 
According to the schematic [it would have been helpful if you had posted a link so I didn't have to look for it], the MS1 and MS2 pins are pulled high to Vcc through 10K resistors. The purpose of the resistor is to limit the current. If you connected either pin to ground in order to change the step resolution, you'd create a short circuit without the resistor in place. So to answer your question, you should be able to connect MS1 and/or MS2 directly to ground, since the resistors are already built into the board.

http://www.schmalzhaus.com/EasyDriver/EasyDriver_v44/EasyDriver_v44_sch.pdf
 
Gosh, I was troubled for not being able to post a pics here and i never thought of putting a link. So sorry.

Thanks, i getting to see some light here.
 
Guys, need some help here.


First, i'll describe how i have been using my plc. i had a power supply that converts 240VAC to 24VDC 1.4A. the 24VDC output is connected to the PLC 24V pin and 0V pin. For input, I tapped the 24V to the input's common terminal. when i connect a switch, one end to the input pin and the other end to 0V. For output, i tapped the 0V to the output's common terminal. When i connect a output device, one end to the 24V and the other end to output pin.


so now, keyence PLC has a selectable 24v and 5v input voltage for input pin 000 to 007. if i were to select 5v what is it supposed to mean?


1) Does it mean that the input common terminal has now been changed to 5v for input pin 000 to 007?
2) what about the rest of input pins? it still remain as 24v?
3) what is the voltage of the input common terminal after i have selected 5v as plc input voltage? is it 24v or 5v?


Maybe i'm having the wrong perception, please correct me.
 
I have got a hobby stepper motor driver from Sparkfun (easyDriver). On the driver board itself, there is three terminal inputs labelled "step", "Dir" and "Gnd".

Now with my PLC, my PLC output is connected based on NPN. therefore rightfully PLC output common should be connected to 0V (Gnd). The plc pulse output should be connected to the "step" of stepper driver and the "gnd" of stepper driver connected to the 24V of PLC. Then i realized, 24V to Gnd?? it just doesn't seems right.

I would like to ask if the revised flow is correct?
on PLC output, connect 24V to common of PLC. Pulse output terminal of PLC connect to "Step" pin of stepper driver. "Gnd" pin of stepper driver connect to 0V of PLC. I supposed this forms a closed electrical loop.

If the revised connection is correct, does it mean that all my output terminals must be connect based on PNP, no more NPN because my output common has become +24V.

Any help is really appreciated especially from the plc expertise here.
 

Similar Topics

Hello. I am using the following: Eaton E4-AC-12RXP PLC I am trying to control the CL86T which controls a Closed-Loop Stepper motor. I am using...
Replies
3
Views
940
A few days back I posted that you can use a PLC as a Stepper Motor Driver. I got mixed reactions and a lot of requests to see it. So, I posted a...
Replies
14
Views
3,451
Hello all, I am completely new to PLC programming and automation in general. I am working for a company that wants to use a TECO SG2 PLC to...
Replies
0
Views
1,503
I am would like to use a FUJI electric SPB PLC to control a stepper motor. I need the stepper motor to drive a rotating plate a specific number of...
Replies
9
Views
4,593
Good day, Does anyone have a tutorial for Motion Controls basics? Also sample configuration and wiring would be helpful just to make me...
Replies
3
Views
2,113
Back
Top Bottom