Yaskawa
eLearning
Let's look at how to use SigmaWin+ to do a
Position Control Mode Application
using the SigmaWin+ Parameter Wizard.
So here's the application...
Let's just review that quickly.
We're going to be simulating a rotary
index table directly driven by an SGMAV
motor and commanded by standalone controller.
Here's the simplified
connection diagram. The output format is
listed as Step and Direction so
controller sending Step and Direction to
the amplifier and this indexer
controllers program so that each command
pulse represents . 01 degrees.
So one pulse here from the controller,
the motor should go . 01 degrees.
By the way, that's called the
Reference Unit when you are
referring to the amplifier.
We have the outputs SO1
connected here we want that
to turn on whenever the position error
goes below . 1 degrees and we'll use
that in the indexer controller to
confirm that the motor is in position at
the end of the move.
Encoder feedback resolution
must be set so that each post-quad
count back to the controller
represents . 01 degree of motion completed.
So you see how that works here,
the controller is going to send a pulse
amplifier and we want the encoder
feedback when it's read as quadrature
encoder feedback to also show that
that .01 degree of motion has
taken place.
The indexer has one output
for turning the servo on, see that here and
when we turn this servo on input off
would like that to clear any faults in
the amplifier, and the last two here says
if the position error rises above 90 degrees,
we got 90 degrees behind in the amplifier,
we want to have the amplifier
fault out, a Position Error Overflow
and also we'd like to have a warning
when we get halfway there,
45 degrees, so to solve this simplified
application story, here's what I'll do,
I'll initialize the parameters, go into
the Setup Wizard and the Editor to set
up all the parameters. According to this
application, I'm going to label the terminals
here so that when I do have to wire up
the controller, I'll know exactly what my
connections are.
I'll look at the parameters
that were changed and then use my demo
I'd like to verify that this was going
to work before I attach the real controller.
So in SigmaWin+
we'll go to the Parameters and
hit Initialize,
OK,
and it does say that I need to
Change of Parameters Requires Restart.
I will wait to do that until I have finished
all of the other parameters.
So now let's start the wizard
by going to Setup Wizard
under the Parameter menu
and first step is always to do this,
Apply,
to not using the fully closed encoder. under
Under Control Mode, select Position control
(pulse train reference) and hit Apply.
Now for the Reference Input Setting, we have
these different formats that the
controller can send it's pulses, we have
said that the output format is listed
"Step and Direction" so I'm going to use
Sign + Pulse which is equivalent to
step and direction.
You got pulses on one channel
and high or low for direction on
the other channel.
That's likely to be the most common
format for controllers
operating in Position Mode.
There's a choice here for Positive logic and
the case that your pulses go from high to low,
Negative logic for that case and
then from low to high is Positive logic.
I'll just stick with Positive logic and
the controller would list whether it's
positive or negative or give it a drawing,
I'm assume Positive logic.
Now I get to this
Electronic Gear function and what
this means is we need to set the
reference unit. I'm going to recommend
that when you do this you do the
electronic gear details.
This lets you choose a mechanical system
that best fits the description of your
machine. If none of these can be used
with your machine you can go back and
enter the parameters directly, but I said
I have an index table and so I think this
Round table it's called here,
will work out just fine.
First question is Gear ratio and you can
see this is referring to a mechanical
gear between the motor and the table
I don't have that it says that it's
directly driven by SGMAV motor,
so I'll leave that at 1:1.
Next here's the Reference Unit
and this refers to
the distance that the machine should
move when one pulse comes from the
controller - we call that the Reference Unit
and I wanted to set that to .01 degrees.
See here that's been set .001 degrees
by default.
I'm going to Modify and just knock off a
zero here, and also on this page is the
Position Completed Width, which has to do
with the COIN output signal.
COIN means position coincides the actual position
and the commanded position coincide
within a certain tolerance set by the
parameter Pn522.
And we had mentioned that
in the application, they want this
output SO1 to turn on, so we can get that
signal back to the controller whenever
the position is within .1 degrees.
So my reference unit is .01 degrees
and we're asking for the
Position Completed Width in reference units
then I'll need ten reference units
to get to .1 degrees
and hit Apply for that.
Moving on to Motor Encoder setting,
we are able to set
the number of pulses per motor
rotation and here I've said that the
encoder feedback resolution must be set
so that each post-quad count back to the
control represents . 01 degree of
motion completed.
This is actually what's
happening here where it says set the
dividing output according to
the electronic gear ratio.
Why 9000?
Well, 9000 is pre-quad pulses
so after quad that would be 36,000.
Basically, you can see that if the
reference unit is .01 degrees
than 360 degrees equals
36,000 reference units since this
parameter is given as pre-quad pulses
we'll need to divide that 36,000 by four
so 36 divided by 4 is 9
so just hit Apply here.
We'll leave the absolute encoder as
absolute encoder and go on here to the
direction there was nothing indicated
about the direction we'll figure that out
I guess once we see the table in motion.
Leave the standard setting and
finish up here.
Under Motor Stop,
no specification was given how the motor
should stop let's just leave that
default, hit Apply.
Now for the I/O signal setting
for inputs, we see that the
amplifier input Servo On
should also take the function of
Alarm Reset when the Servo On signal
turns off and when this input turns off.
So I'll go into my input signal settings
you see that I already have Servo On,
Alarm Reset is on pin 44, so I can move
that over and make it on the same pin.
Notice that is somewhat of a warning here
they turned the text red, but then not only
that I can click on it again and that
reverses the allocation, meaning instead
of normally open it's normally closed
and so now when I open the connection
to pin 40
I'll Reset Alarm and when I close
the connection to pin 40 I'll turn the
Servo On.
That's it for the inputs, the rest we'll
leave at default probably not even
going to use them according to the
wiring diagram.
And it's warning me about
the duplications here of Servo On
and Alarm Reset.
Yes, I'm sure.
Now for outputs, we're looking
at this SO1 to be the COIN output.
If I look at my outputs SO1 is COIN
it's also Velocity Compare and since
Velocity Compare is not applicable in
position mode, I can just leave this here
this is the default and we'll apply that.
For these other two that have to do with
the position error alarms and warnings
I can't really do those through the Wizard,
so I'll go in to these parameters
next here outside of the Wizard.
So I'll save the Wizard,
I like to save first
called Position Mode
and then you can write with a backup file
OK, and I'll finish
and yeah, I could cycle power
but I'll just go ahead and finish up
with those other two parameters in the
parameters list.
And those are parameters Pn520 and 51e.
Under sequence Pn520,
Excessive Position Error Alarm Level,
so I'll open that one.
It's given in reference units and so if I wanted
to have 90 degrees, I put in 90 my
reference unit was . 01 so two more
zeros and then the warning level was
supposed to be 45 degrees, but you'll
notice the unit here is in percent and
that begs the question...percent of what?
And typically when you see a percentage
if it's not listed what it's a
percentage of, it would be a percentage
of another parameter that's related to it.
In this case, we're talking about percent
of the 90 degrees.
So although I want 45 degrees
I don't enter 45, I add 50 percent
because 45 is 50 percent of 90.
And I'll write those over.
Right now I'm done with my parameters,
I'll close it, cycle power.
Best practice is to reconnect,
File, Reconnect,
and then back into the software.
So let me go through here and label
the terminals, Servo On and Alarm Reset.
This is going to be wired to pin 40 CN1.
Coder feedback and always refer to
the Wiring check under the Monitor
if you don't know the pin numbers.
Encoder feedback is over here
PAO, PBO, PCO
so that was 33, 34, 35 and 36.
And the last one here 19 and 20.
And output SO1 right here is pin 25 and 26
25, 26
it's just good practice to have your pin
numbers labeled, so when you go to wire it
you've got it all in one place and you
know exactly where to wire to.
I'm missing the command reference here
Step and Direction and that's up here to the
reference here, pulse and sine 7 and 8
and 11 and 12..
7 and 8
11 and 12
So where I'm at...Initialize the parameters,
used the Setup Wizard and the Parameter
Editor, labeled my terminals.
I could see a list of the
parameters that have been changed
by going to the Parameters menu again,
opening up differ from constant
and just take a look here be sure that
everything is in place and now let's
verify operation on the demo so the
first thing I can do here to check out
this application is to use these monitors:
reference pulse, feedback and deviation.
So let's go find those here, we've
got the Deviation Counter that's better
described as the Position Error.
There is the Reference Pulse Counter,
that's counting the pulses
from the controller and
Feedback is counting the encoder pulses
feedback from the motor.
So I've now enabled the servo
and I'm going to give
a reference pulse through my demo by
turning the wheel one click you can see
that one Reference Pulse now and the
Feedback Pulse Counter went to 16.
Do one more.
I've got two, Feedback Pulse Counter went
to 44, so why is the Feedback Pulse Counter
going so much higher? It's because of
that electronic gear ratio parameter the
motor's encoder is moving the equivalent
of . 01 degrees which in encoder counts
is much higher number out of the million
for revolution encoder counts.
Also, I can see that if I were to
put my hand on the motor,
let's watch the deviation counter,
I would apply some force to it, you can
see the deviation counter goes up and
down and then also if I go to Wiring Check
I can see the COIN output will turn off
if I go out of position.
See it goes from low to high.
High means off,
low means conducting circuit.
The other feature that had to do with a position
error was to get a warning or an alarm
by moving the motor in over-travel.
This could happen during motion, but the test
it out it's really hard to overpower the
motor by 45 or 90 degrees
unless you'd put the demo into
over-travel condition.
So let's keep an
eye on the Deviation Counter
and I'll hit the over-travel inputs,
you can see I've done that.
I'll start to turn the motor,
you can see the Deviation Counter
is now going to way up.
That's the Position Error
going way up
so 4278 means 42.78
and now it says 4149 is 41.49 degrees.
And if I go up here a little bit,
above 45 you can see I've got the
Overflow Warning and if I keep going,
I get the Position Error Pulse Overflow.
I can go take a look at that alarm and
you'll see that if I scroll down a little
bit, the deviation counter did go right
about up to 90 degrees.
Now for the Pn212 setting
I did already explain why
that's 9,000 because the pre-quadrature
is 9,000 post-quadrature would be 36,000
which is the number of reference units
per rotation and then finally let's use
program jog to move the motor
one revolution.
How many reference units are required?
The answer to that would be
36,000 so I get 360 degrees out of my
.01 reference unit.
So before I go into Program JOG
how about I try to reset the alarm by
turning off the servo and see that works
Program JOG is under Test Run
so I'll need
36,000 reference units.
I can hit Apply
Maybe I'll cut the speed down a little
bit so it doesn't go too fast,
400
and let's cut down Accel/Decel
maybe down to 200
You can see how when I do that it
adjusts the profile and then I'll hit
Run, Servo On, and I still have my
over-travels on.
Put the over-travels back on
Program JOG and Run.
Yep, we're going to move
and take my word for it, it moved,
and it moved one revolution.
So, that's it.
Position Control Mode Application
using the Wizard and SigmaWin+.