15
Example Description V01 PS552-MC Library Package Drive-based Motion Control – FM562 PTO Application Examples

Drive Based Motion PTO Application Examples_Description V01 3ADR023054M0201

Embed Size (px)

DESCRIPTION

Drive Based Motion

Citation preview

Page 1: Drive Based Motion PTO Application Examples_Description V01 3ADR023054M0201

Example Description V01

PS552-MC Library Package Drive-based Motion Control – FM562 PTO Application Examples

Page 2: Drive Based Motion PTO Application Examples_Description V01 3ADR023054M0201

Motion control Library Package

Examples Description 0 AC500 / Issued: 2014-02-24

Content

1  Disclaimer .................................................................................................................. 1 

2  INTRODUCTION TO THE DOCUMENT ..................................................................... 2 

2.1  Scope of the document .................................................................................................... 2 

2.2  Compatibility and Requirements ..................................................................................... 2 

2.3  Where to find which information ..................................................................................... 2 

2.4  Safety Instructions ............................................................................................................ 3 

3  Function realization example ................................................................................... 4 

3.1  Check axis status and position ....................................................................................... 4 

3.2  Positioning with use of MC_MoveAbsolute .................................................................... 6 

3.3  Velocity change on the fly ................................................................................................ 9 

3.4  Velocity change on the fly 2 (2 function blocks) .......................................................... 11 

4  REVISION HISTORY ................................................................................................ 12 

Page 3: Drive Based Motion PTO Application Examples_Description V01 3ADR023054M0201

Motion control Library Package

Examples Description 1 AC500 / Issued: 2014-02-24

1 Disclaimer

A. For customers domiciled outside Germany / Für Kunden mit Sitz außerhalb Deutschlands

„Warranty, Liability:

The user shall be solely responsible for the use of this application example described within this file. ABB shall be under no warranty whatsoever. ABB's liability in connection with this application example or the files included within this file, irrespective of the legal ground, shall be excluded. The exclusion of liability shall not apply in the case of intention or gross negligence. The present declaration shall be governed by and construed in accordance with the laws of Switzerland under exclusion of its conflict of laws rules and of the Vienna Convention on the International Sale of Goods (CISG)."

„Gewährleistung und Haftung:

Der Nutzer ist allein für die Verwendung des in dieser Datei beschriebenen Anwendungsbeispiels verantwortlich.

ABB unterliegt keiner Gewährleistung. Die Haftung von ABB im Zusammenhang mit diesem Anwendungsbeispiel oder den in dieser Datei enthaltenen Dateien - gleich aus welchem Rechtsgrund - ist ausgeschlossen. Dieser Ausschluß gilt nicht im Falle von Vorsatz oder grober Fahrlässigkeit. Diese Erklärung unterliegt Schweizer Recht unter Ausschluß der Verweisungsnormen und des UN-Kaufrechts (CISG)."

B Nur für Kunden mit Sitz in Deutschland

„Gewährleistung und Haftung:

Die in diesem Anwendungsbeispiel enthaltenen Dateien beschreiben eine mögliche Anwendung der AC500 bzw. zeigen eine mögliche Einsatzart. Sie stellen nur Beispiele für Programmierungen dar, sind aber keine fertigen Lösungen. Eine Gewähr kann nicht übernommen werden.

Der Nutzer ist für die ordnungsgemäße, insbesondere vollständige und fehlerfreie Programmierung der Steuerungen selbst verantwortlich. Im Falle der teilweisen oder ganzen Übernahme der Programmierbeispiele können gegen ABB keine Ansprüche geltend gemacht werden.

Die Haftung von ABB, gleich aus welchem Rechtsgrund, im Zusammenhang mit den Anwendungsbeispielen oder den in dieser Datei enthaltenen Dateien wird ausgeschlossen. Der Haftungsausschluß gilt jedoch nicht in Fällen des Vorsatzes, der groben Fahrlässigkeit, bei Ansprüchen nach dem Produkthaftungsgesetz, im Falle der Verletzung des Lebens, des Körpers oder der Gesundheit oder bei schuldhafter Verletzung einer wesentlichen Vertragspflicht. Im Falle der Verletzung einer wesentlichen Vertragspflicht ist die Haftung jedoch auf den vertragstypischen, vorhersehbaren Schaden begrenzt, soweit nicht zugleich ein anderer der in Satz 2 dieses Unterabsatzes erwähnten Fälle gegeben ist. Eine Änderung der Beweislast zum Nachteil des Nutzers ist hiermit nicht verbunden.

Es gilt materielles deutsches Recht unter Ausschluß des UN-Kaufrechts."

Page 4: Drive Based Motion PTO Application Examples_Description V01 3ADR023054M0201

Motion control Library Package

Examples Description 2 AC500 / Issued: 2014-02-24

2 INTRODUCTION TO THE DOCUMENT

2.1 Scope of the document

The manual is intended as introduction for configuring and using the Pulse Train Output (PTO) module FM562 together with the Motion control library PS552-MC-E in example programs.

Further functional description of the Motion Control Libraries itself and details of the function blocks of the library are available in the online help of the CoDeSys editor of Control Builder Plus (CBP) which is a part of the engineering suite Automation Builder.

2.2 Compatibility and Requirements

The engineering suite Automation Builder version V1.0.1 (or higher) must be installed. Automation Builder contains amongst others the configurator Control Builder Plus (CBP) and the editor CoDeSys.

The library PS552-MC-E must be installed.

The device description of FM562 is not in the scope of Automation Builder version V1.0.1 and must be separately installed. This is done with the Package Manager in Control Builder Plus. The required package is available for download from “Software Updates” on http://www.abb.com/plc . The reference number of the package is 1SAP191500R2331.

The examples are made for Control Builder Plus version V2.3.0 (contained in Automation Builder V1.0.1) or higher and have been tested with with Version v2.3.0.

The following screenshots are made in the English version of Windows®. The installation language of the Automation Builder is English.

2.3 Where to find which information

Technical documentation of the module

The technical documentation of the FM562 module can be found in the document “FM562 Pulse Train Output Module Hardware Instruction System Technology & Configuration” (Document number 3ADR024107M0201), which is distributed together with the Device Description for FM562.

Documentation of the function blocks

The documentation of the PLCopen motion control library PS552-MC-E and the functions blocks that can be used with FM562 are available in the online help of the CoDeSys editor (the library must be installed). To access the documentation in CoDeSys click “Help”, then select “Contents” in the menu. In the Help window you find the structure of the documentation in the “Contents” tab. Click in the documentation structure on “Target System” then on “AC500 / S500” and then on “Motion Control Library”.

To get an overview of the PLCopen motion control function blocks that can be used with FM562, click “Overview” then “Overview of PLCopen Function blocks”.

Module specific information can be found in the documentation of the motion control library in the section “Drive-Based Motion Control” in the part “Realization with FM562”.

The access function block for the module is described in “PTO_FM562_ACCESS Adapts Specific PLCopen Blocks to FM562”.

Please note that each axis in your configuration requires a separate instance of this access function block.

Example project

The example project file contains four example programs that show how to use the function blocks of the PLCopen motion control library together with the module. The programs are explained in chapter 3 of this document.

When you have installed the Device Description for FM562, then the project is available in the following path (e.g. for Windows® 7 English version): C:\Users\Public\Public Documents\ControlBuilderPlus\Examples\PS552-MC_V300\Drive-based Motion Control\PTO_FM562_CBP23\

The filename is “PLC_PTO_PLCopen_example.project”. The project file can be opened with Automation Builder.

Page 5: Drive Based Motion PTO Application Examples_Description V01 3ADR023054M0201

Motion control Library Package

Examples Description 3 AC500 / Issued: 2014-02-24

2.4 Safety Instructions

The user must follow all applicable safety instructions and the guidelines mentioned in the user documents and installation instructions of the products used in the example program. Before installation and commissioning read the following manuals:

o Manual and safety instructions of the drives used.

o Installation and safety instructions of the other devices.

o AC500 system description Vol 0: 2CDC125015M0201, also available in the online help in CoDeSys (Help > Contents >Target System > AC500 / S500 > Introduction > Overview > Regulations).

Page 6: Drive Based Motion PTO Application Examples_Description V01 3ADR023054M0201

Motion control Library Package

Examples Description 4 AC500 / Issued: 2014-02-24

3 Function realization example

This chapter explains the examples given in the project file PLC_PTO_PLCopen_example.project. It contains four programs which all are made for the same configuration. The configuration consists of an AC500-eCo CPU PM564-RP-ETH with one module FM562 connected to the IO-bus of the CPU. The engineering station with the Automation Builder must be connected to the CPU in order to be able to execute and whatch the example programs.

Connecting a drive is not required. The programs are also executed when no drive is connected to the FM562. It is also possible to use a CPU PM564-TP-ETH in the configuration instead of the PM564-RP-ETH.

The project file contains the following examples:

Example project Name of example program Explanation in chapter

Check axis status and position Check axis status and position 3.1

Positioning with use of MC_MoveAbsolute Absolute positioning realization 3.2

Velocity change on the fly Use MCA_MoveVelocityContinuous 3.3

Velocity change on the fly 2 (2 function blocks) Use 2 MC_MoveVelocity 3.4

3.1 Check axis status and position

Application example: execute a continuous motion at target velocity 200cm/s. Observe status and actual position of the axis with the function blocks MC_ReadStatus and MC_ReadActualPosition.

Parameter setting of MC_MoveVelocity:

Velocity: Target Velocity, 200cm/s,

Acceleration: Acceleration rate, 2000cm/s2,

Deceleration: Deceleration rate, 2000cm/s2,

Start Frequency: 0 (is set in the module configuration of CBP).

Page 7: Drive Based Motion PTO Application Examples_Description V01 3ADR023054M0201

Motion control Library Package

Examples Description 5 AC500 / Issued: 2014-02-24

Scaling parameters applied on the access block PTO_FM562_ACCESS:

PULSE_PER_REVO=1000 (1000 pulse to turn 1 revolution)

UNITS_PER_REVO_NOM=1, UNITS_PER_REVO_DENOM=1 (1 revolution to move 1cm, unit “cm”)

Download the program to the PLC then go in Online mode and switch the CPU to Run.

Switch on the Enable signal connected to input DI0 (pin 2) of the FM562 module (refer to the switch “FM562 Enable” in the schematics above)

Enable the function blocks one by one in Online mode. The function blocks can be enabled by the following action: first double click the input variable that is connected to the function block input EN, Enable or Execute, so that the value changes to TRUE, then download the state change to the CPU by pressing Ctrl+F7 on the keyboard.

This action must be repeated for the following functions blocks in this sequence: PTOAccess, MCPower, MCVelocity, MCReadstatus, MCReadactualposition.

Then the current status of the state machine and position can be read from MC_ReadStatus (ContinuousMotion) and MC_ReadActualPosition (change of position is shown).

Page 8: Drive Based Motion PTO Application Examples_Description V01 3ADR023054M0201

Motion control Library Package

Examples Description 6 AC500 / Issued: 2014-02-24

Now use MC_Stop to abort the ongoing Function Block execution.

MC_Stop command effects at rising edge of “execute” and transfers the axis state machine to the state “Stopping”. When “Execute” is on, state machine will be in “Stopping” state until “Execute” is off, state machine will be back to “stand still”. Change of status of state machine and the final position can be read from MC_ReadStatus (ContinuousMotion -> Stopping) and MC_ReadActualPosition (final position after stop).

3.2 Positioning with use of MC_MoveAbsolute

The following example shows how to realize a movement of one axis from the current position to an absolute target position. The target position is directly determined by its distance, from the current position of the axis at the time of execution to the target position.

Application example: move 200 cm forward from origin

Parameter setting of MC_MoveAbsolute:

Position: Target position for the motion, 200cm

Velocity: Value of the maximum velocity, 20cm/s

Acceleration: Acceleration rate, 2000cm/s2

Deceleration: Deceleration rate, 2000cm/s2

Start Frequency:0 (set by CBP).

Parameter setting of PTO_FM562_ACCESS:

PULSE_PER_REVO=1000 (1000 pulse to turn 1 revolution)

UNITS_PER_REVO_NOM=1, UNITS_PER_REVO_DENOM=1 (1 revolution to move 1cm, unit as “cm”)

Page 9: Drive Based Motion PTO Application Examples_Description V01 3ADR023054M0201

Motion control Library Package

Examples Description 7 AC500 / Issued: 2014-02-24

Download the program to the PLC then go in Online mode and switch the CPU to Run.

Switch on the Enable signal on input DI0 (pin 2) of the FM562 module.

Then enable the Function blocks (as explained in 3.1) in the following sequence: PTOAccess, MCPower, MCAbsolute.

The positioning operation is finished successfully when the Done output of the function block MCAbsolute has changed to TRUE.

To initiate a movement, disable MCAbsolute, change the MCAbsolute_Position to 0, enable MCAbsolute again. A blinking LED P1 on the FM562 module shows the activity of the pulse train output.

When the blinking has ended, you can initiate a movement in the inverse direction. Disable MCAbsolute, change the MCAbsolute_Position to 200, enable MCAbsolute again. A blinking LED P0 on the FM562 module shows the activity of the pulse train output.

The variable MCReadactualposition is showing the actual position.

Page 10: Drive Based Motion PTO Application Examples_Description V01 3ADR023054M0201

Motion control Library Package

Examples Description 8 AC500 / Issued: 2014-02-24

Now use MC_Stop to abort the ongoing function block execution, input parameters value of function block MC_Stop: e.g. MCStop_Deceleration=2000.

The MC_Stop command is effective at rising edge of “Execute” and transfers the axis state machine to the state “Stopping”. When “Execute” is on, the state machine will be in “Stopping” state until “Execute” is off, then the state machine will change to “Stand still”.

Use MC_Reset to reset the current position to 0, after the pulse output is stopped by MC_Stop or after FM562 has finished generating output pulses. This function block is effective at the rising edge of the enable signal.

Page 11: Drive Based Motion PTO Application Examples_Description V01 3ADR023054M0201

Motion control Library Package

Examples Description 9 AC500 / Issued: 2014-02-24

3.3 Velocity change on the fly

Example: accelerate to target velocity 20cm/s, then change direction, first decelerate and then accelerate to 200cm/s until stop. The example uses the proprietary function block MCA_MoveVelocityContinuous which allows continuous modification of the values for Velocity, Acceleration and Deceleration.

Parameter setting of MCA_MoveVelocityContinuous:

Velocity: Target Velocity, change from 20cm/s to 200cm/s,

Acceleration: Acceleration rate, 2000cm/s2,

Deceleration: Deceleration rate, 2000cm/s2,

Start Frequency: 0 (set by CBP).

PTO_FM562_ACCESS:

PULSE_PER_REVO=1000 (1000 pulse to turn 1 revolution)

UNITS_PER_REVO_NOM=1, UNITS_PER_REVO_DENOM=1 (1 revolution to move 1cm, unit as “cm”)

Download the program to the PLC then go in Online mode and switch the CPU to Run.

Switch on the Enable signal on input DI0 (pin 2) of the FM562 module

Then enable the Function blocks (as explained in 3.1) in the following sequence: PTOAccess, MCPower, MCAVelocity.

Page 12: Drive Based Motion PTO Application Examples_Description V01 3ADR023054M0201

Motion control Library Package

Examples Description 10 AC500 / Issued: 2014-02-24

Now change the parameters: MCAVelocity_Velocity=200, MCAVelocity_Deceleration=100, MCAVelocity_Direction=NEGATIVE. The velocity and direction of pulse output are changed. This can be observed on the LEDs P0 and P1 of the FM562 module.

Use MC_Stop to abort the ongoing Function Block execution.

MC_Stop command is effective at rising edge of “execute” and transfers the axis state machine to the state “Stopping”. When “Execute” is on, state machine will be in “Stopping” state until “Execute” is off, state machine will then change to “Stand still”.

Page 13: Drive Based Motion PTO Application Examples_Description V01 3ADR023054M0201

Motion control Library Package

Examples Description 11 AC500 / Issued: 2014-02-24

3.4 Velocity change on the fly 2 (2 function blocks)

This is a variant of the example in 3.3. It shows how speed can be changed on the fly using two PLCopen motion control function blocks MC_MoveVelocity which are used instead of the proprietary function block MCA_MoveVelocityContinuous.

The example can be put in operation in a similar way as described in chapter 3.3.

A second MC_MoveVelocity block is executed with different setting parameters and aborts the first MC_MoveVelocity block. Velocity/acceleration/deceleration/direction can be changed on the fly according to the parameter setting of the second MC_MoveVelocity block. Example shown below.

Page 14: Drive Based Motion PTO Application Examples_Description V01 3ADR023054M0201

Motion control Library Package

Examples Description 12 AC500 / Issued: 2014-02-24

4 REVISION HISTORY

Rev. ind.

Page (P) Chapt. (C)

Description

V01

All First release

Page 15: Drive Based Motion PTO Application Examples_Description V01 3ADR023054M0201

abb ABB Automation Products GmbH Wallstadter Str. 59  68526 Ladenburg, Germany  Phone: +49 62 21 701 1444  Fax : +49 62 21 701 1382  E‐Mail: [email protected] 

www.abb.com/plc

Note: We reserve the right to make technical changes or modify the contents of this document without prior notice. With regard to purchase orders, the agreed particulars shall prevail. ABB AG does not accept any responsibility whatsoever for potential errors or possible lack of information in this document. We reserve all rights in this document and in the subject matter and illustrations contained therein. Any reproduction, disclosure to third parties or utilization of its contents – in whole or in parts – is forbidden without prior written consent of ABB AG. © Copyright 2012 ABB , All rights reserved

Manual No. 3ADR 023054 M0201