Yaskawa
eLearning
You're watching the PLCopen Basics
Video Tutorial Series
This video shows how to Enable the Servos
using MC_Power
Hi, I'm Matt Pelletier
I think it's about time to get the servos energized
so let's do it!
I want to illustrate where we're going
in the class project for the next few videos
we'll use the existing HMI program
as the interface to enable the servos
and start positioning, reset faults
stop motion
and each box over here represents
a different POU
so in this video we're just doing the Enable POU
so let's do that right away
let's create an Enable POU and run it in this Slow Task
your language can be Ladder Diagram
and then we'll add MC_Power
So see if you can follow along with me
I know that we've done this type of thing before
in the IEC Basics class
so we'll just insert a new program call it Enable
change the language to LD
now that program exists
but it's not running in any task
so before we forget
let's Insert a Program Instance of Enable
OK
Enable Enable
we can open that up
now the Edit wizard remember the PLCopen
Plus lists all of the instructions
related to PLCopen
and MC_Power is the core of turning on the Servo
enter that one here
our axes are all set up
so we can use those, Screw
we've set up Screw as an Axis_Ref
and then Enable
we can use the Variable from the HMI
called G_Enable
and be sure you choose the right one here
EnableScrew
you can open up the HMI_I POU
and see we'll be using this Toggle Boolean
to turn ON and OFF
the G_EnableScrew
and that will be our direct control here of MC_Power.
Now what about these other Inputs?
Enable Positive, Negative, BufferMode
when you don't know what an input is
you right click and choose Help
and we always have here a description
of the input and output and parameters
so you can see here that Enable_Positive,
Negative, BufferMode
those are all E extended instructions
and they're not supported
they're reserved for future use
so it's safe to leave those disconnected
and this is really the most basic Servo ON
that we could possibly have.
So let's Download Changes and try it out
and in this version of MotionWorks IEC
I don't have the Download Changes button
but that's no problem you can go to
Extras > Options > Commands
and under Compile Debug
are all of the possible buttons
Download Changes can be added
as long as I'm in here
I think I'll get rid of the Rebuild Project
and I never use Patch POU
I can pull those off
and click OK
and now you can do Download Changes
of course you could always do
Online > Download Changes as well
and I'm used to this button so put that in there
and Download Changes
I forgot to connect my demo
so let me do that again
with the LinkManager
you can always check the status down here
I've set this to Customized it
to always show it in the Taskbar
and now I need to Login
if it times out you can hit Enter again
and Login
and there we've got it
get that camera connected
log into the camera
I usually zoom in a few clicks
and then I like it small here in the corner
so now Download Changes
Download Changes always Makes the project
and then attempts to Download
I think I'm going to get rid of this message
it's just complaining about
that they don't know if it's the same project or not
because it can only remember eleven characters
of the project name.
I will not show this again.
All right, Project and Boot Project
I'll close that resource
I have this setup
now I like to arrange this so that I can
see everything at once
Tile Vertically and I'll see this
and go into Debug Mode
and under Online be sure that Toggle Boolean
is ON for the selected worksheet
now I can turn ON Input 01 by just clicking on it
and you can see that that turned on MC_Power
and there's a confirmation of that
with this SO1 which is the Brake Release
Output by default
so if you have a Brake Motor you can
connect that to a relay to release the brake
but functionally it also means
that the servo is Enabled
so that's it Servo ON, Servo OFF
Servo ON, Servo OFF
no net created code yet for the Rotary
or the Virtual which are being turned on
simultaneously by this other Input
but that is what I would like to
challenge you to do.
Create an MC_Power for this Screw,
the Rotar,y and I don't show it here,
but also the Virtual Axis
let's see if we can get all of those up and running
and you can resume the video to see how I do it.
Okay, I'm going to very quickly create Servo Enable
for the other axes
leave Debug Mode
and Yaskawa's preferred method of programming is
a vertical layout we'll put the blocks going down
because we'll often have ladder rungs out
to the left or out to the right
or maybe Timers or other Logic
so we tend to do a more of a Vertical Block layout
and one shortcut is to simply type the name of
the Block like I'm doing here
you can use the Enter key to save some time here
so we've got Rotary > Enter
use the arrow keys to go over to Enable
G_Enable Rotary
line that one up
come down here another MC_Power 3
that'll be Virtual
and arrow over to G_Enable
see arrow down here to Enable Virtual
that is the code
I'm still connected
will do Download Changes > Close the Resource
free up some space
take a look here with Window > Tile
see my Blocks on one side
go to Debug Mode
looks like it's already ON
turn this one ON
there's a Left there's the Right
and the Virtual, check it for errors
and if you do have an error ID
all you have to do is look at that the code
the error ID code, the number
and then look in the Help
and scroll down toward the bottom
every error ID has a description
and if the server can't turn ON it's usually
one of these physical electrical conditions
or it could be that the Access_Ref. AccessNum
is not properly initialized that's why we did that first
in the previous video.
So use the Help to troubleshoot any problems
we now have the servos ON
and one feature of this YTTS Toggle
is that this Output Q
we leave Debug Mode
the Output Q
is marked Retained
okay, we don't need to stay in here
but that means that this Output will be Retained
even if you have a Warm Start
or Power Cycle
So back to Debug Mode
if I'd Stop
here the controllers Stop the servos turn OFF
and now if I Warm Start it
see that Output was Retained
and so the servos turn right back ON.
So that's a handy little feature
in an attempt to make this Input Interface
a little easier to use.
If you do Stop and Cold Start
then of course they're cleared to the Initial Value
and you have to turn them back ON
and now one final feature that is not so much PLCopen
but rather hardware based.
Is if you look at your Global Variables
each piece of hardware does have some
feedback and some of them
are related to servo ON
for example I can see here that
this Screw has a Servo ON Input
this is a status input coming back from the
servo into the IEC Controller
there's also useful information like the power
is on the Main Circuit Power
Positioning Complete
a Hardware Base Block
there's no E-Stop ON
and we'd mentioned the Break Output Status
this is a way to get
that into your program
so all these signals can be used to make a more
robust Servo ON
that checks for these conditions
before attempting to use the
MC_Power Block.
So this is success!
We have the Servos ON.