0:01
Following on with the micro CPU 250 and we’re gonna see how that interacts with stepper motors If you’ve any questions, you can pop them in and we’ll get to them at the end.
0:11
Hello and welcome to today’s webinar Today we will look at using the micro CPU 250 with stepper motors.
0:19
Let’s take a look at our agenda for today We are going to start with a quick review of the CPU 250 we will talk about stepper motors We are going to talk about interfacing with stepper motors, whether you do it from a field bus or an industrial ethernet, whether you do it strictly from I.O.
0:38
signals, like stepping direction.
0:40
We are going to show you the steps involved in controlling motion from the CPU250 and there will be demonstrations throughout and we will finish with a Q &A session.
0:50
Here is a quick look at some of the hardware features of the CPU250.
0:55
You can see them all covered here in detail.
0:57
They are the hardware features and highlights for the CPU250.
1:02
It has all the prohibibles you are used to seeing in the micro series, a built-in ethernet port, a couple of serial ports, a cam port for remote I.O.
1:12
expansion, but it also has local I.O. expansion using OCS I.O. up to 7 modules worth.
1:19
And it supports all the same protocols you will find in the micro series.
1:23
From a CPU 250 standpoint it also has an amazing compliment of building IO and those are highlighted here.
1:31
But today we are going to focus on the two high speed DC outputs which are capable of stepper control. What is stepper motor?
1:39
It is a type of brushless DC motor that is used for simple position applications.
1:44
The way a stepper motor works is that a full motor rotation is always divided into a number of equal steps.
1:51
It could be 200 steps per revolution, could be 400 or could be a thousandth of steps per revolution.
1:58
Steppers are known for their ability to position without requiring any kind of encoder feedback, so they work well in open loop.
2:05
Now what are the advantages of stepper motors?
2:08
Well they have low cost, again they do work well in open loop type configuration, they are easy to use and have a great torque at 0 speed and at low speed so you would not find them hunting around when they are resting trying to hold position, they have a great torque when they are not moving.
2:26
Now when would you use stepper?
2:28
Low cost applications, low speed applications where you are moving from one point to another maybe going from point A to point B to point C and back to point A you get high continuous torque without the need of a gearbox.
2:42
So how can you control a stepper motor from the CPU250?
2:47
Well you have got some options.
2:49
Plenty of stepper motors support CANOPEN.
2:52
They have got it built right in and CANOPEN is an option for the CPU250.
2:58
Another would be using Ethernet.
3:01
You will find some stepper motors with Ethernet built in and many of them support Mudbus TCP also supported by the CPU250.
3:11
but the most common interface you will find on the stepper motors is a pulse train style interface which only acquires IO signals of a special type of control and that is what we are going to be focused on today using a pulse train interface to control a stepper motor.
3:27
So how are we going to wire our CPU 250 to a stepper motor that supports a pulse train or step and direction style interface?
3:36
Well let’s start with the step or clock signal which is the signal that tells the motor how many steps to move that needs to come from one of the two high-speed outputs on the CPU to 150.
3:48
So that is either Q1 or Q2.
3:51
Now step or motor also requires a signal for direction clockwise or counterclockwise and in some cases it will also need an enable signal.
4:00
Now those can be wired to output on the CPU 250 because there are no high speed requirements for those two signals and then in addition to those three output signals you are going to have a common and a 24 volt signal required as well.
4:16
Now we need to talk about what is called a trapezoidal MOV profile.
4:20
This is the type of MOV profile that the stepper motor is going to execute. What does it consist of?
4:26
Well the stepper motor is going to see a pulse train that will cause it to start accelerating from a starting frequency up to a running frequency, it will take a certain amount of time or a certain number of pulses to accelerate, then it will get up to the running frequency where it will stay for a certain number of pulses, then as it approaches the destination it will start decelerating back down to its starting frequency and then stop at the destination.
4:53
So by specifying the parameters in the table on the left, the cause the stepper to execute the trapezoidal move profile on the right.
5:06
Now let’s give an example with some numbers.
5:08
Let’s say we need to move a total of 8000 pulses, maybe that represents 40 revolutions, maybe it represents 5 revolutions of the motor, but we want to move 8000 pulses and we know we need to start with acceleration and end with deceleration and let’s say we want 800 pulses of acceleration and 800 pulses of deceleration, well that means we need to run at 6400 pulses to get a total of 8000 pulses, now what velocity do we want to run at? What number of pulses per second do we want to run at?
5:42
Let’s say that our max speed we want to run at for the move is 2400 pulses per second and we are going to start with velocity of 800 pulses per second that means during acceleration we are going to have an average of a thousand six hundred pulses per second as you can see there on the chart so how do we get these numbers to the CPU 250 so those pulse trains can be generated we do that by putting those numbers in the appropriate IO registers that are allocated for the stepper function and you can see in the chart on the left the next to the last column shows the IO references for step or number one and if we’re using step or number two the IO references are shown in the last column so we load appropriate values in the appropriate IO registers to specify the move and then kick off the move by turning on either key one for step or number one or key two for step or number two and we have also got some feedback bits we can use to make sure everything is working as it should.
6:44
Now here is a flow chart we have created that shows how the IO should be changing as the move progresses.
6:50
For our demonstration let’s start by taking a look at our logic in Cscape.
6:55
The first step in our logic program is we need to specify the move.
6:58
So we need to specify the start frequency and the run frequency.
7:03
These are both in pulses per second.
7:05
So we are going to start at 1000 pulses per second at the beginning of acceleration and end of the acceleration and our full speed is going to be 10 000 pulses per second and then we also have to specify how many pulses we want to accelerate, how many pulses we want to accelerate and in between how many pulses we are going to be running at full speed and all these variables we have created are tied to the appropriate IO registers in the program variable window.
7:36
So let’s go to the program variable window and see that these variables are all tied to the register as per the table from our slides and also as per the user’s manual. So we have prepared for the move by loading in these values.
7:50
Next we are going to go through a simple process.
7:53
First we need to kick off the move by turning on Q1 and this particular variable is tied to Q1 in our case.
8:01
We are just turning it on through the slide switch that is in our IO stimulator.
8:06
Next we need to monitor the feedback bit to see the motor has started moving, so our start move bit is on, we have turned it on, we wait for our move ready bit to turn off, that is the i30 bit, we are talking about stepper number 1, when that happens we are creating a state in our program called move in progress, so that is how we know that the move has started, because this feedback bit has turned off, now once our move is in progress, when that feedback bit turns back on again, we know that our is complete. So we can go ahead and say the move is complete. That is a new state.
8:44
We turn off the move in progress state.
8:47
We turn off the start move command at the beginning and then we will be ready for another move to execute again by kicking off again.
8:55
In our case by turning on this push button and doing the whole sequence over again. Let’s take a look at it on the bench.
9:02
To demonstrate our move we are going to stimulate the press of a momentary push button by sliding switch number one on and off and that is kicking off the move and we are just repeating it here with multiple presses of the button and of course you can set up the sequence with multiple moves in different positions we can do all that just by adding logic to our CPU 250.
9:27
That concludes our webinar for Thank you so much for listening and the Q &A session will begin shortly.
9:39
Okay, so we will be carrying on to CPU 250 next week again, which will be with use of variable frequency drives.
9:46
So if that is of interest to you, then the registration link is there at the same time as always.
9:53
Other than that, I don’t see any questions in on the topic today.
9:57
Thank you all for joining us.
9:58
I hope to see you next time.