Rexroth MLC Tech-FB for Packaging Applications

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "Rexroth MLC Tech-FB for Packaging Applications"

Transcription

1 Electric Drives Linear Motion and Hydraulics Assembly Technologies Pneumatics Service Rexroth MLC Tech-FB for Packaging Applications R Edition 01 Application Manual

2 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual Title Type of Documentation Document Typecode Internal File Reference Rexroth MLC Tech-FB for Packaging Applications Application Manual DOK-IM*MLC-TFB-IMPAV03-AW01-EN-P RS-890a758d9ddb78bd0a6846a000ac81d9-4-en-US-7 Record of Revision Edition Release Date Notes DOK-IM*MLC-TFB-IMPAV03-AW01-EN- P.. 05/07 Released Copyright Validity Published by Note 2007 Bosch Rexroth AG Copying this document, giving it to others and the use or communication of the contents thereof without express authority, are forbidden. Offenders are liable for the payment of damages. All rights are reserved in the event of the grant of a patent or the registration of a utility model or design (DIN 34-1). The specified data is for product description purposes only and may not be deemed to be guaranteed unless expressly confirmed in the contract. All rights are reserved with respect to the content of this documentation and the availability of the product. Bosch Rexroth AG Bgm.-Dr.-Nebel-Str. 2 D Lohr a. Main Tel.: +49 (0)93 52/40-0 Fax: +49 (0)93 52/ Telex: Bosch Rexroth Corporation Electric Drives 5150 Prairie Stone Parkway Hoffman Estates, IL USA Tel.: Fax: Dept. EAM (DPJ) This document has been printed on chlorine-free bleached paper.

3 Application Manual Rexroth MLC Tech-FB Electric Drives Table of Contents Bosch Rexroth AG I/I Table of Contents 1 Crank Kinematics Function and Function Blocks Introduction and Overview Common Definitions Definitions of the Basic Variables at the Crank Kinematics Counting Direction Mechanical (Xmech) and Virtual (Xvirt) Translatory Position MB_CamTableCrank MB_CamTableCrankSuperimposed MB_PhiToXvirt MB_MasterToPhi MB_XvirtToXmech CamLock Function Blocks Overview CamLock - Application Example MB_PrepareCams MB_CamLock Function Block MB_CamLock MB_CamLock Components and Parametrization Hardware Firmware Software MB_CamLock Parametrization Page 3 Service & Support Helpdesk Service Hotline Internet Helpful Information Index... 33

4 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual

5 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG 1/33 Crank Kinematics Function and Function Blocks 1 Crank Kinematics Function and Function Blocks 1.1 Introduction and Overview The function and function blocks described in this section are used to convert between linear (translatory) motion and rotary motion (crank angle) for use in a Crank Kinematic application. Crank Kinematics are often used to drive the cross seal splits in sealing machines 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, driven by a servo motor whose axis is offset from that of the translatory slide. The Crank Kinematic shown below outputs set points and actual values (position and velocity) in translatory units while the measuring system outputs in rotary units. For this reason, the set points and actual values must be converted from 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 MB_MasterToPhi Description Outputs crank angles calculated from the master axis position and the superimposed CAM. Fig.1-2: Crank Kinematics Function Function Block MB_CamTableCrank MB_CamTableCrankSuperimposed Description Calculates a transformation CAM which converts a translatory virtual master position into rotary values (crank angles). Calculates a transformation CAM and combines it with a user CAM to output a superimposed CAM profile.

6 2/33 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual Crank Kinematics Function and Function Blocks Function Block MB_PhiToXvirt MB_XvirtToXmech Description Converts crank angles (Phi) into virtual translatory position (Xvirt) for use by the PLC program. Converts virtual translatory position (Xvirt) into mechanical translatory position (Xmech). Application Case 1: Single Axis Operating Mode Application Case 2: Synchronous Operating Mode with CAM Reverse Conversion Fig.1-3: Crank Kinematics Function Blocks The following two applications are typically used: Single axis operation refers to the position or velocity controlled operation of the 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 crank angles, via the transformation cam. The transformation cam is calculated by the MB_CamTableCrank function block and becomes active using the MC_CamIn function block. The crank axis will then follow the virtual master (which runs in translatory units) and the transformation cam converts the translatory position into a crank angle. Refer to chapter 1.3 "MB_CamTableCrank" on page 6 for details. In this application, a translatory axis with a user CAM profile follows a master axis. The user CAM only applies to the translatory axis. For this reason, the user CAM does not affect the nonlinear behavior of the Crank Kinematic. Instead, the user CAM is combined with a transformation CAM, via the MB_CamTableSuperimposed function block, and the resulting rotary CAM is sent to the drive via the PLC program. Refer to chapter 1.4 "MB_CamTable CrankSuperimposed" on page 8 for details. In the previous application examples, translatory units are converted to rotary units (set point preparation). However, in order for the PLC to subsequently process position or velocity commands, the rotary units must be converted back to translatory units by means of the MB_PhiToXvirt function block. Refer to chapter 1.5 "MB_PhiToXvirt" on page 11 for details.

7 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG 3/33 Crank Kinematics Function and Function Blocks Fig.1-4: Crank Kinematics Technology Function Block Diagram 1.2 Common Definitions Definitions of the Basic Variables at the Crank Kinematics The following figures show the connection between crank and translatory coordinates, as well as the meaning of several mechanical parameters.

8 4/33 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual Crank Kinematics Function and Function Blocks Fig.1-5: Mechanical Arrangement 1: Connection of Crank and Translatory Coordinates at the Crank Kinematics Fig.1-6: Mechanical Arrangement 2: Connection of Crank and Translatory Coordinates at the Crank Kinematics

9 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG 5/33 Crank Kinematics Function and Function Blocks Variable / Term XNull PoleDistance0 PoleDistance1 Maximum travel range Linearized range Transformation cam Definition Distance between crank axis and slide's zero point Distance to the pole point X0 / X1 (beyond the linearized range, a compensation function is applied) Travel range of the translatory coordinate system = X1-X0 In the linearized range no substitute polynomial has an effect Converts translatory (mm) coordinates into crank angles (degrees) Fig.1-7: Counting Direction Variables and Terms The following counting directions generally apply to the arrangements shown in fig. 1-5 " Mechanical Arrangement 1: Connection of Crank and Translatory Coordinates at the Crank Kinematics" on page 4 and fig. 1-6 " Mechanical Arrangement 2: Connection of Crank and Translatory Coordinates at the Crank Kinematics" 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 beginning with 0 and ending with 360 Counting Direction of the Translatory Slide: Mechanical arrangement 1: To the right more largely growing numerical values Mechanical arrangement 2: To the left more largely growing numerical values Mechanical (Xmech) and Virtual (Xvirt) Translatory Position Mechanically, the slide (translatory axis) can move between the rear (X0) and front (X1) pole points. This mechanical limit is labeled as the maximum travel range. The mechanical translatory position (Xmech) corresponds to two different crank angles. Therefore, the virtual translatory position (Xvirt) is used to clearly assign a translatory position to a crank angle. The virtual translatory position moves in the positive direction, even when the mechanical position (Xmech) inverts the direction when passing the pole position. The modulo overflow of Xvirt is defined by the user via the zero point (Xnull). In addition, the modulo value of Xvirt corresponds to double the travel range of the crank kinematics. 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:

10 6/33 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual Crank Kinematics Function and Function Blocks Fig.1-9: Counting Direction of the Slide Position (Xvirt and Xmech) 1.3 MB_CamTableCrank Short Description The MB_CamTableCrank function block calculates a transformation cam (with 1024 data points) using the crank-specific input values. This transformation cam 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 be coupled to a rotary crank drive. Refer to chapter 1.1 "Introduction and Overview" on page 1 for details. In single axis operation, the virtual axis is moved in translatory units while the crank drive follows the transformation cam. Travel beyond the linearized range is allowed by specifying a PoleDistance0 and a PoleDistance1 value. A compensation function (substitute polynomial of 5 th order) is applied to the position which approximates the crank drive and limits the drive dynamic while in the PoleDistance area. With the transition in and out of the linearized range position, velocity and acceleration is constant. The function block provides the calculated transformation cam via the "CamTable" VAR_IN_OUT. The PLC program must download this CamTable to the drive (e.g. using MB_WriteListeParameter) before it can be used (e.g., using MC_CamIn function block).

11 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG 7/33 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 [ ] OF DINT Array with the data of the calculated transformation cam Data MB_CRANK Structure with internal calculated data of the crank kinematics. Data are calculated in this FB and passed on to other function blocks. VAR_INPUT Execute BOOL Positive edge starts the calculation of the transformation cam CamFormat BOOL TRUE = New Format ( last point = first point = 360 ) FALSE = Old Format ( last point = 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 linearized range where travel is affected by limited drive dynamics. PoleDistance1 REAL Distance from the front pole point X1 (in [mm]) to the linearized range where travel is affected by limited drive dynamics. 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 MB_Crank Data Structure Fig.1-11: MB_CamTableCrank I/O Interface The MB_Crank data structure serves for the internal data exchange between function blocks and function. The content of the data structure MB_CRANK is calculated by the MB_CamTableCrank / MB_CamTableCrankSuperimposed function blocks, and is applied to all other relevant function blocks and function.

12 8/33 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual Crank Kinematics Function and Function Blocks Boundary Conditions Boundary Conditions Pushrod Radius + Offset The following boundary conditions must be satisfied or errors will be reported to the PLC. Reason If this boundary condition is not satisfied, the translatory slide can not drive mechanically 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 Setup The following setup must be performed in IndraWorks in order to move the translatory 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 parameter mode in order to modify scaling factors. MB_CamTableCrank Application Example The following sequence example is performed for single axis operation: 1. The MB_CamTableCrank function block calculates the transformation cam. 2. The calculated transformation cam is written to the crank drive using the MB_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 drive motor. 5. Input the crank drive's actual position into the MB_PhiToXvirt function block. 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 the Xvirt output value of the MB_PhiToXvirt function block into the MC_Move Absolute function block for the virtual axis. After this sequence, the virtual master is at the crank drive actual position and the crank drive is now synchronize to the virtual master without performing any motion. 7. Switch the crank drive to cam operation mode using MC_CamIn. Set CamShaftDistance = 360, gear ratio to 1:1, select the transformation cam and select the virtual master as the master axis). The crank drive will not execute any motion in order to synchronize with the virtual master as the virtual master was moved to the crank position (step 6). The crank drive will perform a dynamic synchronized move if step 6 was not performed. 8. Now the virtual axis can be moved using the MC_MoveAbsolute and MC_MoveVelocity function blocks in single axis operation (the crank axis will now follow the master axis using the transformation cam). 1.4 MB_CamTableCrankSuperimposed Short Description The MB_CamTableCrankSuperimposed function block superimposes the given user cam (CamInput) with the transformation cam and outputs a resulting superimposed cam via the CamOutput. The transformation cam is calculated

13 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG 9/33 Crank Kinematics Function and Function Blocks within the function block, similar to the MB_CamTableCrank function block. The superimposition principle is shown in fig " Cam Superimposed Principle" on page 9. The user cam must contain 1024 data points and define the movement of the translatory axis in reference to the master axis (without consideration of the crank kinematics). The table's 100% value corresponds to the movement (2 travel range = modulo value of the virtual translatory axis). The calculated superimposed cam must be written to the crank drive by using the MB_WriteListParameter function block and must be activated by the PLC program using MC_CamIn function block. Notes to the User According to given end point of the user cam, the following cases are distinguished: 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) energyoptimal procedure, because natural movement of the crank is used. If the end point of the user cam is 0%, a forward-backward movement of the translatory axis with directional return of the crank takes place (as shown in the figure below) Fig.1-13: Cam Superimposed Principle

14 10/33 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual 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 [ ]OF DINT Array with the data of the user cam to the presetting of the translatory movement profile CamOutput ARRAY [ ]OF DINT Array with the data of the calculated superimposed cam to the activation 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 relevant function 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 = 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 linearized range where travel is affected by limited drive dynamic. PoleDistance1 REAL Distance from the rear pole point X1 (in [mm]) to the linearized range 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 ErrorStruct ERROR_ CODE ERROR_ STRUCT Error description Detailed error description Boundary Conditions Fig.1-15: MB_CamTableSuperimposed I/O Interface Refer to chapter 1.3 "MB_CamTableCrank" on page 6 for details. The following setup must be performed in IndraWorks in order to move the translatory slide in synchronous operation mode with a given user cam:

15 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG 11/33 Crank Kinematics Function and Function Blocks 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 parameter mode in order to modify scaling factors. Superimposed Cam Application Example The following example sequence is performed for a synchronous application with 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 superimposed cam that is calculated by superimposing a user cam to a transformation cam. Refer to the graphics in fig " Cam Superimposed Principle" on page The calculated superimposed cam is written to the crank drive using the MB_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 operation mode (via MC_CamIn, with CamShaftDistance=360, 1:1 gear and the superimposed 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 synchronization. Synchronize the crank drive to the master axis by inputting the master axis position and the superimposed cam into the MB_MasterTo Phi function block. Next, before switching to synchronous operation mode, move the crank drive to match the output position of the MB_MasterToPhi function block using the MC_MoveAbsolute function block. 1.5 MB_PhiToXvirt Short Description Interface Description The MB_PhiToXvirt function block converts crank angles (Phi) into virtual translatory positions (Xvirt). Fig.1-16: MB_PhiToXvirt Function Block

16 12/33 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual 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 calculated before by MB_CamTableCrank or MB_CamTableCrankSuperimposed) 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 ErrorStruct ERROR_ CODE ERROR_ STRUCT Error description Detailed error description Xvirt REAL Virtual translatory position (Xvirt) Fig.1-17: MB_PhiToXvirt I/O Interface 1.6 MB_MasterToPhi Short Description Interface Description The MB_MasterToPhi function returns the crank angle (Phi) which is calculated from the master axis position (master) and the (superimposed) cam. The superimposed cam must be calculated before this function is called (via MB_Cam TableCrankSuperimposed). The output value of the MB_MasterToPhi function can be used to position the crank drive to match the position of the master axis before switching to synchronous operation mode. Fig.1-18: MB_MasterToPhi Function I/O Type Name Data Type Comment VAR_IN_OUT CamTable ARRAY [ ]OF DINT Array with the data of the superimposed cam VAR_INPUT Position REAL Position of the master axis

17 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG 13/33 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 = d ) Fig.1-19: MB_MasterToPhi I/O Interface 1.7 MB_XvirtToXmech Short Description Interface Description The MB_XvirtToXmech function block converts the virtual translatory position (Xvirt) into the mechanical translatory position (Xmech) of the slide. Xmech values can be used for display purposes (e.g., HMI interface). 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 ErrorStruct ERROR_ CODE ERROR_ STRUCT Error description Detailed error description Xmech REAL Mechanical translatory position (Xmech) of the slide Fig.1-21: MB_XvirtToXmech I/O Interface

18 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual

19 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG 15/33 CamLock Function Blocks 2 CamLock Function Blocks 2.1 Overview CamLock technology function blocks are used to enhance the "Lock On/Lock Off" 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 are referred to as Lock On, Lock Off and One-to-One. They allow a synchronized slave axis to disengage (Lock Off) from its master and stop at a predefined position until it is once again synchronized (Lock On) to the master. The MB_CamLock function block is used to activate the Lock On / Lock Off functionality. A UserCam profile is also supported. While a slave axis is synchronized to the master, it follows the master using the One-to-One cam. A phase offset between the master and slave position can be defined. When the Lock Off cam is enabled (via the MB_CamLock function block), the slave axis transitions off of the master position to a predefined lock off 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 to the 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 Example This functionality is generally used in packaging machines where products coming down a line are required to have a uniform gap between them before they can be wrapped. In the event that the gap is too large, the wrapping process in the machine is disengaged (Lock Off) from the master for one or more cycles until product is once again detected. This condition is called, "No Product, No Seal". Once product is detected, the wrapping process is once again synchronized to the master (Lock On) and continues to wrap products. This none-uniform gap feature makes it necessary to accelerate or decelerate the slave axis to synchronize to the master. The following figure illustrates a typical 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 process that a slave axis follows during the Lock On / Lock Off process.

20 16/33 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual CamLock Function Blocks One-to-One CAM Profile Synchronized to Master Fig.2-2: CamLock Cam Profiles 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 feature is 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 cam profile is active and follows the master input. Lock Off Cam Profile Fig.2-3: Run Cam Active, Normal Operation of Wrapper Application The Lock Off cam profile decelerates the slave axis to a stop over one cycle of the master. The Lock Off cam is active while both the Enable and LockOff inputs in 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.

21 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG 17/33 CamLock Function Blocks Once enabled, the Lock Off cam profile is active after the 0 crossover of the slave axis. Lock On Cam Profile Fig.2-4: Lock Off Cam Active, No Product - No Seal The Lock On cam profile is active and accelerates from a stopped position to match the velocity of the master input over one cycle of the master (360 degrees). 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 the master. Afterwhich the slave axis follows the One-to-One cam while in normal operation. The Lock On cam profile is active while the Enable input is set high and the LockOff input is set low in the MB_CamLock function block. Once enabled, the Lock On cam profile is active after the 0 crossover of the master axis.

22 18/33 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual CamLock Function Blocks Fig.2-5: Lock On Cam Active, Product is Present 2.3 MB_PrepareCams Short Description Interface 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 resulting motion profiles contain boundary conditions for position and velocity. Fig.2-6: MB_PrepareCams Function Block The MB_PrepareCams function block is supported by both MLC control and MLD-M drive systems. Any functionality unique to a particular system will be clearly identified. MLD-M Drive System An MLD-M drive system supports four (4) drive parameters for storing CamLock Cam profiles. The following table shows the correlation between an MC_CAM_ID integer value and the drive parameter that will be used to store the Cam profile.

23 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG 19/33 CamLock Function Blocks The axis referenced in the AXIS VAR_IN_OUT will store the Cam profiles calculated by the MB_PrepareCams function block. MC_CAM_ID Drive Parameter 1 P P P P Fig.2-7: Available Drive Parameters for CamLock Cam Profiles The MC_CAM_ID integer value only determines which parameter will be used to store the calculated Cam profile. The actual functionality (e.g., LockOnCam) is determined by the input in the function block. For example, in an MLD-M system, if a value of 1 is used for the LockOnCam input, then the LockOn Cam profile that is calculated by the function block is stored in drive parameter P of the axis referenced in the AXIS VAR_IN_OUT. For an MLC control system, a value of 1 will store the Cam profile in control parameter C However, in order for the MB_PrepareCams function block to execute without errors, an axis input is still required for the AXIS VAR_IN_OUT input. The calculated Cam profiles are stored in control parameters. MLC Control System An MLC control system supports a block of 98 control parameters for storing CamLock Cam profiles. Unlike drive parameters, the correlation between MC_CAM_ID value and control parameter is straight forward. Starting with control parameter C , an MC_CAM_ID value of 1 will be stored in control parameter C and so on up to C for an MC_CAM_ID value of 98. Control parameter C is not available for storing Cam profiles, it is reserved for "Stopping the slave axis". This function block must run right after power up in order to calculate the three cam profiles and download them to the relevant parameters. Use the Done output to verify that the process has completed before the PLC program continues. The MB_PrepareCams function block is executed only once at the start of the PLC program and before the MB_CamLock function block.

24 20/33 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual CamLock Function Blocks I/O Type Name Data Type Comment VAR_IN_OUT Axis AXIS_REF Reference to slave axis where Cam profiles are downloaded. For control cams, type AXIS_REF variable is used. VAR_INPUT Execute BOOL Positive edge starts the calculation of three cam profiles. LockOnCam MC_CAM_ID Determines the destination of the LockOn Cam table. 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 Cam table. Default value is 2. UserCam_Profile MC_CAM_ID Determines the destination of the UserCam table. Default value is 1. LockOff_Pos REAL This input is used to calculate the appropriate velocity profile. VAR_OUTPUT Done BOOL Three cam profiles have been calculated, build and 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 Error Handling Fig.2-8: MB_PrepareCams I/O Interface The function block generates the following error messages in Additional1 / Additional2 for the "F_RELATED_TABLE". ErrorID Additional1 Additional2 Description RESOURCE_ERROR 16# #0000 Fb was aborted from another FB RESOURCE_ERROR 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 less than 360, default=180 CALCULATION_ERROR 16#13A2 16#0000 Calculation of the step width result = 0 STATE_MACHINE_ERROR 16# #0000 Invalid state of the state machine Fig.2-9: MB_PrepareCams Error Codes

25 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG 21/33 CamLock Function Blocks 2.4 MB_CamLock Function Block MB_CamLock Short Description Interface Description The MB_CamLock function block is used to enable the Run, Lock On and Lock Off cam profiles calculated and stored by the MB_PrepareCams function block. In addition to the enabling of cam profiles, this function block also provides the following functionality: Electronic gear ratio Direction of Synchronization (SyncMode) MC_CamIn and MC_CamOut Functionality for drive cams Master fine adjustment Fig.2-10: MB_CamLock Function Block For an MLC control system, control cams can be used to assign a slave input as a virtual axis. The values used for the MC_CAM_ID inputs in the MB_CamLock function block must match the same values used in the MB_PrepareCams function block or an error will be issued. For example, if a value of 1 is used for the LockOnCam input of the MB_Prepare Cams function block, then it also must be used for the LockOnCam input of the MB_CamLock function block. The following table lists the different cam profiles controlled by the MB_Cam Lock function block:

26 22/33 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual 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 High Lock On High High to Low The slave axis switches from the Run cam to the Lock Off cam profile and comes to a stop at the position specified in the LockOff_Pos input. The slave axis accelerates from a stopped position using the Lock On cam profile, synchronizes with 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 dynamically synchronizes the slave before entering the run state. A falling edge will execute a gear out. LockOff BOOL True: Locked off False: Locked on RatioNumerator UINT Electronic gear ratio RatioDenumerator UINT Electronic gear ratio If this input is true before Enable, the axis will dynamically synchronize, enter the Run state, and then Lock off. SyncMode MC_SYNC_DIREC TION 0: = shortest distance 1: = positive direction 2: = negative direction MasterFineAdjust REAL Input required for the MB_MotionProfile LockOff_Pos REAL The position in degrees where the slave axis will stop when locked off the master. The default values 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.

27 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG 23/33 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 sync state CommandAborted BOOL Command aborted by another FB CamState UINT Current state of the CamLock FB 1: Dynamic Sync 2: Run State 3: Lock Off State 4: Standstill 5: Lock On State 6: Gear Out (continuous motion) Error BOOL Indicates an error has occurred ErrorID ERROR_CODE Short error description ErrorIdent ERROR_STRUCT Detailed error description Timing Diagram Fig.2-12: MB_CamLock I/O Interface Functional Description Fig.2-13: MB_CamLock Timing Diagram When the Enable input is set high in combination with the LockOff input low, the slave axis dynamically synchronizes with the master and immediately switches 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 executes 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 transitions from Run (2) to Lock Off (3) to Standstill (4). The default value for LockOff_Pos is 180 degrees, which is half way from lock on to run, and from run to lock off.

28 24/33 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual CamLock Function Blocks At this point, the function block stays in the stopped state until the LockOff input goes low. This would complete the cycle. To disable the CamLock function block, it is recommended to be in CamState=4 (stopping state) and set the Enable input to low. If the Enable input is set to low, while in the Run state, the slave will desynchronize from the LockOn/LockOff Cam functionality and switch to continuous motion. LockOn/LockOff Trace Examples Fig.2-14: Channel 0 (green)= master position Channel 1 (red) = slave position Channel 2 (blue)= slave velocity Master velocity= 200 rpm LockOn Profile with a LockOff_Pos of 180 degrees The figure above shows the position and velocity profile during the LockOn profile. The LockOff_Pos position is 180 (default). This shows that for a lock off position of 180, the position and velocity profiles are smooth with no jump and no overshoot.

29 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG 25/33 CamLock Function Blocks Fig.2-15: Channel 0 (green)= master position Channel 1 (red)= slave position Channel 2 (blue)= slave velocity Master velocity= 200 rpm LockOff Profile with a LockOff_Pos of 180 degrees The figure above shows the position and velocity profile during the LockOff profile. The LockOff_Pos position is 180 (default). This shows that for a lock off position of 180, the position and velocity profiles are smooth with no jump and no overshoot. Fig.2-16: Channel 0 (green)= master position Channel 1 (red)= slave position Channel 2 (blue)= slave velocity Master velocity= 200 rpm LockOn Profile with a LockOff_Pos of 90 degrees The figure above shows the position and velocity profile during the LockOn profile when the LockOff_pos position is 90. This shows that for a lock off position of 90, the position and velocity profiles are still ok (there is a velocity jump, but no motion reverses direction).

30 26/33 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual CamLock Function Blocks Fig.2-17: Channel 0 (green)= master position Channel 1 (red)= slave position Channel 2 (blue)= slave velocity Master velocity= 200 rpm LockOff Profile with a LockOff_Pos of 90 degrees The figure above shows the position and velocity profile during LockOff profile when the LockOff_Pos position is 90. This shows that for a lock off position of 90, the position and velocity profiles have an overshoot. This position overshoot causes 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 and MB_CamLock function blocks). If a different lock off position other than 180 is used, then the further away from 180, the more overshoot in position and velocity will occur. Error Handling The function block generates the following error messages in Additional1 / Additional2 for the "F_RELATED_TABLE". ErrorID Additional1 Additional2 Description RESOURCE_ERROR 16# #0000 Fb was aborted from another FB RESOURCE_ERROR 16# #0000 This drive firmware version is not supported INPUT_RANGE_ERROR 16# #0001 LockOff_Pos needs to be greater than 0 and less than 360, default=180 ACCESS_ERROR 16# #0001 Parameter P , Bit 4 is not set ACCESS_ERROR 16# #0002 Error occurred during setting up A =P STATE_MACHINE_ERROR 16# #0000 Invalid state of the state machine Fig.2-18: MB_CamLock Error Codes MB_CamLock Components and Parametrization Hardware The following Rexroth hardware components are required:

31 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG 27/33 CamLock Function Blocks Firmware Software MB_CamLock Parametrization 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) The following firmware is required and used with the above mentioned Rexroth hardware components: Drive firmware MPH04V10 or higher The following functional packages are required: Closed Loop Synchronization Drive PLC The required PC software to use is as follows: IndraWorks for MLC03 IndraLogic The following drive parametrization steps are performed using IndraWorks and are required before running the MB_CamLock function block. 1. Load basic drive parameters. Right click relevant Axis Parameter handling Basic parameter load 2. Reference the drive (absolute feedback preferred) before running the function block. 3. Enable drive to Modulo format (set S , Bit 7 = 1). 4. Set the NC Cycle Time S = PLC Task Cycle Time using Indra Work's Parameter Editor. The PLC Task cycle time can be set by launching IndraLogic from within the IndraWorks project and selecting Task Configuration from the Resource tab.

32 28/33 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual CamLock Function Blocks Fig.2-19: IndraLogic, Cycle Task Time 5. Switch IndraWorks to online mode, right click over the relevant drive and select Parameter Editor. Fig.2-20: IndraWorks, Parameter Editor 6. Set parameter P , Bit 4=1. 7. Set P = P = 0 (0 means that Cam switching occurs at master position of zero degrees). 8. Set the synchronization acceleration (P ) and the synchronization velocity (P ) for the slave axis. For a virtual slave, set A and A

33 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG 29/33 CamLock Function Blocks 9. Set the synchronization direction (P ), the synchronization mode (P ) and the command value mode (S ) of the slave axis depending on the master drive polarity (P ). 10. Make sure that parameter S is equal to 0.

34 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual

35 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG 31/33 Service & Support 3 Service & Support 3.1 Helpdesk Our service helpdesk at our headquarters in Lohr, Germany, will assist you with all kinds of enquiries. Contact us: By phone through the Service Call Entry Center, Mo - Fr 7:00 am - 6:00 pm CET +49 (0) By Fax +49 (0) By Service Hotline Out of helpdesk hours please contact our German service department directly: +49 (0) or +49 (0) Hotline numbers for other countries can be found in the addresses of each region (see below). 3.3 Internet Additional notes regarding service, maintenance and training, as well as the current addresses of our sales and service offices can be found on Outwith Germany please contact our sales/service office in your area first. 3.4 Helpful Information For 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 codes and serial numbers your phone / fax numbers and address so we can contact you in case of questions

36 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual

37 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG 33/33 Index Index C CamLock Function Blocks MB_CamLock 21 MB_PrepareCams 18 trace examples 24 Crank Kinematics application case 1: single axis operating mode 2 application case 2: synchronous operating mode with cam 2 counting direction 5 MB_CamTableCrank Function Block 6 MB_CamTableCrankSuperimposed 8 MB_MasterToPhi function 12 MB_PhiToXvirt function block 11 MB_XvirtToXmech 13 mechanical arrangement 1 3 mechanical arrangement 2 4 mechanical translatory position 5 overview 1 travel range equation 5 variables and terms 5 Xmech 5 Xvirt 5 F Function MB_MasterToPhi 12 Function Block MB_CamTableCrank 6 MB_CamTableCrankSuperimposed 8 MB_PhiToXvirt 11 MB_XvirtToXmech 13 M MB_CamLock 21 MB_CamTableCrank 6 MB_CamTableCrank Function Block application notes 8 boundary conditions 8 data structure 7 MB_CamTableCrankSuperimposed 8 application example 11 MB_MasterToPhi 12 MB_PhiToXvirt 11 MB_PrepareCams 18 MB_XvirtToXmech 13

38 Bosch Rexroth AG Electric Drives Rexroth MLC Tech-FB Application Manual

39 Application Manual Rexroth MLC Tech-FB Electric Drives Bosch Rexroth AG Notes

40 Bosch Rexroth AG Electric Drives P.O. Box Lohr, Germany Bgm.-Dr.-Nebel-Str Lohr, Germany Phone +49 (0) Fax +49 (0) R Printed in Germany DOK-IM*MLC-TFB-IMPAV03-AW01-EN-P