0% found this document useful (0 votes)
133 views4 pages

Plcopen Motion Control Overview

ت=

Uploaded by

عبيد
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views4 pages

Plcopen Motion Control Overview

ت=

Uploaded by

عبيد
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Creating Reusable, Hardware Independent Motion Control

Applications via IEC 61131-3 and PLCopen Function Blocks


I. INTRODUCTION
Based on application requirements and project specifications engineers a coupling to a master axis can be realized for instance via issuing
are required to use a wide range of motion control hardware. In the past MC_GearIn. The resulting state for the slave axis is then Synchronized
this required unique software to be created for each application even Motion. Issuing a single axis move command will bring the axis back to
though the functions are the same. The PLCopen motion standard either Discrete or Continuous Motion. Via the state Stopping one can
provides a way to have standard application libraries that are reusable return to StandStill. ErrorStop is a state the axis transfers to in case of an
for multiple hardware platforms. This lowers development, main- error. Via a (manual) Reset command one can return to StandStill, from
tenance, and support costs while eliminating confusion. In addition, which the machine can be moved to an operational state again. Please
engineering becomes easier, training costs decrease, and the software is note that the States define the functionality of the Function Blocks.
reusable. Effectively, this standardization is done by defining libraries
of reusable components. In this way the programming is less hardware IV. FUNCTION BLOCKS DEFINITIONS
dependent, the reusability of the application software increased, the cost A. AxisRef
involved in training and support reduced, and the application becomes
scalable across different control solutions. Due to the data hiding and The reference to an axis is done via the derived datatype AXIS_REF.
encapsulation, it is usable on different architectures, ranging from This datatype is supplied by all manufacturers. It provides the interface
centralized to distributed or integrated to networked control. It is not towards the motor / drive itself. The technicalities of the real interface
specifically designed for one application, but will serve as a basis for are hidden within the structure and function block itself. In this way,
ongoing definitions in different areas. As such it is open to existing and different architectures, from centralized to distributed and networked
future technologies. systems, looks the same to the user while giving access to all relevant
parameters.
II. OVERVIEW OF THE RESULTS
Currently the suite of PLCopen Motion Control Specifications consists B. AxisRef as Var_In_Out
of the following parts: The Axis_Ref is used as Var_In_Out, represented as an input and an
 Part 1& 2 – Basics & Extensions combined in one output connected by a horizontal line in a graphical representation of a
 Part 3 – User Guidelines and examples Function Block. The variables used within Axis_Ref, acting both as
 Part 4 – Coordinated motion input and output parameters, can be modified within the Function Block
 Part 5 – Homing Procedures as well as receive values from external variables. However they are
 Part 6 – Extensions for fluid power stored externally to the FB, making copying of the structure
unnecessary.
Basically every specification contains 3 sections: As an example of how this could operate: imagine a program containing
1. definition of the state machine several function blocks, all linked after each other (left-to-right) and all
2. definition of a basic set of FB’s for single axis and multi-axes referring to the same axis via Axis_Ref. The first FB reads the latest
motion control values in Axes_Ref, and might update some of these values before it
3. compliance rules and statement procedure. finishes its execution. Then the next FB is started and reads the updated
values within Axes_Ref, so uses the latest values. And these values are
III. BASICS – DEFINITION OF THE STATE MACHINE internally coupled to the motor itself. Again, the control architecture can
be quite different across systems.
The axis is always in one of the defined state (see diagram). Any motion One can use this reference to define one or more virtual axes, in that
command is a transition that changes the state of the axis and, as a sense that it exists as a datastructure but is not coupled to a physical
consequence, modifies the way the current motion is computed. drive and/or motor.
The state diagram normatively defines the behavior of the axis at a high
level. This diagram is useful to build a more complicated profile or to
treat exceptions within a program. (In real implementations there may
be additional states at a lower level defined).
There are eight states defined as shown in the picture below:

V. THE FUNCTION BLOCKS FOR SINGLE AXIS MOTION


CONTROL
There are motion related and administrative function blocks defined in
both part 1 and 2. The first movement function block is shown here in
some more detail:
A normal procedure starts in Disabled. In this state the power can be
switched on per axis (via the command MC_Power) which transfers the FB-Name MC_MoveAbsolute
relevant axis to the state Standstill. From there one can access the This function block commands a controlled motion at a specified absolute
Homing state (via the issue of the command Home per axis), which after position.
normal completion returns to Stand Still. From here one can transfer an
axis to either Discrete Motion or Continuous Motion. From these states In a graphical representation it looks like:
 MC_ReadDigitalOutput - provides the value of the digital output
MC_MoveAbsolute as referenced by OUTPUT_REF;
AXIS_REF Axis Axis AXIS_REF
 MC_WriteDigitalOutput - writes a value to the output referenced
BOOL Execute Done BOOL
REAL Position Busy BOOL
by the argument ‘Output’ once;
REAL Velocity Active BOOL  MC_ReadActualVelocity& MC_ReadActualTorque - returns the
REAL Acceleration CommandAborted BOOL value of the actual velocity or torque as long as enabled;
REAL Deceleration Error BOOL  MC_PositionProfile, MC_VelocityProfile & MC_Acceleration-
REAL Jerk ErrorID WORD Profile - commands different locked motion profiles: a time-
MC_Direction Direction position, a time-velocity or a time-acceleration profile.
MC_BufferMode BufferMode
VI. COMMON SET OF MULTI-AXES FUNCTION BLOCKS

The other single axis Function Blocks as defined in part 1 and 2 are For multi-axes, coordinated movements, a small set is defined. This set
listed here below in short-form: will be extended by additional application specific libraries. The current
defined Function Blocks are:
 MC_MoveRelative - moves the axis a specified distance relative to
the actual position at the time of the execution;  CamTableSelect - selects the CAM tables by setting the pointers to
 MC_MoveAdditive - for a specified relative distance additional to the relevant tables;
the original commanded position in the discrete motion state. In  CamIn - engages the CAM;
state Continuous Motion the specified relative distance is added to  CamOut - disengages the Slave from the Master axis immediately;
the actual position at the time of the execution;  GearIn - commands a ratio between the velocity of the slave and
 MC_MoveSuperimposed - for a specified relative distance master axis;
additional to an existing motion. The existing Motion is not  GearOut - disengages the Slave from the Master axis;
interrupted, but is superimposed by the additional motion;  MC_GearInPos - commands a gear ratio between the position of
 MC_HaltSuperimposed - commands a halt to all superimposed the slave and master axes from the synchronization point onwards;
motions of the axis. The underlying motion is not interrupted;  MC_PhasingAbsolute & MC_Phasing Relative - creates an
 MC_MoveVelocity - for a never ending controlled motion at a absolute or relative phase shift in the master position of a slave axis;
specified velocity;  MC_CombineAxes - combines the motion of two axes into a third
 MC_MoveContinuousAbsolute &MC_MoveContinuousRelative axis with selectable combination method.
- commands a controlled motion to a specified absolute or relative
position ending with the specified velocity; A. Aborting, merging, and blending
 MC_TorqueControl - continuously exerts a torque or force of the
Multiple function blocks have an input to set the different operating
specified magnitude, approached using a defined ramp, and sets the
modes, combined with an output for signalling this. With this input, the
‘InTorque’ output if the torque level is reached;
FB can either work in a “Non-buffered mode” (default behavior) or in a
 MC_SetPosition - shifts the coordinate system of an axis by
“Buffered mode”. The difference between those modes is when they
manipulating both the set-point position as well as the actual
should start their action:
position of an axis with the same value without any movement
 A command in a non-buffered mode acts immediately, even if this
caused;
interrupts another motion;
 MC_SetOverride - sets the values of override for the whole axis
 A command in a buffered mode waits till the current FB is done
and all functions that are working on that axis;
(signaled via the corresponding output or via in-position, or in-
 MC_TouchProbe - records an axis position at a trigger event;
velocity or similar outputs).
 MC_AbortTrigger - is used to abort function blocks which are
connected to trigger events (e.g. MC_TouchProbe); The following modes have been identified:
 MC_DigitalCamSwitch - provides the analogy to switches on a  Aborting - Default mode without buffering. The next FB aborts an
motor shaft: it commands a group of discrete output bits to switch ongoing motion and the command is affecting the axis immediately;
in analogy to a set of mechanical cam controlled switches
 Buffered - The next FB is affecting the axis as soon as the previous
connected to an axis. Forward and backward movements are
movement is ‘Done’. There is no blending;
allowed;
 BlendingLow - The next FB is controlling the axis after the previous
 MC_Home - commands the axis to perform the «search home»
FB has finished (equal to buffered), but the axis may not stop
sequence. The details of this sequence are manufacturer dependent
between the movements. The velocity is blended with the lowest
and can be set by axis parameters, as well as the function blocks as
velocity of both commands (1 and 2) at the first end-position (1);
defined in Part 5 – Homing Procedures;
 BlendingPrevious - blending with the velocity of FB 1 at end-
 MC_Stop - commands a controlled motion stop and transfers the
position of FB 1;
axis to the state ‘Stopping’. It aborts any ongoing function block
 BlendingNext - blending with velocity of FB 2 at end-position of
execution. With the ‘Done’ output set, the state is transferred to the
FB1;
‘StandStill”. While the axis is in state ‘Stopping’ no other FB can
perform any motion on the same axis;  BlendingHigh - blending with highest velocity of FB 1 and FB 2 at
end-position of FB1.
 MC_Halt - commands a controlled motion stop. It aborts any
ongoing function block execution. The axis is moved to the state
‘DiscreteMotion’ until the velocity is zero. With the ‘Done’ output VII. AN EXAMPLE
set, the state is transferred to ‘StandStill’; The following example is Example of a simple drilling unit:
 MC_Power - switches the power stage on or off;
 MC_ReadStatus - returns in detail the status of the state diagram
of the selected axis;
 MC_ReadMotionState - returns in detail the status of the axis with
respect to the motion currently in progress;
 MC_ReadAxisInfo - reads information like modes, inputs directly
related to the axis, and certain axis status information;
 MC_ReadAxisError - Indicates errors not relating to the function
blocks; FF F
 MC_Reset - makes the transition from the state ‘ErrorStop’ to
‘StandStill’ by resetting all internal axis-related errors and clearing REV
pending commands;
 MC_ReadParameter & MC_ReadBoolParameter - Returns the
value of a vendor specific parameter; We use Sequential Function Chart here to describe the different step for
this drilling example.
 MC_WriteParameter & MC_WriteBoolParameter - modifies
the value of a vendor specific parameter;
Step 1: Initialization, for instance at power up;
 MC_ReadActualPosition - returns the actual position;
 MC_ReadDigitalInput - provides the value of the digital input as
referenced by INPUT_REF;
Step 2: Move forward to drilling position and start driller turning: in this registration function now can be used company wide, and the source is
way it will be fully operational before the position is reached; then usable on different platforms. This saves time and money in the next
check if both actions are completed; machine.
Step 3: Drill the hole; This part is an ongoing specification, which releases as new examples
Step 4: After drilling the hole we have to wait for the step-chain are added. For up-to-date information, check www.PLCopen.org.
sequence to finish dwelling the hole free of any stuff which might have
stuck in the hole; IX. PART 4 – COORDINATED MOTION
Step 5: Move driller back to starting position and shut the spindle off.
Combining the finishing of moving backwards and stopping the spindle Part 4 is focused to the coordinated multi-axes motion in 3D space, to
we signal the step-chain to start over. serve the majority of user’s application needs in this area. Part 1 and
Part 2 deal with Master / slave motion control, a type of coordinated
motion control where the master axis position is used to generate one or
Initialization more slave axis position commands. For multi-dimensional movements,
one goes beyond this point via a grouping of a set of axes, without a
Done
master axis. This is done via the definition of a set of Function Blocks
with related coordinated motion functionality as well as a higher level
MoveAbsolute
state diagram, linking the single axis state diagrams in the group. In this
Done
way a better trajectory planning is possible. Also, the current
Master/Slave axes can have the problem that if an error occurs, the other
MoveRelative axes have no knowledge about this, and continue their movement. By
combining axes in a group one knows upfront which axes are involved
Done and has the basis for a better error behavior.
The level of the PLCopen Motion Control Function Blocks are specified
Ton at such a level that the user quickly recognizes the functionality of the
function block and what happens if it is activated or connected to other
Done blocks in a sequence of motion commands. This PLCopen initiative
transforms the functionalities as known in the CNC and Robotic world
MoveAbsolute
to the PLC world.
Overall there are a number of sets of function blocks defined to do this,
Done as shown below without going into details: for this download the
Representation
INT of the drilling example in SFC specification from the website www.PLCopen.org.

The corresponding timing diagram for the movement is depending on The first step is to group axes. The following FBs are defined for this:
the selected mode. For example:
 MC_AddAxisToGroup  MC_GroupReadConfiguration
v  MC_RemoveAxisFromGroup  MC_GroupEnable
 MC_UngroupAllAxes  MC_GroupDisable

The next step is to link the transformations:


FFW D FW D DW ELL REV t  MC_SetKinTransform  MC_ReadKinTransform
 MC_SetCartesianTransform  MC_ReadCartesianTransform
 MC_SetCoordinateTransform  MC_ReadCoordinateTransform
s
 MC_SetDynCoordTransform

t Y' Z' Product or Programmer´s



Coordinate System
PCS
Timing diagram for drilling – aborting mode Cartesian and/or
Velocity
X' cylindrical
Z transformations
Machine
MCS Coordinate System
FFWD FWD DWELL REV t
X Y Kinematical
Position
transformations
ACS Axes Coordinate
System

t
Axis group
1 2 3
Timing diagram for drilling – blending mode

VIII. PART 3 – USER GUIDELINES


Within Part 3 user examples are explained. These examples show how Overview of the coordinate systems and transformations
to create real application parts based on the function blocks as defined in
the specifications. With this, a user can create an own set of Function  ACS Axis related
Blocks, and so their own library, dedicated to their typical application  MCS Machine related
areas.  PCS Product or Workpiece related
To give an example: in Part 2 there is no registration function defined.
For this the function block TouchProbe is intended. With an example it For coordinated moving, the following blocks are defined:
is shown how the user can create an own function block Registration,  MC_GroupHome  MC_MoveLinearRelative
based on the function block TouchProbe, together with already defined  MC_GroupStop  MC_MoveCircularAbsolute
function blocks. With this, an application specific function block is  MC_GroupHalt  MC_MoveCircularRelative
created that also can be used across platforms. In this way, different  MC_GroupInterrupt  MC_MoveDirectAbsolute
inputs from sensors can be used, where either the location is not known  MC_GroupContinue  MC_MoveDirectRelative
(directly or networked) and /or need to be compensated. This user  MC_MoveLinearAbsolute  MC_MovePath
derived function block can be added to the company own library. This
Axes Group Synchronized Motion In this way, any combination sequence is possible without the need of
The following function blocks deal with a master/ slave relationship predefining hundreds of homing methods. The individual adjustments
between a single or group of axes and a single or group of axes for for torque limit, time limit and distance limit provide control of the
coordination purposes. There are two kinds of coordinated motion that sequence error conditions.
have to be distinguished from a programming point of view and in the
realization of the motion control itself. These two modes are identified The following FBs lead to a final position and leave the homing state to
here through their names: Synchronization and Tracking. The ‘StandStill’:
differences and related FBs are shown in the next figure:  MC_HomeDirect - Static Homing forcing a position from a user
reference;
 MC_HomeAbsolute - Static Homing forcing a position from an
absolute encoder;
 MC_FinishHoming - Finishes the homing procedure with the
possibility to do a relative move to the operational area.

In addition, the homing functionality is needed while the machine is


operating, i.e. not in the state ‘Homing’. This ‘homing-on-the-fly’ is
called passive homing. They have no effect on State Diagram, like the
administrative FBs, and can be called in any movement state. They
consist of:
 MC_StepReferenceFlyingSwitch
 MC_StepReferenceFlyingRefPulse
 MC_AbortPassiveHoming

XI. PART 6 – FLUID POWER


The goal of this part is optimizing programming and integration of fluid
Graphical explanation of coordination power devices and systems by defining Function Blocks employing
PLCopen standardization and modular methodology, based on the
Then there are other FBs defined, most without motion: existing set and resulting in a limited number of additional function
 MC_GroupSetPosition  MC_GroupReadError blocks.
 MC_GroupReadActualPosition  MC_GroupReset The primary goal is to level restrictions to market response and provide
 MC_GroupReadActualVelocity  MC_PathSelect integrators with the option to apply the best technology to a given
problem without regard to specific technology constructs. Standardized
 MC_GroupReadActualAcceleration  MC_GroupSetOverride
interfaces will allow cross pollination from electrical and fluid power
 MC_GroupReadStatus
resource pools and drive best of breed solution configuration.

The defined Function Blocks are:


X. PART 5 – HOMING PROCEDURES AND BLOCKS
 MC_LimitLoad  MC_LoadControl
A. Homing Procedures  MC_LimitMotion  MC_LoadSuperImposed
 MC_LoadProfile
The homing functionality was originally seen as a separate sequence in
the startup phase of a machine or axis. The sequence for an axis was:
power on, homing, and move ‘something’. The whole homing procedure XII. CERTIFICATION
itself was hidden to the user. However, some users needed more control
on the homing functionality itself. For this reason, a set of building Included in the document are the rules for compliance and certification.
blocks have been identified to be able to define dedicated homing Basically this is a self-certification, from which the results per supplier
procedures. This procedure can be encapsulated in a dedicated homing are published on the PLCopen website www.PLCopen.org. Certified
function block, which can be added to the library and used for this companies are allowed to use the logo below, with additional number,
specific procedure. As examples, several possible homing procedures date and number of supported compliant function blocks:
are defined:
 HomeAbsSwitch - Absolute Switch homing plus limit switches;
 HomeLimitSwitch - Homing against limit switches;
 HomeBlock - Homing against hardware parts blocking movement;
 HomeRefPulse - Homing using encoder reference pulse ‘Zero
Mark’;
 HomeRefPulseSet - Homing using a set of encoder reference pulses
‘Zero Mark’;
 HomeDirect - Static Homing, forcing a position from a user
reference;
 HomeAbsolute - Static Homing, forcing a position from an absolute
encoder.
XIII. CONCLUSION
B. Homing Step Function Blocks
The publication of the specification and the first implementations
To make these procedures available to the user, a toolkit is defined with clearly showed that the multi-axes implementation certainly fits within
additional Function Blocks, FBs. By using one or more connected the framework as defined by the IEC 61131-3 standard.
function blocks one can create complex homing sequences. With these, With many implementations becoming available, motion control will
a user can create its own homing procedure in more detail, and even never be the same: more hardware independence give the users less
create own, user specific, homing procedures. Additionally, these training costs, and the possibility to create application software that is
function blocks include advanced homing process error reporting, usable on a number of different targets more easily, and targets which
evaluating time, distance and torque limits. can be selected in a later phase of the overall machine development
The following defined FBs match the homing procedures and are issued cycle. This brings a higher efficiency and reduces costs during
in or change the state to the ‘Homing’ state. development, maintenance and training.
 MC_StepAbsSwitch - Absolute Switch homing plus limit
switches; For up-to-date information, the specification itself, as well as
 MC_StepLimitSwitch - Homing against limit switches; information on the contributions of PLCopen in safety, communication
 MC_StepBlock - Homing against hardware parts blocking and exchange, check www.PLCopen.org.
movement;
 MC_StepRefPulse - Homing using encoder reference Pulse ‘Zero
Mark’.

You might also like