ECET-262 [LABORATORY 12B]
ECET-262 [LABORATORY 12B]
ECET-262 [LABORATORY 12B]
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>ECET</strong>-<strong>262</strong><br />
FALL 2010<br />
[<strong>LABORATORY</strong> <strong>12B</strong>]<br />
Motion Programming: Introduction to EPAS Software & Targetbased<br />
Positioning
P a g e | 2 of 29<br />
LAB <strong>12B</strong><br />
Introduction to EPAS Software & Target-based Positioning<br />
Objective: To learn and understand motion programming applications and concepts by working<br />
with ELAU PacDrive Systems and EPAS Software.<br />
Software Tool Required: Automation Toolkit EPAS-4 V24.<br />
Prerequisite Knowledge: Ladder Logic programming.<br />
Supplement Documents: EPAS-4 Programming Manual, PacDrive C-200 Controller Operating<br />
Manual, PacDrive iSH Motor Operating Manual, PacDrive MC-4 Servo Drive Operating<br />
Manual.<br />
Background<br />
This lab would be utilizing ELAU PacDrive MC-4 and ELAU PacDrive C200 Controller<br />
Hardware along with the ELAU iSH Motors. The system setup is being shown in the figure<br />
below:<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
P a g e | 3 of 29<br />
PacDrive Automation System<br />
The PacDrive automation system provides the optimal solution for electronic packaging<br />
machines, both in terms of technology and economy. PacDrive consists of a high performance<br />
controller run on a PC or controller-based architecture, the PacDrive controller and the digital<br />
servo amplifiers which contain the power supply unit, the final stages and the servo controller for<br />
the individual axes. The PacDrive controller is the intelligent head of the system and is based on<br />
an industrial PC. The PacDrive controller synchronizes and coordinates the motion functions of<br />
the packaging machine. Thanks to the use of an IEC 1131-3 soft PLC, areas of application that<br />
had previously been unavailable to a classical PLC have been opened up to the PacDrive<br />
controller family. The individual PLCs or motion tasks can thus be split up into various parallel<br />
tasks that can then be implemented with the programming environment EPAS-4 as per the IEC<br />
61131-3 standard. Up to 99 servo axes can be connected to one PacDrive controller and supplied<br />
with motion data. The circular, digital real-time bus SERCOS implements the secure data<br />
exchange with the MC-4 servo amplifiers. With the use of fiber optic technology, the data bus is<br />
insensitive to electromagnetic disturbances and cyclically supplies the decentralized<br />
MC-4 servo amplifiers with new set points at a data rate of up to 16 MBaud. All internal<br />
conditions of the axes can be called up via the real-time bus and processed by the PacDrive<br />
controller.<br />
In addition to digital and analog inputs and outputs, each PacDrive controller has two<br />
serial interfaces and one Ethernet interface available. Thanks to the integrated OPC<br />
interface, it is possible to connect various process visualization and control systems<br />
to PacDrive. Additional peripheral components can also be connected using the field<br />
bus interface module. A PacDrive controller can be the field bus master or the slave.<br />
The international field bus standards CANopen, PROFIBUS-DP and DeviceNet are<br />
supported. The built-in interfaces enable remote diagnosis via telephone modem or<br />
Internet. PCs can communicate via TCP/IP with the PacDrive controller and directly<br />
diagnose the conditions of the controller.<br />
C-200 Controller<br />
The PacDrive controller, microprocessor-based control hardware with the VxWorks real-time<br />
operating system, centrally implements the PLC and motion functions. PacDrive controller<br />
C200 synchronizes, coordinates and generates the motion functions for a maximum of 8 drives<br />
of a food and packaging machine.<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
P a g e | 4 of 29<br />
PacDrive MC-4 servo amplifier<br />
The MC-4 digital servo amplifier features compact, closed, wall-mountable construction as well<br />
as state-of-the-art technology. The innovative MC-4 has a power supply unit, power amplifier,<br />
and a software servo controller for one axis all installed in a single space-saving housing. Since it<br />
communicates with the PacDrive controller exclusively via fiber optics, it is also suitable for<br />
decentralized structures. It does not require a user program, processes single or multi-turn<br />
encoders, and configures itself using the electronic type plate in the SH motor.<br />
Highlights of the PacDrive MC-4:<br />
▪ Broad voltage range<br />
▪ Integrated power supply unit<br />
▪ Max. 34.5 / 69 kVA power<br />
▪ Automatic motor identification<br />
▪ Minimal size<br />
▪ Inverter Enable safety input<br />
▪ 250% overload<br />
▪ Integrated SERCOS interface<br />
PacDrive iSH Motor<br />
The innovative iSH combines the motor, power amplifier, and the digital servo controller for an<br />
axis in a space-saving housing. Due to its compact construction with integrated controller it is<br />
perfectly suitable for peripheral set-up. It is available with single or multi-turn encoders and<br />
configures itself with the aid of the electronic type plate in the iSH itself.<br />
Highlights<br />
▪ Compact size<br />
▪ 3.5 times as much peak torque<br />
▪ Integrated SERCOS interface<br />
▪ High-resolution single or multi-turn encoder<br />
▪ Protection class IP65<br />
▪ Simple wiring<br />
▪ Superior reliability<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
P a g e | 5 of 29<br />
Automation Toolkit EPAS-4 Software<br />
Due to the combination of comprehensive functions and fully developed tools, the Automation<br />
Toolkit EPAS-4 is a good example of a powerful programming tool that is as easy to use as a<br />
standard office program.<br />
Getting Started with EPAS-4<br />
EPAS-4 is a complete development environment for the PacDrive system. EPAS-4 puts a<br />
simple approach to the powerful IEC language at the disposal of the PLC programmer. Use of<br />
the editors and debugging functions is based upon the proven development program<br />
environments of advanced programming languages (such as Visual C++).<br />
EPAS-4 Quick Concepts<br />
Project<br />
A project contains all of the objects in a PLC program. A project is saved in a file named after<br />
the project. The following objects are included in a project:<br />
1. POUs (Program Organization Units)<br />
2. Data types<br />
3. Visualizations<br />
4. Resources and libraries.<br />
POU (Program Organization Unit)<br />
Functions blocks and programs are POUs. Each POU consists of a declaration part and a body.<br />
The body is written in one of the IEC programming languages, which include IL, ST, SFC, FBD,<br />
LD and CFC. EPAS-4 supports all IEC standard POUs. If you want to use these POUs in your<br />
project, you must include the library standard.lib in your project. POUs can call up other POUs.<br />
However, recursions are not allowed.<br />
Function block<br />
A function block is a POU which provides one or more values during the procedure. As opposed<br />
to a function, a function block provides no return value. As an example a function block is<br />
shown below<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
P a g e | 6 of 29<br />
The above shown function block is a VarioPos function block. This function block performs the<br />
target –based positioning motion to the selected axis.<br />
Resources<br />
You need the resources for configuring and organizing your project and for tracing variable<br />
values:<br />
• Global Variables which can be used throughout the project<br />
• Message logger to show and archive system messages and diagnostic messages<br />
• PLC Configuration for configuring your hardware<br />
• Task Configuration for guiding your program through tasks<br />
• Sampling Trace for graphic display of variable values<br />
• VarioCam functions to execute motion tasks<br />
• Watch and Receipt Manager for displaying variable values and setting default variable values<br />
• Library manager<br />
• Log<br />
Libraries<br />
You can include in your project a series of libraries who’s POUs, data types, and global variables<br />
you can use just like user-defined variables. The library "Standard_V00XXXX.lib" and<br />
"MAX4_V00XXXX.lib" are a standard part of the program and are always at your disposal.<br />
Data types<br />
Along with the standard data types the user can define his own data types. Structures,<br />
enumeration types and references can be created.<br />
Visualization<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
P a g e | 7 of 29<br />
EPAS-4 provides visualizations so that you can display your project variables. You can draw<br />
geometric elements off-line with the help of the visualization. They can then change their form<br />
online, depending upon certain variable values.<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
Motion Profiles<br />
EPAS-4 supports and provides different motion profiles through different function blocks. The three main motion profiles available with<br />
EPAS-4 are:<br />
Motion<br />
Profiles<br />
Endless Feed<br />
based<br />
positioning<br />
CAM based<br />
positioning<br />
Vario Pos<br />
(Target-based<br />
positioning)<br />
EndlessFeed EndlessFeed2 EndlessFeed3<br />
VarioPos VarioPos2 VarioPos3<br />
VarioPos4<br />
Each of these motion profiles will be discussed in detailed one by one through Laboratory 7A-7C. 7C. This Lab would discuss the EndlessFeed<br />
motion profile in detail.
EndlessFeed Motion Profile<br />
EndlessFeed motion profile is the most common and basic motion profiles used frequently in<br />
packaging machines. The basic concept of this type of motion profile is to achieve a velocity in a<br />
given time. For Example:<br />
In the above figure where the curve goes flat in between the y-axis remains constant w.r.t time.<br />
Note that the above curve describes the motion profile for only one cycle. Note from the figure<br />
below:<br />
That the velocity starts de-accelerating as soon as start signal goes low. But if the start signal was<br />
present the motion would have been continued until the start signal is low.<br />
Endless motion is used for rotary systems and is performed using the function block. If the<br />
function block with the Enable input is released, the Active output is set. The axis with the<br />
acceleration ACC starts by a positive edge (FALSE -> TRUE) at the Start input until the<br />
velocity VEL is reached. If the start signal Start is removed, the axis stop at the set<br />
StopPosition with the deceleration DEC.
P a g e | 10 of 29<br />
Function Body Diagram of EndlessFeed Block<br />
OUTPUT VALUES<br />
INPUT PARAMETERS<br />
Input Parameters<br />
Enable: is the enable signal for this block. This signal needs to be high in order to start the<br />
motion through this block.<br />
Axis: The axis that is needed to perform motion through this block is specified in this field.<br />
Encoder: The logical encoder which is the drive itself is specified in this field. Remember the<br />
servo motor has a feedback to the MC-4 drive. This is the position feedback of the motor that is<br />
being listened by the drive all the time while the motor is in motion.<br />
Acceleration: Maximum acceleration is specified in this field.<br />
De-acceleration: Maximum de-acceleration is specified in this field.<br />
Emergency DEC: is the maximum de-acceleration that is applied when Enable signal goes to low<br />
during the motion.<br />
VEL: is the maximum velocity or the target velocity is specified in this field.<br />
Periode: is the number of times this motion will occur. One turn of the motor is takes 360 ,<br />
therefore if we want 10 cycles the period would be 10 x 360 .<br />
Stopposition: is the position at which motion will stop with the specified de-acceleration if the<br />
start signal goes low. Usually it is specified as 0 (the angular position at which motion starts).<br />
Start: to start the motion through this block, start signal must be high along with the enable<br />
signal. The enable signal should be high first then only start signal go to high, otherwise motion<br />
will not start.<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
P a g e | 11 of 29<br />
Output Parameters<br />
Active: An active signal tells of the block is active or not. If the signal is high that means motion<br />
for the selected axis is in progress.<br />
Position X & Position Y: are the real-time x and y coordinate positions of the axis. If the axis is<br />
in motion the values in this field will continuously change.<br />
Result: this field indicates the current status of the block. If there is an error executing the<br />
function block the equivalent result code will appear in this field.<br />
ResultText: this field will indicate result text equivalent to the result code in the result field.<br />
CamActive: this field will indicate if the Cam motion is active for the selected axis.<br />
Applications of EndlessFeed Motion Profile<br />
Each motion profile has a definite scope and application. Endless Feed motion profile as the<br />
name suggests is used to run industrial systems like conveyor belts endlessly where the target is<br />
to achieve a certain velocity. This motion is very basic to conveyor systems that move the<br />
objects on the conveyor belts and pass them on to the next conveyor belts. In a simpler way this<br />
motion profile is used thoroughly to move the objects on a conveyor belt at a constant velocity.<br />
For Example: In a packaging machine shown in the figure below, that is used to package photo<br />
print wallets. Endless feed motion can be used to drive exit conveyor which regularly moves the<br />
packaged product out of the line.<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
Starting EPAS-4<br />
1. Double-click with the left mouse button on the EPAS-4 icon on your desktop.<br />
Goto Start -> All Programs/Programs-> ELAU->EPAS-4 V24-> Automation Toolkit<br />
EPAS-4 V24<br />
Starting New Project<br />
2. Click the icon in the top left corner of the EPAS-4, as shown below:
P a g e | 13 of 29<br />
Create New Project Step 1/3<br />
3. Enter the following fields one by one carefully into the “Create New Project” window:<br />
1. Project Name:<br />
C-200_Lab_7a_Target_Based_Positioning_YOUR_NAME_DATE<br />
2. Project Path: Choose a desired project path, your project related files will be saved in this<br />
path.<br />
3. Name of the POU(Program Organization Units): PLC_PRG<br />
4. Language of POU: LD= Ladder Programming<br />
5. Controller Type: Pac Drive C200<br />
6. Firmware Version: 00.24.20<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
P a g e | 14 of 29<br />
Create New Project Step 2/3 (Selecting Controller Over the Network)<br />
In step 2 , click<br />
button to search for the controllers available over the network.<br />
Select Pac Drive C-200 Controller from the list obtained after search and click apply to select the<br />
controller, as shown below:<br />
Click next on the screen to proceed to step 3.<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
P a g e | 15 of 29<br />
Create New Project Step 3/3<br />
Click Finish to start the project, as shown below:<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
Familiarize with the EPAS Project Window and Tools:<br />
7. Cut, Copy Paste, Search and Zoom<br />
Tools<br />
6. Ladder Programming Tools<br />
5.Current Selected POU (Ladder<br />
8. Ladder Programming Workspace<br />
1. POUs- Program Organization Units associated with the current<br />
project.<br />
2. Data Types<br />
3. Visualizations<br />
4. Resources: shows the available resources for the current project.
Configuring Controller Configuration<br />
Before we start writing our ladder program we need to configure the controller configuration. In<br />
order to do so we need to understand what is the current hardware attached to the controller. For<br />
example- Currently C-200 Controller is serving two servo motors through two MC-4 drives. So<br />
in order to communicate or command these motors the MC-4 drives must be setup the following<br />
way:<br />
1. Goto Resources Tab Goto PLC Configuration<br />
Expand Controller Configuration Select SERCOS Interface RTB(Real-Time<br />
Bus)Right click and Goto Append Sub-element Select MC-4<br />
Append one more sub-element to the SERCOS Interface as told in the step above.<br />
2. After you have added the MC-4 sub-elements the controller configuration would look like<br />
this:<br />
3. Now since we have our hardware configured, we are ready to write a ladder-logic<br />
program.<br />
Writing a Ladder-Logic Program:<br />
As an example we are going to write a ladder-logic program that would provide motion to a iSH<br />
Motor.
P a g e | 18 of 29<br />
1. Goto POU Tab <br />
Double-click and select PLC_PRG<br />
Programming Window appears on the right that looks like:<br />
Ladder<br />
2. Familiarize yourself with the Ladder-Programming Toolbar:<br />
SET / RESET<br />
NEGATE<br />
TIMER ON (TON)<br />
FALLING EDGE DETECTION<br />
RISING EDGE DETECTION<br />
BOX with EN<br />
FUNCTION BLOCK<br />
Reset ‘Coil’<br />
Set ‘Coil’<br />
Coil<br />
Parallel Contact (Negated)<br />
Parallel Contact<br />
Contact (Negated)<br />
Contact<br />
Network After<br />
Network<br />
Before<br />
3. Start Programming:<br />
Start programming by selecting any of these tools from the Ladder Programming toolbar.<br />
For Example:<br />
Name each??? with a label that is appropriate to your program.<br />
Tips: Turn on the Auto Declaration feature in the EPAS-4 to quickly define new variables in<br />
your ladder program. This saves time and you won’t miss out to declare any variable that you<br />
created while programming.<br />
Steps to Turn-on Auto-Declaration<br />
Go to Project Go to Options Go to Editor Check the box before Auto-declaration<br />
Select OK<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
P a g e | 19 of 29<br />
Downloading/Transferring Program to Controller:<br />
The steps below will guide you how to download your ladder program to the controller once you<br />
are finished programming.<br />
1. Compile<br />
Go to Project Build:<br />
If the build is successful, proceed to transfer the project files to the controller.<br />
2. Transferring Project<br />
Go to Project Tools Transfer Project Package to PacDrive Controller:<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
<strong>ECET</strong> <strong>262</strong>-08-24-2010<br />
P a g e | 20 of 29
P a g e | 21 of 29<br />
Make sure all the files types associated with the project are checked. Then go to<br />
to search for the available controllers on the network.<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
P a g e | 22 of 29<br />
Note: Once the transfer is completed the controller will boot with the new program. Watch the<br />
front face of the controller when all the red lights dim out one by one the boot cycle is complete<br />
and you are ready to run your program.<br />
3. Testing<br />
The following steps will guide you how to test the program once the project is transferred to<br />
the controller.<br />
Step1.<br />
Go Online<br />
Go to Online Login:<br />
Step2.<br />
Run Mode<br />
Go to Online Run or F5:<br />
Step3.<br />
Writing Values<br />
Double-click the contact to which you wish to write the value, for a Boolean variable like<br />
shown below “enable controller” a filled blue square (<br />
empty blue square (<br />
) means “FALSE”<br />
) means “TRUE” and an<br />
To write the values:<br />
Go to Online Write Values or alternatively Press Ctrl+F7, you should see the impact<br />
on the ladder diagram right after you write values. Not that the program must be running<br />
in order to see the values change in the ladder diagram.<br />
After Writing Values:<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
P a g e | 23 of 29<br />
Note: Notice that as soon as the enable controller signal is turned high the<br />
Conveyor_1.ControllerEnableSet coil turns blue (TRUE). You should also listen to a<br />
sound which would actually originate because the brakes are applied to the motor. This<br />
means that the motor is ready to move and waiting for the motion command. (Refer to the<br />
Axis State Flowchart on the next page for more details).<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
P a g e | 24 of 29<br />
Axis State<br />
Understanding the axis state parameter is of utmost importance while writing motion programs.<br />
Axis state parameter makes available the current state of the axis. The flowchart below explains<br />
when an axis is considered to be Ready and what signals must be activated in order to reach<br />
Ready State.<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
Example Ladder Program<br />
As an example you could refer to this ladder program. This Ladder program would demonstrate how to perform motion through<br />
EndlessFeed Block to a selected Axis.<br />
Rung 0001: The controller is needed to be enabled every time we seek to use controller.<br />
This is done by activating the ControllerEnableSet variable to true.<br />
Rung 0002: A ReadytoRun signal is generated TRUE if the Axis State of the<br />
first Axis which here is Conveyor_1 is GE (Greater Than or Equal to) 3. 3 is<br />
the Code for Axis state “Ready”. Note that ReadytoRun signal is an<br />
input/output variable.<br />
Rung 0003: A Start_Motor1 input contact is defined (Normally Open) which would<br />
drive an output coil named SM1 (Start Motor 1)<br />
Rung 0004: The ReadytoRun signal which was generated is used to drive or trigger The<br />
Enable of the Motion Block “EndlessFeed2”. The axis field of the block is fed as name<br />
of the axis which is needed to be in motion. In this case it is Conveyor_1. Other fields<br />
are filled anonymously such as Velocity, Acceleration, De-acceleration etc. Description<br />
of all these fields has been explained in the previous sections of this Lab.
P a g e | 26 of 29<br />
Ladder Programming Task<br />
Design a ladder-logic program that can drive two axes (2 Motors) at a time. Use EndlessFeed motion block to perform this task. Refer<br />
to the Example Ladder Program given in this Laboratory. Feed Following Motion Data into the EndlessFeed motion blocks.<br />
For 1 st Motor: For 2 nd Motor:<br />
Variable Value Variable Value<br />
VEL -800 VEL 1600<br />
ACC 1000 ACC 1000<br />
DEC 1000 DEC 1000<br />
Smooth 0 Smooth 0<br />
EmergencyDEC 10000 EmergencyDEC 10000<br />
Periode 7200 Periode 14400<br />
StopPosition 0 StopPosition 0<br />
Report:<br />
Include the Ladder Diagram for this Task and answers to the discussion questions in your report.<br />
<strong>ECET</strong> <strong>262</strong>-08-24-2010
Discussion<br />
1. What are the components of the C-200 Controller System?<br />
2. Suggest few other industrial applications where EndlessFeed motion profile is used or<br />
could be used.<br />
3. What is the basic difference between de-acceleration and EmergencyDEC?<br />
4. What is the basic difference between Enable and start signal in reference to the<br />
EndlessFeed Motion Block?<br />
5. In your Ladder Programming Task, what does a negative velocity suggests what<br />
difference do you observe in the motion between the two motors?