Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

PLC as stepper controller

Status
Not open for further replies.

Bishop_v7.62

Newbie level 4
Joined
Jun 25, 2011
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,325
Hi to everyone

I'm trying to build bipolar stepper controller using siemens s200 plc. L298 would be my motor driver and plc would create signals for full step and half step mode of work. This is my school project, i don't have enough knowledge to build it so i need your help. I need to utilize high speed signals with microwin subroutines, inputs have to be speed (frequency), cw/ccw mode, and of course fs/hs mode and frequency needs to be modifiable on line. ANY help would be great, i'm totally at a loss. i have some ladder diagram exp, but have never worked with subroutines.

Thank you all in advance
 

alexan_e

Administrator
Joined
Mar 16, 2008
Messages
11,895
Helped
2,021
Reputation
4,158
Reaction score
2,031
Trophy points
1,393
Location
Greece
Activity points
64,377
I don't think that your question can be answered here, the majority of users are involved with microcontrollers or ASIC etc, they can also help with analog design but PLC is a different thing, maybe you should look for PLC specific forums.

I did a search using Google, one of the results was Forums.MrPLC.com

Alex
 

Bishop_v7.62

Newbie level 4
Joined
Jun 25, 2011
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,325
Thing is, i registered on that forum, but i'm unable to post new threads (?), in an any case, thank you for reply
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,967
Helped
14,147
Reputation
28,553
Reaction score
12,834
Trophy points
1,393
Location
Bochum, Germany
Activity points
278,259
Why don't you try to generate the step motor phase sequence in your familiar ladder description, using a timer for the step delay? This will provide you at least with a functional design.
 

Bishop_v7.62

Newbie level 4
Joined
Jun 25, 2011
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,325
I'm sorry, can you post me example, or link one, i'm not sure what you are talking about. (oh, and when i sad ladder ex, i meant i know basic stuff, like locking circles, using logic so...i'm a noob)
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,967
Helped
14,147
Reputation
28,553
Reaction score
12,834
Trophy points
1,393
Location
Bochum, Germany
Activity points
278,259
Yes, I'm talking about using logic. If you consider the state signals A, B, C, D, and inputs DIR, MODE and CLK, you can describe the stepper motor controller in any PLC programming language of your choice, e.g. ladder. As previously suggested, the CLK input should be derived from a timer that sets the step frequency.

The first design step is to write down a truth table that contains the next state of A to D depending on the previous states, DIR and MODE when the CLK input is set.
 

Bishop_v7.62

Newbie level 4
Joined
Jun 25, 2011
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,325
Ok, i managed to drive my step motor using pwm and fast outputs, i even tried using timers, it worked, but pwm subroutine is more elegant in my opinion. Now i wonder, there are two inputs for that subroutine, cycle and pulse. I locked my pulse to 1 ms but i would like my motor to gradually ramp up speed, and after some time, gradually stop. Is there a way to program cycle input of my pwm so it changes values from, let say 200, in increment of 5 every 1 s to 2, stay like that for 10 s and thay goes backe, in increment of 5s form 2 to 200?
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,967
Helped
14,147
Reputation
28,553
Reaction score
12,834
Trophy points
1,393
Location
Bochum, Germany
Activity points
278,259
i managed to drive my step motor using pwm and fast outputs, i even tried using timers, it worked
Very good.
i would like my motor to gradually ramp up speed
According to the S7-200 system manual, PWM cycle time can be only changed asynchronously, shortly stopping PWM operation. You have to determine, if this conflicts with the "elegance" of the PWM solution. The manual suggests PTO tables for step motor ramps, but it can only provide 50 percent duty cycle signals.

I fear that you have to fall back to manual step motor sequence programming if you want to implement an optimal speed ramp. I assume, that S7-200 can do at least for moderate step speed requirements. What's your maximum step frequency, by the way? For maximum utilization of the S7 capabilities, you may want to refer to AWL coding, however.
 

Bishop_v7.62

Newbie level 4
Joined
Jun 25, 2011
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,325
It doesn't have to be optimal, it is not for industrial application, i just have to show sequence driving. I'm gonna study manual a bit more, perhaps i will use pto instead of pwm, and i don't have fixed step frequency, i can determine it, currently it's 1kHz
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top