rexroth mlc tech-fb · rexroth mlc tech-fb for packaging applications r911321344 edition 01...

40
Rexroth MLC Tech-FB for Packaging Applications R911321344 Edition 01 Electric Drives and Controls Pneumatics Service Linear Motion and Assembly Technologies Hydraulics

Upload: dangdat

Post on 18-May-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

Rexroth MLC Tech-FBfor Packaging Applications

R911321344Edition 01

Application Manual

Electric Drivesand Controls Pneumatics Service

Linear Motion and Assembly TechnologiesHydraulics

Rexroth MLC Tech-FBfor Packaging Applications

Application Manual

DOK-IM*MLC-TFB-IMPAV03-AW01-EN-P

RS-890a758d9ddb78bd0a6846a000ac81d9-4-en-US-7

Edition Release Date Notes

DOK-IM*MLC-TFB-IMPAV03-AW01-EN-P

05/07 Released

.

.

Copyright © 2007 Bosch Rexroth AGCopying this document, giving it to others and the use or communication of thecontents thereof without express authority, are forbidden. Offenders are liablefor the payment of damages. All rights are reserved in the event of the grant ofa patent or the registration of a utility model or design (DIN 34-1).

Validity The specified data is for product description purposes only and may not bedeemed to be guaranteed unless expressly confirmed in the contract. All rightsare reserved with respect to the content of this documentation and the availa‐bility of the product.

Published by Bosch Rexroth AGBgm.-Dr.-Nebel-Str. 2 ■ D-97816 Lohr a. MainTel.: +49 (0)93 52/40-0 ■ Fax: +49 (0)93 52/40-48 85 ■ Telex: 68 94 21Bosch Rexroth Corporation ■ Electric Drives and Controls5150 Prairie Stone Parkway ■ Hoffman Estates, IL 60192 ■ USATel.: 847-645-3600 ■ Fax: 847-645-6201http://www.boschrexroth.com/Dept. EAM (DPJ)

Note This document has been printed on chlorine-free bleached paper.

Title

Type of Documentation

Document Typecode

Internal File Reference

Record of Revision

Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

Table of ContentsPage

1 Crank Kinematics Function and Function Blocks........................................................... 11.1 Introduction and Overview...................................................................................................................... 11.2 Common Definitions............................................................................................................................... 31.2.1 Definitions of the Basic Variables at the Crank Kinematics................................................................. 31.2.2 Counting Direction............................................................................................................................... 51.2.3 Mechanical (Xmech) and Virtual (Xvirt) Translatory Position ............................................................. 51.3 MB_CamTableCrank.............................................................................................................................. 61.4 MB_CamTableCrankSuperimposed....................................................................................................... 81.5 MB_PhiToXvirt...................................................................................................................................... 111.6 MB_MasterToPhi.................................................................................................................................. 121.7 MB_XvirtToXmech................................................................................................................................ 13

2 CamLock Function Blocks........................................................................................... 152.1 Overview............................................................................................................................................... 152.2 CamLock - Application Example........................................................................................................... 152.3 MB_PrepareCams................................................................................................................................ 182.4 MB_CamLock Function Block............................................................................................................... 212.4.1 MB_CamLock.................................................................................................................................... 212.4.2 MB_CamLock Components and Parametrization.............................................................................. 26

Hardware........................................................................................................................................ 26Firmware......................................................................................................................................... 27Software......................................................................................................................................... 27MB_CamLock Parametrization....................................................................................................... 27

3 Service & Support........................................................................................................ 313.1 Helpdesk............................................................................................................................................... 313.2 Service Hotline...................................................................................................................................... 313.3 Internet.................................................................................................................................................. 313.4 Helpful Information................................................................................................................................ 31

Index............................................................................................................................ 33

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG I/I

Table of Contents

Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

1 Crank Kinematics Function and Function Blocks1.1 Introduction and Overview

The function and function blocks described in this section are used to convertbetween linear (translatory) motion and rotary motion (crank angle) for use ina Crank Kinematic application.Crank Kinematics are often used to drive the cross seal splits in sealing ma‐chines or to drive molder and stamping tools with thermo-forming machines.The translatory slide in this Kinematic is moved by the rotation of a crank, drivenby a servo motor whose axis is offset from that of the translatory slide.The Crank Kinematic shown below outputs set points and actual values (posi‐tion and velocity) in translatory units while the measuring system outputs inrotary units. For this reason, the set points and actual values must be convertedfrom translatory to rotary units and back again.

Fig.1-1: Single Axis Crank Kinematics with Offset Crank Axis

The following functions and function blocks are supported:

Function Description

MB_MasterToPhi Outputs crank angles calculated from the masteraxis position and the superimposed CAM.

Fig.1-2: Crank Kinematics Function

Function Block Description

MB_CamTableCrankCalculates a transformation CAM which convertsa translatory virtual master position into rotary val‐ues (crank angles).

MB_CamTableCrankSuperim‐posed

Calculates a transformation CAM and combines itwith a user CAM to output a superimposed CAMprofile.

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG 1/33

Crank Kinematics Function and Function Blocks

Function Block Description

MB_PhiToXvirt Converts crank angles (Phi) into virtual translatoryposition (Xvirt) for use by the PLC program.

MB_XvirtToXmech Converts virtual translatory position (Xvirt) into me‐chanical translatory position (Xmech).

Fig.1-3: Crank Kinematics Function BlocksThe following two applications are typically used:

Application Case 1: Single Axis Op‐erating Mode

Single axis operation refers to the position or velocity controlled operation ofthe translatory axis. In this application, a virtual master (with translatory scaling)is moved using position or velocity function blocks. (e.g., MC_MoveAbsolute,MC_MoveRelative or MC_MoveVelocity).The virtual master signals are converted from translatory positions to crankangles, via the transformation cam. The transformation cam is calculated bythe MB_CamTableCrank function block and becomes active using the MC_Ca‐mIn function block. The crank axis will then follow the virtual master (which runsin translatory units) and the transformation cam converts the translatory positioninto a crank angle. Refer to chapter 1.3 "MB_CamTableCrank" on page 6for details.

Application Case 2: SynchronousOperating Mode with CAM

In this application, a translatory axis with a user CAM profile follows a masteraxis. The user CAM only applies to the translatory axis. For this reason, theuser CAM does not affect the nonlinear behavior of the Crank Kinematic.Instead, the user CAM is combined with a transformation CAM, via theMB_CamTableSuperimposed function block, and the resulting rotary CAM issent to the drive via the PLC program. Refer to chapter 1.4 "MB_CamTable‐CrankSuperimposed" on page 8 for details.

Reverse Conversion In the previous application examples, translatory units are converted to rotaryunits (set point preparation). However, in order for the PLC to subsequentlyprocess position or velocity commands, the rotary units must be converted backto translatory units by means of the MB_PhiToXvirt function block. Refer tochapter 1.5 "MB_PhiToXvirt" on page 11 for details.

2/33 Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

Crank Kinematics Function and Function Blocks

Fig.1-4: Crank Kinematics Technology Function Block Diagram

1.2 Common Definitions1.2.1 Definitions of the Basic Variables at the Crank Kinematics

The following figures show the connection between crank and translatory co‐ordinates, as well as the meaning of several mechanical parameters.

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG 3/33

Crank Kinematics Function and Function Blocks

Fig.1-5: Mechanical Arrangement 1: Connection of Crank and Translatory Co‐ordinates at the Crank Kinematics

Fig.1-6: Mechanical Arrangement 2: Connection of Crank and Translatory Co‐ordinates at the Crank Kinematics

4/33 Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

Crank Kinematics Function and Function Blocks

Variable / Term Definition

XNull Distance between crank axis and slide's zero point

PoleDistance0PoleDistance1

Distance to the pole point X0 / X1 (beyond the linearized range, a compensation functionis applied)

Maximum travel range Travel range of the translatory coordinate system = |X1-X0|

Linearized range In the linearized range no substitute polynomial has an effect

Transformation cam Converts translatory (mm) coordinates into crank angles (degrees)

Fig.1-7: Variables and Terms

1.2.2 Counting DirectionThe following counting directions generally apply to the arrangements shownin fig. 1-5 " Mechanical Arrangement 1: Connection of Crank and TranslatoryCoordinates at the Crank Kinematics" on page 4 and fig. 1-6 " Mechanical Ar‐rangement 2: Connection of Crank and Translatory Coordinates at the CrankKinematics" on page 4:● Counting Direction of the Crank Angle:

– Mechanical arrangement 1: Clockwise, on the left beginning with 0°and ending with 360°

– Mechanical arrangement 2: Counterclockwise, on the right beginningwith 0° and ending with 360°

● Counting Direction of the Translatory Slide:– Mechanical arrangement 1: To the right more largely growing nu‐

merical values– Mechanical arrangement 2: To the left more largely growing numer‐

ical values

1.2.3 Mechanical (Xmech) and Virtual (Xvirt) Translatory Position

Mechanically, the slide (translatory axis) can move between the rear (X0) andfront (X1) pole points. This mechanical limit is labeled as the maximum travelrange. The mechanical translatory position (Xmech) corresponds to two differ‐ent crank angles. Therefore, the virtual translatory position (Xvirt) is used toclearly assign a translatory position to a crank angle. The virtual translatoryposition moves in the positive direction, even when the mechanical position(Xmech) inverts the direction when passing the pole position. The modulo over‐flow of Xvirt is defined by the user via the zero point (Xnull). In addition, themodulo value of Xvirt corresponds to double the travel range of the crank kin‐ematics. The travel range is calculated as follows:

Fig.1-8: Travel Range Equation for Crank Kinematics

The following figure shows Xvirt and Xmech in an example:

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG 5/33

Crank Kinematics Function and Function Blocks

Fig.1-9: Counting Direction of the Slide Position (Xvirt and Xmech)

1.3 MB_CamTableCrankShort Description The MB_CamTableCrank function block calculates a transformation cam (with

1024 data points) using the crank-specific input values. This transformationcam is used to convert translatory positions into rotary positions (crank angles)for use by a Crank Kinematics. This allows for a translatory virtual master to becoupled to a rotary crank drive. Refer to chapter 1.1 "Introduction and Over‐view" on page 1 for details.In single axis operation, the virtual axis is moved in translatory units while thecrank drive follows the transformation cam.Travel beyond the linearized range is allowed by specifying a PoleDistance0and a PoleDistance1 value. A compensation function (substitute polynomial of5th order) is applied to the position which approximates the crank drive and limitsthe drive dynamic while in the PoleDistance area. With the transition in and outof the linearized range position, velocity and acceleration is constant.The function block provides the calculated transformation cam via the "CamT‐able" VAR_IN_OUT. The PLC program must download this CamTable to thedrive (e.g. using MB_WriteListeParameter) before it can be used (e.g., usingMC_CamIn function block).

6/33 Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

Crank Kinematics Function and Function Blocks

Interface Description

Fig.1-10: MB_CamTableCrank Function Block

I/O Type Name Data Type Comment

VAR_IN_OUT CamTable ARRAY [0..1023]OF DINT

Array with the data of the calculated transformation cam

Data MB_CRANK Structure with internal calculated data of the crank kine‐matics. Data are calculated in this FB and passed on toother function blocks.

VAR_INPUT Execute BOOL Positive edge starts the calculation of the transformationcam

CamFormat BOOL TRUE = New Format ( last point = first point = 360° )FALSE = Old Format ( last point = 360° - d )

Radius REAL Length of the crank in [mm]

Pushrod REAL Length of the pushrod in [mm]

Offset REAL Offset of the slide level to the crank center [mm]

XNull REAL Distance from crank center to the zero point of the slide[mm]

PoleDistance0 REAL Distance from the rear pole point X0 (in [mm]) to the line‐arized range where travel is affected by limited drive dy‐namics.

PoleDistance1 REAL Distance from the front pole point X1 (in [mm]) to the line‐arized range where travel is affected by limited drive dy‐namics.

VAR_OUTPUT Done BOOL Calculation completed, cam table and output data (Data)are valid

Active BOOL FB is in process

Error BOOL Error (see ErrorID and ErrorStruct)

ErrorID ERROR_ CODE Error description

ErrorStruct ERROR_ STRUCT Detailed error description

Fig.1-11: MB_CamTableCrank I/O InterfaceMB_Crank Data Structure The MB_Crank data structure serves for the internal data exchange between

function blocks and function. The content of the data structure MB_CRANK iscalculated by the MB_CamTableCrank / MB_CamTableCrankSuperimposedfunction blocks, and is applied to all other relevant function blocks and function.

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG 7/33

Crank Kinematics Function and Function Blocks

Boundary Conditions The following boundary conditions must be satisfied or errors will be reportedto the PLC.

Boundary Conditions Reason

Pushrod ≥ Radius + |Offset| If this boundary condition is not satisfied, the translatory slide can not drive mechan‐ically on a constant y-coordinate

(XNull ≥ Rear TP) & (XNull ≤ Rear TP+ 2 x travel range)

The zero point must lie within the travel range

Fig.1-12: Boundary SetupThe following setup must be performed in IndraWorks in order to move thetranslatory slide in single axis operation:● Set the scaling of the virtual axis to linear with a modulo value of (2 x travel

range).● Set the scaling of the crank drive (real axis) to rotary with a modulo value

of 360°.

IndraWorks must be in online mode with the drive in parametermode in order to modify scaling factors.

MB_CamTableCrank ApplicationExample

The following sequence example is performed for single axis operation:

1. The MB_CamTableCrank function block calculates the transformationcam.

2. The calculated transformation cam is written to the crank drive using theMB_WriteListParameter function block.

3. Switch on power to the crank drive using the MC_Power function block.4. Reference the crank drive using the MC_Home function block. This step

is required when no absolute measuring device is used at the crank drivemotor.

5. Input the crank drive's actual position into the MB_PhiToXvirt functionblock. The actual crank position is converted from crank angles (degrees)to a translatory (mm) virtual value.

6. Move the virtual master to the crank drive's actual position by inputting theXvirt output value of the MB_PhiToXvirt function block into the MC_Move‐Absolute function block for the virtual axis. After this sequence, the virtualmaster is at the crank drive actual position and the crank drive is nowsynchronize to the virtual master without performing any motion.

7. Switch the crank drive to cam operation mode using MC_CamIn. SetCamShaftDistance = 360 , gear ratio to 1:1, select the transformation camand select the virtual master as the master axis). The crank drive will notexecute any motion in order to synchronize with the virtual master as thevirtual master was moved to the crank position (step 6). The crank drivewill perform a dynamic synchronized move if step 6 was not performed.

8. Now the virtual axis can be moved using the MC_MoveAbsolute andMC_MoveVelocity function blocks in single axis operation (the crank axiswill now follow the master axis using the transformation cam).

1.4 MB_CamTableCrankSuperimposedShort Description The MB_CamTableCrankSuperimposed function block superimposes the giv‐

en user cam (CamInput) with the transformation cam and outputs a resultingsuperimposed cam via the CamOutput. The transformation cam is calculated

8/33 Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

Crank Kinematics Function and Function Blocks

within the function block, similar to the MB_CamTableCrank function block. Thesuperimposition principle is shown in fig. 1-13 " Cam Superimposed Principle"on page 9. The user cam must contain 1024 data points and define themovement of the translatory axis in reference to the master axis (without con‐sideration of the crank kinematics). The table's 100% value corresponds to themovement (2 • travel range = modulo value of the virtual translatory axis).The calculated superimposed cam must be written to the crank drive by usingthe MB_WriteListParameter function block and must be activated by the PLCprogram using MC_CamIn function block.

Notes to the UserAccording to given end point of the user cam, the following cases are distin‐guished:● If the end point of the user cam is close to 100%, the crank executes no

directional return (crank keeps on turning in the same direction) ⇒ energy-optimal procedure, because natural movement of the crank is used.

● If the end point of the user cam is 0%, a forward-backward movement ofthe translatory axis with directional return of the crank takes place (asshown in the figure below)

Fig.1-13: Cam Superimposed Principle

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG 9/33

Crank Kinematics Function and Function Blocks

Interface Description

Fig.1-14: MB_CmTableSuperimposed Function Block

I/O Type Name Data Type Comment

VAR_IN_OUT CamInput ARRAY[0..1023]OFDINT

Array with the data of the user cam to the presetting of the trans‐latory movement profile

CamOutput ARRAY[0..1023]OFDINT

Array with the data of the calculated superimposed cam to theactivation of the crank

Data MB_CRANK Structure with internal calculated data of the crank kinematics.Data are calculated in this FB and then applied by other relevantfunction blocks

VAR_INPUT Execute BOOL Positive edge starts the calculation of the superimposed cam

CamFormat BOOL TRUE = New Format ( last point = first point = 360° )FALSE = Old Format ( last point = 360° - d )

Radius REAL Length of the crank in [mm]

Pushrod REAL Length of the pushrod in [mm]

Offset REAL Offset of the slide level to the crank center [mm]

XNull REAL Distance from crank center to the zero point of the slide [mm]

PoleDistance0 REAL Distance from the rear pole point X0 (in [mm]) to the linearizedrange where travel is affected by limited drive dynamic.

PoleDistance1 REAL Distance from the rear pole point X1 (in [mm]) to the linearizedrange where travel is affected by limited drive dynamic.

VAR_OUTPUT Done BOOL Calculation completed, cam table and output data (Data) are valid

Active BOOL FB is in process

Error BOOL Error (see ErrorID and ErrorStruct)

ErrorID ERROR_CODE

Error description

ErrorStruct ERROR_STRUCT

Detailed error description

Fig.1-15: MB_CamTableSuperimposed I/O InterfaceBoundary Conditions Refer to chapter 1.3 "MB_CamTableCrank" on page 6 for details.

The following setup must be performed in IndraWorks in order to move thetranslatory slide in synchronous operation mode with a given user cam:

10/33 Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

Crank Kinematics Function and Function Blocks

● Set the scaling of the crank drive (real axis) to rotary with a modulo valueof 360°.

IndraWorks must be in online mode with the drive in parametermode in order to modify scaling factors.

Superimposed Cam ApplicationExample

The following example sequence is performed for a synchronous applicationwith cam:1. A user cam is inputted into the function block's CamInput (e.g., by reading

in a drive cam, or reading from a file ...).2. The MB_CamTableCrankSuperimposed function block outputs a super‐

imposed cam that is calculated by superimposing a user cam to a trans‐formation cam. Refer to the graphics in fig. 1-13 " Cam SuperimposedPrinciple" on page 9.

3. The calculated superimposed cam is written to the crank drive using theMB_WriteListParameter function block.

4. Switch on the power to the crank drive using the MC_Power function block.5. Reference the crank drive using the MC_Home function block. This step

is required when no absolute measuring device is being used.6. The position output from the superimposed cam and that of the crank drive

position can be out of phase from each other. A switch to cam operationmode (via MC_CamIn, with CamShaftDistance=360, 1:1 gear and the su‐perimposed cam selected) can be executed via the following 2 options:● Switch the crank drive to cam operation mode without a previous

position calibration. The crank drive will execute a dynamic synchro‐nization.

● Synchronize the crank drive to the master axis by inputting themaster axis position and the superimposed cam into the MB_Mas‐terTo Phi function block. Next, before switching to synchronousoperation mode, move the crank drive to match the output positionof the MB_MasterToPhi function block using the MC_MoveAbsolutefunction block.

1.5 MB_PhiToXvirtShort Description The MB_PhiToXvirt function block converts crank angles (Phi) into virtual trans‐

latory positions (Xvirt).Interface Description

Fig.1-16: MB_PhiToXvirt Function Block

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG 11/33

Crank Kinematics Function and Function Blocks

I/O Type Name Data Type Comment

VAR_IN_OUT Data MB_CRANK Structure with the internal data of the crank kinematics (must be cal‐culated before by MB_CamTableCrank or MB_CamTableCrankSu‐perimposed)

VAR_INPUT Enable BOOL Calculation of Xvirt in each cycle while Enable=TRUE

Phi REAL Crank position in [°]

Radius REAL Length of the crank in [mm]

Pushrod REAL Length of the pushrod in [mm]

Offset REAL Offset of the slide level to the crank center [mm]

XNull REAL Distance from the crank center to the zero point of the slide [mm]

VAR_OUTPUT Done BOOL Calculation is completed -> Xvirt is valid

Error BOOL Error (see ErrorID and ErrorStruct)

ErrorID ERROR_CODE

Error description

ErrorStruct ERROR_STRUCT

Detailed error description

Xvirt REAL Virtual translatory position (Xvirt)

Fig.1-17: MB_PhiToXvirt I/O Interface

1.6 MB_MasterToPhiShort Description The MB_MasterToPhi function returns the crank angle (Phi) which is calculated

from the master axis position (master) and the (superimposed) cam. The su‐perimposed cam must be calculated before this function is called (via MB_Cam‐TableCrankSuperimposed). The output value of the MB_MasterToPhi functioncan be used to position the crank drive to match the position of the master axisbefore switching to synchronous operation mode.

Interface Description

Fig.1-18: MB_MasterToPhi Function

I/O Type Name Data Type Comment

VAR_IN_OUT CamTable ARRAY[0..1023]OFDINT

Array with the data of the superimposed cam

VAR_INPUT Position REAL Position of the master axis

12/33 Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

Crank Kinematics Function and Function Blocks

I/O Type Name Data Type Comment

Modulo REAL Modulo value of the master axis

CamFormat BOOL TRUE = New Format ( last point = first point = 360° )FALSE = Old Format ( last point = 360° - d )

Fig.1-19: MB_MasterToPhi I/O Interface

1.7 MB_XvirtToXmechShort Description The MB_XvirtToXmech function block converts the virtual translatory position

(Xvirt) into the mechanical translatory position (Xmech) of the slide. Xmechvalues can be used for display purposes (e.g., HMI interface).

Interface Description

Fig.1-20: MB_XvirtToXmech Function Block

I/O Type Name Data Type Comment

VAR_INPUT Enable BOOL FB executes calculation while Enable=TRUE

Xvirt REAL Virtual translatory position in [mm]

Radius REAL Length of the crank in [mm]

Pushrod REAL Length of the pushrod in [mm]

Offset REAL Offset of the slide level to the crank center [mm]

XNull REAL Distance from the crank center to the zero point of the slide[mm]

VAR_OUTPUT Done BOOL Output value (Phi) is valid

Error BOOL Error (see ErrorID and ErrorStruct)

ErrorID ERROR_CODE

Error description

ErrorStruct ERROR_STRUCT

Detailed error description

Xmech REAL Mechanical translatory position (Xmech) of the slide

Fig.1-21: MB_XvirtToXmech I/O Interface

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG 13/33

Crank Kinematics Function and Function Blocks

Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

2 CamLock Function Blocks2.1 Overview

CamLock technology function blocks are used to enhance the "Lock On/LockOff" functionality in Rexroth MLC controls using version 3 firmware.The MB_PrepareCams function block uses a 5th order polynomial to calculate,build and download three cam profiles to a slave axis. These cam profiles arereferred to as Lock On, Lock Off and One-to-One. They allow a synchronizedslave axis to disengage (Lock Off) from its master and stop at a predefinedposition until it is once again synchronized (Lock On) to the master. TheMB_CamLock function block is used to activate the Lock On / Lock Off func‐tionality. A UserCam profile is also supported.While a slave axis is synchronized to the master, it follows the master using theOne-to-One cam. A phase offset between the master and slave position canbe defined. When the Lock Off cam is enabled (via the MB_CamLock functionblock), the slave axis transitions off of the master position to a predefined lockoff position and comes to a stop. When the Lock Off cam is disabled (Lock On),the slave axis transitions from its stopped position and re-synchronizes back tothe master. Once synchronized, the slave axis switches back to the One-to-One cam and continues following the master input position.

2.2 CamLock - Application ExampleThis functionality is generally used in packaging machines where productscoming down a line are required to have a uniform gap between them beforethey can be wrapped. In the event that the gap is too large, the wrapping proc‐ess in the machine is disengaged (Lock Off) from the master for one or morecycles until product is once again detected. This condition is called, "No Prod‐uct, No Seal". Once product is detected, the wrapping process is once againsynchronized to the master (Lock On) and continues to wrap products.This none-uniform gap feature makes it necessary to accelerate or deceleratethe slave axis to synchronize to the master. The following figure illustrates atypical fill and seal wrapping machine:

Fig.2-1: Horizontal Form, Fill and Seal Wrapper

The following graph shows the run, decelerate, stop, accelerate and run proc‐ess that a slave axis follows during the Lock On / Lock Off process.

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG 15/33

CamLock Function Blocks

Fig.2-2: CamLock Cam Profiles

One-to-One CAM Profile“Synchronized to Master”

The One-to-One cam profile is active and synchronized to the master input,unless the Lock On/Lock Off feature is not active. The Lock On/Lock Off featureis active while the Enable input in the MB_CamLock function block is set high.The LockOff input must be set low. Under normal operating conditions, this camprofile is active and follows the master input.

Fig.2-3: Run Cam Active, Normal Operation of Wrapper Application

Lock Off Cam Profile The Lock Off cam profile decelerates the slave axis to a stop over one cycle ofthe master. The Lock Off cam is active while both the Enable and LockOff inputsin the MB_CamLock function block are set high. After this cycle, the slave axis'velocity is stopped and does not restart until the Lock On cam profile is active.

16/33 Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

CamLock Function Blocks

Once enabled, the Lock Off cam profile is active after the 0 cross‐over of the slave axis.

Fig.2-4: Lock Off Cam Active, No Product - No Seal

Lock On Cam Profile The Lock On cam profile is active and accelerates from a stopped position tomatch the velocity of the master input over one cycle of the master (360 de‐grees). After this cycle, the velocity of the slave axis matches that of the master.The Lock On cam is only active until the slave axis is synchronized with themaster. Afterwhich the slave axis follows the One-to-One cam while in normaloperation. The Lock On cam profile is active while the Enable input is set highand the LockOff input is set low in the MB_CamLock function block.

Once enabled, the Lock On cam profile is active after the 0 cross‐over of the master axis.

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG 17/33

CamLock Function Blocks

Fig.2-5: Lock On Cam Active, Product is Present

2.3 MB_PrepareCamsShort Description The function block uses a 5th order polynomial to calculate, build and download

3 Cam profiles to parameters determined by the MC_CAM_ID inputs. The re‐sulting motion profiles contain boundary conditions for position and velocity.

Interface Description

Fig.2-6: MB_PrepareCams Function Block

The MB_PrepareCams function block is supported by both MLCcontrol and MLD-M drive systems. Any functionality unique to aparticular system will be clearly identified.

MLD-M Drive System An MLD-M drive system supports four (4) drive parameters for storing CamLockCam profiles. The following table shows the correlation between anMC_CAM_ID integer value and the drive parameter that will be used to storethe Cam profile.

18/33 Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

CamLock Function Blocks

The axis referenced in the AXIS VAR_IN_OUT will store the Camprofiles calculated by the MB_PrepareCams function block.

MC_CAM_ID Drive Parameter

1 P-0-0072

2 P-0-0092

3 P-0-0780

4 P-0-0781

Fig.2-7: Available Drive Parameters for CamLock Cam Profiles

The MC_CAM_ID integer value only determines which parameterwill be used to store the calculated Cam profile. The actual func‐tionality (e.g., LockOnCam) is determined by the input in the func‐tion block.For example, in an MLD-M system, if a value of 1 is used for theLockOnCam input, then the LockOn Cam profile that is calculatedby the function block is stored in drive parameter P-0-0072 of theaxis referenced in the AXIS VAR_IN_OUT.For an MLC control system, a value of 1 will store the Cam profilein control parameter C-0-2001. However, in order for the MB_Pre‐pareCams function block to execute without errors, an axis input isstill required for the AXIS VAR_IN_OUT input. The calculated Camprofiles are stored in control parameters.

MLC Control System An MLC control system supports a block of 98 control parameters for storingCamLock Cam profiles. Unlike drive parameters, the correlation betweenMC_CAM_ID value and control parameter is straight forward. Starting with con‐trol parameter C-0-2001, an MC_CAM_ID value of 1 will be stored in controlparameter C-0-2001 and so on up to C-0-2098 for an MC_CAM_ID value of 98.Control parameter C-0-2099 is not available for storing Cam profiles, it is re‐served for "Stopping the slave axis".

This function block must run right after power up in order to calculate the threecam profiles and download them to the relevant parameters. Use the Doneoutput to verify that the process has completed before the PLC program con‐tinues.

The MB_PrepareCams function block is executed only once at thestart of the PLC program and before the MB_CamLock functionblock.

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG 19/33

CamLock Function Blocks

I/O Type Name Data Type Comment

VAR_IN_OUT Axis AXIS_REF Reference to slave axis where Cam profiles aredownloaded. For control cams, type AXIS_REFvariable is used.

VAR_INPUT Execute BOOL Positive edge starts the calculation of three camprofiles.

LockOnCam MC_CAM_ID Determines the destination of the LockOn Camtable. Default value is 4.

RunCam MC_CAM_ID Determines the destination of the RunCam table.Default value is 3.

LockOffCam MC_CAM_ID Determines the destination of the LockOff Camtable. Default value is 2.

UserCam_Profile MC_CAM_ID Determines the destination of the UserCam ta‐ble. Default value is 1.

LockOff_Pos REAL This input is used to calculate the appropriatevelocity profile.

VAR_OUTPUT Done BOOL Three cam profiles have been calculated, buildand downloaded.

Active BOOL Function block is active

Error BOOL Indicates an error has occurred

ErrorID ERROR_CODE Short error description

ErrorIdent ERROR_STRUCT Detailed error description

Fig.2-8: MB_PrepareCams I/O Interface

Error Handling The function block generates the following error messages in Additional1 / Ad‐ditional2 for the "F_RELATED_TABLE".

ErrorID Additional1 Additional2 Description

RESOURCE_ERROR 16#0003 16#0000 Fb was aborted from another FB

RESOURCE_ERROR 16#0004 16#0000 This drive firmware version is not supported

INPUT_RANGE_ERROR 16#13A1 16#0001 CAM related values are not initialized correctly

INPUT_RANGE_ERROR 16#13A1 16#0002 Slave Axis_Ref, the AxisNo is out of range

INPUT_RANGE_ERROR 16#13A1 16#0003 LockOff_Pos needs to be greater than 0 and lessthan 360, default=180

CALCULATION_ERROR 16#13A2 16#0000 Calculation of the step width result = 0

STATE_MACHINE_ERROR 16#0006 16#0000 Invalid state of the state machine

Fig.2-9: MB_PrepareCams Error Codes

20/33 Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

CamLock Function Blocks

2.4 MB_CamLock Function Block2.4.1 MB_CamLock

Short Description The MB_CamLock function block is used to enable the Run, Lock On and LockOff cam profiles calculated and stored by the MB_PrepareCams function block.In addition to the enabling of cam profiles, this function block also provides thefollowing functionality:● Electronic gear ratio● Direction of Synchronization (SyncMode)● MC_CamIn and MC_CamOut Functionality for drive cams● Master fine adjustment

Interface Description

Fig.2-10: MB_CamLock Function Block

For an MLC control system, control cams can be used to assign aslave input as a virtual axis.

The values used for the MC_CAM_ID inputs in the MB_CamLockfunction block must match the same values used in the MB_Pre‐pareCams function block or an error will be issued. For example, ifa value of 1 is used for the LockOnCam input of the MB_Prepare‐Cams function block, then it also must be used for the LockOnCaminput of the MB_CamLock function block.

The following table lists the different cam profiles controlled by the MB_Cam‐Lock function block:

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG 21/33

CamLock Function Blocks

Cam Profile Enable Input LockOff Input Description

Run High Low Normal operating mode using a 1:1 cam profile.

Lock Off High Low to HighThe slave axis switches from the Run cam to theLock Off cam profile and comes to a stop at theposition specified in the LockOff_Pos input.

Lock On High High to LowThe slave axis accelerates from a stopped posi‐tion using the Lock On cam profile, synchronizeswith the master and switches to the Run cam.

Fig.2-11: Normal CamLock Operation

I/O Type Name Data Type Comment

VAR_IN_OUT Slave AXIS_REF Real or virtual axis

Master AXIS_REF Real or virtual axis

VAR_INPUT Enable BOOL Enables the MB_CamLock FB. A rising edge dy‐namically synchronizes the slave before enteringthe run state. A falling edge will execute a gearout.

LockOff BOOL True: Locked offFalse: Locked onIf this input is true before Enable, the axis willdynamically synchronize, enter the Run state,and then Lock off.

RatioNumerator UINT Electronic gear ratio

RatioDenumerator UINT Electronic gear ratio

SyncMode MC_SYNC_DIREC‐TION

0: = shortest distance1: = positive direction2: = negative direction

MasterFineAdjust REAL Input required for the MB_MotionProfile

LockOff_Pos REAL The position in degrees where the slave axis willstop when locked off the master. The default val‐ues is 180 degrees.

LockOnCam MC_CAM_ID Determines the source of the LockOn Cam table.Default value is 4.

RunCam MC_CAM_ID Determines the source of the Run Cam table.Default value is 3.

LockOffCam MC_CAM_ID Determines the source of the LockOff Cam table.Default value is 2.

UserCam_Profile MC_CAM_ID Determines the source of the User Cam table.Default value is 1.

22/33 Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

CamLock Function Blocks

I/O Type Name Data Type Comment

VAR_OUTPUT InOperation BOOL True while the FB is Enabled

InSync BOOL InSync output is true when the run cam is in syncstate

CommandAborted BOOL Command aborted by another FB

CamState UINT Current state of the CamLock FB1: Dynamic Sync2: Run State3: Lock Off State4: Standstill5: Lock On State6: Gear Out (continuous motion)

Error BOOL Indicates an error has occurred

ErrorID ERROR_CODE Short error description

ErrorIdent ERROR_STRUCT Detailed error description

Fig.2-12: MB_CamLock I/O Interface

Timing Diagram

Fig.2-13: MB_CamLock Timing Diagram

Functional Description When the Enable input is set high in combination with the LockOff input low,the slave axis dynamically synchronizes with the master and immediatelyswitches to the Run state. The CamState output transitions from Dynamic Sync(1) to Run (2). The function block will stay in the Run state (running a 1:1 cam)until the LockOff input goes high.When the LockOff input goes high, during run mode, the function block exe‐cutes a lock off cam and stops at the position specified in the LockOff_Pos input.During this transition from running to stopping, the CamState output transitionsfrom Run (2) to Lock Off (3) to Standstill (4). The default value for LockOff_Posis 180 degrees, which is half way from lock on to run, and from run to lock off.

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG 23/33

CamLock Function Blocks

At this point, the function block stays in the stopped state until the LockOff inputgoes low. This would complete the cycle. To disable the CamLock functionblock, it is recommended to be in CamState=4 (stopping state) and set theEnable input to low.If the Enable input is set to low, while in the Run state, the slave will de‐synchronize from the LockOn/LockOff Cam functionality and switch to contin‐uous motion.

LockOn/LockOff Trace Examples

Channel 0 (green)= master positionChannel 1 (red) = slave positionChannel 2 (blue)= slave velocityMaster velocity= 200 rpm

Fig.2-14: LockOn Profile with a LockOff_Pos of 180 degreesThe figure above shows the position and velocity profile during the LockOnprofile. The LockOff_Pos position is 180 (default). This shows that for a lock offposition of 180, the position and velocity profiles are smooth with no jump andno overshoot.

24/33 Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

CamLock Function Blocks

Channel 0 (green)= master positionChannel 1 (red)= slave positionChannel 2 (blue)= slave velocityMaster velocity= 200 rpm

Fig.2-15: LockOff Profile with a LockOff_Pos of 180 degreesThe figure above shows the position and velocity profile during the LockOffprofile. The LockOff_Pos position is 180 (default). This shows that for a lock offposition of 180, the position and velocity profiles are smooth with no jump andno overshoot.

Channel 0 (green)= master positionChannel 1 (red)= slave positionChannel 2 (blue)= slave velocityMaster velocity= 200 rpm

Fig.2-16: LockOn Profile with a LockOff_Pos of 90 degreesThe figure above shows the position and velocity profile during the LockOnprofile when the LockOff_pos position is 90. This shows that for a lock off po‐sition of 90, the position and velocity profiles are still ok (there is a velocity jump,but no motion reverses direction).

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG 25/33

CamLock Function Blocks

Channel 0 (green)= master positionChannel 1 (red)= slave positionChannel 2 (blue)= slave velocityMaster velocity= 200 rpm

Fig.2-17: LockOff Profile with a LockOff_Pos of 90 degreesThe figure above shows the position and velocity profile during LockOff profilewhen the LockOff_Pos position is 90. This shows that for a lock off position of90, the position and velocity profiles have an overshoot. This position overshootcauses the motion to reverse direction.

It is recommended to use a value of 180 for the LockOff_Pos input(this input has to match for both the MB_PrepareCams andMB_CamLock function blocks). If a different lock off position otherthan 180 is used, then the further away from 180, the more over‐shoot in position and velocity will occur.

Error Handling The function block generates the following error messages in Additional1 / Ad‐ditional2 for the "F_RELATED_TABLE".

ErrorID Additional1 Additional2 Description

RESOURCE_ERROR 16#0003 16#0000 Fb was aborted from another FB

RESOURCE_ERROR 16#0004 16#0000 This drive firmware version is not supported

INPUT_RANGE_ERROR 16#1301 16#0001 LockOff_Pos needs to be greater than 0 and lessthan 360, default=180

ACCESS_ERROR 16#1302 16#0001 Parameter P-0-0088, Bit 4 is not set

ACCESS_ERROR 16#1302 16#0002 Error occurred during setting upA-0-2610=P-0-0691

STATE_MACHINE_ERROR 16#0006 16#0000 Invalid state of the state machine

Fig.2-18: MB_CamLock Error Codes

2.4.2 MB_CamLock Components and ParametrizationHardware

The following Rexroth hardware components are required:

26/33 Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

CamLock Function Blocks

● IndraDrive C or IndraDrive M● MLC L40.2● Additional second encoder interface card required for measuring wheel● Additional second encoder (according to drive project planning manual)

FirmwareThe following firmware is required and used with the above mentioned Rexrothhardware components:● Drive firmware MPH04V10 or higher● The following functional packages are required:

– Closed Loop– Synchronization– Drive PLC

SoftwareThe required PC software to use is as follows:● IndraWorks for MLC03● IndraLogic

MB_CamLock ParametrizationThe following drive parametrization steps are performed using IndraWorks andare required before running the MB_CamLock function block.1. Load basic drive parameters.

Right click relevant Axis ▶ Parameter handling ▶ Basic parameter load2. Reference the drive (absolute feedback preferred) before running the

function block.3. Enable drive to Modulo format (set S-0-0076, Bit 7 = 1).4. Set the NC Cycle Time S-0-0001 = PLC Task Cycle Time using Indra‐

Work's Parameter Editor.The PLC Task cycle time can be set by launching IndraLogic from withinthe IndraWorks project and selecting Task Configuration from the Re‐source tab.

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG 27/33

CamLock Function Blocks

Fig.2-19: IndraLogic, Cycle Task Time5. Switch IndraWorks to online mode, right click over the relevant drive and

select Parameter Editor.

Fig.2-20: IndraWorks, Parameter Editor6. Set parameter P-0-0088, Bit 4=1.7. Set P-0-0144 = P-0-0094 = 0 (0 means that Cam switching occurs at

master position of zero degrees).8. Set the synchronization acceleration (P-0-0142) and the synchronization

velocity (P-0-0143) for the slave axis.For a virtual slave, set A-0-2790 and A-0-2791.

28/33 Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

CamLock Function Blocks

9. Set the synchronization direction (P-0-0154), the synchronization mode(P-0-0155) and the command value mode (S-0-0393) of the slave axisdepending on the master drive polarity (P-0-0108).

10. Make sure that parameter S-0-0048 is equal to 0.

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG 29/33

CamLock Function Blocks

Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

3 Service & Support3.1 Helpdesk

Our service helpdesk at our headquarters in Lohr, Germany, will assist you withall kinds of enquiries.Contact us:● By phone through the Service Call Entry Center,

Mo - Fr 7:00 am - 6:00 pm CET+49 (0) 9352 40 50 60

● By Fax+49 (0) 9352 40 49 41

● By email: [email protected]

3.2 Service HotlineOut of helpdesk hours please contact our German service department directly:+49 (0) 171 333 88 26or+49 (0) 172 660 04 06Hotline numbers for other countries can be found in the addresses of eachregion (see below).

3.3 InternetAdditional notes regarding service, maintenance and training, as well as thecurrent addresses of our sales and service offices can be found onhttp://www.boschrexroth.comOutwith Germany please contact our sales/service office in your area first.

3.4 Helpful InformationFor quick and efficient help please have the following information ready:● detailed description of the fault and the circumstances● information on the type plate of the affected products, especially type co‐

des and serial numbers● your phone / fax numbers and e-mail address so we can contact you in

case of questions

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG 31/33

Service & Support

Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

IndexCCamLock Function Blocks

MB_CamLock 21MB_PrepareCams 18trace examples 24

Crank Kinematicsapplication case 1: single axis operating mode2application case 2: synchronous operating modewith cam 2counting direction 5MB_CamTableCrank Function Block 6MB_CamTableCrankSuperimposed 8MB_MasterToPhi function 12MB_PhiToXvirt function block 11MB_XvirtToXmech 13mechanical arrangement 1 3mechanical arrangement 2 4mechanical translatory position 5overview 1travel range equation 5variables and terms 5Xmech 5Xvirt 5

FFunction

MB_MasterToPhi 12Function Block

MB_CamTableCrank 6MB_CamTableCrankSuperimposed 8MB_PhiToXvirt 11MB_XvirtToXmech 13

MMB_CamLock 21MB_CamTableCrank 6MB_CamTableCrank Function Block

application notes 8boundary conditions 8data structure 7

MB_CamTableCrankSuperimposed 8application example 11

MB_MasterToPhi 12MB_PhiToXvirt 11MB_PrepareCams 18MB_XvirtToXmech 13

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG 33/33

Index

Bosch Rexroth AG | Electric Drivesand Controls

Rexroth MLC Tech-FB | Application Manual

Notes

Application Manual | Rexroth MLC Tech-FB Electric Drivesand Controls

| Bosch Rexroth AG

Bosch Rexroth AGElectric Drives and ControlsP.O. Box 13 5797803 Lohr, GermanyBgm.-Dr.-Nebel-Str. 297816 Lohr, GermanyPhone +49 (0)93 52-40-50 60Fax +49 (0)93 52-40-49 [email protected]

Printed in GermanyDOK-IM*MLC-TFB-IMPAV03-AW01-EN-PR911321344