0% found this document useful (0 votes)
8 views316 pages

L-force 9400 Servo Drives Manual

The document is a software manual for L-force 9400 Servo Drives, detailing various function libraries and their applications. It includes sections on general information, function blocks, and specific data type conversions. The manual also contains copyright information and disclaimers regarding liability for discrepancies in the documentation.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views316 pages

L-force 9400 Servo Drives Manual

The document is a software manual for L-force 9400 Servo Drives, detailing various function libraries and their applications. It includes sections on general information, function blocks, and specific data type conversions. The manual also contains copyright information and disclaimers regarding liability for discrepancies in the documentation.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Software Manual

L-force 9400 Servo Drives

Function libraries
r LenzeDataConversion
r LenzeDevice9400
r LenzeLineDrive
r LenzePositioning
r LenzeServoDrive
r LenzeToolbox

L
Copyright
© 2006 Lenze Drive Systems GmbH. All rights reserved.

Imprint
Lenze Drive Systems GmbH
Postfach 10 13 52, 31763 Hameln, Germany
Phone: ++49 (0)5154 / 82-0
Fax: ++49 (0)5154 / 82-2111
E-Mail: Lenze@[Link]

Copyright information
All texts, photos and graphics contained in this documentation are subject to
copyright protection. No part of this documentation may be copied or made
available to third parties without the explicit written approval of Lenze Drive
Systems GmbH.

Liability
All information given in this documentation has been carefully selected and
tested for compliance with the hardware and software described.
Nevertheless, discrepancies cannot be ruled out. We do not accept any
responsibility or liability for any damage that may occur. Required correction
will be included in updates of this documentation.

2 1.4 EN - 08/2006 - TD05/TD14 L


L-force | 9400 function library
Contents

Contents
1 About this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.1 Conventions used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2 Definition of notes used . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

2 General information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.1 What is a function block? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.2 Parameterisable function blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3 Conventions used for input/output identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2.4 Signal types & scaling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

3 Short overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.1 Analog signal processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.2 Digital signal processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.3 Data type conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.4 Mathematical functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.5 Conversion of physical units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.6 Speed conditioning. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.7 Special functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.8 Output of status signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.9 FBs for system via electrical shaft . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.10 FBs for positioning tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.11 All function blocks [A-Z] . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
3.12 FB reference list - 9300 Servo PLC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.13 FB reference list - 9300 servo inverter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

4 Function blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
4.1 L_Dc2BytesToWord - Data type conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.2 L_Dc2WordsToDWord - Data type conversion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
4.3 L_Dc4BytesToDWord - Data type conversion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
4.4 L_DcBitShift - Shift operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.5 L_DcBitsToByte - Bit multiplexer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.6 L_DcBitsToDWord - Bit multiplexer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.7 L_DcBitsToWord - Bit multiplexer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.8 L_DcByteToBits - Bit demultiplexer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.9 L_DcByteToWord - Type converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
4.10 L_DcDIntToDWord - Type converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50

L 1.4 EN - 08/2006 3
L-force | 9400 function library
Contents

4.11 L_DcDIntToInt - Type converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51


4.12 L_DcDWordBitand - Bit combination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.13 L_DcDWordBitor - Bit combination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.14 L_DcDWordBitxor - Bit combination. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
4.15 L_DcDWordTo2Words - Data type conversion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.16 L_DcDWordTo4Bytes - Data type conversion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.17 L_DcDWordToBits - Bit demultiplexer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
4.18 L_DcDWordToDInt - Type converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
4.19 L_DcDWordToWord - Type converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.20 L_DcGetBitOfByte - Bit operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.21 L_DcGetBitOfDWord - Bit operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.22 L_DcGetBitOfWord - Bit operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.23 L_DcIntToDInt - Type converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
4.24 L_DcIntToWord - Type converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
4.25 L_DcNorm_aToNorm_n - Signal converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
4.26 L_DcNorm_nToNorm_a - Signal converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
4.27 L_DcNorm_nToSpeed_s - Signal converter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
4.28 L_DcResetBitOfByte - Bit operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
4.29 L_DcResetBitOfDWord - Bit operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
4.30 L_DcResetBitOfWord - Bit operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
4.31 L_DcSetBitOfByte - Bit operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
4.32 L_DcSetBitOfDWord - Bit operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
4.33 L_DcSetBitOfWord - Bit operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
4.34 L_DcSpeed_sToNorm_n - Signal converter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
4.35 L_DcSpeed_sToSpeed_v - Signal converter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
4.36 L_DcSpeed_vToSpeed_s - Signal converter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
4.37 L_DcWordTo2Bytes - Data type conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
4.38 L_DcWordToBits - Bit demultiplexer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
4.39 L_DcWordToByte - Type converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
4.40 L_DcWordToDWord - Type converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
4.41 L_DcWordToInt - Type converter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
4.42 L_DevApplErr - Error tripping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
4.43 L_DevBrakeStateDecoder - Status signals of the basic function "Brake control" . . . . . 85
4.44 L_DevDriveInterfaceStateDecoder - Status signals of the drive interface. . . . . . . . . . . . 87
4.45 L_DevHomingStateDecoder - Status signals of the basic function "Homing" . . . . . . . . 89

4 1.4 EN - 08/2006 L
L-force | 9400 function library
Contents

4.46 L_DevLimiterStateDecoder - Status signals of the basic function "Limiter" . . . . . . . . . . 91


4.47 L_DevManualJogStateDecoder - Status signals of the basic function "ManualJog" . . 93
4.48 L_LdAddOffsetCyclic - Offset addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
4.49 L_LdClutchAxisP - Virtual clutch for synchronism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
4.50 L_LdClutchV - Virtual clutch for electronic gearboxes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
4.51 L_LdConvAxisV - Speed ratio . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
4.52 L_LdDifferentiateCyclic - Cyclic differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
4.53 L_LdExtrapolate - Extrapolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
4.53.1 Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
4.54 L_LdIntegrateCyclic - Cyclic integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
4.55 L_LdLinearCoupling - Master value connection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
4.56 L_LdMarkSync - Mark synchronisation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115
4.57 L_LdMonitFollowError - Following error monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117
4.58 L_LdMPot - Master value adjustment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119
4.59 L_LdPosCtrlLin - Master value adjustment via position . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
4.60 L_LdSetAxisVelocity - Master value processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
4.61 L_LdStateDecoder - LineDrive status signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
4.62 L_LdSyncOperation - Master value connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131
4.63 L_LdToolControl - Setpoint conditioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
4.64 L_LdVirtualMasterP - Virtual master for synchronism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137
4.64.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
4.65 L_LdVirtualMasterV - Virtual master for electronic gearboxes. . . . . . . . . . . . . . . . . . . . . . 142
4.65.1 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
4.66 L_LdZeroDetect - Zero crossing detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146
4.67 L_PosDecoderStatePositioner - Positioning status signals . . . . . . . . . . . . . . . . . . . . . . . . . 147
4.68 L_PosDecoderStateSequencer - Status signals of the sequence control . . . . . . . . . . . . . 149
4.69 L_PosGetProfile - Profile data tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
4.70 L_PosGetProfileData - Profile data output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
4.71 L_PosGetTableAcc - Acceleration table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153
4.72 L_PosGetTableJerk - S-ramp time table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
4.73 L_PosGetTablePos - Position table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
4.74 L_PosGetTableSpeed - Speed table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157

L 1.4 EN - 08/2006 5
L-force | 9400 function library
Contents

4.75 L_PosPositionerTable - Profile data record management . . . . . . . . . . . . . . . . . . . . . . . . . . 158


4.75.1 Variable tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
4.75.2 "Teach" function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 166
4.75.3 Positioning modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167
4.75.4 Touch probe positioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
4.76 L_PosProfileInterface - Profile data interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
4.77 L_PosProfileTable - Profile data record management (simple). . . . . . . . . . . . . . . . . . . . . . 173
4.77.1 Profile data table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
4.77.2 "Teach" function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
4.77.3 Positioning modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
4.77.4 Touch probe positioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181
4.78 L_PosSequencer - Sequence control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
4.78.1 Priorities of the control signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
4.78.2 States of the sequencer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
4.78.3 Action types available for creating the positioning program. . . . . . . . . . . . . . . . 190
[Link] Action type "Program end" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
[Link] Action type "Positioning" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
[Link] Action type "Switching" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
[Link] Action type "Branching" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
[Link] Action type "Variable branching" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
[Link] Action type "Homing" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198
[Link] Action type "Waiting" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
[Link] Action type "Counter setting". . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
[Link] Action type "Counting" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
[Link] Action type "Stand-by" . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
4.78.4 Example: Sequence table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
4.79 L_SdDelayComp - Dead time compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204
4.80 L_SdDifferentiate - Differentiation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
4.81 L_SdFactor - Stretching factor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206
4.82 L_SdGetPosition - Position conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
4.83 L_SdGetSpeed - Speed conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
4.84 L_SdIntegrate - integration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
4.85 L_SdLimitSpeed - Speed limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
4.86 L_SdPosToUnit - Position conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
4.87 L_SdRampGenerator - Ramp function generator with S-ramp. . . . . . . . . . . . . . . . . . . . . . 213
4.87.1 Loading the ramp function generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
4.87.2 Acceleration and jerk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215
4.88 L_SdRuntimeComp - Runtime compensation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216

6 1.4 EN - 08/2006 L
L-force | 9400 function library
Contents

4.89 L_SdSetAxisData - Machine parameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217


4.89.1 Typical application. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
4.89.2 Selection and input of machine parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
4.89.3 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220
4.90 L_SdSetPosition - position conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
4.91 L_SdSetSpeed - speed conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
4.92 L_SdSpeedFilter - Speed signal delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
4.93 L_SdSpeedSet - Setpoint ramp generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
4.93.1 Setpoint path. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
4.93.2 Fixed setpoints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229
4.93.3 Ramp generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
4.93.4 Setting and selection of the Ti times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
4.93.5 Display of the machine-based variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 231
4.94 L_SdSpeedToUnit - Speed conversion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
4.95 L_SdSwitchPoint - Position switch points . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
4.96 L_SdTouchProbe - Touch probe evaluation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
4.96.1 Actual value interpolation (principle) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
4.96.2 Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236
4.97 L_SdUnitToPos - Position conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
4.98 L_SdUnitToSpeed - Speed conversion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
4.99 L_Tb5And - AND with 5 inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
4.100 L_Tb5Nand - NAND with 5 inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
4.101 L_Tb5Nor - NOR with 5 inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
4.102 L_Tb5Or - OR with 5 inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
4.103 L_Tb5Xor - XOR with 5 inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
4.104 L_Tb8Select - 1-out of-8-selector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
4.105 L_TbAbs - Absolute value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
4.106 L_TbAdd - Addition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
4.107 L_TbAddLim - Addition with limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
4.108 L_TbAnd - AND with 2 inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
4.109 L_TbCompare - comparison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
4.109.1 Function 1: dnIn1 = dnIn2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
4.109.2 Function 2: dnIn1 > dnIn2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
4.109.3 Function 3: dnIn1 < dnIn2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252
4.109.4 Function 4: |dnIn1| = |dnIn2| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
4.109.5 Function 5: |dnIn1| > |dnIn2| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
4.109.6 Function 6: |dnIn1| < |dnIn2| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253

L 1.4 EN - 08/2006 7
L-force | 9400 function library
Contents

4.110 L_TbCompare_n - scaled comparison. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254


4.110.1 Function 1: dnIn1_n = dnIn2_n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
4.110.2 Function 2: dnIn1_n > dnIn2_n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
4.110.3 Function 3: dnIn1_n < dnIn2_n . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
4.110.4 Function 4: |dnIn1_n| = |dnIn2_n| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
4.110.5 Function 5: |dnIn1_n| > |dnIn2_n| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
4.110.6 Function 6: |dnIn1_n| < |dnIn2_n| . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
4.111 L_TbCount - Up/downcounter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
4.111.1 Function 1: Automatic counter reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
4.111.2 Function 2: Counter stop at upper limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
4.112 L_TbCurve - characteristic function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
4.112.1 Selection of the characteristic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
4.112.2 Characteristic mode 0: Entire range. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
4.112.3 Characteristic mode 1: Symmetrically to y axis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
4.112.4 Characteristic mode 2: Symmetrically to zero point . . . . . . . . . . . . . . . . . . . . . . . . 265
4.113 L_TbDeadband - Dead band with gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266
4.114 L_TbDeadband_n - Scaled dead band with gain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
4.115 L_TbDelay - Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
4.115.1 Function 1: ON-delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
4.115.2 Function 2: OFF-delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
4.115.3 Function 3: General delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
4.116 L_TbDifferentiate - Differentiator with low-pass filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
4.117 L_TbDiv - Division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
4.118 L_TbDiv_n - Scaled division . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
4.119 L_TbFlipFlopD - D flipflop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277
4.120 L_TbFlipFlopRS - Status-controlled RS flipflop . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279
4.121 L_TbGainLim - Gain with limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
4.122 L_TbIntegrate - Integration with limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
4.123 L_TbLimit - Limit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
4.124 L_TbLimit_n - Scaled limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
4.125 L_TbMul - Multiplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 285
4.126 L_TbMul_n - Scaled multiplication with limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
4.127 L_TbMulLim - Multiplication with limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 287
4.128 L_TbNand - NAND with 2 inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 288
4.129 L_TbNeg - Negation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 289
4.130 L_TbNor - NOR with 2 inputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
4.131 L_TbNormalize - Signal scaling with limitation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291

8 1.4 EN - 08/2006 L
L-force | 9400 function library
Contents

4.132 L_TbNot - Negation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292


4.133 L_TbOr - OR with 2 inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
4.134 L_TbOscillator - Rectangular signal generator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
4.134.1 Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
4.134.2 Optimising the accuracy of the output signal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
4.135 L_TbPIController - PI controller with limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
4.136 L_TbPT1Filter - Delay . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
4.137 L_TbRateAction - Rate action with limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
4.138 L_TbSampleHold - Sample & Hold. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
4.139 L_TbSelect - Switch-over. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303
4.140 L_TbSub - Subtraction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304
4.141 L_TbSubLim - Subtraction with limitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
4.142 L_TbTransition - Edge evaluation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
4.142.1 Function 1: Evaluating rising edges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
4.142.2 Function 2: Evaluating falling edges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 307
4.142.3 Function 3: Evaluating rising and falling edges . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308
4.143 L_TbXor - XOR with 2 inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309

5 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310

Your opinion is important to us. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316

L 1.4 EN - 08/2006 9
L-force | 9400 function library
About this Manual
Conventions used

1 About this Manual


This Manual contains information on the Lenze function blocks which can be used in the
L-force »Engineer« function block editor for the "9400 Servo Drives".

1.1 Conventions used

This Manual uses the following conventions to distinguish between different types of
information:
Type of information Writing Examples/notes
Variable identifier italics Set bEnable to TRUE to...
Window The message window... / The Options dialog box...
Control element bold The OK button... / The Copy command... / The Properties tab... / The
Name input field...
Sequence of If several commands must be used in sequence to carry out a function,
menu commands then the individual commands are separated by an arrow. Select the
command FileOpen to...
Shortcut <bold> Press <F1> to open the Online Help.
If a command requires a combination of keys, a "+" is placed between
the key symbols:
Use <Shift>+<ESC> to...
Program code Courier IF var1 < var2 THEN
Keyword Courier a = a + 1
bold END IF

Hyperlink underline Hyperlinks are highlighted references which are activated by means of a
mouse click.
Step-by-step Step-by-step instructions are indicated by a pictograph.
instructions M

10 1.4 EN - 08/2006 L
L-force | 9400 function library
About this Manual
Definition of notes used

1.2 Definition of notes used

This documentation uses the following signal words and symbols to indicate dangers and
important information:

Safety instructions
Layout of the safety instructions:

 Pictograph and signal word!


(characterise the type and severity of danger)
Note
(describes the danger and gives information about how to prevent dangerous
situations)

Pictograph Signal word Meaning


Danger! Danger of personal injury through dangerous electrical voltage
 Reference to an imminent danger that may result in death or serious personal injury
if the corresponding measures are not taken.
Danger! Danger of personal injury through a general source of danger
 Reference to an imminent danger that may result in death or serious personal injury
if the corresponding measures are not taken.
Stop! Danger of property damage
 Reference to a possible danger that may result in property damage if the
corresponding measures are not taken.

Application notes

Pictograph Signal word Meaning


Note! Important note for trouble-free operation

Tip! Useful tip for easy handling


O

L 1.4 EN - 08/2006 11
L-force | 9400 function library
General information
What is a function block?

2 General information

2.1 What is a function block?

A function block (FB) can be compared with an integrated circuit that contains a certain
control logic and delivers one or several values when being executed.
r Function blocks are classified in function libraries according to their functions.
r An instance (reproduction, copy) of the function block is always inserted in the circuit.
r It is also possible to insert several instances of a function block in a circuit.
r Each instance has an unequivocal identifier (the instance name) and a processing
number which defines the position the function block is calculated during runtime.

n Instance name (freely selectable)


o Function block name (cannot be changed)
p Processing number
q Other instance of the function block

[2-1] Information on a function block in the function block editor

2.2 Parameterisable function blocks

Some function blocks have parameters which serve to change particular settings during
operation, if required or which display actual values & status information.

r By clicking the symbol the parameter list of a function block can be opened.

12 1.4 EN - 08/2006 L
L-force | 9400 function library
General information
Parameterisable function blocks

Allocation of the user codes


After a parameterisable function block has been selected, an index must be defined in the
dialog box Define Function Block Properties from which on the allocation of user codes for
the parameters is to start.
r If the user codes for the compatibility with earlier devices are not yet assigned, these
are suggested for the function block:

r If the user codes for the compatibility with earlier devices are already assigned, e.g.
since an instance of the function block is already available in the connection, a free
(user-defined) index will be automatically suggested which can also be changed, if
required:

Note!
The parameters described in this documentation are always listed together with
the user code index that results from the selection of the option Compatible
with earlier devices!

Wildcard "unit" for the real unit of the machine


The parameters for a travel profile (e.g. position, speed, acceleration and deceleration) are
selected in real units with regard to the slide, e.g. 1000 mm as relative position.
r The machine parameters of the drive interface (system block LS_DriveInterface) are
used to define the real unit.
r This documentation uses the term "unit" in the parameter unit information only as a
wildcard for the real unit of the machine.

Resolution Value range Number of decimal positions


32 bits ± 214748.3647 4

L 1.4 EN - 08/2006 13
L-force | 9400 function library
General information
Conventions used for input/output identifiers

2.3 Conventions used for input/output identifiers

This chapter describes the conventions used for the identifiers of the inputs/outputs of the
function blocks to ensure a uniform and consistent terminology and to make reading and
comprehending the applications and function block connections easier.

O Tip!
The conventions used by Lenze are based on the "Hungarian Notation". This
ensures that the most significant characteristics of the corresponding input/
output (e.g. the data type) can be instantly recognised from its identifier.

An identifier consists of
r a data type entry
r an identifier (the "proper" name of the input/output)
r an (optional) signal type specification

Data type entry


The data type entry provides information about the data type of the corresponding input/
output:

Data type entry Meaning Bit width Value range


min MAX
b BOOL 1 FALSE TRUE
by BYTE 8 0 255
dn DINT 32 -2147483648 2147483647
dw DWORD 32 0 4294967295
n INT 16 -32768 32767
s STRING - - -
t TIME 32 - -
W WORD 16 0 65535

If it is about an array or a pointer, this will be indicated before the data type entry:

Data type entry Meaning


a Array (combined type), field
p Pointer

14 1.4 EN - 08/2006 L
L-force | 9400 function library
General information
Conventions used for input/output identifiers

Identifier
The identifier is the proper name of the input/output and should indicate the application
or function.
r Identifiers always start with a capital letter.
r If an identifier consists of several "words", then each "word" must start with a capital
letter.
r All other letters are written in lower case.

Signal type entry


In general, it is possible to assign a certain signal type to the inputs and outputs of the
Lenze function blocks. There are e.g. digital, scaled, position, acceleration and speed
signals.
r A corresponding ending (preceded by an underscore) is added to the identifier of the
corresponding input/output to indicate the signal type.
r An overview of the different signal types and their scaling is provided in the following
subchapter "Signal types & scaling". (C 16)

L 1.4 EN - 08/2006 15
2.4 Signal types & scaling
16

Signal types & scaling


General information
L-force | 9400 function library
It is very helpful for the parameter setting & configuration of the controller to know the signal types and their scaling listed
in the following table, which are used to process physical values (e.g. a speed or position) in the function block
interconnection.

Signal type Unit Connection Resolution Scaling Range Number of Identifier


symbol in decimal suffix
the FB editor external ≡ internal positions

Position inc u/w 32 bits 1 motor revolution ≡ 216 inc -231 ... 231-1 inc 3 _p
14
Speed rpm s/t 16 bits 15000 rpm ≡ 2 ≡ 16384 ± 30000.0 rpm 1 _v
x 32 bits 15000 rpm ≡ 226 ≡ 67108864 ± 480000.0 rpm 1 _s
22 9
Speed change/time rpm/s v 32 bits 15000000 rpm/s ≡ 2 ≡ 4194304 ± 7.69 * 10 rpm/s 3 _x
Scaled signal % z 32 bits 100 % ≡ 230 ≡ 1073741824 ± 200.00 % 2 _n
y 16 bits 100 % ≡ 214 ≡ 16384 ± 199.99 % 2 _a
Control/status signal { 1 Bit 0 ≡ FALSE; 1 ≡ TRUE 0/1 0
1.4 EN - 08/2006

Time s | 28 bits 0 ... 268435.456 s 3


Status word | 32 bits -2147483648 ... 2147483647 0
(0000 0000hex ... FFFF FFFFhex)
Not standardised |

O Tip!
Only inputs/outputs of the same signal type (with the same connection
symbol) can be connected in the »Engineer« function block editor.
Non-standardised inputs/outputs can be connected if the input and
output have the same resolution.
The online documentation for the »Engineer« contains detailed
information on how to use the function block editor.
L
L-force | 9400 function library
Short overview
Analog signal processing

3 Short overview

3.1 Analog signal processing

Function block Function


L_SdDelayComp Extrapolation
...extrapolates a signal by the time set.
L_Tb8Select 1-from-8-selector
...connects one of eight analog input signals through to the output.
L_TbAbs Absolute value generation
...converts a bipolar signal into a unipolar signal, i.e. the absolute value of the
input signal is generated.
L_TbCompare Comparison
...compares two signals of the "DINT" data type and can be used e.g. for
implementing a trigger.
L_TbCompare_n Comparison (scaled)
...compares two scaled signals and can be used e.g. for implementing a
trigger.
L_TbCurve Characteristic function
...produces the corresponding value of the Y axis for the X axis value with a
parameterisable characteristic function y = f(x).
L_TbDeadband Dead band
...produces a symmetrical dead band around zero.
L_TbDeadband_n Dead band (scaled)
...produces a symmetrical dead band (scaled) around zero.
L_TbDifferentiate Differentiator with low pass
L_TbGainLim Gain with limitation
L_TbLimit Signal limitation
...limits a signal of "DINT" data type to an adjustable value range.
L_TbLimit_n Signal limitation (scaled)
...limits a scaled signal [%] to an adjustable value range.
L_TbNeg Sign inversion
...block inverts the sign of the input signal, i.e. the input signal is multiplied
by -1 and is then output.
L_TbNormalize Signal scaling
...scales any signal to a parameterisable reference variable.
L_TbPIController Simple PI controller with different control functions and parameterisable
limitation.
L_TbPT1Filter PT1 filter
...filters and delays analog signals.
L_TbRateAction Rate action function to compensate disturbing low passes.
L_TbSampleHold Sample & Hold
...stores a value in order to keep it even after mains switching.
L_TbSelect Selector
...switches between two signals. The switch-over is controlled via a boolean
input signal.

L 1.4 EN - 08/2006 17
L-force | 9400 function library
Short overview
Digital signal processing

3.2 Digital signal processing

Function block Function


L_TbCount Upcounter and downcounter with adjustable limitation.
L_TbDelay Binary delay element
L_TbFlipFlopD D flipflop
• Can be used for evaluation and storage of digital signal edges.
L_TbFlipFlopRS RS flipflop
• Can be used for evaluation and storage of digital signals.
L_TbOscillator Rectangular pulse generator with parameterisable pulse/dead time.
L_TbTransition Signal edge evaluation
• Can be used to generate timed and retriggerable pulses.

Logic operations for "BOOL" data type

Function block Logic operation


L_TbAnd AND (2 inputs)
L_Tb5And AND (5 inputs)
L_TbOr OR (2 inputs)
L_Tb5Or OR (5 inputs)
L_TbNand NOT-AND (2 inputs)
L_Tb5Nand NOT-AND (5 inputs)
L_TbNor NOT-OR (2 inputs)
L_Tb5Nor NOT-OR (5 inputs)
L_TbXor EXCLUSIVE-OR (2 inputs)
L_Tb5Xor EXCLUSIVE-OR (5 inputs)
L_TbNot Negation (inverter)

Bit operations for "DINT" data type

Function block Function


L_DcBitShift Bit shift operation

Bit operations for "BYTE" data type

Function block Function


L_DcByteToBits BYTE conversion  BOOL (8 x)
L_DcGetBitOfByte Output a status of a single bit.
L_DcSetBitOfByte Set a single bit to "1".
L_DcResetBitOfByte Reset a single bit to "0".

Bit operations for "WORD" data type

Function block Function


L_DcWordToBits WORD conversion  BOOL (16 x)

18 1.4 EN - 08/2006 L
L-force | 9400 function library
Short overview
Data type conversion

Function block Function


L_DcSetBitOfWord Set a single bit to "1".
L_DcResetBitOfWord Reset a single bit to "0".

Bit operations for "DWORD" data type

Function block Function


L_DcDWordToBits DWORD conversion  BOOL (32 x)
L_DcGetBitOfDWord Output a status of a single bit.
L_DcSetBitOfDWord Set a single bit to "1".
L_DcResetBitOfDWord Reset a single bit to "0".
L_DcDWordBitand Bit-by-bit AND operation of two DWORD values.
L_DcDWordBitor Bit-by-bit OR operation of two DWORD values.
L_DcDWordBitxor Bit-by-bit EXCLUSIVE-OR operation of two DWORD values.

3.3 Data type conversion

Function block Function


L_DcBitsToByte BOOL (8 x)  BYTE
L_DcBitsToWord BOOL (16 x)  WORD
L_DcBitsToDWord BOOL (32 x)  DWORD
L_DcByteToBits BYTE  BOOL (8 x)
L_DcByteToWord BYTE  WORD
L_Dc2BytesToWord BYTE (2 x)  WORD
L_Dc4BytesToDWord BYTE (4 x)  DWORD
L_DcIntToDInt INT  DINT
L_DcIntToWord INT  WORD
L_DcDIntToInt DINT  INT
L_DcDIntToDWord DINT  DWORD
L_DcWordToBits WORD  BOOL (16 x)
L_DcWordTo2Bytes WORD  BYTE (2 x)
L_DcWordToByte WORD  BYTE
L_DcWordToInt WORD  INT
L_DcWordToDWord WORD  DWORD
L_Dc2WordsToDWord WORD (2 x)  DWORD
L_DcDWordToBits DWORD  BOOL (32 x)
L_DcDWordTo4Bytes DWORD  BYTE (4 x)
L_DcDWordToDInt DWORD  DINT
L_DcDWordToWord DWORD  WORD
L_DcDWordTo2Words DWORD  WORD (2 x)

L 1.4 EN - 08/2006 19
L-force | 9400 function library
Short overview
Mathematical functions

3.4 Mathematical functions

Function block Mathematical function


L_TbAbs Absolute value generation
L_TbAdd Addition without limitation
L_TbAddLim Addition with limitation
L_TbDiv Division with remainder
L_TbDiv_n Division divisor selected as scaled signal [%]
L_TbIntegrate Integration with limitation
L_TbMul Multiplication without limitation
L_TbMul_n Multiplication with the multiplicand selected as scaled signal [%]
L_TbMulLim Multiplication with limitation
L_TbNeg Sign inversion
L_TbSub Subtraction without limitation
L_TbSubLim Subtraction with limitation

3.5 Conversion of physical units

Function block Function


L_DcNorm_aToNorm_n 16-bit signal (scaled)  32-bit signal (scaled)
L_DcNorm_nToNorm_a 32-bit signal (scaled)  16-bit signal (scaled)
L_DcNorm_nToSpeed_s 32-bit signal (scaled)  32-bit-speed signal
L_DcSpeed_vToSpeed_s 16-bit speed signal  32-bit speed signal
L_DcSpeed_sToSpeed_v 32-bit speed signal  16-bit speed signal
L_DcSpeed_sToNorm_n 32-bit speed signal  32-bit signal (scaled)
L_SdDifferentiate Differentiation (position  speed)
L_SdIntegrate Integration (speed  position)
L_SdUnitToPos Position [unit]  position [increments]
L_SdSetPosition Position [unit] (selected as parameter value)  position [increments]
L_SdPosToUnit Position [increments]  position [unit]
L_SdGetPosition Position [increments]  position [unit] (displayed as parameter value)
L_SdGetSpeed Speed  speed [unit/s] (displayed as parameter value)
L_SdUnitToSpeed Speed [unit/s]  speed
L_SdSetSpeed Speed [unit/s] (selected as parameter value)  speed

20 1.4 EN - 08/2006 L
L-force | 9400 function library
Short overview
Speed conditioning

3.6 Speed conditioning

Function block Function


L_SdDifferentiate Differentiation (position  speed)
L_SdIntegrate Integration (speed  position)
L_SdLimitSpeed Leads a speed setpoint to defined limit ranges.
L_SdSpeedFilter Filters or decelerates speed signal according to the PT1 principle.
L_SdRampGenerator Ramp generator (ramp function generator) with S-shaped ramps.
L_SdSpeedSet Ramp generator (ramp function generator) with S-shaped ramps,
parameterisable fixed setpoints and comprehensive parameter setting and
control options.

3.7 Special functions

Function block Function


L_DevApplErr Fault tripping
• Up to 8 different application fault messages with parameterisable
module ID, fault ID , and fault response can be tripped by the application.
L_SdSetAxisData Represented machine parameters of a master drive.
L_SdTouchProbe Touch probe processing
• The FB takes over the interpolation of the input signal based on the time
stamp handed over by a touch probe system block and outputs the
interpolated value and the difference compared with the last input
signal.

3.8 Output of status signals

The following FBs decode the status output signal dnState, which is made available by
some system and function blocks, into single boolean status signals for further use in the
FB interconnection:

Function block Function


L_DevDriveInterfaceStateDecoder Status signals of the drive interface (SB LS_DriveInterface)
L_DevManualJogStateDecoder Status signals of the basic function "Manual jog" (SB LS_ManualJog)
L_DevHomingStateDecoder Status signals of the basic function "Homing" (SB LS_Homing)
L_DevLimiterStateDecoder Status signals of the basic function "Limiter" (SB LS_Limiter)
L_DevBrakeStateDecoder Status signals of the basic function "Brake control" (SB LS_Brake)
L_PosDecoderStatePositioner Status signals of the basic function "Positioning" (SB LS_Positioner)
L_PosDecoderStateSequencer Status signals of the sequence control (FB L_PosSequencer)
L_LdStateDecoder Status signals of the FBs of the function library "[Link]"

L 1.4 EN - 08/2006 21
L-force | 9400 function library
Short overview
FBs for system via electrical shaft

3.9 FBs for system via electrical shaft

Application "Electronic gearbox"

Function block Function


L_LdClutchV Virtual clutch with speed reference.
L_LdExtrapolate Extrapolation of position information in order to e.g. compensate higher bus
transmission cycles or smooth absolute value encoders with low resolution.
L_LdMonitFollowError Following error monitoring with adjustable switching threshold and
hysteresis.
L_LdMPot Master value adjustment in positive/negative traversing direction with
parameterisable speeds.
L_LdSetAxisVelocity Extension/compression of the X axis and synchronisation via touch probe.
The master speed is integrated to the position within the cycle.
L_LdStateDecoder Decoding of the status output signal dnState of an FB from the function
library "[Link]" into individual boolean status signals for further
use in the FB interconnection.
L_LdToolControl Setpoint conditioning for the tool axis.
L_LdVirtualMasterV Virtual master
L_SdFactor Stretch factor
L_SdRuntimeComp Compensation of the runtime by a leading master value.
L_SdSetAxisData Represented machine parameters of a master drive.

"Synchronism" application"

Function block Function


L_LdAddOffsetCyclic Offset addition to a clocked position.
L_LdClutchAxisP Virtual clutch with position reference.
L_LdConvAxisV Speed ratio between two axes.
L_LdDifferentiateCyclic Differentiation of a position considering the cycle.
L_LdExtrapolate Extrapolation of position information in order to e.g. compensate higher bus
transmission cycles or smooth absolute value encoders with low resolution.
L_LdIntegrateCyclic Integration of a speed to a position considering the cycle.
L_LdLinearCoupling Master value connection
L_LdMarkSync Mark synchronisation in synchronism and cam profiler applications.
L_LdMonitFollowError Following error monitoring with adjustable switching threshold and
hysteresis.
L_LdPosCtrlLin Master value adjustment (related to position)
L_LdStateDecoder Decoding of the status output signal dnState of an FB from the function
library "[Link]" into individual boolean status signals for further
use in the FB interconnection.
L_LdSyncOperation Master value connection
L_LdToolControl Setpoint conditioning for the tool axis.
L_LdVirtualMasterP Virtual master
L_LdZeroDetect Detection of zero crossings in case of a clocked position.
L_SdRuntimeComp Compensation of the runtime by a leading master value.
L_SdSetAxisData Represented machine parameters of a master drive.
L_SdSwitchPoint Position switch points (cams)

22 1.4 EN - 08/2006 L
L-force | 9400 function library
Short overview
FBs for positioning tasks

3.10 FBs for positioning tasks

Function block Function


L_PosPositionerTable Storing and managing (traversing) profiles and "teaching" positions, speeds,
accelerations/decelerations and S-ramp times.
L_PosProfileTable Storing and managing up to four traversing profiles and "teaching" target
positions.
• Unlike the FB L_PosPositionerTable, this FB does not use any variable
tables, but profile parameter data is directly entered under the assigned
codes.
• Furthermore, the position assigned to the input dnExtPos_p will be used
as target position if profile number 1 is selected.
L_PosSequencer Parameterisable sequence table to implement a sequence control.
L_PosProfileInterface Profile data selection for the SB LS_Positioner.
L_SdSwitchPoint Position switch points (cams)
L_LdMonitFollowError Following error monitoring with adjustable switching threshold and
hysteresis.
L_PosGetProfile Output of profile data sets
• Together with an FB instance of type L_PosPositionerTable or
L_PosProfileTable this FB provides five profile data sets that can be
selected.
L_PosGetProfileData Output of profile parameters from one profile data set.
L_PosGetTableAcc Output of parameterised accelerations
• Together with an FB instance
– ...of type L_PosPositionerTable this FB provides five acceleration values
from the VTACC variable table.
– ...of type L_PosProfileTable this FB provides accelerations which are
directly defined in the profiles.
L_PosGetTableJerk Output of parameterised S-ramp times
• Together with an FB instance
– ...of type L_PosPositionerTable this FB provides five S-ramp times from
the VTJERK variable table .
– ...of type L_PosProfileTable this FB provides S-ramp times which are
directly defined in the profiles.
L_PosGetTablePos Output of parameterised positions
• Together with an FB instance
– ...of type L_PosPositionerTable this FB provides five position values from
the VTPOS variable table.
– ...of type L_PosProfileTable this FB provides positions which are directly
defined in the profiles.
L_PosGetTableSpeed Output of parameterised speeds
• Together with an FB instance
– ...of type L_PosPositionerTable this FB provides five speed values from
the VTSPEED variable table.
– ...of type L_PosProfileTable this FB provides speeds which are directly
defined in the profiles.
L_PosDecoderStatePositioner Decoding of the status output signal dnState of SB LS_Positioner into
individual boolean status signals for further use in the FB interconnection.
L_PosDecoderStateSequencer Decoding of the status output signal dnState of FB LS_PosSequencer into
individual boolean status signals for further use in the FB interconnection.

L 1.4 EN - 08/2006 23
L-force | 9400 function library
Short overview
All function blocks [A-Z]

3.11 All function blocks [A-Z]

Function block Function


L_Dc2BytesToWord ...converts two input values of type "BYTE" into an output value of type
"WORD".
L_Dc2WordsToDWord ...converts two input values of type "WORD" into an output value of type
"DWORD".
L_Dc4BytesToDWord ...converts four input values of type "BYTE" into an output value of type
"DWORD".
L_DcBitShift ...carries out a bit shift operation with a "DINT" value.
L_DcBitsToByte ...converts 8 single bit values into a value of type "byte".
L_DcBitsToDWord ...converts 32 single bit values into a value of type "DWORD".
L_DcBitsToWord ...converts 16 single bit values into a value of type "WORD".
L_DcByteToBits ...outputs the 8 corresponding bit values for an input value of type "byte".
L_DcByteToWord ...converts a data type "BYTE" into the data type "WORD" .
L_DcDIntToDWord ...converts a data type "DINT" into the data type "DWORD" .
L_DcDIntToInt ...converts a data type "DINT" into the data type "INT" .
L_DcDWordBitand ...carries out a bit-by-bit AND operation of two input values of "DWORD"
type and also outputs the results as "DWORD".
L_DcDWordBitor ...carries out a bit-by-bit OR operation of two input values of "DWORD" type
and also outputs the results as "DWORD".
L_DcDWordBitxor ...carries out a bit-by-bit EXCLUSIVE-OR operation of two input values of
"DWORD" type and also outputs the results as "DWORD".
L_DcDWordTo2Words ...converts an input value of type "DWORD" into two output values of type
"WORD".
L_DcDWordTo4Bytes ...converts an input value of type "DWORD" into four output values of type
"BYTE".
L_DcDWordToBits ...outputs the 32 corresponding bit values for an input value of type
"DWORD".
L_DcDWordToDInt ...converts a data type "DWORD" into the data type "DINT" .
L_DcDWordToWord ...converts a data type "DWORD" into the data type "WORD" .
L_DcGetBitOfByte ...returns the state of a single bit within a "BYTE" value.
L_DcGetBitOfDWord ...returns the state of a single bit within a "DWORD" value.
L_DcIntToDInt ...converts a data type "INT" into the data type "DINT" .
L_DcIntToWord ...converts a data type "INT" into the data type "WORD" .
L_DcNorm_aToNorm_n ...converts a scaled 16-bit signal into a scaled 32-bit signal.
L_DcNorm_nToNorm_a ...converts a scaled 32-bit signal into a scaled 16-bit signal.
L_DcNorm_nToSpeed_s ...uses the transmitted machine parameters and converts a scaled 32-bit
signal into a 32-bit speed signal.
L_DcResetBitOfByte ...resets a single bit in a "BYTE" type value to "0".
L_DcResetBitOfDWord ...resets a single bit in a "DWORD" type value to "0".
L_DcResetBitOfWord ...resets a single bit in a "WORD" type value to "0".
L_DcSetBitOfByte ...resets a single bit in a "BYTE" type value to "1".
L_DcSetBitOfDWord ...resets a single bit in a "DWORD" type value to "1".
L_DcSetBitOfWord ...resets a single bit in a "WORD" type value to "1".
L_DcSpeed_sToNorm_n ...uses the transmitted machine parameters and converts a 32-bit speed
signal into a scaled 32-bit signal.
L_DcSpeed_sToSpeed_v ...uses the transmitted machine parameters and converts a 32-bit speed
signal into a scaled 16-bit speed signal.

24 1.4 EN - 08/2006 L
L-force | 9400 function library
Short overview
All function blocks [A-Z]

Function block Function


L_DcSpeed_vToSpeed_s ...uses the transmitted machine parameters and converts a 16-bit speed
signal into a 32-bit speed signal.
L_DcWordTo2Bytes ...converts an input value of type "WORD" into two output values of type
"BYTE".
L_DcWordToBits ...outputs the 16 corresponding bit values for an input value of type "WORD".
L_DcWordToByte ...converts a data type "WORD" into the data type "BYTE" .
L_DcWordToDWord ...converts a data type "WORD" into the data type "DWORD" .
L_DcWordToInt ...converts a data type "WORD" into the data type "INT" .
L_DevApplErr ...can trip up to 8 different application error messages with parameterisable
module ID, error ID , and error response from the application.
L_DevBrakeStateDecoder ...decodes the status output signal dnState of the SB LS_Brake into individual
boolean status signals for further use in the FB interconnection.
L_DevDriveInterfaceStateDecoder ...decodes the status output signal dnState of the SB LS_DriveInterface into
individual boolean status signals for further use in the FB interconnection.
L_DevHomingStateDecoder ...decodes the status output signal dnState of the SB LS_Homing into
individual boolean status signals for further use in the FB interconnection.
L_DevLimiterStateDecoder ...decodes the status output signal dnState of the SB LS_Limiter into
individual boolean status signals for further use in the FB interconnection.
L_DevManualJogStateDecoder ...decodes the status output signal dnState of the SB LS_ManualJog into
individual boolean status signals for further use in the FB interconnection.
L_LdAddOffsetCyclic ...adds an offset to a clocked position and returns the value to the clock pulse.
L_LdClutchAxisP ...provides the "Virtual clutch" function with position reference for the
"Synchronism" application.
L_LdClutchV ...provides the "Virtual clutch" function with speed reference for the
"Electronic gearbox" application.
L_LdConvAxisV ...transforms a speed between two axes.
L_LdDifferentiateCyclic ...differentiates a position considering the cycle.
L_LdExtrapolate ...can extrapolate a position information in order to e.g. compensate higher
bus transmission cycles or smooth absolute value encoders with low
resolution.
L_LdIntegrateCyclic ...integrates a speed to a position considering the cycle.
L_LdLinearCoupling ...serves as master value connection for the "synchronism" application.
L_LdMarkSync ...is used for mark synchronisation in synchronism and cam profiler
applications.
L_LdMonitFollowError ...is used for following error monitoring with adjustable switching threshold
and hysteresis.
L_LdMPot ...can adjust the master value in positive/negative traversing direction with
parameterisable speeds.
L_LdPosCtrlLin ...can be used for a position-related master value adjustment.
L_LdSetAxisVelocity ...serves to extend/compress the X axis and execute a synchronisation via
touch probe. The master speed is integrated to the position within the cycle.
L_LdStateDecoder ...decodes the status output signal dnState of an FB from the function library
"[Link]" into individual boolean status signals for further use in
the FB interconnection.
L_LdSyncOperation ...serves as master value connection for the "synchronism" application.
L_LdToolControl ...is used for setpoint conditioning.
L_LdVirtualMasterP ...provides the "Virtual master" function for the "Synchronism" application.
L_LdVirtualMasterV ...provides the "Virtual master" function for the "Electronic gearbox"
application.
L_LdZeroDetect ...FB observes a clocked position and detects zero crossings.

L 1.4 EN - 08/2006 25
L-force | 9400 function library
Short overview
All function blocks [A-Z]

Function block Function


L_PosDecoderStatePositioner ...decodes the status output signal dnState of the SB LS_Positioner into
individual boolean status signals for further use in the FB interconnection.
L_PosDecoderStateSequencer ...decodes the status output signal dnState of FB LS_PosSequencer into
individual boolean status signals for further use in the FB interconnection.
L_PosGetProfile ...provides together with an FB instance of type L_PosPositionerTable or
L_PosProfileTable five profile data sets that can be selected.
L_PosGetProfileData ...outputs the profile data of a profile data set.
L_PosGetTableAcc ...provides together with an FB instance of type L_PosPositionerTable five
acceleration values from the VTACC variable table.
...provides together with an FB instance of type L_PosProfileTable the
accelerations directly defined in the profiles.
L_PosGetTableJerk ...provides together with an FB instance of type L_PosPositionerTable five S-
ramp times from the VTJERK variable table.
...provides together with an FB instance of type L_PosProfileTable the S-ramp
times directly defined in the profiles.
L_PosGetTablePos ...provides together with an FB instance of type L_PosPositionerTable five
position values from the VTPOS variable table.
...provides together with an FB instance of type L_PosProfileTable the
positions directly defined in the profiles.
L_PosGetTableSpeed ...provides together with an FB instance of type L_PosPositionerTable five
speed values from the VTSPEED variable table.
...provides together with an FB instance of type L_PosProfileTable the speeds
directly defined in the profiles.
L_PosPositionerTable ...is used to store and manage (traversing) profiles and to teach positions,
speeds, accelerations/decelerations and S-ramp times.
L_PosProfileInterface ...provides a profile data record for the SB LS_Positioner.
L_PosProfileTable ...is used to store and manage up to four traversing profiles and to "teach"
target positions.
• Unlike the FB L_PosPositionerTable, this FB does not use any variable
tables, but profile parameter data is directly entered under the assigned
codes.
• Furthermore, the position assigned to the input dnExtPos_p will be used
as target position if profile number 1 is selected.
L_PosSequencer ...processes a positioning program based on a parameterisable sequence
table.
L_SdDelayComp ...extrapolates a signal by the time set.
L_SdDifferentiate ...creates a speed signal from a position value.
L_SdFactor ...provides the "Stretch factor" function for the "Electronic gearbox"
application.
L_SdGetPosition ...uses the transmitted machine parameters and converts a position in [inc]
into a position in the real unit of the machine. The converted position is
displayed as parameter value.
L_SdGetSpeed ...uses the transmitted machine parameters and converts a speed into a
velocity. The converted value is displayed as parameter value.
L_SdIntegrate ...integrates a speed to a position.
L_SdLimitSpeed ...can lead a speed setpoint to defined limit ranges.
L_SdPosToUnit ...uses the transmitted machine parameters and converts a position defined
in the internal unit [inc] into a position in the real unit of the machine.
L_SdRampGenerator ...provides a ramp function generator with S-shaped ramps for limiting the
time increase of analog signals.
L_SdRuntimeComp ...permits the compensation of the runtime by a leading master value.
L_SdSetAxisData ...represents the machine parameters of a master drive.

26 1.4 EN - 08/2006 L
L-force | 9400 function library
Short overview
All function blocks [A-Z]

Function block Function


L_SdSetPosition ...uses the transmitted machine parameters and converts a position which
has been selected as parameter value in the real machine units into a
position in [inc] and outputs it for further processing within the FB
interconnection.
L_SdSetSpeed ...uses the transmitted machine parameters and converts a velocity which
has been selected as parameter value in the real machine units into a speed
and outputs it for further processing within the FB interconnection.
L_SdSpeedFilter ...is used to filter or delay a speed signal according to the PT1 principle. The
resulting position loss is compensated by an internal follow-up controller.
L_SdSpeedSet ...provides a ramp generator with comprehensive parameterisation and
control options for conditioning a setpoint signal.
L_SdSwitchPoint ...provides up to 8 simple position switch points (cams).
L_SdTouchProbe ...takes over the interpolation of the input signal based on the time stamp
handed over by a touch probe system block and outputs the interpolated
value and the difference compared with the last input signal.
L_SdUnitToPos ...uses the transmitted machine parameters and converts a position defined
in the real unit of the machine into an internal position.
L_SdUnitToSpeed ...uses the transmitted machine parameters and converts a speed value
defined in the real unit of the machine into an internal speed value.
L_Tb5And ...carries out a logic AND operation of binary signals.
L_Tb5Nand ...carries out a logic NAND operation of binary signals.
L_Tb5Nor ...carries out a logic NOR operation of binary signals.
L_Tb5Or ...carries out a logic OR operation.
L_Tb5Xor ...carries out a logic EXCLUSIVE-OR operation.
L_Tb8Select ...connects one of eight analog input signals through to the output.
L_TbAbs ...converts a bipolar signal into a unipolar signal, i.e. the absolute value of the
input signal is generated.
L_TbAdd ...carries out an addition without limitation.
L_TbAddLim ...carries out an addition with limitation.
L_TbAnd ...carries out a logic AND operation of binary signals.
L_TbCompare ...compares two signals of the "DINT" data type and can be used e.g. for
implementing a trigger.
L_TbCompare_n ...compares two scaled signals and can be used e.g. for implementing a
trigger.
L_TbCount ...provides a digital upcounter and downcounter with adjustable limitation.
L_TbCurve ...produces the corresponding value of the Y axis for the X axis value with a
parameterisable characteristic function y = f(x).
L_TbDeadband ...produces a symmetrical dead band around zero.
L_TbDeadband_n ...produces a symmetrical dead band (scaled) around zero.
L_TbDelay ...delays binary signals.
L_TbDifferentiate ...provides a differentiator with low pass.
L_TbDiv ...carries out a division with remainder.
L_TbDiv_n ...carries out a division. The divisor (denominator) must be specified as a
scaled signal [%].
L_TbFlipFlopD ...provides a D flipflop which can be used to evaluate and save digital signal
edges.
L_TbFlipFlopRS ...provides an RS flipflop which can be used to evaluate and save digital
signals.
L_TbGainLim ...carries out an addition with limitation.
L_TbIntegrate ...carries out an integration with limitation.
L_TbLimit ...limits a signal of "DINT" data type to an adjustable value range.

L 1.4 EN - 08/2006 27
L-force | 9400 function library
Short overview
FB reference list - 9300 Servo PLC

Function block Function


L_TbLimit_n ...limits a scaled signal [%] to an adjustable value range.
L_TbMul ...carries out a multiplication without limitation.
L_TbMul_n ...carries out a multiplication. The multiplicand (2. factor) must be specified
as a scaled signal [%].
L_TbMulLim ...carries out a multiplication with limitation.
L_TbNand ...carries out a logic NAND operation of binary signals.
L_TbNeg ...block inverts the sign of the input signal, i.e. the input signal is multiplied
by -1 and is then output.
L_TbNor ...carries out a logic OR operation of binary signals.
L_TbNormalize ...scales any signal to a parameterisable reference variable.
L_TbNot ...negates a binary signal.
L_TbOr ...carries out a logic OR operation of binary signals.
L_TbOscillator ...provides a rectangular signal generator with parameterisable pulse/dead
time.
L_TbPIController ...provides a simple PI controller with different control functions and
parameterisable limitation.
L_TbPT1Filter ...filters and delays analog signals.
L_TbRateAction ...provides a rate function to compensate disturbing low passes.
L_TbSampleHold ...stores a value in order to keep it even after mains switching.
L_TbSelect ...switches between two signals. The switch-over is controlled via a boolean
input signal.
L_TbSub ...carries out a subtraction without limitation.
L_TbSubLim ...carries out a subtraction with limitation.
L_TbTransition ...evaluates digital signal edges and can convert them into time-defined and
retriggerable pulses.
L_TbXor ...carries out a logic EXCLUSIVE-OR operation of binary signals.

3.12 FB reference list - 9300 Servo PLC

The following reference list shall assist you in finding the correct function block to simulate
a function known from 9300 servo PLC.
Function block for 9300 servo PLC Function block for 9400 Servo Drives
Name Description Function library Name Description
L_32BitTransferDINT Data-consistent copying of Lenze32BitTransferDrv - -
a DINT variable
L_32BitTransferDWORD Data-consistent copying of Lenze32BitTransferDrv - -
a DWORD variable
L_8200CtrlWord Control word for the Lenze8200Drive - -
frequency inverter
L_8200DataControl Process data exchange with Lenze8200Drive - -
frequency inverter
L_8200Initialization Initialise frequency inverter Lenze8200Drive - -
L_8200Parameter Initialise codes Lenze8200Drive - -
L_8200StatusWord Status word of frequency Lenze8200Drive - -
inverters
L_ABS Absolute value generation [Link] L_TbAbs Absolute value generation
L_ADD Addition [Link] L_TbAdd Addition without limitation
L_TbAddLim Addition with limitation
L_AifParMapClose* Deactivate code mapping LenzeAifParMapDrv - -
* Function (no function block)

28 1.4 EN - 08/2006 L
L-force | 9400 function library
Short overview
FB reference list - 9300 Servo PLC

Function block for 9300 servo PLC Function block for 9400 Servo Drives
Name Description Function library Name Description
L_AifParMapInit* Configure code mapping LenzeAifParMapDrv - -
L_AifParMapOpen* Activate code mapping LenzeAifParMapDrv - -
L_AIN Input gain & offset [Link] SB LS_AnalogInput Analog inputs
L_AND AND [Link] - -
L_ANEG Inversion [Link] - -
L_AOUT Output gain & offset [Link] L_TbGainLim Gain with limitation
L_TbAdd Addition without limitation
L_TbAddLim Addition with limitation
L_ARIT Arithmetic [Link] L_TbAdd Addition without limitation
L_TbAddLim Addition with limitation
L_TbDiv Division with remainder
L_TbDiv_n Division divisor selected as
scaled signal [%]
L_TbMul Multiplication without
limitation
L_TbMul_n Multiplication with the
multiplicand selected as
scaled signal [%]
L_TbMulLim Multiplication with
limitation
L_TbSub Subtraction without
limitation
L_TbSubLim Subtraction with limitation
L_ARITPH Arithmetic [Link] L_TbAdd Addition without limitation
L_TbAddLim Addition with limitation
L_TbDiv Division with remainder
L_TbDiv_n Division divisor selected as
scaled signal [%]
L_TbMul Multiplication without
limitation
L_TbMul_n Multiplication with the
multiplicand selected as
scaled signal [%]
L_TbMulLim Multiplication with
limitation
L_TbSub Subtraction without
limitation
L_TbSubLim Subtraction with limitation
L_ASW Switch-over [Link] L_Tb8Select 1-from-8-selector
L_TbSelect Selector
L_BRK Holding brake [Link] SB LS_Brake Basic function "Brake
control"
L_ByteArrayToDint Type conversion [Link] - -
L_CamAddVelocity Speed addition LenzeCamControl2 - -
L_CamAdjustDfIn Digital frequency LenzeCamControl2 - -
adjustment
L_CamClutchXAxis Virtual clutch LenzeCamControl1 L_LdClutchAxisP Virtual clutch with position
reference
L_LdClutchV Virtual clutch with speed
reference
L_CamContactor Cam group LenzeCamControl1 L_SdSwitchPoint Position switch points
(cams)
L_CamContactorVPos Dynamic adjustment of the LenzeCamControl1 - -
cams/hysteresis
L_CamControl Setpoint conditioning LenzeCamControl1 L_LdToolControl Setpoint conditioning for
the tool axis
L_CamData Profile management LenzeCamControl1 - -
* Function (no function block)

L 1.4 EN - 08/2006 29
L-force | 9400 function library
Short overview
FB reference list - 9300 Servo PLC

Function block for 9300 servo PLC Function block for 9400 Servo Drives
Name Description Function library Name Description
L_CamDifferentiate Converter/differentiator LenzeCamControl2 L_SdDifferentiate Differentiation (position 
speed)
L_CamEditProfileData Online change of the profile LenzeCamControl2 - -
points
L_CamExtrapolate Extrapolation LenzeCamControl2 L_LdExtrapolate Extrapolation of position
informaton
L_CamGetPosition Unit conversion LenzeCamControl1 L_SdPosToUnit Position [increments] 
position [unit]
L_SdGetPosition Position [increments] 
position [unit] (displayed as
parameter value)
L_CamIntegrateVarLim Phase integrator LenzeCamControl2 L_SdIntegrate Integration (speed 
position)
L_CamLimitVelocity Limiting element LenzeCamControl1 L_SdLimitSpeed Leads a speed setpoint to
defined limit ranges
L_CamMachineData Machine parameters LenzeCamControl1 L_SdSetAxisData Represented machine
parameters of a master
drive.
L_CamMonitFollowError Following error monitoring LenzeCamControl1 L_LdMonitFollowError Following error monitoring
with adjustable switching
threshold and hysteresis.
L_CamPosCtrlLin Linear profile generator LenzeCamControl1 - -
L_CamProfileData Loading of important profile LenzeCamControl1 - -
points
L_CamSectionShift Section shift LenzeCamControl2 - -
L_CamSelPosition Master value selection LenzeCamControl2 L_Tb8Select 1-from-8-selector
L_CamSelVelocity Digital frequency selection LenzeCamControl2 L_Tb8Select 1-from-8-selector
L_CamSequence Selection of a profile LenzeCamControl1 - -
sequence
L_CamSetPosition Unit conversion LenzeCamControl1 L_SdUnitToPos Position [unit]  position
[increments]
L_SdSetPosition Position [unit] (selected as
parameter value)  position
[increments]
L_CamSetXAxisVelocity Extending & compressing LenzeCamControl1 L_LdSetAxisVelocity Extension/compression of
the master value the X axis and
synchronisation via touch
probe. The master speed is
integrated to the position
within the cycle.
L_CamSetYAxisVelocity Extending & compressing LenzeCamControl1 - -
the setpoint
L_CamVelocityFilter Filter (PT1) for speed signals LenzeCamControl2 L_TbPT1Filter PT1 filter
L_CamVMasterPosition Virtual master with LenzeCamControl1 L_LdVirtualMasterP Virtual master with position
positioning function reference
L_CamVMasterVelocity Virtual master LenzeCamControl1 L_LdVirtualMasterV Virtual master with speed
reference
L_CanClose* Deactivation LenzeCanDrv - -
L_CanDSxClose* Deactivate index mapping LenzeCanDSxDrv - -
L_CanDSxCloseHeartBeat* Deactivate "Heartbeat" LenzeCanDSxDrv - -
L_CanDSxCloseNodeGuardi Deactivate "Node Guarding" LenzeCanDSxDrv - -
ng*
L_CanDSxHeartBeat Execute "Heartbeat" LenzeCanDSxDrv - -
L_CanDSxInitIndexCode* Configure index mapping LenzeCanDSxDrv - -
L_CanDSxNodeGuarding Execute "Node Guarding" LenzeCanDSxDrv - -
L_CanDSxOpen* Initialise CanDSx driver LenzeCanDSxDrv - -
L_CanDSxOpenHeartBeat* Initialise "Heartbeat" LenzeCanDSxDrv - -
L_CanDSxOpenNodeGuardi Initialise "Node Guarding" LenzeCanDSxDrv - -
ng*
L_CanGetRelocCobId* Query - COB-ID area LenzeCanDrv - -
L_CanGetState* Driver status LenzeCanDrv - -
* Function (no function block)

30 1.4 EN - 08/2006 L
L-force | 9400 function library
Short overview
FB reference list - 9300 Servo PLC

Function block for 9300 servo PLC Function block for 9400 Servo Drives
Name Description Function library Name Description
L_CanInit* Initialisation LenzeCanDrv - -
L_CanPdoReceive Receive CAN object LenzeCanDrv - -
L_CanPdoTransmit Transmit CAN object LenzeCanDrv - -
L_CMP Comparison [Link] L_TbCompare Comparison
L_TbCompare_n Comparison (scaled)
L_CONV Normalisation [Link] L_TbGainLim Gain with limitation
L_TbNormalize Signal scaling
L_CONVPA Conversion of angle to [Link] - -
analog
L_CONVPP Conversion of phase signal [Link] - -
L_CONVVV Conversion [Link] - -
L_CONVX Scaling with limitation [Link] L_TbNormalize Signal scaling
L_CURVE Characteristic function [Link] L_TbCurve Characteristic function
L_DB Dead band [Link] L_TbDeadband Dead band
L_TbDeadband_n Dead band (scaled)
L_DFRFG Digital frequency ramp LenzeElectricalShaft - -
function generator
L_DFSET Digital frequency LenzeElectricalShaft - -
processing
L_DIGDEL Binary delay element [Link] L_TbDelay Binary delay element
L_DintToByteArray Type conversion [Link] - -
L_Display9371BB Transparent mode with [Link] - -
operating unit 9371BB
L_DT1_ Differentiation [Link] L_TbDifferentiate Differentiator with low pass
L_FCNT Up/downcounter [Link] L_TbCount Upcounter and
downcounter with
adjustable limitation.
L_FIXSET Programming of fixed [Link] L_SdSpeedSet Ramp generator (ramp
setpoints function generator) with S-
shaped ramps,
parameterisable fixed
setpoints and
comprehensive parameter
setting and control options.
L_FLIP D flipflop [Link] L_TbFlipFlopD D flipflop
L_TbFlipFlopRS RS flipflop
L_FUNCodeIndexConv Index of a code (function) [Link] - -
L_FWM Error tripping [Link] L_DevApplErr Error tripping
L_GEARCOMP Gearbox compensation LenzeElectricalShaft - -
L_IOAInModule Signal conversion LenzeIOSystem - -
L_IOAOutModule Signal conversion LenzeIOSystem - -
L_IOCompactModule Coordinate data LenzeIOSystem - -
L_IOConvByteArrayToByte Conversion function LenzeIOSystem - -
L_IOConvByteToByteArray Conversion function LenzeIOSystem - -
L_IOCounterDataFromIO Counter function LenzeIOSystem - -
L_IOCounterDataToIO Counter function LenzeIOSystem - -
L_IOCounterDIModuleData Counter function LenzeIOSystem - -
FromIO
L_IOCounterDIModuleData Counter function LenzeIOSystem - -
ToIO
L_IOData15 Coordinate data LenzeIOSystem - -
L_IOData610 Coordinate data LenzeIOSystem - -
L_IODInModule Bit conversion LenzeIOSystem - -
L_IODOutModule Bit conversion LenzeIOSystem - -
L_IOParAIAOModule Parameter function LenzeIOSystem - -
* Function (no function block)

L 1.4 EN - 08/2006 31
L-force | 9400 function library
Short overview
FB reference list - 9300 Servo PLC

Function block for 9300 servo PLC Function block for 9400 Servo Drives
Name Description Function library Name Description
L_IOParAlnModule Parameter function LenzeIOSystem - -
L_IOParAOutModule Parameter function LenzeIOSystem - -
L_IOParComGuarding Monitoring function LenzeIOSystem - -
L_IOParCompactModule Parameter function LenzeIOSystem - -
L_IOParCounterDIModule Counter function LenzeIOSystem - -
L_IOParCounterModule Counter function LenzeIOSystem - -
L_IOParPDO15 Parameter function LenzeIOSystem - -
L_IOParPDO610 Parameter function LenzeIOSystem - -
L_IOParSSIModule Parameter function LenzeIOSystem - -
L_IOSSIDataFromIO Counter function LenzeIOSystem - -
L_IOSSIDataToIO Counter function LenzeIOSystem - -
L_LIM Limit [Link] - -
L_MCAutoResetInterface Process control LenzeMotionControl - -
L_MCGetPosition Unit conversion LenzeMotionControl L_SdPosToUnit Position [increments] 
position [unit]
L_SdGetPosition Position [increments] 
position [unit] (displayed as
parameter value)
L_MCGetVelocity Unit conversion LenzeMotionControl L_SdGetSpeed Speed  speed [unit/s]
(displayed as parameter
value)
L_MCInterpolator Signal interpolation LenzeMotionControl - -
L_MCMachineData Machine parameters LenzeMotionControl SB LS_DriveInterface The machine parameters for
the drive/motor are set via
the drive interface.
L_SdSetAxisData Represented machine
parameters of a master
drive.
L_MCPhiDiff Integration and subtraction LenzeMotionControl L_TbDifferentiate Differentiator with low pass
of speed signals
L_MCPhiIntegrator Integrator with TP set LenzeMotionControl L_SdIntegrate Integration (speed 
function position)
L_TbIntegrate Integration with limitation
L_MCPhiTrim Phase trimming is speed- LenzeMotionControl - -
dependent
L_MCPhiTrimTime Phase trimming is time- LenzeMotionControl - -
dependent
L_MCPositionCorrection Feed correction LenzeMotionControl - -
L_MCProfileGenerator Profile generator LenzeMotionControl - -
L_MCResidualDistance Residual path calculation LenzeMotionControl - -
L_MCSetAcceleration Unit conversion LenzeMotionControl - -
L_MCSetDeceleration Unit conversion LenzeMotionControl - -
L_MCSetPosition Unit conversion LenzeMotionControl - -
L_MCSetProfileConverter Unit conversion LenzeMotionControl - -
L_MCSetProfileValues Unit conversion LenzeMotionControl - -
L_MCSetVelocity Unit conversion LenzeMotionControl - -
L_MCSignalDerive Signal differentiation LenzeMotionControl - -
L_MCSwitchCam Switching points LenzeMotionControl - -
L_MCSwitchPoint Switching points LenzeMotionControl L_SdSwitchPoint Position switch points
(cams)
L_MCTouchProbeCtrl Touch probe pre-processing LenzeMotionControl L_SdTouchProbe Touch probe processing
L_MemClearFlash* Delete flash memory LenzeMemDrv - -
segment
L_MemCopyFromRam* Copy data from RAM into LenzeMemDrv - -
variable memory
L_MemCopyToRam* Copy data from variable LenzeMemDrv - -
memory into RAM
* Function (no function block)

32 1.4 EN - 08/2006 L
L-force | 9400 function library
Short overview
FB reference list - 9300 Servo PLC

Function block for 9300 servo PLC Function block for 9400 Servo Drives
Name Description Function library Name Description
L_MemGetStateDriver* Driver status LenzeMemDrv - -
L_MemGetStateOfMemory PLC memory status LenzeMemDrv - -
L_MemLoadRamFromFlash* Copy data from flash LenzeMemDrv - -
memory into RAM
L_MemReadDINT* Read DINT value out of RAM LenzeMemDrv - -
L_MemReadDWORD* Read DWORD value out of LenzeMemDrv - -
RAM
L_MemReadINT* Read INT value out of RAM LenzeMemDrv - -
L_MemReadWORD* Read WORD value out of LenzeMemDrv - -
RAM
L_MemSaveRamToFlash* Copy data from RAM into LenzeMemDrv - -
flash memory
L_MemWriteDINT* Write DINT value into RAM LenzeMemDrv - -
L_MemWriteDWORD* Write DWORD value into LenzeMemDrv - -
RAM
L_MemWriteINT Write INT value into RAM LenzeMemDrv - -
L_MemWriteWORD* Write WORD value into RAM LenzeMemDrv - -
L_MFAIL Mains failure control [Link] - -
L_MPOT Motor potentiometer [Link] - -
L_NOT NOT [Link] L_TbNot Negation (inverter)
L_NSET Speed pre-processing [Link] L_SdSpeedSet Ramp generator (ramp
function generator) with S-
shaped ramps,
parameterisable fixed
setpoints and
comprehensive parameter
setting and control options.
L_OR OR [Link] L_TbOr OR (2 inputs)
L_Tb5Or OR (5 inputs)
L_ParRead Reading of codes [Link] - -
L_ParWrite Writing of codes [Link] - -
L_PCTRL Process controller [Link] - -
L_PHADD Addition [Link] L_TbAdd Addition without limitation
L_TbAddLim Addition with limitation
L_PHCMP Comparison [Link] L_TbCompare Comparison
L_TbCompare_n Comparison (scaled)
L_PHDIFF Difference [Link] L_TbDifferentiate Differentiator with low pass
L_PHDIV Division [Link] L_TbDiv Division with remainder
L_TbDiv_n Division divisor selected as
scaled signal [%]
L_PHINT Integration [Link] L_SdIntegrate Integration (speed 
position)
L_PHINTK Integration [Link] L_SdIntegrate Integration (speed 
position)
L_PT1_ Deceleration [Link] L_TbPT1Filter PT1 filter
L_REF Homing function LenzeElectricalShaft SB LS_Homing Basic function "Homing"
L_RFG Ramp function generator [Link] L_SdRampGenerator Ramp generator (ramp
function generator) with S-
shaped ramps.
L_SdSpeedSet Ramp generator (ramp
function generator) with S-
shaped ramps,
parameterisable fixed
setpoints and
comprehensive parameter
setting and control options.
L_RLQ Right/left quick stop [Link] - -
L_Rs232Close Deactivation (function) LenzeFpiDrv - -
L_Rs232GetReceiveState Receive status (function) LenzeFpiDrv - -
* Function (no function block)

L 1.4 EN - 08/2006 33
L-force | 9400 function library
Short overview
FB reference list - 9300 Servo PLC

Function block for 9300 servo PLC Function block for 9400 Servo Drives
Name Description Function library Name Description
L_Rs232GetSendState Transmit status (function) LenzeFpiDrv - -
L_Rs232Open Initialisation (function) LenzeFpiDrv - -
L_Rs232ReceiveData Receiving data (function) LenzeFpiDrv - -
L_Rs232SendData Transmitting data LenzeFpiDrv - -
(function)
L_SH Sample & Hold [Link] L_TbSampleHold Sample & Hold
L_SRFG Ramp function generator [Link] L_SdRampGenerator Ramp generator (ramp
with S ramp function generator) with S-
shaped ramps.
L_SdSpeedSet Ramp generator (ramp
function generator) with S-
shaped ramps,
parameterisable fixed
setpoints and
comprehensive parameter
setting and control options.
L_TBConvBitsToByte* BOOL (8 x)  BYTE LenzePLCToolBox L_DcBitsToByte BOOL (8 x)  BYTE
L_TBConvBitsToDword* BOOL (32 x)  DWORD LenzePLCToolBox L_DcBitsToDWord BOOL (32 x)  DWORD
L_TBConvBitsToWord* BOOL (16 x)  WORD LenzePLCToolBox L_DcBitsToWord BOOL (16 x)  WORD
L_TBConvByteToBits BYTE  BOOL (8 x) LenzePLCToolBox L_DcByteToBits BYTE  BOOL (8 x)
L_TBConvCharToByte* ASCII character  ASCII code LenzePLCToolBox - -
L_TBConvDwordToBits DWORD  BOOL (32 x) LenzePLCToolBox L_DcDWordToBits DWORD  BOOL (32 x)
L_TBConvWordToBits WORD  BOOL (16 x) LenzePLCToolBox L_DcWordToBits WORD  BOOL (16 x)
L_TBGetBitOfByte* Outputs a bit of a BYTE value LenzePLCToolBox L_DcGetBitOfByte Outputs a bit of a BYTE value
L_TBGetBitOfDword* Outputs a bit of a DWORD LenzePLCToolBox L_DcGetBitOfDWord Outputs a bit of a DWORD
value value
L_TBGetBitOfWord* Outputs a bit of a WORD LenzePLCToolBox - -
value
L_TBResetBitOfByte* Resets a bit of a BYTE value LenzePLCToolBox L_DcResetBitOfByte Resets a bit of a BYTE value
to "0". to "0".
L_TBResetBitOfDword* Resets a bit of a DWORD LenzePLCToolBox L_DcResetBitOfDWord Resets a bit of a DWORD
value to "0". value to "0".
L_TBResetBitOfWord* Resets a bit of a WORD value LenzePLCToolBox L_DcResetBitOfWord Resets a bit of a WORD value
to "0". to "0".
L_TBSetBitOfByte* Sets a bit of a BYTE value to LenzePLCToolBox L_DcSetBitOfByte Sets a bit of a BYTE value to
"1". "1".
L_TBSetBitOfDword* Sets a bit of a DWORD value LenzePLCToolBox L_DcSetBitOfDWord Sets a bit of a DWORD value
to "1". to "1".
L_TBSetBitOfWord* Sets a bit of a WORD value LenzePLCToolBox L_DcSetBitOfWord Sets a bit of a WORD value
to "1". to "1".
L_TBSquareWave Rectangular pulse generator LenzePLCToolBox L_TbOscillator Rectangular pulse generator
with variable pulse/dead with parameterisable
time. pulse/dead time.
L_TpConfigDigInX Configures a touch probe LenzeTpDrv - -
input (function)
L_TpGetLastScanDigIn1...4 Provides touch-probe LenzeTpDrv L_SdTouchProbe Touch probe processing
signals
L_TRANS Edge evaluation [Link] L_TbTransition Signal edge evaluation
L_WndAccTorque Acceleration compensation LenzeWinder - -
L_WndCalcDiameter Diameter calculation LenzeWinder - -
L_WndCalcLength Length calculation LenzeWinder - -
L_WndCalcThickness Thickness calculation LenzeWinder - -
L_WndConvActPos Actual dancer value LenzeWinder - -
conditioning
L_WndConvMSet Torque setpoint converter LenzeWinder - -
L_WndConvNSet Speed setpoint converter LenzeWinder - -
L_WndFrictionCurve Friction compensation LenzeWinder - -
L_WndGearRatio Gearbox factor changeover LenzeWinder - -
* Function (no function block)

34 1.4 EN - 08/2006 L
L-force | 9400 function library
Short overview
FB reference list - 9300 Servo PLC

Function block for 9300 servo PLC Function block for 9400 Servo Drives
Name Description Function library Name Description
L_WndIdentFriction Identification of the friction LenzeWinder - -
characteristic
L_WndIdentMInertia Identification of the LenzeWinder - -
moment of inertia
L_WndMInertia Mass inertia calculation LenzeWinder - -
L_WndProcessCtrl Dancer / tension control LenzeWinder - -
L_WndStopCtrl Stop controller LenzeWinder - -
L_WndTensionCurve Tensile force characteristic LenzeWinder - -
* Function (no function block)

L 1.4 EN - 08/2006 35
L-force | 9400 function library
Short overview
FB reference list - 9300 servo inverter

3.13 FB reference list - 9300 servo inverter

The following reference list shall assist you in finding the correct function block to simulate
a function known from the 9300 servo inverter.
Function block for 9300 servo inverter Function block for 9400 Servo Drives
Name Description Name Description
ABS Absolute value generator L_TbAbs Absolute value generation
ADD Addition block L_TbAdd Addition without limitation
L_TbAddLim Addition with limitation
AIF-IN Fieldbus - -
AIF-OUT Fieldbus - -
AIN Analog inputs SB LS_AnalogInput Analog inputs
AND AND L_TbAnd AND (2 inputs)
L_Tb5And AND (5 inputs)
ANEG Analog inverter L_TbNeg Sign inversion
AOUT Analog outputs SB LS_AnalogOutput Analog outputs
ARIT Arithmetic block L_TbAdd Addition without limitation
L_TbAddLim Addition with limitation
L_TbDiv Division with remainder
L_TbDiv_n Division divisor selected as scaled
signal [%]
L_TbMul Multiplication without limitation
L_TbMul_n Multiplication with the
multiplicand selected as scaled
signal [%]
L_TbMulLim Multiplication with limitation
L_TbSub Subtraction without limitation
L_TbSubLim Subtraction with limitation
ARITPH 32 bit arithmetic block L_TbAdd Addition without limitation
L_TbAddLim Addition with limitation
L_TbDiv Division with remainder
L_TbDiv_n Division divisor selected as scaled
signal [%]
L_TbMul Multiplication without limitation
L_TbMul_n Multiplication with the
multiplicand selected as scaled
signal [%]
L_TbMulLim Multiplication with limitation
L_TbSub Subtraction without limitation
L_TbSubLim Subtraction with limitation
ASW Analog change-over switch L_Tb8Select 1-from-8-selector
L_TbSelect Selector
BRK Holding brake control SB LS_Brake Basic function "Brake control"
CAN-IN System bus Network configuration in the »Engineer«, interconnection via ports in the
machine application.
CAN-OUT
CMP Comparator L_TbCompare Comparison
L_TbCompare_n Comparison (scaled)
CONV Conversion L_TbGainLim Gain with limitation
L_TbNormalize Signal scaling
CONVPHA 32 bit conversion - -
CONVPHPH 32 bit conversion - -
CONVPP 32 bit/16 bit conversion - -
CURVE Characteristic function L_TbCurve Characteristic function
DB Dead band L_TbDeadband Dead band
L_TbDeadband_n Dead band (scaled)

36 1.4 EN - 08/2006 L
L-force | 9400 function library
Short overview
FB reference list - 9300 servo inverter

Function block for 9300 servo inverter Function block for 9400 Servo Drives
Name Description Name Description
DCTRL Device control SB LS_DriveInterface Drive interface
DFIN Digital frequency input SB LS_DigitalFrequencyInput Digital frequency input
DFOUT Digital frequency output SB LS_DigitalFrequencyOutput Digital frequency output
DFRFG Digital frequency ramp function - -
generator
DFSET Digital frequency processing - -
DIGDEL Binary delay element L_TbDelay Binary delay element
DIGIN Digital inputs SB LS_DigitalInput Digital inputs
DIGOUT Digital outputs SB LS_DigitalOutput Digital outputs
DT1-1 Derivative-action element L_TbDifferentiate Differentiator with low pass
FCNT Piece number L_TbCount Upcounter and downcounter with
adjustable limitation.
FEVAN Free analog input variable - -
FDO Free digital outputs - -
FIXED Constant signals - -
FIXSET Fixed setpoints L_SdSpeedSet Ramp generator (ramp function
generator) with S-shaped ramps,
parameterisable fixed setpoints
and comprehensive parameter
setting and control options.
FLIP D flipflop L_TbFlipFlopD D flipflop
L_TbFlipFlopRS RS flipflop
GEARCOMP Gearbox torsion - -
LIM Limiter L_TbLimit Signal limitation
L_TbLimit_n Signal limitation (scaled)
MCTRL Motor control SB LS_MotorInterface Motor interface
MFAIL Mains failure control - -
MLP Motor phase failure detection - -
MONIT Monitoring - -
MPOT Motor potentiometer - -
NOT NOT L_TbNot Negation (inverter)
NSET Speed setpoint conditioning L_SdSpeedSet Ramp generator (ramp function
generator) with S-shaped ramps,
parameterisable fixed setpoints
and comprehensive parameter
setting and control options.
OR OR L_TbOr OR (2 inputs)
L_Tb5Or OR (5 inputs)
OSZ Oscilloscope function - -
PCTRL Process controller - -
PHADD 32 bit addition block L_TbAdd Addition without limitation
L_TbAddLim Addition with limitation
PHCMP Comparator L_TbCompare Comparison
L_TbCompare_n Comparison (scaled)
PHDIFF 32 bit setpoint/actual value L_TbDifferentiate Differentiator with low pass
comparison
PHDIV Conversion L_TbDiv Division with remainder
L_TbDiv_n Division divisor selected as scaled
signal [%]
PHINT Phase integrator L_SdIntegrate Integration (speed  position)
PT1-1 First-order delay element L_TbPT1Filter PT1 filter
R/L/Q QSP / setpoint inversion - -
REF Homing function SB LS_Homing Basic function "Homing"

L 1.4 EN - 08/2006 37
L-force | 9400 function library
Short overview
FB reference list - 9300 servo inverter

Function block for 9300 servo inverter Function block for 9400 Servo Drives
Name Description Name Description
RFG Ramp function generator L_SdRampGenerator Ramp generator (ramp function
generator) with S-shaped ramps.
L_SdSpeedSet Ramp generator (ramp function
generator) with S-shaped ramps,
parameterisable fixed setpoints
and comprehensive parameter
setting and control options.
S&H Sample & Hold L_TbSampleHold Sample & Hold
SRFG S shaped ramp function generator L_SdRampGenerator Ramp generator (ramp function
generator) with S-shaped ramps.
L_SdSpeedSet Ramp generator (ramp function
generator) with S-shaped ramps,
parameterisable fixed setpoints
and comprehensive parameter
setting and control options.
STAT Digital status signals L_DevDriveInterfaceStateDecoder Status signals of the drive interface
L_DevManualJogStateDecoder Status signals of the basic function
"Manual jog"
L_DevHomingStateDecoder Status signals of the basic function
"Homing"
L_PosDecoderStatePositioner Status signals of the basic function
"Positioning"
L_DevLimiterStateDecoder Status signals of the basic function
"Limiter"
L_DevBrakeStateDecoder Status signals of the basic function
"Brake control"
L_PosDecoderStateSequencer Status signals of the sequence
control (FB L_PosSequencer)
L_LdStateDecoder Status signals of the FBs of the
function library "[Link]"
STATE-BUS Statebus SB LS_DigitalInput Digital inputs
SB LS_DigitalOutput Digital outputs
STORE Memory - -
SYNC Multi-axis positioning - -
TRANS Binary edge evaluation L_TbTransition Signal edge evaluation

38 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks

4 Function blocks
This chapter describes all function blocks (FBs) that are provided by the »Engineer«
function block editor for the "9400 Servo Drives".

Note!
The grayed out area at the beginning of each FB description informs you which
function library contains the corresponding FB and which "9400 Servo Drives"
can be used with the FB.

L 1.4 EN - 08/2006 39
L-force | 9400 function library
Function blocks
L_Dc2BytesToWord - Data type conversion

4.1 L_Dc2BytesToWord - Data type conversion

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts two input values of type "BYTE" into an output value of type "WORD".

L_Dc2BytesToWord
byInput1
byInput2
wOutput

Inputs

Identifier/data type Information/possible settings


byInput1 Input value 1 ≡ bit 0 ... bit 7 of wOutput
BYTE
byInput2 Input value 2 ≡ bit 8 ... bit 15 of wOutput
BYTE

Outputs

Identifier/data type Value/meaning


wOutput Value of type "word" corresponding to the transmitted input values
WORD

40 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_Dc2WordsToDWord - Data type conversion

4.2 L_Dc2WordsToDWord - Data type conversion

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts two input values of type "WORD" into an output value of type "DWORD".

L_Dc2WordsToDWord
wInput1
wInput2
dwOutput

Inputs

Identifier/data type Information/possible settings


wInput1 Input value 1 ≡ bit 0 ... bit 15 of dwOutput
WORD
wInput2 Input value 2 ≡ bit 16 ... bit 31 of dwOutput
WORD

Outputs

Identifier/data type Value/meaning


dwOutput Value of type "double word" corresponding to the transmitted input values
DWORD

L 1.4 EN - 08/2006 41
L-force | 9400 function library
Function blocks
L_Dc4BytesToDWord - Data type conversion

4.3 L_Dc4BytesToDWord - Data type conversion

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts four input values of type "BYTE" into an output value of type "DWORD".

L_Dc4BytesToDWord
byInput1
byInput2
byInput3
byInput4
dwOutput

Inputs

Identifier/data type Information/possible settings


byInput1 Input value 1 ≡ bit 0 ... bit 7 of dwOutput
BYTE
byInput2 Input value 2 ≡ bit 8 ... bit 15 of dwOutput
BYTE
byInput3 Input value 3 ≡ bit 16 ... bit 23 of dwOutput
BYTE
byInput4 Input value 4 ≡ bit 24 ... bit 31 of dwOutput
BYTE

Outputs

Identifier/data type Value/meaning


dwOutput Value of type "double word" corresponding to the transmitted input values
DWORD

42 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcBitShift - Shift operation

4.4 L_DcBitShift - Shift operation

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a bit shift operation with a "DINT" value.


r The shift factor, i.e. the number of bits by which the input value is shifted to the left or
right, is defined by a parameter.
r The result of the shift operation is output a the output dnOut.
r The sign remains.

L_DcBitShift
dnIn
0 1 0 1 0 0
Bit 31 Bit 0
dnOut
0 0 1 0 1 0

Inputs

Identifier/data type Information/possible settings


dnIn Input signal
DINT

Outputs

Identifier/data type Value/meaning


dnOut Output signal according to the parameterised bit shift operation
DINT

Parameters

Parameters Possible settings Information


C04190 -31 31 Shift factor
• Initialisation: 0

Example

Shift factor = +2 Shift factor = -3


dnIn dnIn
Bit 31 Bit 0 Bit 31 Bit 0

Bit 31
0 0 Bit 0 Bit 31 Bit 0
dnOut dnOut

L 1.4 EN - 08/2006 43
L-force | 9400 function library
Function blocks
L_DcBitsToByte - Bit multiplexer

4.5 L_DcBitsToByte - Bit multiplexer

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts 8 single bit values into a value of type "byte".

L_DcBitsToByte
bBit0 byOutput
bBit1
0 BYTE
1
bBit2
2
bBit3
3
bBit4
4
bBit5
5
bBit6
6
bBit7
7

Inputs

Identifier/data type Information/possible settings


bBit0 Input for bit value with valency 20
BOOL
... ...
bBit7 Input for bit value with valency 27
BOOL

Outputs

Identifier/data type Value/meaning


byOutput Value of type "byte" corresponding to the transmitted bit values
BYTE

44 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcBitsToDWord - Bit multiplexer

4.6 L_DcBitsToDWord - Bit multiplexer

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts 32 single bit values into a value of "DWORD" type.

L_DcBitsToDWord
bBit0 dwOutput
bBit1
0 DWORD
1
bBit2
2
bBit3
3
bBit4
4
bBit5
5
bBit6
6
bBit7
7
bBit8
8
bBit9
9
bBit10
10
bBit11
11
bBit12
12
bBit13
13
bBit14
14
bBit15
15
bBit16
16
bBit17
17
bBit18
18
bBit19
19
bBit20
20
bBit21
21
bBit22
22
bBit23
23
bBit24
24
bBit25
25
bBit26
26
bBit27
27
bBit28
28
bBit29
29
bBit30
30
bBit31
31

Inputs

Identifier/data type Information/possible settings


bBit0 Input for bit value with valency 20
BOOL
... ...
bBit31 Input for bit value with valency 231
BOOL

L 1.4 EN - 08/2006 45
L-force | 9400 function library
Function blocks
L_DcBitsToDWord - Bit multiplexer

Outputs

Identifier/data type Value/meaning


dwOutput Value of type "double word" corresponding to the transmitted bit values
DWORD

46 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcBitsToWord - Bit multiplexer

4.7 L_DcBitsToWord - Bit multiplexer

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts 16 single bit values into a value of "WORD" type.

L_DcBitsToWord
bBit0 wOutput
bBit1
0 WORD
1
bBit2
2
bBit3
3
bBit4
4
bBit5
5
bBit6
6
bBit7
7
bBit8
8
bBit9
9
bBit10
10
bBit11
11
bBit12
12
bBit13
13
bBit14
14
bBit15
15

Inputs

Identifier/data type Information/possible settings


bBit0 Input for bit value with valency 20
BOOL
... ...
bBit15 Input for bit value with valency 215
BOOL

Outputs

Identifier/data type Value/meaning


wOutput Value of "word" type corresponding to the transmitted bit values.
WORD

L 1.4 EN - 08/2006 47
L-force | 9400 function library
Function blocks
L_DcByteToBits - Bit demultiplexer

4.8 L_DcByteToBits - Bit demultiplexer

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB outputs the 8 corresponding bit values for an input value of type "byte".

L_DcByteToBits
byInput bBit0
BYTE 0
bBit1
1
bBit2
2
bBit3
3
bBit4
4
bBit5
5
bBit6
6
bBit7
7

Inputs

Identifier/data type Information/possible settings


byInput Value to be converted
BYTE

Outputs

Identifier/data type Value/meaning


bBit0 Bit 0 output of byInput (valency: 20)
BOOL
bBit1 Bit 1 output of byInput (valency: 21)
BOOL
bBit2 Bit 2 output of byInput (valency: 22)
BOOL
... ...
bBit7 Bit 7 output of byInput (valency: 27)
BOOL

48 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcByteToWord - Type converter

4.9 L_DcByteToWord - Type converter

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts a data type "BYTE" into the data type "WORD".

L_DcByteToWord
byIn wOut
BYTE W WORD

Inputs

Identifier/data type Information/possible settings


byIn Input signal
BYTE

Outputs

Identifier/data type Value/meaning


wOut Output signal
WORD

Function

BYTE
Bit 7 Bit 0

Bit 15
0 0 0 0 0 0 0 0 Bit 0
WORD

L 1.4 EN - 08/2006 49
L-force | 9400 function library
Function blocks
L_DcDIntToDWord - Type converter

4.10 L_DcDIntToDWord - Type converter

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts a data type "DINT" into the data type "DWORD".

L_DcDIntToDWord
dnIn dwOut
DINT W DWORD

Inputs

Identifier/data type Information/possible settings


dnIn Input signal
DINT

Outputs

Identifier/data type Value/meaning


dwOut Output signal
DWORD

50 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcDIntToInt - Type converter

4.11 L_DcDIntToInt - Type converter

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts a data type "DINT" into the data type "INT".

L_DcDIntToInt
dnIn nOut
DINT W INT

Inputs

Identifier/data type Information/possible settings


dnIn Input signal
DINT • Internal limitation to -32768 ... +32767 (INT display area).

Outputs

Identifier/data type Value/meaning


nOut Output signal
INT

Function

DINT (-32768 ... +32767dec)


Bit 31
± Bit 0

Bit 15
± Bit 0
INT

L 1.4 EN - 08/2006 51
L-force | 9400 function library
Function blocks
L_DcDWordBitand - Bit combination

4.12 L_DcDWordBitand - Bit combination

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a bit-by-bit AND operation of two input values of "DWORD" type and
also outputs the results as "DWORD".

L_DcDWordBitand
dwIn1
1 0 0 0 1 1
dwIn2 Bit 31 Bit 0

0 1 0 1 1 0 &
dwOut
0 0 0 0 1 0

Inputs

Identifier/data type Information/possible settings


dwIn1 Value 1 for bit-by-bit AND combination
DWORD
dwIn2 Value 2 for bit-by-bit AND combination
DWORD

Outputs

Identifier/data type Value/meaning


dwOut Result of the bit-by bit AND operation of dwIn1 and dwIn2
DWORD

Function

dwIn1 - bit n dwIn2 - bit n dwOut - bit n


0 0 0
0 1 0
1 0 0
1 1 1

Example

dwIn1 = 00011001010011100001011000101000
dwIn2 = 01010001100001100100100001111000
--------------------------------
dwOut = 00010001010001100000000000101000

52 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcDWordBitor - Bit combination

4.13 L_DcDWordBitor - Bit combination

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a bit-by-bit OR operation of two input values of "DWORD" type and also
outputs the results as "DWORD".

L_DcDWordBitor
dwIn1
1 0 0 0 1 1
dwIn2 Bit 31 Bit 0

0 1 0 1 1 0 1
dwOut
1 1 0 1 1 1

Inputs

Identifier/data type Information/possible settings


dwIn1 Value 1 for bit-by-bit OR combination
DWORD
dwIn2 Value 2 for bit-by-bit OR combination
DWORD

Outputs

Identifier/data type Value/meaning


dwOut Result of the bit-by bit OR operation of dwIn1 and dwIn2
DWORD

Function

dwIn1 - bit n dwIn2 - bit n dwOut - bit n


0 0 0
0 1 1
1 0 1
1 1 1

Example

dwIn1 = 00011001010011100001011000101000
dwIn2 = 01010001100001100100100001111000
--------------------------------
dwOut = 01011001110011100101111001111000

L 1.4 EN - 08/2006 53
L-force | 9400 function library
Function blocks
L_DcDWordBitxor - Bit combination

4.14 L_DcDWordBitxor - Bit combination

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a bit-by-bit EXCLUSIVE OR operation of two input values of "DWORD"
type and also outputs the results as "DWORD".

L_DcDWordBitxor
dwIn1
1 0 0 0 1 1
dwIn2 Bit 31 Bit 0

0 1 0 1 1 0 1
dwOut
1 1 0 1 0 1

Inputs

Identifier/data type Information/possible settings


dwIn1 Value 1 for bit-by-bit EXCLUSIVE OR combination
DWORD
dwIn2 Value 2 for bit-by-bit EXCLUSIVE OR combination
DWORD

Outputs

Identifier/data type Value/meaning


dwOut Result of the bit-by bit EXCLUSIVE OR operation of dwIn1 and dwIn2
DWORD

Function

dwIn1 - bit n dwIn2 - bit n dwOut - bit n


0 0 0
0 1 1
1 0 1
1 1 0

Example

dwIn1 = 00011001010011100001011000101000
dwIn2 = 01010001100001100100100001111000
--------------------------------
dwOut = 01001000110010000101111001010000

54 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcDWordTo2Words - Data type conversion

4.15 L_DcDWordTo2Words - Data type conversion

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts an input value of type "DWORD" into two output values of type "WORD".

L_DcDWordTo2Words
dwInput
wOutput1
wOutput2

Inputs

Identifier/data type Information/possible settings


dwInput Input value
DWORD

Outputs

Identifier/data type Value/meaning


wOutput1 Output value 1 ≡ bit 0 ... bit 15 of dwInput
WORD
wOutput2 Output value 2 ≡ bit 16 ... bit 31 of dwInput
WORD

L 1.4 EN - 08/2006 55
L-force | 9400 function library
Function blocks
L_DcDWordTo4Bytes - Data type conversion

4.16 L_DcDWordTo4Bytes - Data type conversion

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts an input value of type "DWORD" into four output values of type "BYTE".

L_DcDWordTo4Bytes
dwInput
byOutput1
byOutput2
byOutput3
byOutput4

Inputs

Identifier/data type Information/possible settings


dwInput Input value
DWORD

Outputs

Identifier/data type Value/meaning


byOutput1 Output value 1 ≡ bit 0 ... bit 7 of dwInput
BYTE
byOutput2 Output value 2 ≡ bit 8 ... bit 15 of dwInput
BYTE
byOutput3 Output value 3 ≡ bit 16 ... bit 23 of dwInput
BYTE
byOutput4 Output value 4 ≡ bit 24 ... bit 31 of dwInput
BYTE

56 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcDWordToBits - Bit demultiplexer

4.17 L_DcDWordToBits - Bit demultiplexer

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB outputs the 32 corresponding bit values for an input value of "DWORD" type.

L_DcDWordToBits
dwInput bBit0
DWORD 0
bBit1
1
bBit2
2
bBit3
3
bBit4
4
bBit5
5
bBit6
6
bBit7
7
bBit8
8
bBit9
9
bBit10
10
bBit11
11
bBit12
12
bBit13
13
bBit14
14
bBit15
15
bBit16
16
bBit17
17
bBit18
18
bBit19
19
bBit20
20
bBit21
21
bBit22
22
bBit23
23
bBit24
24
bBit25
25
bBit26
26
bBit27
27
bBit28
28
bBit29
29
bBit30
30
bBit31
31

Inputs

Identifier/data type Information/possible settings


dwInput Value to be converted
DWORD

L 1.4 EN - 08/2006 57
L-force | 9400 function library
Function blocks
L_DcDWordToBits - Bit demultiplexer

Outputs

Identifier/data type Value/meaning


bBit0 Bit 0 output of dwInput (valency: 20)
BOOL
bBit1 Bit 1 output of dwInput (valency: 21)
BOOL
bBit2 Bit 2 output of dwInput (valency: 22)
BOOL
... ...
bBit31 Bit 31 output of dwInput (valency: 231)
BOOL

58 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcDWordToDInt - Type converter

4.18 L_DcDWordToDInt - Type converter

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts a data type "DWORD" into the data type "DINT".

L_DcDWordToDInt
dwIn dnOut
DWORD W DINT

Inputs

Identifier/data type Information/possible settings


dwIn Input signal
DWORD

Outputs

Identifier/data type Value/meaning


dnOut Output signal
DINT

L 1.4 EN - 08/2006 59
L-force | 9400 function library
Function blocks
L_DcDWordToWord - Type converter

4.19 L_DcDWordToWord - Type converter

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts a data type "DWORD" into the data type "WORD".

L_DcDWordToWord
dwIn wOut
DWORD W WORD

Inputs

Identifier/data type Information/possible settings


dwIn Input signal
DWORD

Outputs

Identifier/data type Value/meaning


wOut Output signal
WORD

Function

DWORD
Bit 31 Bit 0

Bit 15 Bit 0
WORD

60 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcGetBitOfByte - Bit operation

4.20 L_DcGetBitOfByte - Bit operation

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB returns the state of a single bit within a "BYTE" value.

L_DcGetBitOfByte
byInput bBit
byBitNr

Inputs

Identifier/data type Information/possible settings


byInput Input signal
BYTE
byBitNr No. (0 ... 7) of the bit of byInput the state of which is to be detected.
BYTE

Outputs

Identifier/data type Value/meaning


bBit State of bit byBitNr of byInput.
BOOL

L 1.4 EN - 08/2006 61
L-force | 9400 function library
Function blocks
L_DcGetBitOfDWord - Bit operation

4.21 L_DcGetBitOfDWord - Bit operation

Function library: LenzeDataConversion


Function available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB returns the state of a single bit within a "DWORD" value.

L_DcGetBitOfDWord
dwInput bBit
byBitNr

Inputs

Identifier/data type Information/possible settings


dwInput Input signal
DWORD
byBitNr No. (0 ... 31) of the bit of dwInput the state of which is to be detected.
BYTE

Outputs

Identifier/data type Value/meaning


bBit State of bit byBitNr of dwInput.
BOOL

62 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcGetBitOfWord - Bit operation

4.22 L_DcGetBitOfWord - Bit operation

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB returns the state of a single bit within a "WORD" value.

L_DcGetBitOfWord
wInput bBit
byBitNr

Inputs

Identifier/data type Information/possible settings


wInput Input signal
WORD
byBitNr No. (0 ... 15) of the bit of wInput the state of which is to be detected.
BYTE

Outputs

Identifier/data type Value/meaning


bBit State of bit byBitNr of wInput.
BOOL

L 1.4 EN - 08/2006 63
L-force | 9400 function library
Function blocks
L_DcIntToDInt - Type converter

4.23 L_DcIntToDInt - Type converter

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts a data type "INT" into the data type "DINT".

L_DcIntToDInt
nIn dnOut
INT W DINT

Inputs

Identifier/data type Information/possible settings


nIn Input signal
INT

Outputs

Identifier/data type Value/meaning


dnOut Output signal
DINT

Function

INT
Bit 15
± Bit 0

Bit 31
± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± ± Bit 0
DINT

64 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcIntToWord - Type converter

4.24 L_DcIntToWord - Type converter

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts a data type "INT" into the data type "WORD" .

L_DcIntToWord
nIn wOut
INT W WORD

Inputs

Identifier/data type Information/possible settings


nIn Input signal
INT

Outputs

Identifier/data type Value/meaning


wOut Output signal
WORD

L 1.4 EN - 08/2006 65
L-force | 9400 function library
Function blocks
L_DcNorm_aToNorm_n - Signal converter

4.25 L_DcNorm_aToNorm_n - Signal converter

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts a scaled 16-bit signal into a scaled 32-bit signal.

L_DcNorm_aToNorm_n
nIn_a dnOut_n
[%] 16 Bit W [%] 32 Bit

Inputs

Identifier/data type Information/possible settings


nIn_a Input signal
INT • 100 % ≡ 214 ≡ 16384

Outputs

Identifier/data type Value/meaning


dnOut_n Output signal
DINT • 100 % ≡ 230 ≡ 1073741824

Function

nIn_a
Bit 15
± Bit 0

Bit 31
± 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Bit 0
dnOut_n

66 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcNorm_nToNorm_a - Signal converter

4.26 L_DcNorm_nToNorm_a - Signal converter

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts a scaled 32-bit signal into a scaled 16-bit signal.

L_DcNorm_nToNorm_a
dnIn_n nOut_a
[%] 32 Bit W [%] 16 Bit

Inputs

Identifier/data type Information/possible settings


dnIn_n Input signal
DINT • 100 % ≡ 230 ≡ 1073741824

Outputs

Identifier/data type Value/meaning


nOut_a Output signal
INT • 100 % ≡ 214 ≡ 16384

Function

dnIn_n
Bit 31
± Bit 0

Bit 15
± Bit 0
nOut_a

L 1.4 EN - 08/2006 67
L-force | 9400 function library
Function blocks
L_DcNorm_nToSpeed_s - Signal converter

4.27 L_DcNorm_nToSpeed_s - Signal converter

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB uses the transmitted machine parameters and converts a scaled 32-bit signal into
a 32-bit speed signal.

L_DcNorm_nToSpeed_s
dnIn_n dnOut_s
[%] 32 Bit W [rpm] 32 Bit
AxisData

Inputs

Identifier/data type Information/possible settings


dnIn_n Input signal in [%]
DINT • 100 % ≡ 230 ≡ 1073741824
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnOut_s Output signal in [rpm]
DINT • 15000 rpm ≡ 226 ≡ 67108864

68 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcResetBitOfByte - Bit operation

4.28 L_DcResetBitOfByte - Bit operation

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB resets a single bit in a "BYTE" type value to "0".

L_DcResetBitOfByte
byInput byOutput
byBitNr

Inputs

Identifier/data type Information/possible settings


byInput Input signal
BYTE
byBitNr No. (0 ... 7) of the bit to be reset.
BYTE

Outputs

Identifier/data type Value/meaning


byOutput Value of type "byte" resulting from the reset bit.
BYTE

L 1.4 EN - 08/2006 69
L-force | 9400 function library
Function blocks
L_DcResetBitOfDWord - Bit operation

4.29 L_DcResetBitOfDWord - Bit operation

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB resets a single bit in a "DWORD" type value to "0".

L_DcResetBitOfDWord
dwInput dwOutput
byBitNr

Inputs

Identifier/data type Information/possible settings


dwInput Input signal
DWORD
byBitNr No. (0 ... 31) of the bit to be reset.
BYTE

Outputs

Identifier/data type Value/meaning


dwOutput Value of type "double word" resulting from the reset bit.
DWORD

70 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcResetBitOfWord - Bit operation

4.30 L_DcResetBitOfWord - Bit operation

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB resets a single bit in a "WORD" type value to "0".

L_DcResetBitOfWord
wInput wOutput
byBitNr

Inputs

Identifier/data type Information/possible settings


wInput Input signal
WORD
byBitNr No. (0 ... 15) of the bit to be reset.
BYTE

Outputs

Identifier/data type Value/meaning


wOutput Value of type "word" resulting from the reset bit.
WORD

L 1.4 EN - 08/2006 71
L-force | 9400 function library
Function blocks
L_DcSetBitOfByte - Bit operation

4.31 L_DcSetBitOfByte - Bit operation

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB sets a single bit in a "BYTE" type value to "1".

L_DcSetBitOfByte
byInput byOutput
byBitNr

Inputs

Identifier/data type Information/possible settings


byInput Input signal
BYTE
byBitNr No. (0 ... 7) of the bit to be set.
BYTE

Outputs

Identifier/data type Value/meaning


byOutput Value of type "byte" resulting from the set bit.
BYTE

72 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcSetBitOfDWord - Bit operation

4.32 L_DcSetBitOfDWord - Bit operation

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB sets a single bit in a "DWORD" type value to "1".

L_DcSetBitOfDWord
dwInput dwOutput
byBitNr

Inputs

Identifier/data type Information/possible settings


dwInput Input signal
DWORD
byBitNr No. (0 ... 31) of the bit to be set.
BYTE

Outputs

Identifier/data type Value/meaning


dwOutput Value of type "double word" resulting from the set bit.
DWORD

L 1.4 EN - 08/2006 73
L-force | 9400 function library
Function blocks
L_DcSetBitOfWord - Bit operation

4.33 L_DcSetBitOfWord - Bit operation

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB sets a single bit in a "WORD" type value to "1".

L_DcSetBitOfWord
wInput wOutput
byBitNr

Inputs

Identifier/data type Information/possible settings


wInput Input signal
WORD
byBitNr No. (0 ... 15) of the bit to be set.
BYTE

Outputs

Identifier/data type Value/meaning


wOutput Value of type "word" resulting from the set bit.
WORD

74 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcSpeed_sToNorm_n - Signal converter

4.34 L_DcSpeed_sToNorm_n - Signal converter

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB uses the transmitted machine parameters and converts a 32-bit speed signal into
a scaled 32-bit signal.

L_DcSpeed_sToNorm_n
dnIn_s dnOut_n
[rpm] 32 Bit W [%] 32 Bit
AxisData

Inputs

Identifier/data type Information/possible settings


dnIn_s Input signal in [rpm]
DINT • 15000 rpm ≡ 226 ≡ 67108864
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnOut_n Output signal in [%]
DINT • 100 % ≡ 230 ≡ 1073741824

L 1.4 EN - 08/2006 75
L-force | 9400 function library
Function blocks
L_DcSpeed_sToSpeed_v - Signal converter

4.35 L_DcSpeed_sToSpeed_v - Signal converter

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB uses the transmitted machine parameters and converts a 32-bit speed signal into
a 16-bit speed signal.

L_DcSpeed_sToSpeed_v
dnIn_s nOut_v
[rpm] 32 Bit W [rpm] 16 Bit
AxisData

Inputs

Identifier/data type Information/possible settings


dnIn_s Input signal in [rpm]
DINT • 15000 rpm ≡ 226 ≡ 67108864
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


nOut_v Output signal in [rpm]
DINT • 15000 rpm ≡ 214 ≡ 16384

76 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcSpeed_vToSpeed_s - Signal converter

4.36 L_DcSpeed_vToSpeed_s - Signal converter

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB uses the transmitted machine parameters and converts a 16-bit speed signal into
a 32-bit speed signal.

L_DcSpeed_vToSpeed_s
nIn_v dnOut_s
[rpm] 16 Bit W [rpm] 32 Bit
AxisData

Inputs

Identifier/data type Information/possible settings


nIn_v Input signal in [rpm]
INT • 15000 rpm ≡ 214 ≡ 16384
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnOut_s Output signal in [rpm]
DINT • 15000 rpm ≡ 226 ≡ 67108864

L 1.4 EN - 08/2006 77
L-force | 9400 function library
Function blocks
L_DcWordTo2Bytes - Data type conversion

4.37 L_DcWordTo2Bytes - Data type conversion

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts an input value of type "WORD" into two output values of type "BYTE".

L_DcWordTo2Bytes
wInput
byOutput1
byOutput2

Inputs

Identifier/data type Information/possible settings


wInput Input value
WORD

Outputs

Identifier/data type Value/meaning


byOutput1 Output value 1 ≡ bit 0 ... bit 7 of wInput
BYTE
byOutput2 Output value 2 ≡ bit 8 ... bit 15 of wInput
BYTE

78 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcWordToBits - Bit demultiplexer

4.38 L_DcWordToBits - Bit demultiplexer

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB outputs the 16 corresponding bit values for an input value of type "WORD".

L_DcWordToBits
wInput bBit0
WORD 0
bBit1
1
bBit2
2
bBit3
3
bBit4
4
bBit5
5
bBit6
6
bBit7
7
bBit8
8
bBit9
9
bBit10
10
bBit11
11
bBit12
12
bBit13
13
bBit14
14
bBit15
15

Inputs

Identifier/data type Information/possible settings


wInput Value to be converted
WORD

Outputs

Identifier/data type Value/meaning


bBit0 Bit 0 output of byInput (valency: 20)
BOOL
bBit1 Bit 1 output of byInput (valency: 21)
BOOL
bBit2 Bit 2 output of byInput (valency: 22)
BOOL
... ...
bBit15 Bit 15 output of byInput (valency: 215)
BOOL

L 1.4 EN - 08/2006 79
L-force | 9400 function library
Function blocks
L_DcWordToByte - Type converter

4.39 L_DcWordToByte - Type converter

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts a data type "WORD" into the data type "BYTE" .

L_DcWordToByte
wIn byOut
WORD W BYTE

Inputs

Identifier/data type Information/possible settings


wIn Input signal
WORD

Outputs

Identifier/data type Value/meaning


byOut Output signal
BYTE

Function

WORD
Bit 15 Bit 0

Bit 7 Bit 0
BYTE

80 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DcWordToDWord - Type converter

4.40 L_DcWordToDWord - Type converter

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts a data type "WORD" into the data type "DWORD" .

L_DcWordToDWord
wIn dwOut
WORD W DWORD

Inputs

Identifier/data type Information/possible settings


wIn Input signal
WORD

Outputs

Identifier/data type Value/meaning


dwOut Output signal
DWORD

Function

WORD
Bit 15 Bit 0

Bit 31
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Bit 0
DWORD

L 1.4 EN - 08/2006 81
L-force | 9400 function library
Function blocks
L_DcWordToInt - Type converter

4.41 L_DcWordToInt - Type converter

Function library: LenzeDataConversion


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB converts a data type "WORD" into the data type "INT".

L_DcWordToInt
wIn nOut
WORD W INT

Inputs

Identifier/data type Information/possible settings


wIn Input signal
WORD

Outputs

Identifier/data type Value/meaning


nOut Output signal
INT

82 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DevApplErr - Error tripping

4.42 L_DevApplErr - Error tripping

Function library: LenzeDevice9400


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB serves to execute a fault handling in the application.


r Via the 8 boolean inputs up to 8 different application fault messages with
parameterisable module ID, fault ID and fault response can be released by the
application.
r If more than 8 application fault messages are required, the FB can be instanced.
r If several inputs are set to TRUE at the same time, the input with the highest number
trips the fault message.

L_DevApplErr
bError1 dnState
bError2 Error handler dnErrorNo
bError3
bError4
bError5
bError6
bError7
bError8

Inputs

Identifier/data type Information/possible settings


bError1 Input for fault message 1 (lowest priority)
BOOL FALSEÊTRUE The fault condition 1 is fulfilled and the parameterised application
fault message is output by the operating system.
FALSE The fault condition 1 is not fulfilled anymore.
... ...
bError8 Input for fault message 8 (highest priority)
BOOL FALSEÊTRUE The fault condition 8 is fulfilled and the parameterised application
fault message is output by the operating system.
FALSE The fault condition 8 is not fulfilled anymore.

L 1.4 EN - 08/2006 83
L-force | 9400 function library
Function blocks
L_DevApplErr - Error tripping

Outputs

Identifier/data type Value/meaning


dnState Display of the fault message last transmitted to the operating system.
DINT 1 Fault message 1 is active.
2 Fault message 2 is active.
4 Fault message 3 is active.
8 Fault message 4 is active.
16 Fault message 5 is active.
32 Fault message 6 is active.
64 Fault message 7 is active.
128 Fault message 8 is active.
dnErrorNo Current fault number
DINT

Parameters

Parameters Possible settings Information


C05900 980 999 Module ID
• Initialisation: 999
C05901/1...8 0 65535 Fault ID
• Initialisation: 0
C05902/1...8 Fault response
0 None
1 Fault
2 Trouble
3 Quick stop by trouble
4 Warning locked
5 Warning
6 Information

84 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DevBrakeStateDecoder - Status signals of the basic function "Brake control"

4.43 L_DevBrakeStateDecoder - Status signals of the basic function "Brake control"

Function library: LenzeDevice9400


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB decodes the status output signal dnState of the SB LS_Brake into individual boolean
status signals for further use in the FB interconnection.
r The functionality corresponds to a converter "DINTBOOL", but the boolean outputs of
this FB have the same names according to their meaning.

L_DevBrakeStateDecoder
dnState bActive
bModulUsed
bBrakeReleased
LS_Brake state bErrorActive
bGrindIn
bTorqueTest
bDirectMode
bAutoMode
bErrExtFeedback
bErrPosDrift
bErrModul
bTimeActivate
bGrindInDone
bTorqueTestDone

Inputs

Identifier/data type Information/possible settings


dnState Input for the bit-coded status signal of the basic function "Brake control".
DINT • Connect this input with the output of the same name of the SB LS_Brake.

L 1.4 EN - 08/2006 85
L-force | 9400 function library
Function blocks
L_DevBrakeStateDecoder - Status signals of the basic function "Brake control"

Outputs
The boolean outputs have the following meaning when the value is TRUE:

Bit* Identifier Meaning in case of TRUE


1 bActive Brake control is active.
4 bModulUsed Brake module is used.
8 bBrakeReleased Brake status (internal status signal).
15 bErrorActive Brake error is active (collective message).
16 bGrindIn Status "Brake grinding-in".
17 bTorqueTest Status "Brake test".
18 bDirectMode Status "Direct control".
19 bAutoMode Status "Automatic control".
20 bErrExtFeedback Fault: External feedback.
21 bErrPosDrift Fault: Position drift when brake is applied/during brake test.
22 bErrModul Fault: Brake module monitoring.
23 bTimeActivate Information: Brake activation via waiting time.
24 bGrindInDone Information: Brake grinding-in is completed.
25 bTorqueTestDone Information: Brake test is completed.
* Relating to the input signal dnState.

86 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DevDriveInterfaceStateDecoder - Status signals of the drive interface

4.44 L_DevDriveInterfaceStateDecoder - Status signals of the drive interface

Function library: LenzeDevice9400


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB decodes the status output signal dnState of the SB LS_DriveInterface into
individual boolean status signals for further use in the FB interconnection.
r The functionality corresponds to a converter "DINTBOOL", but the boolean outputs of
this FB have the same names according to their meaning.

L_DevDriveInterfaceStateDecoder
dnState bActive
bDone
bAccDec
bCcw
bHomePosOK
bBrakeReleased
bZeroPos
LS_DriveInterface state

bErrorActive
bTorqueFollower
bSpeedFollower
bPositionFollower
bFollowerActive
bPositioningActive
bHomingActive
bManualJogActive
bBrakeTestActive
bStandstillActive
bStoppingActive
bQspActive
bDriveNotReady
bInit
bFail
bNotOperational

Inputs

Identifier/data type Information/possible settings


dnState Input for the bit-coded status signal of the drive interface.
DINT • Connect this input with the output of the same name of the
SB LS_DriveInterface.

L 1.4 EN - 08/2006 87
L-force | 9400 function library
Function blocks
L_DevDriveInterfaceStateDecoder - Status signals of the drive interface

Outputs
The boolean outputs have the following meaning when the value is TRUE:

Bit* Identifier Meaning in case of TRUE


1 bActive Basic function is active.
2 bDone Basic function is completed.
3 bAccDec Acceleration/deceleration phase is active.
5 bCcw Counter-clockwise rotation is active.
7 bHomePosOK Home position is known.
8 bBrakeReleased Brake is released.
10 bZeroPos Zero crossing detected or position = "0".
15 bErrorActive Fault is active.
16 bTorqueFollower Torque follower is active.
17 bSpeedFollower Speed follower is active.
18 bPositionFollower Position follower is active.
19 bFollowerActive Setpoint follower is active (group signal for bit 16 ...18.)
20 bPositioningActive Positioning is active.
21 bHomingActive Homing is active.
22 bManualJogActive Manual jog is active.
23 bBrakeTestActive Brake test is active.
24 bStandstillActive Drive is at standstill.
25 bStoppingActive Stopping (standard stop) is active.
26 bQspActive Quick stop is active.
28 bDriveNotReady Controller is not ready.
29 bInit Controller is being initialised.
30 bFail Fault
31 bNotOperational State machine for the basic functions is not ready.
* Relating to the input signal dnState.

88 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DevHomingStateDecoder - Status signals of the basic function "Homing"

4.45 L_DevHomingStateDecoder - Status signals of the basic function "Homing"

Function library: LenzeDevice9400


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB decodes the status output signal dnState of the SB LS_Homing into individual
boolean status signals for further use in the FB interconnection.
r The functionality corresponds to a converter "DINTBOOL", but the boolean outputs of
this FB have the same names according to their meaning.

L_DevHomingStateDecoder
dnState bActive
bDone
bAccDec
LS_Homing state bCcw
bHomePosOK
bErrorActive
bRefMarkDetect
bTPDetect
bLimProfile
bLimDir
bLimAbort
bStoppingActive
bErrPG

Inputs

Identifier/data type Information/possible settings


dnState Input for the bit-coded status signal of the basic function "Homing".
DINT • Connect this input with the output of the same name of the SB LS_Homing.

L 1.4 EN - 08/2006 89
L-force | 9400 function library
Function blocks
L_DevHomingStateDecoder - Status signals of the basic function "Homing"

Outputs
The boolean outputs have the following meaning when the value is TRUE:

Bit* Identifier Meaning in case of TRUE


1 bActive Homing is active.
2 bDone Homing is completed.
3 bAccDec Acceleration/deceleration phase is active.
5 bCcw Counter-clockwise rotation is active.
7 bHomePosOK Home position is known.
15 bErrorActive Fault is active.
16 bRefMarkDetect Pre-stop (home switch) has been detected.
17 bTPDetect Touch probe/zero pulse has been detected.
21 bLimProfile Profile data is limited by the basic function "Limiter" (SB LS_Limiter).
22 bLimDir Direction is inhibited by the basic function "Limiter" (SB LS_Limiter).
23 bLimAbort Abort by basic function "Limiter" (SB LS_Limiter).
25 bStoppingActive Stopping (standard stop) is active.
30 bErrPG Error during profile generation.
* Relating to the input signal dnState.

90 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DevLimiterStateDecoder - Status signals of the basic function "Limiter"

4.46 L_DevLimiterStateDecoder - Status signals of the basic function "Limiter"

Function library: LenzeDevice9400


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB decodes the status output signal dnState of the SB LS_Limiter into individual
boolean status signals for further use in the FB interconnection.
r The functionality corresponds to a converter "DINTBOOL", but the boolean outputs of
this FB have the same names according to their meaning.

L_DevLimiterStateDecoder
dnState bCinhForced
bQSPForced
bQSP2Forced
bLimSpeed1
bLimSpeed2
bLimSpeed3
LS_Limiter state

bLimSpeed4
bLimNegDir
bLimPosDir
bLimTipDistance
bLimSetPos
bHWLimitPos
bHWLimitNeg
bSWLimitPos
bSWLimitNeg
bLimSpeed
bLimAcc
bLimDec

Inputs

Identifier/data type Information/possible settings


dnState Input for the bit-coded status signal of the basic function "Limiter".
DINT • Connect this input with the output of the same name of the SB LS_Limiter.

L 1.4 EN - 08/2006 91
L-force | 9400 function library
Function blocks
L_DevLimiterStateDecoder - Status signals of the basic function "Limiter"

Outputs
The boolean outputs have the following meaning when the value is TRUE:

Bit* Identifier Meaning in case of TRUE


0 bCinhForced Controller inhibit is initiated.
(Safe torque off is requested.)
1 bQSPForced Quick stop is initiated.
(Safe stop 1 is requested.)
2 bQSP2Forced Quick stop is initiated.
(Safe stop 2 is requested.)
3 bLimSpeed1 Profile change due to speed limitation.
(Limited speed 1 is requested.)
4 bLimSpeed2 Profile change due to speed limitation.
(Limited speed 2 is requested.)
5 bLimSpeed3 Profile change due to speed limitation.
(Limited speed 3 is requested.)
6 bLimSpeed4 Profile change due to speed limitation.
(Limited speed 4 is requested.)
7 bLimNegDir Only positive direction of rotation is permissible.
• When the direction of rotation is negative while requesting "Only positive
direction of rotation", the drive is braked to standstill.
8 bLimPosDir Only negative direction of rotation is permissible.
• When the direction of rotation is negative while requesting "Only negative
direction of rotation", the drive is braked to standstill.
10 bLimTipDistance Increment in manual jog mode is limited.
12 bLimSetPos Limitation of the set position is active.
16 bHWLimitPos Positive limit switch inhibits travel in positive direction.
17 bHWLimitNeg Negative limit switch inhibits travel in positive direction.
18 bSWLimitPos Positive software limit position inhibits travel in positive direction.
19 bSWLimitNeg Negative software limit position inhibits travel in negative direction.
20 bLimSpeed Limitation of speed is active.
21 bLimAcc Limitation of acceleration is active.
22 bLimDec Limitation of deceleration is active.
23 bLimJerk Limitation of jerk is active (S-ramp time is increased).
* Relating to the input signal dnState.

92 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_DevManualJogStateDecoder - Status signals of the basic function "ManualJog"

4.47 L_DevManualJogStateDecoder - Status signals of the basic function "ManualJog"

Function library: LenzeDevice9400


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB decodes the status output signal dnState of the SB LS_ManualJog into individual
boolean status signals for further use in the FB interconnection.
r The functionality corresponds to a converter "DINTBOOL", but the boolean outputs of
this FB have the same names according to their meaning.

L_DevManualJogStateDecoder
dnState bActive
bDone
bAccDec
LS_ManualJog state bCcw
bErrorActive
bErrJogNegRelease
bErrJogNegJogPos
bErrJogPosRelease
bJogSpeed2
bJogSpeed1
bLimDirPos
bLimDirNeg
bAbort
bStoppingActive
bErrPG

Inputs

Identifier/data type Information/possible settings


dnState Input for the bit-coded status signal of the basic function "ManualJog".
DINT • Connect this input with the output of the same name of the SB LS_ManualJog.

L 1.4 EN - 08/2006 93
L-force | 9400 function library
Function blocks
L_DevManualJogStateDecoder - Status signals of the basic function "ManualJog"

Outputs
The boolean outputs have the following meaning when the value is TRUE:

Bit* Identifier Meaning in case of TRUE


1 bActive Manual jog is active.
2 bDone Manual jog is completed.
3 bAccDec Acceleration/deceleration phase is active.
5 bCcw Counter-clockwise rotation is active.
15 bErrorActive Impermissible state (see bit 16, 17, 18, 22, 23).
16 bErrJogNegRelease Stop by simultaneous selection of negative direction and retraction from limit
switch.
17 bErrJogNegJogPos Stop by simultaneous selection of positive and negative direction.
18 bErrJogPosRelease Stop by simultaneous selection of positive direction and retraction from limit
switch.
20 bJogSpeed2 Manual jog speed 2 is active.
21 bJogSpeed2 Manual jog speed 1 is active.
22 bLimDirPos Stop by selection of positive direction and simultaneous activation of the positive
software limit position or the positive limit switch.
23 bLimDirNeg Stop by selection of negative direction and simultaneous activation of the negative
software limit position or the negative limit switch.
24 bAbort General abort (deramping of the speed setpoint)
• E.g. when a direction initiator for manual jog is released or an impermissible state
occurs (see bit 16, 17, 18, 22, 23).
25 bStoppingActive Stopping is active.
30 bErrPG Error during profile generation.
* Relating to the input signal dnState.

94 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_LdAddOffsetCyclic - Offset addition

4.48 L_LdAddOffsetCyclic - Offset addition

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB adds an offset to a clocked position and returns the value to the clock pulse.
r The cycle and shift factor for the position resolution are read out of the machine
parameters (AxisData).
r The clock pulse is created without remainder processing.

L_LdAddOffsetCyclic
dnState
dnPosIn_p dnPosOut_p
dnOffset_p
AxisData

Inputs

Identifier/data type Information/possible settings


dnPosIn_p Clocked position in [inc]
DINT
dnOffset_p Offset in [inc]
DINT
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 10 Zero crossing active
Bit 15 Fault
Bit 18 No cycle available
Bit 21 Input error (e.g. impermissible position jump or inverse direction of
motion)
Bit 23 No valid axis data structure
dnPosOut_p Position output in [inc]
DINT

L 1.4 EN - 08/2006 95
L-force | 9400 function library
Function blocks
L_LdClutchAxisP - Virtual clutch for synchronism

4.49 L_LdClutchAxisP - Virtual clutch for synchronism

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB provides the "Virtual clutch" function with position reference for the "Synchronism"
application.

L_LdClutchAxisP
dnSetPosition_p dnState
dnActPosition_p bInTarget
dnOpenPosition_p bOpen
bEnable bAccDec
bClose dnPosOut_p
bOpenInstant
AxisData

Inputs

Identifier/data type Information/possible settings


dnSetPosition_p Selection of an external master position in [inc]
DINT • E.g. by an absolute value encoder or a virtual master.
• The external master position must be within the cycle.
• C05078 indicates the position of the master shaft in the real unit of the machine.
dnActPosition_p Internal master position of the clutch function in [inc]
DINT • The internal master position must be within the cycle.
• C05077 indicates the master position in the real unit of the machine.
dnOpenPosition_p Selection of the stop position after decoupling or selection of the starting position
DINT when engaging the master shaft in [inc].
• The stop position/starting position must be within the cycle.
• C05076 indicates the stop position in the real unit of the machine.
bEnable Activate the clutch function
BOOL • This input has the highest priority.
FALSE Clutch function is deactivated.
• The input dnSetPosition_p connected 1:1 to the output
dnPosOut_p. No ramps are active.
TRUE Clutch function is activated.
bClose Control of clutch function
BOOL FALSE Open the clutch.
• The master position dnPosOut_p is positioned via the set ramp to
the stop position dnOpenPosition_p.
TRUE Close the clutch.
• The master position dnPosOut_p is synchronised via the set ramp
and follows the master shaft dnSetPosition_p after it has been
clutched in.

96 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_LdClutchAxisP - Virtual clutch for synchronism

Identifier/data type Information/possible settings


bOpenInstant Positive opening operation of the clutch.
BOOL • This input has the second highest priority (after bEnable).
FALSEÊTRUE The master position dnPosOut_p is separated from the master shaft
and stopped via the set ramp.
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 1 State active
Bit 2 Procedure completed
Bit 3 Acceleration/deceleration phase
Bit 8 Brake/clutch closed
Bit 9 Waiting for clutch process
Bit 15 Fault
Bit 16 Starting position is beyond the cycle
Bit 18 No cycle available
Bit 19 Maximum speed = "0"
Bit 21 Input error (e.g. impermissible position jump or inverse direction of
motion)
Bit 23 No valid axis data structure
bInTarget Status signal "Position reached"
BOOL TRUE Position reached.
bOpen Status signal "Clutch/declutch process is active"
BOOL FALSE Clutch is closed, master position follows the master shaft.
TRUE Master position is synchronised to the master shaft after the clutch
is closed or the master position is shut down after the clutch is
opened.
• dnActPosition_p and dnSetPosition_p are not synchronous!
bAccDec Status signal "Ramp function of the clutch is active"
BOOL FALSE Ramp function of the clutch is not active.
• The clutch is closed or the master position is shut down.
TRUE Ramp function of the clutch is active.
• The master position is synchronised or shut down.
dnPosOut_p Master position output (current position of the master shaft in the cycle) in [inc]
DINT • C05079 indicates the current master position in the real unit of the machine.

L 1.4 EN - 08/2006 97
L-force | 9400 function library
Function blocks
L_LdClutchAxisP - Virtual clutch for synchronism

Parameters

Identifier/data type Possible settings Information


Index
C05070/1 0.010 s 130.000 Clutch in ramp
• Acceleration ramp for
synchronising to the master shaft.
• Initialisation: 1.000 s
C05070/2 0.010 s 130.000 Decoupling ramp
• Deceleration ramp for shutdown
of the master position.
• Initialisation: 1.000 s
C05070/3 0.010 s 130.000 Ramp stop
• Deceleration ramp for the positive
opening operation.
• Initialisation: 1.000 s
C05074 -2147483647 2147483647 Status
• Display of the bit-coded output
signal dnState.
C05076 -214748.3647 unit 214748.3647 Standstill position selection
• Display of the input signal
dnOpenPosition_p in the real unit
of the machine.
C05077 -214748.3647 unit 214748.3647 Master position
• Display of the input signal
dnActPosition_p in the real unit of
the machine.
C05078 -214748.3647 unit 214748.3647 Master shaft
• Display of the input signal
dnSetPosition_p in the real unit of
the machine.
C05079 -214748.3647 unit 214748.3647 Current master position
• Display of the input signal
dnPosOut_p in the real unit of the
machine.

98 1.4 EN - 08/2006 L
L-force | 9400 function library
Function blocks
L_LdClutchV - Virtual clutch for electronic gearboxes

4.50 L_LdClutchV - Virtual clutch for electronic gearboxes

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB provides the "Virtual clutch" function with speed reference for the "Electronic
gearbox" application.

L_LdClutchV
dnSpeedIn_s dnState
dnSetSpeed_s bOpen
bEnable bAccDec
bClose dnSpeedOut_s
bOpenInstant
AxisData

Inputs

Identifier/data type Information/possible settings


dnSpeedIn_s Setpoint speed
DINT • At this input, the FB expects a speed in [rpm]. The machine parameters at the
input AxisData are used as speed reference.
• C05088 indicates the setpoint speed in the real unit of the machine.
dnSetSpeed_s Basic speed
DINT • At this input, the FB expects a speed in [rpm]. The machine parameters at the
input AxisData are used as speed reference.
• The selected speed is output at dnSpeedOut_s when the clutch is open.
• C05087 indicates the basic speed in the real unit of the machine.
bEnable Activate the clutch function
BOOL • This input has the highest priority.
FALSE Clutch function is deactivated.
• The input dnSpeedIn_s is connected through 1:1 to output
dnSpeedOut_s. No ramps are active.
TRUE Clutch function is activated.
bClose Control of clutch function
BOOL FALSE Open the clutch.
• The master speed dnSpeedOut_s is led to the basic speed
dnSetSpeed_s via the set ramp.
TRUE Close the clutch.
• The master speed dnSpeedOut_s is synchronised to the setpoint
speed dnSpeedIn_s via the set ramp.
bOpenInstant Positive opening operation of the clutch.
BOOL • This input has the second highest priority (after bEnable).
FALSEÊTRUE The master speed dnSpeedOut_s is separated from the master shaft
and stopped via the set ramp.
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

L 1.4 EN - 08/2006 99
L-force | 9400 function library
Function blocks
L_LdClutchV - Virtual clutch for electronic gearboxes

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 1 State active
Bit 3 Acceleration/deceleration phase
Bit 8 Brake/clutch closed
Bit 15 Fault
Bit 23 No valid axis data structure
bOpen Status signal "Clutch/declutch process is active"
BOOL FALSE Clutch is closed, dnSpeedOut_s follows dnSpeedIn_s.
TRUE dnSpeedOut_s is asynchronous to dnSpeedIn_s and is led via the
internal profile generator.
bAccDec Status signal "Ramp function of the clutch is active"
BOOL FALSE Ramp function of the clutch is not active.
• The clutch is closed or the master speed is shut down.
TRUE Ramp function of the clutch is active.
• The master speed is accelerated or decelerated.
dnSpeedOut_s Speed output in [rpm]
DINT • C05089 indicates the speed in the real unit of the machine.

Parameters

Identifier/data type Possible settings Information


Index
C05080/1 0.010 s 130.000 Clutch in ramp
• Acceleration ramp for
synchronising to dnSpeedIn_s.
• Initialisation: 1.000 s
C05080/2 0.010 s 130.000 Decoupling ramp
• Deceleration ramp for
synchronising to dnSetSpeed_s.
• Initialisation: 1.000 s
C05080/3 0.010 s 130.000 Ramp stop
• Deceleration ramp for the positive
opening operation.
• Initialisation: 1.000 s
C05083 0.010 s 130.000 Jerk limitation
• S-ramp time for jerk limitation.
• Initialisation: 1.000 s
C05085 -2147483647 2147483647 Status
• Display of the bit-coded output
signal dnState.
C05087 -214748.3647 unit 214748.3647 Basic speed
• Read only
• Calculated from the speed signal
dnSetSpeed_s.

100 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdClutchV - Virtual clutch for electronic gearboxes

Identifier/data type Possible settings Information


Index
C05088 -214748.3647 unit 214748.3647 Setpoint speed
• Read only
• Calculated from the speed signal
dnSpeedIn_s.
C05089 -214748.3647 unit 214748.3647 Output speed
• Read only
• Calculated from the speed signal
dnSpeedOut_s.

L 1.4 EN - 08/2006 101


L-force | 9400 function library
Function blocks
L_LdConvAxisV - Speed ratio

4.51 L_LdConvAxisV - Speed ratio

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB transforms a speed between two axes.

L_LdConvAxisV
bEnable dnState
v
dnSpeedIn_s dnSpeedOut_s
XAxisData
YAxisData t

Inputs

Identifier/data type Information/possible settings


bEnable Activate function
BOOL FALSE Output speed = "0".
TRUE Output speed = transformed input speed.
dnSpeedIn_s Selection of the master speed
DINT • At this input, the FB expects a speed in [rpm]. The machine parameters at the
input AxisData are used as speed reference.
• C05165/1 indicates the master speed in the real unit of the machine.
XAxisData Machine parameters for scaling the master speed (master shaft)
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)
YAxisData Machine parameters for scaling the setpoint speed (tool)
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 14 Internal limitation for calculation
Bit 15 Fault
Bit 23 No valid axis data structure
dnSpeedOut_s Setpoint speed output as speed in [rpm]
DINT • C05165/2 indicates the setpoint speed in the real unit of the machine.

102 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdConvAxisV - Speed ratio

Parameters

Identifier/data type Possible settings Information


Index
C05160 Operating mode
0 Unit coupling Lenze setting
1 Clock equality
2 Free coupling
C05161/1 0 unit 2147483647 Cycle X
• Read only
C05161/2 0 unit 2147483647 Cycle Y
• Read only
C05162/1 0.0000 214748.3647 Reference variable X
• Initialisation: 0.0000
C05162/2 0.0000 214748.3647 Reference variable Y
• Initialisation: 0.0000
C05163/1 String of digits User unit X
• Read only
C05163/2 String of digits User unit Y
• Read only
C05165/1 -2147483647 unit/t 2147483647 Master speed
• Read only
• Calculated from the speed signal
dnSpeedIn_s.
C05165/2 -2147483647 unit/t 2147483647 Setpoint speed
• Read only
• Calculated from the speed signal
dnSpeedOut_s.
C05169 -2147483647 2147483647 Status
• Display of the bit-coded output
signal dnState.

L 1.4 EN - 08/2006 103


L-force | 9400 function library
Function blocks
L_LdConvAxisV - Speed ratio

Function
This FB transforms a speed between two axes, calculating the function of an electronic
gearbox. The transformation works with remainder processing.
Operating mode 0 (unit coupling):
r In this operating mode, the FB couples both axes via the set feed constants.
r Via C05162/1 and C05162/2 the ratio of the corresponding units is set, i.e. how many
units of the X axis correspond to how many units of the Y axis.
Operating mode 1 (clock equality):
r In this operating mode the FB makes use of the set cycles. The transformation displays
one cycle of the X axis exactly in one cycle of the Y axis.
Operating mode 2 (free coupling):
r In this operating mode the set feed constants are not used for the transformation.
r Via C05162/1 and C05162/2 the revolution ratio is indicated, i.e. how many revolutions
of the master shaft correspond to how many revolutions of the tool.

104 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdDifferentiateCyclic - Cyclic differentiation

4.52 L_LdDifferentiateCyclic - Cyclic differentiation

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB differentiates a position into a speed (by analogy with the FB L_SdDifferentiate) in
consideration of the cycle.
r The cycle and shift factor for the position resolution are read out of the machine
parameters (AxisData).
r The clock pulse is created with remainder processing.
r The FB is the counterpart of the FB L_LdIntegrateCyclic. (C 110)

L_LdDifferentiateCyclic
dnState
dnPosIn_p dnSpeedOut_s
AxisData

Inputs

Identifier/data type Information/possible settings


dnPosIn_p Clocked position in [inc]
DINT • Scaling: 1 motor revolution ≡ 216 (or acc. to AxisData)
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 10 Zero crossing active
Bit 14 Internal limitation for calculation
Bit 15 Fault
Bit 18 No cycle available
Bit 21 Input error (e.g. impermissible position jump or inverse direction of
motion)
Bit 23 No valid axis data structure
dnSpeedOut_s Speed
DINT • Scaling: 15000 rpm ≡ 226 ≡ 67108864

L 1.4 EN - 08/2006 105


L-force | 9400 function library
Function blocks
L_LdExtrapolate - Extrapolation

4.53 L_LdExtrapolate - Extrapolation

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB serves to extrapolate position information in order to e.g. compensate higher bus
transmission cycles or smooth absolute value encoders with low resolution. A forced
extrapolation is also possible.

L_LdExtrapolate
bEnable bBusy
bForced bLimit
dnPosIn_p bError
dnSpeedOut_s
AxisData dnPosOut_p

Inputs

Identifier/data type Information/possible settings


bEnable Activate extrapolation
BOOL FALSE The master value at dnPosIn_p is connected through 1:1 to the
output dnPosOut_p.
TRUE The master value at dnPosIn_p is output to dnPosOut_p depending
on the input bForce and the number of the extrapolation cycles set in
C05000.
bForced Forced extrapolation
BOOL FALSE Extrapolation is only executed if the input value in the task cycle
does not change, for instance, since the fieldbus cycle is longer and
does not provide new position values in the task cycle.
TRUE Extrapolation is executed irrespective of master value changes.
dnPosIn_p Position of the external, and, as the case may be, insufficiently resolved master shaft
DINT in [inc].
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


bBusy Status signal "Extrapolation is executed"
BOOL TRUE Extrapolation is executed.
bLimit Status signal "Extrapolation limit reached"
BOOL TRUE Extrapolation limit (C05000) reached.
bError "Fault" status signal
BOOL TRUE Master position dnPosIn_p has exceeded the cycle defined in the
machine parameters (AxisData).

106 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdExtrapolate - Extrapolation

Identifier/data type Value/meaning


dnSpeedOut_s Master speed output (in the cycle) as speed in [rpm]
DINT • C05007 indicates the master speed in the real unit of the machine.
dnPosOut_p Master position output (in the cycle) in [inc]
DINT • C05008 indicates the master position in the real unit of the machine.

Parameters

Identifier/data type Possible settings Information


Index
C05000 1 127 Number of extrapolation cycles
• Initialisation: 1
C05007 -214748.3647 unit/t 214748.3647 Current speed
• Read only
• Calculated from the speed signal
dnSpeedOut_s.
C05008 -214748.3647 unit 214748.3647 Current position
• Display of the input signal
dnPosOut_p in the real unit of the
machine.
C05009 Fault master value cycle
0 No fault • Read only

1 Fault

L 1.4 EN - 08/2006 107


L-force | 9400 function library
Function blocks
L_LdExtrapolate - Extrapolation

4.53.1 Function

Compensation of bus transmission cycles > Sampling rate


If position information (e.g. the vertical shaft position) is exchanged between master and
slave drives via a bus system with a transmission cycle higher than the sampling rate or
between tasks with different cycle times, the setpoints cannot be processed in the control
cycle of the drives. As a result, the position does not change linearly but stepwise at
constant speed, which causes torque impulses.

dnPosIn_p r This FB serves to smooth the stepping


dnPosOut_p by extrapolation.
r The number of the extrapolation cycles
to be set in C05000 are defined
according to the following formula:
t Bus cycle [ms]
C05000 = --------------------------------------
5 cycles Task cycle [ms]

[4-1] Example: Signal characteristic with five extrapolation cycles

Note!
Ensure that the number of extrapolation cycles amounts to an integer value so
that the position information increases linearly and the speed can be calculated
correctly.
• If a smaller value is set than calculated according to the formula mentioned
above, the extrapolation limit is reached and this is displayed by the output
bLimit. In this case, dnPosIn_p is directly connected through to dnPosOut_p.
• If a higher value is set than calculated according to the formula mentioned
above, it has no impact.

r By setting bEnable to TRUE, the extrapolation is activated.


r If bEnable is set to FALSE, the input signal is only looped through or the difference for
speed output is created.

108 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdExtrapolate - Extrapolation

Smoothing of a low-resolution absolute value encoder


If the resolution of the absolute value encoder is so low that a new setpoint is not available
for every new task call, this FB serves to "fine-interpolate" between the setpoints for a
better smooth running.
r For this purpose enter instead of the bus cycle time the resolution converted at
minimum speed into the formula mentioned above for calculating the extrapolation
cycles.

Forced extrapolation
Forced extrapolation means that it is extrapolated up to the maximum value in C05000
irrespective whether the input signal has changed or not.
r The forced extrapolation is activated by setting bForced to TRUE.

L 1.4 EN - 08/2006 109


L-force | 9400 function library
Function blocks
L_LdIntegrateCyclic - Cyclic integration

4.54 L_LdIntegrateCyclic - Cyclic integration

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB integrates a speed in a position (by analogy with the FB L_SdIntegrate) in


consideration of the cycle.
r It is possible to add a position offset to the output position, e.g. for trimming purposes.
This function corresponds exactly to the FB L_LdAddOffsetCyclic. (C 95)
r The cycle and shift factor for the position resolution are read out of the machine
parameters (AxisData).
r The clock pulse is created with remainder processing.
r The FB is the counterpart of the FB L_LdDifferentiateCyclic. (C 105)

L_LdIntegrateCyclic
dnState
dnSpeedIn_s dnPosOut_p
bLoadStartPos dnSpeedOut_s
dnStartPos_p
dnPosOffset_p
AxisData

Inputs

Identifier/data type Information/possible settings


dnSpeedIn_s Speed
DINT • 15000 rpm ≡ 226 ≡ 67108864
bLoadStartPos Load the integrator with starting position
BOOL TRUE Load the integrator with the value at the dnStartPos_p input.
dnStartPos_p Starting position in [inc] with which the integrator is loaded by setting
DINT bLoadStartPos to TRUE.
dnPosOffset_p Position offset in [inc]
DINT
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)
• If this input is released, the following scaling applies:
1 motor revolution ≡ 216

110 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdIntegrateCyclic - Cyclic integration

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 10 Zero crossing active
Bit 14 Internal limitation for calculation
Bit 15 Fault
Bit 18 No cycle available
Bit 21 Input error (e.g. impermissible position jump or inverse direction of
motion)
Bit 23 No valid axis data structure
dnPosOut_p Position output in [inc]
DINT
dnSpeedOut_s Speed output in [rpm]
DINT • Under consideration of the selected position offset.

L 1.4 EN - 08/2006 111


L-force | 9400 function library
Function blocks
L_LdLinearCoupling - Master value connection

4.55 L_LdLinearCoupling - Master value connection

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB serves as master value connection for the "synchronism" application.


r The cycle of the X axis is synchronous to the cycle of the Y axis, i.e. in case of an overflow
of the X axis, there would also be a new cycle for the Y axis.

L_LdLinearCoupling
bEnable dnState
X
bXReset bXZeroPos
dnXPosIn_p dnYSetPosCycle_p
dnXOffset_p t dnYSpeedOut_s
Y
XAxisData dnXSpeedOut_s
YAxisData dnXActPos_p
t

Inputs

Identifier/data type Information/possible settings


bEnable Activate function
BOOL TRUE Function is activated.
bXReset Reset the master value selection dnXPosIn_p internally
BOOL FALSE Output corresponds to dnXPosIn_p + dnXOffset_p.
TRUE Master value selection dnXPosIn_p is internally set to and held at "0".
Output corresponds to dnXOffset_p.
dnXPosIn_p Master value selection in [inc]
DINT • C05186 indicates the master position in the real unit of the machine.
dnXOffset_p Phase offset selection for the master value in [inc]
DINT • The phase offset is applied immediately.
• C05187 indicates the phase offset in the real unit of the machine.
XAxisData Machine parameters for scaling the master value
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)
YAxisData Machine parameters for scaling the setpoint
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.

112 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdLinearCoupling - Master value connection

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 10 Zero crossing active
Bit 14 Internal limitation for calculation
Bit 15 Fault
Bit 16 Starting position is beyond the cycle
Bit 18 No cycle available
Bit 22 No cycle available for Y axis
Bit 23 No valid axis data structure
bXZeroPos Status signal "Zero position/zero crossing"
BOOL • The input signal dnXActPos_p is the reference.
FALSE Master value is at any position in the master value cycle (register)
TRUE Permanently:
Master value is at the zero position of the master value integrator.
For one cycle:
Zero crossing of the master value integrator.
dnYSetPosCycle_p Setpoint position output in [inc]
DINT • Output of the position setpoint in the setpoint cycle as a function of the master
value (master value cycle).
• The return of master value cycle and setpoint cycle depend on the corresponding
cycles set. Thus, the return is firmly linked to the master value cycle.
• C05189 indicates the setpoint position in the real unit of the machine.
dnYSpeedOut_s Setpoint speed output as speed in [rpm]
DINT • C05184 indicates the setpoint speed in the real unit of the machine.
dnXSpeedOut_s Master speed output as speed in [rpm]
DINT • C05183 indicates the master speed in the real unit of the machine.
dnXActPos_p Master position output in [inc]
DINT • Results from MODULO(dnXOffset_p + dnXPosIn_p)
• C05188 indicates the master position in the real unit of the machine.

Parameters

Identifier/data type Possible settings Information


Index
C05181 -214748.3647 214748.3647 Status
• Display of the bit-coded output
signal dnState.
C05183 -214748.3647 unit/t 214748.3647 Current master speed
• Read only
• Calculated from the speed signal
dnXSpeedOut_s.
C05184 -214748.3647 unit/t 214748.3647 Setpoint speed
• Read only
• Calculated from the speed signal
dnYSpeedOut
_s.
C05186 -214748.3647 unit 214748.3647 Position
• Display of the input signal
dnXPosIn_p in the real unit of the
machine.

L 1.4 EN - 08/2006 113


L-force | 9400 function library
Function blocks
L_LdLinearCoupling - Master value connection

Identifier/data type Possible settings Information


Index
C05187 -214748.3647 unit 214748.3647 Master value trimming
• Display of the input signal
dnXOffset_p in the real unit of the
machine.
C05188 -214748.3647 unit 214748.3647 Current master value
• Display of the output signal
dnXActPos_p in the real unit of the
machine.
C05189 -214748.3647 unit 214748.3647 Current set position
• Display of the output signal
dnYSetPosCycle_p in the real unit
of the machine.

114 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdMarkSync - Mark synchronisation

4.56 L_LdMarkSync - Mark synchronisation

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB is used for mark synchronisation in synchronism and cam profiler applications.
r The FB monitors an encoder signal and interpolates the corresponding position when a
touch probe occurs. The difference to the setpoint position where the touch probe was
expected is determined.
r The assigned correction speed is integrated to a correction offset that is used to correct
the detected deviation.
r For mark correction, connect the FB with a suitable controller, e.g. with the
FB L_LdPosCtrlLin. (C 121)

L_LdMarkSync
bEnable dnState
dnMakeUpLeeway_s dnPosOffset_p
bResetPos dnActDifference_p
dnActPos_p dnTpDifference_p
dnTpTimeLag dnTpTpDistance_p
bTpReceived dnTpPos_p
dnTpSetPos_p
AxisData

Inputs

Identifier/data type Information/possible settings


bEnable Activate FB
BOOL TRUE FB is activated.
dnMakeUpLeeway_s Selection (addition) the compensating speed
DINT • At this input, the FB expects a speed in [rpm]. The machine parameters at the
input AxisData are used as speed reference.
bResetPos Reset internal offset integrator
BOOL TRUE The offset integrator is reset.
dnActPos_p Current encoder position in [inc]
DINT
dnTpTimeLag Input for accepting the time stamp
DINT • Connect this input with the output dnTouchProbeTimeLag of the corresponding
touch probe system block.
bTpReceived Input for taking over the status "Touch probe detected""
BOOL • Connect this input with the output dnTouchProbeReceived of the corresponding
touch probe system block.

L 1.4 EN - 08/2006 115


L-force | 9400 function library
Function blocks
L_LdMarkSync - Mark synchronisation

Identifier/data type Information/possible settings


dnTpSetPos_p Touch probe setpoint position in [inc]
DINT
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnState Status
DINT Bit 3 Internal limitation for calculation
Bit 4 Fault
Bit 23 No valid axis data structure
dnPosOffset_p Integrated position offset in [inc]
DINT • Used as correction position for the master value or the tool position.
dnActDifference_p Current position difference in [inc]
DINT • Is reduced through integration.
dnTpDifference_p Last TP deviation in [inc]
DINT
dnTpTpDistance_p Distance between the last two touch probes in [inc]
DINT • For instance to measure the real actual register.
dnTpPos_p Detected TP position in [inc]
DINT

116 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdMonitFollowError - Following error monitoring

4.57 L_LdMonitFollowError - Following error monitoring

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB serves to implement a following error monitoring.

L_LdMonitFollowError
bEnable bError
dnFollowErrorIn_p dnFollowErrorOut_p
dwHysteresis_p
dwLimitError_p
AxisData

Inputs

Identifier/data type Information/possible settings


bEnable Activate monitoring function
BOOL TRUE Monitoring function is activated.
dnFollowErrorIn_p Following error in [inc]
DINT • C05175 indicates the following error in the real unit of the machine.
dwHysteresis_p Hysteresis for switching threshold in [inc]
DINT
dwLimitError_p Switching threshold for positive and negative following error in [inc]
DINT
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


bError Status signal "following error"
BOOL TRUE Following error of a higher switching threshold.
dnFollowErrorOut_p Following error in [inc]
DWORD

L 1.4 EN - 08/2006 117


L-force | 9400 function library
Function blocks
L_LdMonitFollowError - Following error monitoring

Parameters

Identifier/data type Possible settings Information


Index
C05175 -214748.3647 unit 214748.3647 Following error input
• Display of the input signal
dnFollowErrorIn_p in the real unit
of the machine.
C05178 Status message
FALSE Following error of a lower switching • Read only
threshold
TRUE Following error of a higher
switching threshold
C05179 Following error monitoring
FALSE Deactivated • Read only

TRUE Activated

118 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdMPot - Master value adjustment

4.58 L_LdMPot - Master value adjustment

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB serves to execute a master value adjustment.

L_LdMPot
bEnable bBusy
bJogPositive Dv dnSpeedOut_s
bJogNegative
AxisData

Inputs

Identifier/data type Information/possible settings


bEnable Activate master value adjustment
BOOL FALSE Master value adjustment is/will be deactivated.
• Output dnSpeedOut_s is braked to standstill via the disable ramp,
if required.
TRUE Master value adjustment is activated.
bJogPositive Adjustment in positive traversing direction
BOOL FALSE Output dnSpeedOut_s is braked to standstill via the deceleration
ramp.
TRUE Output dnSpeedOut_s is led to positive speed (C05122) via the start-
up ramp.
bJogNegative Adjustment in negative traversing direction
BOOL FALSE Output dnSpeedOut_s is braked to standstill via the deceleration
ramp.
TRUE Output dnSpeedOut_s is led to negative speed (C05123) via the start-
up ramp.
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


bBusy Status signal "Master value adjustment is active"
BOOL FALSE Master value adjustment is deactivated.
• Output dnSpeedOut_s = "0".
TRUE Master value adjustment is activated.
• Output dnSpeedOut_s ≠ "0".
dnSpeedOut_s Master speed output as speed in [rpm]
DINT • C05127 indicates the master speed in the real unit of the machine.

119 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdMPot - Master value adjustment

Parameters

Identifier/data type Possible settings Information


Index
C05122 -214000.0000 unit/t 214000.0000 Positive speed
• Initialisation: 1.0000 unit/t
C05123 -214000.0000 unit/t 214000.0000 Negative speed
• Initialisation: 1.0000 unit/t
C05124 0.001 s 130.000 Acceleration ramp
• Initialisation: 1.000 s
C05125 0.001 s 130.000 Deceleration ramp
• Initialisation: 1.000 s
C05126 0.001 s 130.000 Disable ramp
• Initialisation: 1.000 s
C05127 -214748.3647 unit 214748.3647 Output speed
• Read only
• Calculated from the speed signal
dnSpeedOut_s.

L 1.4 EN - 08/2006 120


L-force | 9400 function library
Function blocks
L_LdPosCtrlLin - Master value adjustment via position

4.59 L_LdPosCtrlLin - Master value adjustment via position

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB serves to execute a master value adjustment.

L_LdPosCtrlLin
bEnable bInTarget
bExecute Dj dnPosOut_p
bSetZeroPos dnSpeedOut_s
dnSetPos_p
dnActPos_p
AxisData

Inputs

Identifier/data type Information/possible settings


bEnable Activate FB
BOOL FALSE Function block is deactivated, behaviour is according to deactivation
mode set (C05051).
TRUE Function block activated.
bExecute Execute positioning according to the positioning mode set
BOOL FALSE No positioning.
• When a running positioning is aborted, the speed is led to "0" via
the stop ramp.
FALSEÊTRUE Positioning is started and follows the defined set position depending
on the positioning mode set.
bSetPosZero Set the set position internally to "0"
BOOL • Irrespective of the defined set position.
FALSE No action, follow the set position at dnSetPos_p.
TRUE Internal profile generator travels to position 0 if bExecute is set to
TRUE.
dnSetPos_p Selection of an angle/distance or phase difference in [inc]
DINT • E.g. for adjusting the master angle compared to the external master shaft.
dnActPos_p Selection of an angle/distance in [inc] as comparison value for the set position
DINT
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

L 1.4 EN - 08/2006 121


L-force | 9400 function library
Function blocks
L_LdPosCtrlLin - Master value adjustment via position

Outputs

Identifier/data type Value/meaning


bInTarget Status signal "Master shaft has reached stop position"
BOOL TRUE Positioning deactivated, positioning running or bExecute = FALSE.
TRUE Positioning to the set position has been executed.
Master shaft dnPosOut_p has reached the stop position set in
C05011.
dnPosOut_p Master position output (current position of the master shaft in the cycle) in [inc]
DINT
dnSpeedOut_s Correction speed output as speed in [rpm]
DINT • C05165 indicates the correction speed in the real unit of the machine.

Parameters

Identifier/data type Possible settings Information


Index
C05050 Positioning mode
0 Absolute positioning without limit Lenze setting
stop
• If positioning is started, the
outputs follow the set position
via the speed profile set.
1 Absolute positioning with limit stop
• After positioning is started, the
outputs follow the set position
via the speed profile set.
• After reaching the set position, a
restart of the positioning is
required for a new positioning
process.
2 Relative positioning with limit stop
• After positioning is started, the
outputs follow the set position
via the speed profile set.
• After reaching the set position, a
restart of the positioning is
required for a new positioning
process.
C05051 Deactivation mode
0 Positioning function is deactivated Lenze setting
• The outputs are set to "0" or
FALSE.
1 Positioning function in stand-by
mode
• The outputs are kept on the
actual position.
2 Positioning function in stand-by
mode
• The outputs are kept on the set
position.
C05053/1 -214000.0000 unit/t 214000.0000 Positive speed
• Initialisation: 0.02 unit/t
C05053/2 -214000.0000 unit/t 214000.0000 Negative speed
• Initialisation: 0.02 unit/t

122 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdPosCtrlLin - Master value adjustment via position

Identifier/data type Possible settings Information


Index
C05056/1 0.010 s 130.000 Acceleration ramp
• Initialisation: 1.000 s
C05056/2 0.010 s 130.000 Deceleration ramp
• Initialisation: 1.000 s
C05056/3 0.010 s 130.000 Ramp stop
• Initialisation: 1.000 s
C05065 -2147483647 unit/t 2147483647 Correction speed
• Read only
• Calculated from the speed signal
dnSpeedOut_s.
C05067 -214748.3647 unit 214748.3647 Deviation
• Read only
C05069 Deviation compensated
0 Deviation is not compensated • Read only

1 Deviation compensated

L 1.4 EN - 08/2006 123


L-force | 9400 function library
Function blocks
L_LdSetAxisVelocity - Master value processing

4.60 L_LdSetAxisVelocity - Master value processing

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB serves to extend/compress the X axis and execute a synchronisation via touch
probe. The master speed is integrated to the position within the cycle.

L_LdSetAxisVelocity
dnSpeedIn_s dnState
dnTpMakeUpLeeway_s bZeroPos
dnStartPos_p bTpDiffRecogn
dnNumerator dnDifference_p
x
dnDenominator dnTpTpDistance_p
bNegOutput t
dnTpDistance_p
bSyncEnable dnSpeedOut_s
bEnable dnPosOut_p
byDisableMode
dnExtMaster_p
bTpEnable
dnTpPos_p
dnTpIncLastScan_p TP
bTpReceived
AxisData

Inputs

Identifier/data type Information/possible settings


dnSpeedIn_s Selection of the master speed, e.g. from an encoder.
DINT • At this input, the FB expects a speed in [rpm]. The machine parameters at the
input AxisData are used as speed reference.
dnTpMakeUpLeeway_s Selection (addition) of the TP correction speed to the master value
DINT • At this input, the FB expects a speed in [rpm]. The machine parameters at the
input AxisData are used as speed reference.
dnStartPos_p Starting position of the master value integrator in [inc]
DINT • The selected master position is accepted with a FALSEÊTRUE edge at
bLoadStartPos.
• The value must be inside the range of the scaled master value cycle (register).
dnNumerator Factor (numerator) for extending and compressing the master axis
DINT • A change during operation is displayed as a stretching factor (electronic gearbox).
dnDenominator Factor (denominator) for extending and compressing the master axis
DINT • A change during operation is displayed as a stretching factor (electronic gearbox).
bLoadStartPos Load starting position
BOOL FALSEÊTRUE Load starting position dnStartPos_p in the master value integrator.
bNegOutput Invert master speed
BOOL • Direct sign reversal of the master speed.
• The inversion of the master value gets active before the master value scaling and
the stretching factor.
FALSE CW rotation, the master value is not reversed.
TRUE CCW rotation, the master value is reversed.

124 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdSetAxisVelocity - Master value processing

Identifier/data type Information/possible settings


bSyncEnable Activate synchronised stretching/compression
BOOL FALSE Changes in the stretching factor are effective immediately.
TRUE Changes in the stretching factor are only accepted during zero
crossing.
bEnable Activate FB
BOOL FALSE Function block is deactivated, for behaviour see byDisableMode.
TRUE Function block activated.
TRUEÌFALSE Master shaft dnPosOut_p travels via the ramp for permanent
operation with master speed to the external master position
dnExtMaster_p.
byDisableMode Behaviour in case of deactivated function block (bEnable = FALSE)
BYTE 0 Speed output is not active, position remains.
1 Position at dnExtMaster_p is accepted, speed output is active.
dnExtMaster_p Selection of an external master position in [inc], e.g. through an absolute value
DINT encoder.
• Master value scaling is not considered.
• The master position must be inside the cycle.
bTpEnable Activate touch probe evaluation
BOOL TRUE Touch probe evaluation activated.
dnTpPos_p Assigned position of the touch probe sensor in the master value cycle in [inc]
DINT • Value is internally limited to 0 ... 2 x cycle.
dnTpIncLastScan_p Number of increments counted since touch probe.
DINT • Connect this input with the output dnTPCaptureValue1 of the touch probe
system block used.
bTpReceived Control signal for touch probe correction
BOOL • Connect this input with the output bTouchProbeReceived of the touch probe
system block used.
TRUE Touch probe detected.
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

L 1.4 EN - 08/2006 125


L-force | 9400 function library
Function blocks
L_LdSetAxisVelocity - Master value processing

Outputs

Identifier/data type Value/meaning


dnState Status
DINT Bit 4 Position change per cycle too big
Bit 10 Zero crossing active
Bit 14 Internal limitation for calculation
Bit 15 Fault
Bit 16 Starting position is beyond the cycle
Bit 17 Fault in the master signal (position or speed)
Bit 18 No cycle available
Bit 19 Maximum speed = "0"
Bit 20 Position of the touch probe sensor is beyond the cycle
Bit 21 Input error (e.g. impermissible position jump or inverse direction of
motion)
Bit 23 No valid axis data structure
bZeroPos Status signal "Zero position/zero crossing"
BOOL FALSE Master value is at any position in the master value cycle (register).
TRUE Permanently:
Master value is at the zero position of the master value integrator.
For one cycle:
Zero crossing of the master value integrator.
bTpDiffRecogn Status signal "Touch probe correction is active"
BOOL FALSE Touch probe correction is not active or already executed in the
current cycle.
TRUE Touch probe correction is active or not yet completed via the ramp
function.
dnDifference_p Difference between dnTpPos_p and the position measured after detecting a touch
DINT probe in [inc].
dnTpTpDistance_p Distance between the last two touch probes in [inc]
DINT • For instance to measure the real master value register.
dnTpDistance_p Distance between the detected touch probe and the zero point of the integrator in
DINT [inc]
dnSpeedOut_s Master speed output as speed in [rpm]
DINT • C05036 indicates the master speed in the real unit of the machine.
dnPosOut_p Master position output (position value of the master value integrator) in [inc]
DINT • C05043 indicates the master position in the real unit of the machine.

Parameters

Identifier/data type Possible settings Information


Index
C05034 -214748.3647 214748.3647 Status
• Display of the bit-coded output
signal dnState.
C05036 -214748.3647 unit/t 214748.3647 Current master speed
• Read only
• Calculated from the speed signal
dnSpeedOut_s.

126 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdSetAxisVelocity - Master value processing

Identifier/data type Possible settings Information


Index
C05041 -214748.3647 unit 214748.3647 Tp-Tp-difference
• Display of the output signal
dnTpTpDistance_p in the real unit
of the machine.
C05042 -214748.3647 unit 214748.3647 TP deviation
• Display of the output signal
dnDifference_p in the real unit of
the machine.
C05043 -214748.3647 unit 214748.3647 Current master position
• Display of the input signal
dnPosOut_p in the real unit of the
machine.
C05048 TP deviation detected
0 FALSE • Display of the output signal
bTpDiffRecogn.
1 TRUE
C05049 Register zero position
0 FALSE • Display of the output signal
bZeroPos.
1 TRUE

L 1.4 EN - 08/2006 127


L-force | 9400 function library
Function blocks
L_LdStateDecoder - LineDrive status signals

4.61 L_LdStateDecoder - LineDrive status signals

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB decodes the status output signal dnState of an FB from the function library
"[Link]" into individual boolean status signals for further use in the FB
interconnection.
r The functionality corresponds to a converter "DINTBOOL", but the boolean outputs of
this FB have the same names according to their meaning.

L_LdStateDecoder
dnState bInit
0
bActive
1
bDone
2
bAccDec
3
bWarnPosDiff
4
bNegativeDir
5
bReserve06
6
bReserve07
7
bClutchClose
8
bWaitClose
9
bZeroPos
10
Line drive state signals

bReserve11
11
bInitSetCycle
12
bInitActCycle
13
bLimit
14
bError
15
bErrStartPos
16
bErrExtMaster
17
bErrCycleLength
18
bErrMaxSpeed
19
bErrTPPos
20
bErrInput
21
bErrCycleLengthY
22
bErrAxisData
23
bCycle
24
bAutomatic
25
bStopInstant
26
bManualJog
27
bInternalSpeed
28
bErrPosExtMaster
29
bHandwheel
30
bReserve31
31

Inputs

Identifier/data type Information/possible settings


dnState Input for the bit-coded status signal of an FB from the function library
DINT "[Link]".
• Connect this input with the output of the same name of the corresponding FB.

128 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdStateDecoder - LineDrive status signals

Outputs
The boolean outputs have the following meaning when the value is TRUE:

Bit* Identifier Meaning in case of TRUE


Status messages:
0 bInit Function is being initialised.
1 bActive Function is active.
2 bDone Function is completed.
3 bAccDec Acceleration/deceleration phase is active.
4 bWarnPosDiff Position change per cycle too big.
5 bNegativeDir Counter-clockwise rotation
6 bReserve06 -
7 bReserve07 -
8 bClutchClose Brake/clutch closed.
9 bWaitClose Waiting for engagement process.
10 bZeroPos Zero crossing is active.
11 bReserve11 -
12 bInitSetCycle Initialisation of actual cycle.
13 bInitActCycle Initialisation of setpoint cycle.
14 bLimit Internal limitation for calculation.
24 bCycle Single cycle
25 bAutomatic Automatic mode
26 bStopInstant Stopping is active.
27 bManualJog Manual jog
28 bInternalSpeed Internal setpoint speed is active.
30 bHandwheel Electronic handwheel is active.
31 bReserve31 -
* Relating to the input signal dnState.

L 1.4 EN - 08/2006 129


L-force | 9400 function library
Function blocks
L_LdStateDecoder - LineDrive status signals

Bit* Identifier Meaning in case of TRUE


Fault messages:
15 bError Fault
16 bErrStartPos Starting position is beyond the cycle.
17 bErrExtMaster Fault in the master signal (position or speed).
18 bErrCycleLength No cycle available.
19 bErrMaxSpeed Maximum speed = "0".
20 bErrTPPos Position of the touch probe sensor is beyond the cycle.
21 bErrInput Input error (e.g. impermissible position jump or inverse direction of motion).
22 bErrCycleLengthY No cycle available for Y axis.
23 bErrAxisData No valid axis data structure.
29 bErrPosExtMaster The FB L_LdVirtualMasterV cannot approach the external target position because it
is varying. Only fixed positions may be approached.
* Relating to the input signal dnState.

130 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdSyncOperation - Master value connection

4.62 L_LdSyncOperation - Master value connection

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB serves as master value connection for the "synchronism" application.

L_LdSyncOperation
bEnable dnState
j
dnXPosIn_p dnYSpeedOut_s
dnXOffset_p dnXSpeedOut_s
XAxisData t dnXActPos_p
YAxisData bXZeroPos

Inputs

Identifier/data type Information/possible settings


bEnable Activate function
BOOL TRUE Function is activated.
dnXPosIn_p Selection of the master position in [inc]
DINT • C05094 indicates the master position in the real unit of the machine.
dnXOffset_p Selection of the phase offset for the master position in [inc]
DINT • The phase offset is applied immediately.
• C05095 indicates the phase offset in the real unit of the machine.
XAxisData Machine parameters for scaling the master value
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)
YAxisData Machine parameters for scaling the setpoint
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 10 Zero crossing active
Bit 14 Internal limitation for calculation
Bit 15 Fault
Bit 16 Starting position is beyond the cycle
Bit 18 No cycle available
Bit 21 Input error (e.g. impermissible position jump or inverse direction of
motion)
Bit 23 No valid axis data structure
dnYSpeedOut_s Setpoint speed output as speed in [rpm]
DINT • C05097 indicates the setpoint speed in the real unit of the machine.
dnXSpeedOut_s Master speed output as speed in [rpm]
DINT • C05096 indicates the master speed in the real unit of the machine.

L 1.4 EN - 08/2006 131


L-force | 9400 function library
Function blocks
L_LdSyncOperation - Master value connection

Identifier/data type Value/meaning


dnXActPos_p Master position output in [inc]
DINT • Results from MODULO(dnXOffset_p + dnXPosIn_p)
• C05098 indicates the master position in the real unit of the machine.
bXZeroPos Status signal "Zero position/zero crossing"
BOOL FALSE Master value is at any position in the master value cycle (register)
TRUE Permanently:
Master value is at the zero position of the master value integrator.
For one cycle:
Zero crossing of the master value integrator.

Parameters

Identifier/data type Possible settings Information


Index
C05090 Operating mode
0 Unit coupling Lenze setting
1 Clock equality
2 Free coupling
C05091/1 String of digits User unit
• Read only
C05091/2 String of digits User unit
• Read only
C05092/1 0.0000 214748.3647 Reference variable Y
• Initialisation: 0.0000
C05092/2 0.0000 214748.3647 Reference variable Y
• Initialisation: 0.0000
C05093/1 0 unit 2147483647 Cycle Y
• Read only
C05093/2 0 unit 2147483647 Cycle Y
• Read only
C05094 -214748.3647 unit 214748.3647 Position
• Display of the input signal
dnXPosIn_p in the real unit of the
machine.
C05095 -214748.3647 unit 214748.3647 Master value trimming
• Display of the input signal
dnXOffset_p in the real unit of the
machine.
C05096 -214748.3647 unit/t 214748.3647 Current master speed
• Read only
• Calculated from the speed signal
dnXSpeedOut_s.
C05097 -214748.3647 unit/t 214748.3647 Setpoint speed
• Read only
• Calculated from the speed signal
dnYSpeedOut
_s.

132 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdSyncOperation - Master value connection

Identifier/data type Possible settings Information


Index
C05098 -214748.3647 unit 214748.3647 Current master value
• Display of the output signal
dnXActPos_p in the real unit of the
machine.
C05099 -214748.3647 214748.3647 Status
• Display of the bit-coded output
signal dnState.

L 1.4 EN - 08/2006 133


L-force | 9400 function library
Function blocks
L_LdToolControl - Setpoint conditioning

4.63 L_LdToolControl - Setpoint conditioning

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB serves to execute a setpoint conditioning.

L_LdToolControl
dnSetSpeedIn_s dnState
dnTpMakeUpLeeway_s dnSpeedOut_s
dnOffset_p dnSetPosCycle_p
bLoadSetPosCycle dnActPosCycle_p

Tool control
dnSetPosCycleValue_p dnFollowError_p
bInitActPosCycle dnTpTpDistance_p
dnActPosIn_p dnTpDifference_p
bResetActToSet dnDifference_p
bResetSetToAct
bTpEnable
bTpReceived
dnTpLastScan_p
dnTpPos_p
AxisData

Inputs

Identifier/data type Information/possible settings


dnSpeedIn_s Selection of the speed setpoint for the machine axis (tool)
DINT • At this input, the FB expects a speed in [rpm]. The machine parameters at the
input AxisData are used as speed reference.
• C05148 indicates the setpoint speed in the real unit of the machine.
dnTpMakeUpLeeway_s Speed for touch probe correction
DINT • At this input, the FB expects a speed in [rpm]. The machine parameters at the
input AxisData are used as speed reference.
• C05147 indicates the correction speed in the real unit of the machine.
dnOffset_p Relative offset in [inc]
DINT • Is added to the speed setpoint dnSpeedIn_s.
bLoadSetPosCycle Load setting for the master value adjustment
BOOL TRUE Loads value at dnSetPosCycleValue_p into the SET integrator.
dnSetPosCycleValue_p Selection for the master value adjustment in [inc]
DINT • Load value for the SET integrator (setpoint position for the machine axis).
bInitActPosCycle Initialise ACT integrator with the actual position
BOOL TRUE Loads the actual position dnActPosIn_p into the ACT integrator.
dnActPosIn_p Actual position (from SB LS_Feedback) in [inc]
DINT
bResetActToSet Delete following error
BOOL TRUE Transmits the value of the SET integrator to the ACT integrator.
• The output value dnSetPosCycle_p is set to the output value
dnActPosCycle_p.

134 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdToolControl - Setpoint conditioning

Identifier/data type Information/possible settings


bResetSetToAct Deletes following error
BOOL TRUE Transmits the value of the ACT integrator to the SET integrator.
• The output value dnActPosCycle_p is set to the output value
dnSetPosCycle_p.
bTpEnable Activates touch probe evaluation
BOOL TRUE Touch probe evaluation activated.
bTpReceived Control signal for touch probe correction
BOOL • Connect this input with the output bTouchProbeReceived of the touch probe
system block used.
TRUE Touch probe detected.
dnTpLastScan_p Number of increments counted since touch probe.
DINT • Connect this input with the output dnTPCaptureValue1 of the touch probe
system block used.
dnTpPos_p Assigned position of the touch probe sensor in the setpoint cycle in [inc]
DINT • Value is internally limited to 0 ... 2 x cycle.
• C05155 indicates the position in the real unit of the machine.
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 4 Position change per cycle too big
Bit 10 Zero crossing active
Bit 12 Initialisation of actual clock
Bit 13 Initialisation of setpoint clock
Bit 15 Fault
Bit 18 No cycle available
Bit 19 Maximum speed = "0"
Bit 20 Position of the touch probe sensor is beyond the cycle
Bit 21 Input error (e.g. impermissible position jump or inverse direction of
motion)
Bit 23 No valid axis data structure
dnSpeedOut_s Speed setpoint for the position follower (SB LS_PositionFollower) for position
DINT control
dnSetPosCycle_p Setpoint position in the cycle (with clock reference) in [inc]
DINT • Referring to zero point.
• C05150 indicates the setpoint position in the real unit of the machine.
dnActCycle_p Actual position in the cycle (with clock reference) in [inc]
DINT • Referring to zero point.
• C05151 indicates the actual position in the real unit of the machine.
dnFollowError_p Current following error in [inc]
DINT • C05152 indicates the following error in the real unit of the machine.
dnTpTpDistance_p Distance between the last two touch probes in [inc]
DINT • For instance to measure the real actual register.
• C05154 indicates the distance in the real unit of the machine.

L 1.4 EN - 08/2006 135


L-force | 9400 function library
Function blocks
L_LdToolControl - Setpoint conditioning

Identifier/data type Value/meaning


dnTpDifference_p Difference between dnTpPos_p and the position measured after detecting a touch
DINT probe in [inc].
dnDifference_p Current difference between dnTpPos_p and the position measured after detecting a
DINT touch probe in [inc].
• C05153 indicates the deviation in the real unit of the machine.

Parameters

Identifier/data type Possible settings Information


Index
C05142 -2147483647 2147483647 Status
• Display of the bit-coded output
signal dnState.
C05147 -2147483647 unit/t 2147483647 Correction speed
• Read only
• Calculated from the speed signal
dnTpMakeUpLeeway_s.
C05148 -2147483647 unit/t 2147483647 Input speed
• Read only
• Calculated from the speed signal
dnSetSpeedIn_s.
C05149 -2147483647 unit/t 2147483647 Setpoint speed
• Read only
• Calculated from the speed signal
dnSpeedOut_s.
C05150 -214748.3647 unit 214748.3647 Set position in the cycle
• Display of the output signal
dnSetPosCycle_p in the real unit of
the machine.
C05151 -214748.3647 unit 214748.3647 Actual position in the cycle
• Display of the output signal
dnActPosCycle_p in the real unit of
the machine.
C05152 -214748.3647 unit 214748.3647 Following error
• Display of the output signal
dnFollowError_p in the real unit of
the machine.
C05153 -214748.3647 unit 214748.3647 TP deviation
• Display of the output signal
dnDifference_p in the real unit of
the machine.
C05154 -214748.3647 unit 214748.3647 Tp-Tp distance
• Display of the output signal
dnTpTpDistance_p in the real unit
of the machine.
C05155 -214748.3647 unit 214748.3647 TP position
• Display of the input signal
dnTpPos_p in the real unit of the
machine.

136 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdVirtualMasterP - Virtual master for synchronism

4.64 L_LdVirtualMasterP - Virtual master for synchronism

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB provides the "Virtual master" function for the "Synchronism" application.

L_LdVirtualMasterP
dnExtMaster_p dnState
bEnable bInTarget

Virtual master
bContinuous bBusy
bCycle dnPosOut_p
bManualJogCw
bManualJogCcw
dnHandwheel_s
bStopInstant
bEnable2ndSpeedSet
bLoadStartPos
AxisData

Inputs

Identifier/data type Information/possible settings


dnExtMaster_p Selection of an external master position in [inc]
DINT • E.g. through an absolute value encoder.
• The master position must be inside the cycle.
• C05028 indicates the external master position in the real unit of the machine.
bEnable Activate master function
BOOL • This input has the highest priority.
FALSE The input dnExtMaster_p connected 1:1 to the output dnPosOut_p.
No ramps are active.
TRUE Ramps are activated.
TRUEÌFALSE Master shaft dnPosOut_p travels via the ramp for permanent
operation with master speed to the external master position
dnExtMaster_p.
• Only a fixed master position can be approached.
• If the master position changes, bit 29 of the status signal dnState
will be set.
bContinuous Control - continuous operation/production process
BOOL • Only possible for the "continuous operation" mode set in C05010.
TRUE Continuous operation is started, master shaft dnPosOut_p travels
continuously.
TRUEÌFALSE Continuous operation is stopped, master shaft dnPosOut_p travels
to the stop position set in C05011.
bCycle Control - single cycle
BOOL • Only possible for the "inching/single cycle" operating mode set in C05010.
FALSEÊTRUE Cyclic operation of the master shaft dnPosOut_p is started.
• The master shaft travels to the stop position set in C05011.
• A renewed cycle must be started with a renewed FALSEÊTRUE
edge.

L 1.4 EN - 08/2006 137


L-force | 9400 function library
Function blocks
L_LdVirtualMasterP - Virtual master for synchronism

Identifier/data type Information/possible settings


bManualJogCw Inching - CW rotation
BOOL • Only possible for the "inching" mode set in C05010.
TRUE Inching (manual jog) in positive direction.
bManualJogCcw Inching - CCW rotation
BOOL • Only possible for the "inching" mode set in C05010.
TRUE Inching (manual jog) in negative direction.
dnHandwheel_s Master speed for the handwheel function of the master shaft
DINT • At this input, the FB expects a speed in [rpm]. The machine parameters at the
input AxisData are used as speed reference.
bStopInstant Stop master shaft
BOOL • This input has the second highest priority (after bEnable).
FALSEÊTRUE The master shaft dnPosOut_p is immediately braked to standstill via
the set stop ramp.
bEnable2ndSpeedSet Change over to second master speed
BOOL FALSE Master speed 1 (C05013/1) is active.
TRUE Master speed 2 (C05013/2) is active.
bLoadStartPos Set master shaft to starting position
BOOL TRUE Master shaft dnPosOut_p is set to the starting position set in
C05012.
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 1 State active
Bit 2 Procedure completed
Bit 3 Acceleration/deceleration phase
Bit 5 Counter-clockwise rotation
Bit 10 Zero crossing active
Bit 15 Fault
Bit 16 Starting position is beyond the cycle
Bit 17 Fault in the master signal (position or speed)
Bit 18 No cycle available
Bit 19 Maximum speed = "0"
Bit 23 No valid axis data structure
Bit 24 Single cycle
Bit 25 Automatic mode
Bit 26 Stopping is active
Bit 27 Manual jog
Bit 28 Internal setpoint speed is active
Bit 29 Position difference - external master
Bit 30 Electronic handwheel is active

138 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdVirtualMasterP - Virtual master for synchronism

Identifier/data type Value/meaning


bInTarget Status signal "Master shaft has reached stop position"
BOOL TRUE Master shaft dnPosOut_p has reached the stop position set in
C05011.
bBusy Status signal "master shaft is positioned"
BOOL TRUE Master shaft dnPosOut_p is positioned.
dnPosOut_p Master position output (current position of the master shaft in the cycle) in [inc]
DINT • C05027 indicates the master position in the real unit of the machine.

Parameters

Identifier/data type Possible settings Information


Index
C05010 Operating mode - virtual master
0 Continuous operation Lenze setting
1 Inching
2 Handwheel function
C05011 0.0000 unit 214000.0000 Stop position
• The target position must be inside
the cycle.
• Initialisation: 0.0000 unit
C05012 0.0000 unit 214000.0000 Starting position
• The starting position must be
inside the cycle.
• Initialisation: 0.0000 unit
C05013/1 -214000.0000 unit/t 214000.0000 Master speed 1
• Initialisation: 1.0000 unit/t
C05013/2 -214000.0000 unit/t 214000.0000 Master speed 2
• Initialisation: 1.0000 unit/t
C05014/1 0.0000 unit/t 214000.0000 Manual speed - CW rotation
• Initialisation: 1.0000 unit/t
C05014/2 0.0000 unit/t 214000.0000 Manual speed - CCW rotation
• Initialisation: 1.0000 unit/t
C05015/1 0.010 s 130.000 Ramp for manual jog
• Initialisation: 1.000 s
C05015/2 0.010 s 130.000 Ramp for continuous operation/
single cycle
• Initialisation: 1.000 s
C05015/3 0.010 s 130.000 Ramp for stop
• Initialisation: 1.000 s
C05024 -2147483647 2147483647 Status
• Display of the bit-coded output
signal dnState.
C05025 Stop position has been reached
0 No • Like output bInTarget
• Read only
1 Yes
C05026 -214748.3647 unit 214748.3647 Master value cycle
• Read only

L 1.4 EN - 08/2006 139


L-force | 9400 function library
Function blocks
L_LdVirtualMasterP - Virtual master for synchronism

Identifier/data type Possible settings Information


Index
C05027 -214748.3647 unit 214748.3647 Current master position
• Display of the input signal
dnPosOut_p in the real unit of the
machine.
C05028 -214748.3647 unit 214748.3647 External master position
• Display of the input signal
dnExtMaster_p in the real unit of
the machine.

4.64.1 Functions

Handwheel function
r Ensures an easy control of a machine run. The clutched drives are interconnected in a
system.
r Incremental encoders via DFIN or multiple encoder input. An input must be selected.
r No ramp functions are active.
r Function is enabled via the control (PLC) by selecting the "handwheel function"
operating mode (C05010 ="2") and setting bEnable to TRUE.

Manual jog (inching)


r Operation per HMI or keys via control (PLC). The locking is done in the PLC.
r Ramp functions are active.
r Parameters are defined once or changed via HMI.

Single cycle
r Operation per HMI or keys via control (PLC)
r Function starts with a FALSEÊTRUE edge at the bCycle input.
r Ramp functions are active.
r The data for production speed are used as parameters.
r The cycle starts at the current position and stops at the stop position (C05011).

Continuous operation
r Operation per HMI or keys via control (PLC)
r Function starts with a FALSEÊTRUE edge at the bContinuous input. The function
remains active as long as the TRUE level is applied.
r Ramp functions are active.
r The data for production speed are used as parameters.
r The cycle starts at the current position and stops at the stop position (C05011).

140 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdVirtualMasterP - Virtual master for synchronism

Synchronise virtual master to the external master


r The virtual master is synchronised to an external position selection. Thus, the
downstream system can be separated from the external master any time.
r Application: Modular machines: The external position is delivered by
– MotionBus (Slave)
– DFIN/multiple encoder input/FB L_LdSetXAxisVelocity (relative synchronism)
– Fieldbus as real encoder (must be limited to the cycle set).
r The function is activated by setting bEnable to TRUE.

Profile generator/stopping at stop position:


r The process can be executed via several machine cycles (example: printing machines).
The setting of the operating time is decisive.

Load starting position:


r The starting position set in C05012 is accepted by setting bLoadStartPos to TRUE.
r For this, the enable input bEnable must be set to TRUE.

Stop master shaft


r The master shaft is braked to standstill within the operating time set in C05015/3
setting bStopInstant to TRUE.
r For this, the enable input bEnable must be set to TRUE.
r This function has the highest priority.

Change over to second master speed


r By setting bEnable2ndSpeedSet to TRUE, the master speed 1 (C05013/1) is changed to
master speed 2 (C05013/2).
r Ramp functions are active.

L 1.4 EN - 08/2006 141


L-force | 9400 function library
Function blocks
L_LdVirtualMasterV - Virtual master for electronic gearboxes

4.65 L_LdVirtualMasterV - Virtual master for electronic gearboxes

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB provides the "Virtual master" function for the "Electronic gearbox" application.

L_LdVirtualMasterV
dnExtMaster_s dnState

Virtual master
bEnable bBusy
bContinuous dnSpeedOut_s
bManualJogCw
bManualJogCcw
dnHandwheel_s
bStopInstant
bEnable2ndSpeedSet
AxisData

Inputs

Identifier/data type Information/possible settings


dnExtMaster_s Selection of an external master speed, e.g. from an encoder.
DINT • At this input, the FB expects a speed in [rpm]. The machine parameters at the
input AxisData are used as speed reference.
• C05118 indicates the external master speed in the real unit of the machine.
bEnable Activate master function
BOOL • This input has the highest priority.
FALSE The input dnExtMaster_s is connected through 1:1 to output
dnSpeedOut_s. No ramps are active.
TRUE Master shaft dnSpeedOut_s is braked to standstill via the ramp
function or follows the function selected.
TRUEÌFALSE Master shaft dnSpeedOut_s travels via the ramp for continuous
operation with master speed dnExtMaster_s.
bContinuous Control - continuous operation/production process
BOOL • Only possible for the "continuous operation" mode set in C05100.
TRUE Continuous operation is started, master shaft dnSpeedOut_s travels
with setpoint speed.
TRUEÌFALSE Continuous operation is stopped, master shaft dnSpeedOut_s is
braked to standstill via ramp for continuous operation.
bManualJogCw Inching - CW rotation
BOOL • Only possible for the "inching" mode set in C05100.
TRUE Inching (manual jog) in positive direction.
bManualJogCcw Inching - CCW rotation
BOOL • Only possible for the "inching" mode set in C05100.
TRUE Inching (manual jog) in negative direction.
dnHandwheel_s Master speed for the handwheel function of the master shaft.
DINT • At this input, the FB expects a speed in [rpm]. The machine parameters at the
input AxisData are used as speed reference.

142 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdVirtualMasterV - Virtual master for electronic gearboxes

Identifier/data type Information/possible settings


bStopInstant Stop master shaft
BOOL • This input has the second highest priority (after bEnable).
FALSEÊTRUE The master shaft dnSpeedOut_s is immediately braked to standstill
via the set stop ramp.
bEnable2ndSpeedSet Change over to second master speed
BOOL FALSE Master speed 1 (C05103/1) is active.
TRUE Master speed 2 (C05103/2) is active.
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 1 State active
Bit 3 Acceleration/deceleration phase
Bit 5 Counter-clockwise rotation
Bit 15 Fault
Bit 17 Fault in the master signal (position or speed)
Bit 19 Maximum speed = "0"
Bit 23 No valid axis data structure
Bit 25 Automatic mode
Bit 26 Stopping is active
Bit 27 Manual jog
Bit 28 Internal setpoint speed is active
Bit 30 Electronic handwheel is active
bBusy Status signal "Master shaft travels"
BOOL TRUE Master shaft dnSpeedOut_s travels
dnSpeedOut_s Master speed output as speed in [rpm]
DINT • C05117 indicates the master speed in the real unit of the machine.

Parameters

Identifier/data type Possible settings Information


Index
C05100 Operating mode - virtual master
0 Continuous operation Lenze setting
1 Inching
2 Handwheel function
C05103/1 -214000.0000 unit/t 214000.0000 Master speed 1
• Initialisation: 1.0000 unit/t
C05103/2 -214000.0000 unit/t 214000.0000 Master speed 2
• Initialisation: 1.0000 unit/t

L 1.4 EN - 08/2006 143


L-force | 9400 function library
Function blocks
L_LdVirtualMasterV - Virtual master for electronic gearboxes

Identifier/data type Possible settings Information


Index
C05104/1 0.0000 unit/t 214000.0000 Manual speed - CW rotation
• Initialisation: 1.0000 unit/t
C05104/2 0.0000 unit/t 214000.0000 Manual speed - CCW rotation
• Initialisation: 1.0000 unit/t
C05105/1 0.010 s 130.000 Ramp for manual jog
• Initialisation: 1.000 s
C05105/2 0.010 s 130.000 Ramp for continuous operation/
single cycle
• Initialisation: 1.000 s
C05105/3 0.010 s 130.000 Ramp for stop
• Initialisation: 1.000 s
C05114 -2147483647 2147483647 Status
• Display of the bit-coded output
signal dnState.
C05117 -214748.3647 unit 214748.3647 Current master speed
• Read only
• Calculated from the speed signal
dnSpeedOut_s.
C05118 -214748.3647 unit 214748.3647 External master speed
• Read only
• Calculated from the speed signal
dnExtMaster_s.

4.65.1 Functions

Handwheel function
r Ensures an easy control of a machine run. The clutched drives are interconnected in a
system.
r Incremental encoders via DFIN or multiple encoder input. An input must be selected.
r No ramp functions are active.
r Function is enabled via the control (PLC) by selecting the "handwheel function"
operating mode (C05100 ="2") and setting bEnable to TRUE.

Manual jog (inching)


r Operation per HMI or keys via control (PLC). The locking is done in the PLC.
r Ramp functions are active.
r Parameters are defined once or changed via HMI.

Continuous operation
r Operation per HMI or keys via control (PLC)
r Function starts with a FALSEÊTRUE edge at the bContinuous input. The function
remains active as long as the TRUE level is applied.
r Ramp functions are active.
r The data for production speed are used as parameters.

144 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_LdVirtualMasterV - Virtual master for electronic gearboxes

Synchronise virtual master to the external master


r The virtual master is synchronised to an external speed selection. Thus, the
downstream system can be separated from the external master any time.
r Application: Modular machines: The external speed is delivered by
– MotionBus (Slave) as position selection
– DFIN/multiple encoder input/FB L_LdSetXAxisVelocity (relative synchronism)
– Fieldbus as real encoder as position selection (must be limited to the cycle set).
r The function is activated by setting bEnable to TRUE.

Stop master shaft


r The master shaft is braked to standstill within the operating time set in C05111 setting
bStopInstant to TRUE.
r For this, the enable input bEnable must be set to TRUE.
r This function has the highest priority.

Change over to second master speed


r By setting bEnable2ndSpeedSet to TRUE, the master speed 1 (C05103/1) is changed to
master speed 2 (C05103/2).
r Ramp functions are active.
r The function can be used e.g. for applications with reduced machine speed.

Second master speed for manual jog


r A change-over to master speed 2 via input bEnable2ndSpeedSet has also an effect on
the "Manual jog" function:
– Master speed 2 supersedes the manual speeds set in C05104/1 and C05104/2.
– The direction of rotation is defined by the inputs bManualJogCw (positive) or
bManualJogCcw (negative).

L 1.4 EN - 08/2006 145


L-force | 9400 function library
Function blocks
L_LdZeroDetect - Zero crossing detection

4.66 L_LdZeroDetect - Zero crossing detection

Function library: LenzeLineDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB observes a clocked position and detects zero crossings.


r The cycle and shift factor for the position resolution are read out of the machine
parameters (AxisData).

L_LdZeroDetect
dnState
dnPosIn_p bZero
0 0
AxisData

Inputs

Identifier/data type Information/possible settings


dnPosIn_p Clocked position in [inc]
DINT
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 10 Zero crossing active
Bit 15 Fault
Bit 18 No cycle available
Bit 21 Input error (e.g. impermissible position jump or inverse direction of
motion)
Bit 23 No valid axis data structure
bZero Status signal "Zero crossing"
BOOL TRUE Zero crossing detected or position = "0"

146 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosDecoderStatePositioner - Positioning status signals

4.67 L_PosDecoderStatePositioner - Positioning status signals

Function library: LenzePositioning


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB decodes the status output signal dnState of SB LS_Positioner into individual
boolean status signals for further use in the FB interconnection.
r The functionality corresponds to a converter "DINTBOOL", but the boolean outputs of
this FB have the same names according to their meaning.

L_PosDecoderStatePositioner
dnState bActive
bDone
bAccDec
bCcw
bInTarget
bZeroPos
bErrActive
bAbort
Positioner state

bRev
bMinSpeedOverride
bMinAccOverride
bLimPos
bLimProfile
bLimDir
bLimAbort
bStoppingActive
bErrNoHomePos
bErrNoCycleLength
bErrMode
bErrModeChange
bErrProfileData
bErrPG

Inputs

Identifier/data type Information/possible settings


dnState Input for the bit-coded status signal of the basic function "Positioning".
DINT • Connect this input with the output of the same name of the SB LS_Positioner.

L 1.4 EN - 08/2006 147


L-force | 9400 function library
Function blocks
L_PosDecoderStatePositioner - Positioning status signals

Outputs
The boolean outputs have the following meaning when the value is TRUE:

Bit* Identifier Meaning in case of TRUE


Status messages:
1 bActive Positioning is active.
2 bDone Positioning is completed (all profiles have been processed).
3 bAccDec Acceleration/deceleration phase is active.
5 bCcw Counter-clockwise rotation is active.
6 bInTarget Set position reached (in case of sequence profiles the drive continues to travel).
10 bZeroPos Zero crossing
16 bAbort Positioning is aborted.
17 bRev Reversing phase is active.
18 bMinSpeedOverride Speed override ≤1 %
19 bMinAccOverride Acceleration override ≤1 %
20 bLimPos Position is limited by the basic function "Limiter" (SB LS_Limiter).
21 bLimProfile Profile data is limited by the basic function "Limiter" (SB LS_Limiter).
22 bLimDir Direction is inhibited by the basic function "Limiter" (SB LS_Limiter).
23 bLimAbort Abort by basic function "Limiter" (SB LS_Limiter).
25 bStoppingActive Stopping is active.
Fault messages:
15 bErrActive Fault is active.
24 bErrNoHomePos Home position is not known.
26 bErrNoCycleLength Cycle is not known.
27 bErrMode Invalid positioning mode.
28 bErrModeChange Invalid change of positioning mode.
29 bErrProfileData Profile data is not plausible or faulty.
30 bErrPG Error during profile generation.
* Relating to the input signal dnState.

148 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosDecoderStateSequencer - Status signals of the sequence control

4.68 L_PosDecoderStateSequencer - Status signals of the sequence control

Function library: LenzePositioning


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB decodes the status output signal dnState of FB LS_PosSequencer into individual
boolean status signals for further use in the FB interconnection.
r The functionality corresponds to a converter "DINTBOOL", but the boolean outputs of
this FB have the same names according to their meaning.

L_PosDecoderStateSequencer
dnState bReady

Sequencer state
bStarted
bPause
bStop
bReset
bErrActive
bErrBranch
bWatchDogActive

Inputs

Identifier/data type Information/possible settings


dnState Input for the bit-coded status signal of the sequence control.
DINT • Connect this input with the output of the same name of the FB L_PosSequencer.
(C 182)

Outputs
The boolean outputs have the following meaning when the value is TRUE:

Bit* Identifier Meaning in case of TRUE


Status messages:
16 bReady Positioning program ready to start/Program end reached.
17 bStarted Positioning program is running.
18 bPause Positioning program is started, pause is active.
19 bStop Positioning program is stopped.
20 bReset Positioning program is reset.
Fault messages:
15 bErrActive Fault is active.
25 bErrBranch Wrong value at branch input.
22 bWatchDogActive "Watchdog" monitoring function for positioning has been activated.
* Relating to the input signal dnState.

L 1.4 EN - 08/2006 149


L-force | 9400 function library
Function blocks
L_PosGetProfile - Profile data tables

4.69 L_PosGetProfile - Profile data tables

Function library: LenzePositioning


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

Together with an FB instance of type L_PosPositionerTable or L_PosProfileTable this FB


provides five profile data sets that can be selected.

L_PosGetProfile
dnState
dwProfileNumber1 PROFILE ProfileData1
dwProfileNumber2 1 ProfileData2
dwProfileNumber3 2 ProfileData3
dwProfileNumber4 3 ProfileData4
...
dwProfileNumber5 ProfileData5
FBData

Inputs

Identifier/data type Information/possible settings


dwProfileNumber1...5 Number of the profile whose profile data is to be output at ProfileData1 ...
DWORD ProfileData5.
In connection with an FB instance of type L_PosPositionerTable:
1 ... 100 Profile 1 ... 100
In connection with an FB instance of type L_PosProfileTable:
1 ... 4 Profile 1 ... 4
FBData Interface for the transmission of the FB instance data.
• Connect this input with the output of the same name of the FB instance of type
L_PosPositionerTable or L_PosProfileTable.

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 15 Fault is active (collective message).
Bit 16 dwProfileNumber1 is not within the valid range.
Bit 17 dwProfileNumber2 is not within the valid range.
Bit 18 dwProfileNumber3 is not within the valid range.
Bit 19 dwProfileNumber4 is not within the valid range.
Bit 20 dwProfileNumber5 is not within the valid range.
Bit 27 Fault: Invalid FB instance data.
ProfileData1...5 Profile data of the profile selected via dwProfileNumber1...5.

150 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosGetProfileData - Profile data output

4.70 L_PosGetProfileData - Profile data output

Function library: LenzePositioning


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB outputs the profile data of a profile data set.

L_PosGetProfileData
ProfileData dnState
PROFILE
dwPositioningMode
PositioningMode
dnTargetPosition_p
Position
dnSpeed_s
Speed
dnAcceleration_x
Acceleration
dnDeceleration_x
Deceleration
dnJerk
Jerk
dnEndSpeed_s
End speed
NextProfileData
Next profile
NextTPProfileData
Next TP profile
dnTPWindowStart
TP window start
dnTPWindowEnd
TP window end
dwTPConfig
TP configuration
dwProfileNumber
Profile number

Inputs

Identifier/data type Information/possible settings


ProfileData Interface for the transmission of the profile data set.

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 15 Fault is active (collective message).
Bit 29 Fault: Invalid profile data.
dwPositioningMode Positioning mode
DWORD
dnTargetPosition_p Target position in [inc]
DINT
dnSpeed_s Traversing speed as speed
DINT • Scaling: 226 ≡ 15000 [rpm]
dnAcceleration_x Acceleration as speed variation/time
DINT • Scaling: 222 ≡ 15000000 [rpm/s]
dnDeceleration_x Deceleration as speed variation/time
DINT • Scaling: 222 ≡ 15000000 [rpm/s]
dnJerk S-ramp time in [ms]
DINT
dnEndSpeed_s Final speed as speed
DINT • Scaling: 226 ≡ 15000 [rpm]

L 1.4 EN - 08/2006 151


L-force | 9400 function library
Function blocks
L_PosGetProfileData - Profile data output

Identifier/data type Value/meaning


NextProfileData Profile data of the standard sequence profile
• For profile linkage.
NextTPProfileData Profile data of the TP sequence profile
• For touch probe residual path positioning.
dnTPWindowStart TP window starting position
DINT
dnTPWindowEnd TP window end position
DINT
dwTPConfig Touch probe configuration
DWORD
dwProfileNumber Profile number of the profile data set
DWORD

152 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosGetTableAcc - Acceleration table

4.71 L_PosGetTableAcc - Acceleration table

Function library: LenzePositioning


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

Together with an FB instance of type L_PosPositionerTable this FB provides five


acceleration values from the VTACC variable table.
In connection with an FB instance of type L_PosProfileTable it is possible to output the
acceleration and deceleration values that are directly defined in the profiles.

L_PosGetTableAcc
dnState
dwAccTableNumber1 ACC dnAcceleration1_x
dwAccTableNumber2 1 dnAcceleration2_x
dwAccTableNumber3 2 dnAcceleration3_x
dwAccTableNumber4 3 dnAcceleration4_x
...
dwAccTableNumber5 dnAcceleration5_x
FBData

Inputs

Identifier/data type Information/possible settings


dwAccTableNumber1...5 Number of the table position or profile whose acceleration value is to be output at
DWORD dnAcceleration1_x ... dnAcceleration5_x.
In connection with an FB instance of type L_PosPositionerTable:
1 ... 50 Table position 1 ... 50 of the VTACC table
In connection with an FB instance of type L_PosProfileTable:
1 Acceleration of profile 1
2 Acceleration of profile 2
3 Acceleration of profile 3
4 Acceleration of profile 4
5 Deceleration of profile 1
6 Deceleration of profile 2
7 Deceleration of profile 3
8 Deceleration of profile 4
FBData Interface for the transmission of the FB instance data.
• Connect this input with the output of the same name of the FB instance of type
L_PosPositionerTable or L_PosProfileTable.

L 1.4 EN - 08/2006 153


L-force | 9400 function library
Function blocks
L_PosGetTableAcc - Acceleration table

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 15 Fault is active (collective message).
Bit 16 dwAccTableNumber1 is not within the valid range.
Bit 17 dwAccTableNumber2 is not within the valid range.
Bit 18 dwAccTableNumber3 is not within the valid range.
Bit 19 dwAccTableNumber4 is not within the valid range.
Bit 20 dwAccTableNumber5 is not within the valid range.
Bit 27 Fault: Invalid FB instance data.
dnAcceleration1...5_x Acceleration value parameterised at table position or in profile number
DINT dwAccTableNumber1...5.
• Output as speed variation/time
• Scaling: 222 ≡ 15000000 [rpm/s]

154 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosGetTableJerk - S-ramp time table

4.72 L_PosGetTableJerk - S-ramp time table

Function library: LenzePositioning


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

Together with an FB instance of type L_PosPositionerTable this FB provides five S-ramp


times from the VTJERK variable table.
In connection with an FB instance of type L_PosProfileTable it is possible to output the S-
ramp times that are directly defined in the profiles.

L_PosGetTableJerk
dnState
dwJerkTableNumber1 JERK dnJerk1
dwJerkTableNumber2 1 dnJerk2
dwJerkTableNumber3 2 dnJerk3
dwJerkTableNumber4 3 dnJerk4
...
dwJerkTableNumber5 dnJerk5
FBData

Inputs

Identifier/data type Information/possible settings


dwJerkTableNumber1...5 Number of the table position or profile, the speed value of which is to be output at
DWORD dnJerk1 ... dnJerk5.
In connection with an FB instance of type L_PosPositionerTable:
1 ... 50 Table position 1 ... 50 of the VTJERK table
In connection with an FB instance of type L_PosProfileTable:
1 ... 4 Profile 1 ... 4
FBData Interface for the transmission of the FB instance data.
• Connect this input with the output of the same name of the FB instance of type
L_PosPositionerTable or L_PosProfileTable.

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 15 Fault is active (collective message).
Bit 16 dwJerkTableNumber1 is not within the valid range.
Bit 17 dwJerkTableNumber2 is not within the valid range.
Bit 18 dwJerkTableNumber3 is not within the valid range.
Bit 19 dwJerkTableNumber4 is not within the valid range.
Bit 20 dwJerkTableNumber5 is not within the valid range.
Bit 27 Fault: Invalid FB instance data.
dnJerk1...5_s S-ramp time in [ms] parameterised at table position or in profile number
DINT dwJerkTableNumber1...5.

L 1.4 EN - 08/2006 155


L-force | 9400 function library
Function blocks
L_PosGetTablePos - Position table

4.73 L_PosGetTablePos - Position table

Function library: LenzePositioning


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

Together with an FB instance of type L_PosPositionerTable this FB provides five position


values from the VTPOS variable table.
In connection with an FB instance of type L_PosProfileTable it is possible to output the
positions that are directly defined in the profiles.

L_PosGetTablePos
dnState
dwPosTableNumber1 POS dnPosition1_p
dwPosTableNumber2 1 dnPosition2_p
dwPosTableNumber3 2 dnPosition3_p
dwPosTableNumber4 3 dnPosition4_p
...
dwPosTableNumber5 dnPosition5_p
FBData

Inputs

Identifier/data type Information/possible settings


dwPosTableNumber1...5 Number of the table position or profile, the position value of which is to be output
DWORD at dnPosition1_p ... dnPosition5_p.
In connection with an FB instance of type L_PosPositionerTable:
1 ... 50 Table position 1 ... 50 of the VTPOS table
In connection with an FB instance of type L_PosProfileTable:
1 ... 4 Profile 1 ... 4
FBData Interface for the transmission of the FB instance data.
• Connect this input with the output of the same name of the FB instance of type
L_PosPositionerTable or L_PosProfileTable.

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 15 Fault is active (collective message).
Bit 16 dwPosTableNumber1 is not within the valid range.
Bit 17 dwPosTableNumber2 is not within the valid range.
Bit 18 dwPosTableNumber3 is not within the valid range.
Bit 19 dwPosTableNumber4 is not within the valid range.
Bit 20 dwPosTableNumber5 is not within the valid range.
Bit 27 Fault: Invalid FB instance data.
dnPosition1...5_p Position in [inc] parameterised at table position or in profile number
DINT dwPosTableNumber1...5.

156 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosGetTableSpeed - Speed table

4.74 L_PosGetTableSpeed - Speed table

Function library: LenzePositioning


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

Together with an FB instance of type L_PosPositionerTable this FB provides five speed


values from the VTSPEED variable table.
In connection with an FB instance of type L_PosProfileTable it is possible to output the
speed values that are directly defined in the profiles.

L_PosGetTableSpeed
dnState
dwSpeedTableNumber1 SPEED dnSpeed1_s
dwSpeedTableNumber2 1 dnSpeed2_s
dwSpeedTableNumber3 2 dnSpeed3_s
dwSpeedTableNumber4 3 dnSpeed4_s
...
dwSpeedTableNumber5 dnSpeed5_s
FBData

Inputs

Identifier/data type Information/possible settings


dwSpeedTableNumber1...5 Number of the table position or profile, the speed value of which is to be output at
DWORD dnSpeed1_s ... dnSpeed5_s.
In connection with an FB instance of type L_PosPositionerTable:
1 ... 50 Table position 1 ... 50 of the VTSPEED table
In connection with an FB instance of type L_PosProfileTable:
1 ... 4 Profile 1 ... 4
FBData Interface for the transmission of the FB instance data.
• Connect this input with the output of the same name of the FB instance of type
L_PosPositionerTable or L_PosProfileTable.

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 15 Fault is active (collective message).
Bit 16 dwSpeedTableNumber1 is not within the valid range.
Bit 17 dwSpeedTableNumber2 is not within the valid range.
Bit 18 dwSpeedTableNumber3 is not within the valid range.
Bit 19 dwSpeedTableNumber4 is not within the valid range.
Bit 20 dwSpeedTableNumber5 is not within the valid range.
Bit 27 Fault: Invalid FB instance data.
dnSpeed1...5_s Velocity parameterised on table position or in profile number
DINT dwSpeedTableNumber1...5 is output as speed.
• Scaling: 226 ≡ 15000 [rpm]

L 1.4 EN - 08/2006 157


L-force | 9400 function library
Function blocks
L_PosPositionerTable - Profile data record management

4.75 L_PosPositionerTable - Profile data record management

Function library: LenzePositioning


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB is used to store and manage (traversing) profiles and to teach positions, speeds,
accelerations/decelerations and S-ramp times.
r A profile describes a motion request which can be implemented by the
SB LS_Positioner into a rotary motion.
r A profile is described via the following profile parameters: Mode (type of positioning),
position, speed, acceleration, deceleration, S-ramp time, final speed, standard
sequence profile, TP sequence profile, TP window starting and end position.
– For easier handling, the profile parameters position, speed, acceleration/
deceleration and S-ramp time are kept in separate tables.
– Thus, a positioning program for e.g. repeating speeds can always use the same table
position. If this speed is to be changed, an adjustment of a table position can have an
effect on several profiles.
r Another important task of this FB is the conversion of the table values according to the
scaling selected in the SB LS_DriveInterface.

L_PosPositionerTable
dnState
Profiles
dwProfileNumber bBusy
1 2 100
MODE ProfileData
POS FBData
SPEED
ACC
DEC
JERK

bPosTeach VTPOS
11
dwPosTableNumber
dnPos_p 100
100

bSpeedTeach VTSPEED
11
dwSpeedTableNumber
dnSpeed_s 100
50

bAccTeach VTACC
11
dwAccTableNumber
dnAcc_x 100
50

bJerkTeach VTJERK
11
dwJerkTableNumber
dnJerk 100
50

AxisData

158 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosPositionerTable - Profile data record management

Inputs

Identifier/data type Information/possible settings


dwProfileNumber Profile selection
DWORD • Number of the profile the profile parameters of which are to be transferred to the
SB LS_Positioner via the output ProfileData.
• If a sequence profile is defined in the selected profile, this profile is only the first
profile of an arbitrary linkage of profiles.
1 ... 100 Profile number
bPosTeach "Teach" position
BOOL TRUE The position assigned to the input dnPos_p is stored at the VTPOS
table position selected via the input dwPosTableNumber.
TRUEÌFALSE The value of the last cycle is maintained in the table.
dwPosTableNumber Selection of the table position of the position to be "taught"
DWORD 0 No selection (selection in case the input is not assigned)
1 ... 100 Table position 1 ... 100 of the VTPOS table
dnPos_p Position to be "taught" in [inc]
DINT
bSpeedTeach "Teach" speed
BOOL TRUE The speed assigned to the input dnSpeed_s is stored at the VTSPEED
table position selected via the input dwSpeedTableNumber.
TRUEÌFALSE The value of the last cycle is maintained in the table.
dwSpeedTableNumber Selection of the table position for the speed to be "taught"
DWORD 0 No selection (selection in case the input is not assigned)
1 ... 50 Table position 1 ... 50 of the VTSPEED table
dnSpeed_s Speed to be "taught"
DINT • At this input, the FB expects a speed. The machine parameters at the input
AxisData are used as speed reference.
• Scaling: 226 ≡ 15000 [rpm]
bAccTeach "Teach" acceleration/deceleration
BOOL TRUE The acceleration/deceleration assigned to the input dnAcc_s is
stored at the VTACC table position selected via the input
dwAccTableNumber.
TRUEÌFALSE The value of the last cycle is maintained in the table.
dwAccTableNumber Selection of the table position for the acceleration/deceleration speed to be "taught"
DWORD 0 No selection (selection in case the input is not assigned)
1 ... 50 Table position 1 ... 50 of the VTACC table
dnAcc_x Acceleration/deceleration to be "taught"
DINT • At this input, the FB expects a speed variation/time. The machine parameters at
the input AxisData are used as acceleration reference.
• Scaling: 222 ≡ 15000000 [rpm/s]
bJerkTeach "Teach" S-ramp time
BOOL TRUE The S-ramp time assigned to the input dnJerk is stored at the VTJERK
table position selected via the input dwJerkTableNumber.
TRUEÌFALSE The value of the last cycle is maintained in the table.
dwJerkTableNumber Selection of the table position for the S-ramp time to be "taught"
DWORD 0 No selection (selection in case the input is not assigned)
1 ... 50 Table position 1 ... 50 of the VTJERK table

L 1.4 EN - 08/2006 159


L-force | 9400 function library
Function blocks
L_PosPositionerTable - Profile data record management

Identifier/data type Information/possible settings


dnJerk S-ramp time to be "taught" in [ms]
DINT
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 15 Fault is active.
Bit 16 Calculation is active.
Bit 17 Position taught.
Bit 18 Speed taught.
Bit 19 Acceleration taught.
Bit 20 S-ramp time taught.
Bit 28 Fault: Invalid machine parameters (AxisData).
Bit 29 Fault: Invalid profile number (dwProfileNumber).
Bit 30 Fault: Invalid teach-profile number.
bBusy Status signal "Conversion of the profile parameter is active"
BOOL FALSE Profile parameters are ready.
TRUE Conversion is active, no access possible to the profile parameters at
the moment.
ProfileData Interface to basic function "Positioning"
• Data structure with the profile parameters of the profile selected via the input
dwProfileNumber.
• Connect this output with the input of the same name of the SB LS_Positioner.
FBData FB interface for internal profiles/table data (L_PosGetProfile, L_PosGetTableAcc,
L_PosGetTableJerk, L_PosGetTablePos, L_PosGetTableSpeed)
• Data structure with the internal instance data.

Parameters

Parameters Possible settings Information


C04700/1 "Teach" position
0Ê1 The position assigned to the input • For execution via parameter
dnPos_p is stored at the VTPOS table channel.
position selected via the input
dwPosTableNumber.
C04700/2 "Teach" speed
0Ê1 The speed assigned to the input • For execution via parameter
dnSpeed_s is stored at the VTSPEED channel.
table position selected via the input
dwSpeedTableNumber.

160 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosPositionerTable - Profile data record management

Parameters Possible settings Information


C04700/3 Teach acceleration
0Ê1 The acceleration/deceleration • For execution via parameter
assigned to the input dnAcc_s is channel.
stored at the VTACC table position
selected via the input
dwAccTableNumber.
C04700/4 "Teach" S-ramp time
0Ê1 The S-ramp time assigned to the • For execution via parameter
input dnJerk is stored at the VTJERK channel.
table position selected via the input
dwJerkTableNumber.
C04701/1...100 -214748.3648 unit 214748.3648 VTPOS: variable positions
• For the selection of the target
positions and the TP window
starting or end positions for the
profiles.
C04702/1...50 -214748.3648 unit/s 214748.3648 VTSPEED: variable speeds
• For the selection of the traversing
and final speeds for the profiles.
C04703/1...50 -214748.3648 unit/s2 214748.3648 VTACC: variable accelerations
• For the selection of the
accelerations and decelerations
for the profiles.
C04704/1...50 -2147483.648 s 2147483.648 VTJERK: variable S-ramp times
• For the selection of the S-ramp
times for the profiles.
C04705/1 DIS:bPosTeach
0 FALSE • Display of the input signal
bPosTeach.
1 TRUE
C04705/2 DIS:bSpeedTeach
0 FALSE • Display of the input signal
bSpeedTeach.
1 TRUE
C04705/3 DIS:bAccTeach
0 FALSE • Display of the input signal
bAccTeach.
1 TRUE
C04705/4 DIS:bJerkTeach
0 FALSE • Display of the input signal
bJerkTeach.
1 TRUE
C04706/1 0 100 DIS:VTPosNum
• Display of the input signal
dwPosTableNumber.
C04706/2 0 100 DIS:VTSpeedNum
• Display of the input signal
dwSpeedTableNumber.
C04706/3 0 100 DIS:VTAccNum
• Display of the input signal
dwAccTableNumber.
C04706/4 0 100 DIS:VTJerkNum
• Display of the input signal
dwJerkTableNumber.
C04706/5 0 100 DIS:ProfileNum
• Display of the input signal
dwProfileNumber.

L 1.4 EN - 08/2006 161


L-force | 9400 function library
Function blocks
L_PosPositionerTable - Profile data record management

Parameters Possible settings Information


C04707/1 -214748.3648 unit 214748.3648 DIS:dnTeachPos
• Display of the input signal
dnPos_p in the real unit of the
machine.
C04707/2 -214748.3648 unit/s 214748.3648 DIS:dnTeachSpeed
• Display of the input signal
dnSpeed_s in the real unit of the
machine.
C04707/1 -214748.3648 unit/s2 214748.3648 DIS:dnTeachAcc
• Display of the input signal
dnAcc_x in the real unit of the
machine.
C04707/1 -214748.3648 s 214748.3648 DIS:dnTeachJerk
• Display of the input signal dnJerk
in the real unit of the machine.
C04708 -2147483647 2147483647 Status
• Display of the bit-coded output
signal dnState.
C04710/1...100 Positioning mode
(Subcode 1 ... 100 ≡ profile no. 1 ... 100)
1 Absolute • For absolute positioning, the
home position must be known.
2 Absolute TP
5 Relative
6 Relative TP
7 Speed
8 Speed TP
11 Absolute CW
12 Absolute CW TP
13 Absolute CCW
14 Absolute CCW TP
15 Absolute shortest way
16 Absolute shortest way TP
C04711/1...100 Position from VTPOS
(Subcode 1 ... 100 ≡ profile no. 1 ... 100)
1 VTPOS position 1 (C04701/1) • Reference to VTPOS table position
to define the profile parameter
2 VTPOS position 2 (C04701/2) "Position".
... ...
100 VTPOS position 100 (C04701/100)
C04712/1...100 Speed from VTSPEED
(Subcode 1 ... 100 ≡ profile no. 1 ... 100)
1 VTSPEED position 1 (C04702/1) • Reference to VTSPEED table
position to define the profile
2 VTSPEED position 2 (C04702/2) parameter "Speed".
... ...
50 VTSPEED position 50 (C04702/50)
C04713/1...100 Acceleration from VTACC
(Subcode 1 ... 100 ≡ profile no. 1 ... 100)
1 VTACC position 1 (C04703/1) • Reference to VTACC table position
to define the profile parameter
2 VTACC position 2 (C04703/2) "Acceleration".
... ...
50 VTACC position 50 (C04703/50)

162 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosPositionerTable - Profile data record management

Parameters Possible settings Information


C04714/1...100 Deceleration from VTACC
(Subcode 1 ... 100 ≡ profile no. 1 ... 100)
1 VTACC position 1 (C04703/1) • Reference to VTACC table position
to define the profile parameter
2 VTACC position 2 (C04703/2) "Deceleration".
... ...
50 VTACC position 50 (C04703/50)
C04715/1...100 S-ramp time from VTJERK
(Subcode 1 ... 100 ≡ profile no. 1 ... 100)
1 VTJERK position 1 (C04704/1) • Reference to VTJERK table
position to define the profile
2 VTJERK position 2 (C04704/2) parameter "S-ramp time".
... ...
50 VTJERK position 50 (C04704/50)
C04716/1...100 Final speed from VTSPEED
(Subcode 1 ... 100 ≡ profile no. 1 ... 100)
1 VTSPEED position 1 (C04702/1) • Reference to VTSPEED table
position to define the profile
2 VTSPEED position 2 (C04702/2) parameter "Final speed".
... ... • A sequence profile must be
available.
50 VTSPEED position 50 (C04702/50)
C04717/1...100 TP window starting position from
(Subcode 1 ... 100 ≡ profile no. 1 ... 100) VTPOS
1 VTPOS position 1 (C04701/1)
• Reference to VTPOS table position
2 VTPOS position 2 (C04701/2) to define the profile parameter
"TP window starting position".
... ...
• With a position value "0" the
100 VTPOS position 100 (C04701/100) starting position equals the
negative travel range limit.
C04718/1...100 TP window end position from VTPOS
(Subcode 1 ... 100 ≡ profile no. 1 ... 100)
1 VTPOS position 1 (C04701/1) • Reference to VTPOS table position
to define the profile parameter
2 VTPOS position 2 (C04701/2) "TP window end position".
... ... • With a position value "0" the end
position equals the positive travel
100 VTPOS position 100 (C04701/100) range limit.
C04719/1...100 Sequence profile with TP
(Subcode 1 ... 100 ≡ profile no. 1 ... 100)
1 Profile no. 1 • Sequence profile for touch probe
residual path positioning.
... ...
100 Profile no. 100
C04720/1...100 Sequence profile without TP
(Subcode 1 ... 100 ≡ profile no. 1 ... 100)
0 No sequence profile • Sequence profile for profile
(end of a profile chaining) chaining.

1 Profile no. 1
... ...
100 Profile no. 100

L 1.4 EN - 08/2006 163


L-force | 9400 function library
Function blocks
L_PosPositionerTable - Profile data record management

Parameters Possible settings Information


C04721/1...100 Value is bit-coded: Touch probe configuration
(Subcode 1 ... 100 ≡ profile no. 1 ... 100) • The touch probe channels to be
used are selected by setting the
corresponding bits to "1".
Bit 0 TP channel 1, rising edge Digital input 1
Bit 1 TP channel 1, falling edge
Bit 2 TP channel 2, rising edge Digital input 2
Bit 3 TP channel 2, falling edge
Bit 4 TP channel 3, rising edge Digital input 3
Bit 5 TP channel 3, falling edge
Bit 6 TP channel 4, rising edge Digital input 4
Bit 7 TP channel 4, falling edge
Bit 8 TP channel 5, rising edge Digital input 5
Bit 9 TP channel 5, falling edge
Bit 10 TP channel 6, rising edge Digital input 6
Bit 11 TP channel 6, falling edge
Bit 12 TP channel 7, rising edge Digital input 7
Bit 13 TP channel 7, falling edge
Bit 14 TP channel 8, rising edge Digital input 8
Bit 15 TP channel 8, falling edge
Bit 16 TP channel 9 Motor encoder zero pulse
Bit 17 TP channel 10 Load encoder zero pulse
Bit 18 TP channel 11 DFIN zero pulse
Bit 19 TP channel 12 DFOUT zero pulse

164 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosPositionerTable - Profile data record management

4.75.1 Variable tables

To simplify parameter handling, the four most important physical sizes for profile
parameters are stored in separate "variable tables".

VTPos VTSpeed VTAcc VTJerk


Positions Speeds Acceleration/ S-ramp times
deceleration
Unit unit unit/s unit/s2 s
Data format DINT with four decimal positions
Memory locations 100 50 50 50
Code C04701/1...100 C04702/1...50 C04703/1...50 C04704/1...50
For profile Target position Speed Acceleration S-ramp time
TP window starting position Final speed Deceleration
parameters TP window end position

A value is assigned to a profile parameter by a reference to a table position of the assigned


variable table. So, not the value but the table position which contains the value to be used
is entered in the profile parameter.

Profile 1 VTPOS
Mode 3 1
Position 3 VTPOS 2
Speed 1 ...
Acceleration 1 VTACC 100
Deceleration 2 VTACC
Jerk time 1 VTJERK
End speed 50 VTSPEED
TP window start position 6 VTPOS 1 200 [unit]/s
TP window end position 7 VTPOS 2 400 [unit]/s
Next TP profile 12 ...
Next profile 2 50 50 [unit]/s

Profile 2 VTACC
Mode 4 1
Position 4 VTPOS 2
Speed 2 ...
Acceleration 1 VTACC 50
Deceleration 3 VTACC
Jerk time 1 VTJERK
End speed 50 VTJERK
TP window start position 6 VTPOS 1
TP window end position 8 VTPOS 2
Next TP profile 13 ...
Next profile 5 50

[4-1] Principle: References to variable tables (here: References to VTSPEED)

r In case of several references to the same table position, a change of the value in this
table position affects several profiles at the same time. Thus, recurring profile
parameters only need to be changed on one position.
r If e.g. in case of a profile chaining, several profiles are to be executed with the same
speed, the corresponding profile parameters "speed" can all refer to the same table
position.

L 1.4 EN - 08/2006 165


L-force | 9400 function library
Function blocks
L_PosPositionerTable - Profile data record management

Conversion of the values into internal values


The values of the variable tables VTPOS, VTSPEED, VTACC and VTJERK are always entered
in the application unit [unit].
r Since the SB LS_Positioner needs the profile parameters in the internal measuring
system, the FB L_PosPositionerTable also stores the values of the variable tables in this
measuring system.
r The values must only be reconverted by the FB if the machine parameters transmitted
by the drive interface via the input AxisData have changed.
– In this case the output bBusy is set to TRUE during the conversion and an access to
the profile parameters is not possible.

Note!
Exceptions are the values to be "taught". These must be selected in the internal
measuring system.

4.75.2 "Teach" function

In addition to the direct value entry via parameters, the values can also be stored in the
variable tables by means of the "teach" function.
The "teaching" of a value can be activated via an FB input or by describing a parameter (e.g.
by master control):

DIGIN_bInX MUX L_PosPositionerTable


CAN
"Teach position"
Powerlink bPosTeach C04700/1 ³1
Profibus
dwPosTableNumber
Cxxxxx MUX
CAN 0
VTPOS
dnPos_p 1
Powerlink 1 200 [unit]/s
2
2
Profibus ...
100
100
dnActualPos_p MUX
CAN
Powerlink
Profibus

[4-2] Principle of the "teach" function (here: "teaching" of positions)

166 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosPositionerTable - Profile data record management

4.75.3 Positioning modes

Depending on the traversing range/application, you can select between different


positioning modes which are described in the below table.

Note!
For absolute positioning, the home position must be known!
If an absolute positioning process (positioning modes 1 ... 2 and 11 ... 16) is
started although the home position is not known, a fault message occurs.
• In this case a programming error has occurred and the program flow must be
reset.
• If the error only occurs in a sequence profile, the last valid deceleration is used
to decelerate the drive to standstill.

Positioning mode
1 Absolute
The axis travels to an absolute position.
• Reference for the absolute position is zero position.
• The home position must be known.
• The traversing range is limited:
– to 214748.3647 [unit]
– by the internal display area (±231 increments)
• Not possible with "modulo" traversing range.
2 Absolute TP
Like mode 1, but with profile change on touch probe detection.
Touch probe positioning. (C 169)
5 Relative
The axis is traversed by a distance.
• Reference for the distance is the target position of the profile executed before.
• The feed per positioning is limited:
– to 214748.3647 [unit]
– by the internal display area (±231 increments)
6 Relative TP
Like mode 5, but with profile change on touch probe detection.
Touch probe positioning. (C 169)
7 Speed
Continuous constant travel.
• Only possible with "unlimited" and "limited" traversing range
• This mode does not approach a defined position, but follows the profile.
• Acceleration and deceleration are based on profile values.
• The traversing direction is defined by the sign of the traversing speed.
• Stopped through break signal.
8 Speed TP
Like mode 7, but with profile change on touch probe detection.
Touch probe positioning. (C 169)
11 Absolute CW
The axis travels in CW direction to an absolute position.
• Only possible with "modulo" traversing range
• Reference for the absolute position is zero position.
• In this direction the zero position of the axis can be overtravelled.
12 Absolute CW TP
Like mode 11, but with profile change on touch probe detection.
Touch probe positioning. (C 169)

L 1.4 EN - 08/2006 167


L-force | 9400 function library
Function blocks
L_PosPositionerTable - Profile data record management

Positioning mode
13 Absolute CCW
The axis travels in CCW direction to an absolute position.
• Only possible with "modulo" traversing range
• Reference for the absolute position is zero position.
• In this direction the zero position of the axis can be overtravelled.
14 Absolute CCW TP
Like mode 13, but with profile change on touch probe detection.
Touch probe positioning. (C 169)
15 Absolute shortest way
The axis travels in best time to an absolute position.
• Only possible with "modulo" traversing range
• Reference for the absolute position is zero position.
• The rotary table positioning is basically an absolute positioning with target positions between 0 and 360
angular degree [°]. In this mode the zero point can also be overtravelled if this is the shortest way to the
target position:
360°/0°

300° 60°

240° 120°

180°

16 Absolute shortest way TP


Like mode 15, but with profile change on touch probe detection.
Touch probe positioning. (C 169)

168 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosPositionerTable - Profile data record management

4.75.4 Touch probe positioning

With touch probe positioning, the profile is first processed according to the set profile
parameters. If a touch probe is detected during profile processing, the profile automatically
changes to the profile specified under the profile parameter "TP sequence profile".
r Here the current actual position is stored at the time of the touch probe activation (by
a touch probe sensor).
r In the following relative positioning process, the "residual path" to this stored position
is travelled according to the increments.

v [m/s] Œ Profile 4
Mode
Position
Œ  Speed
Profile 4 Profile 7 ...
t [s] Next TP profile 7
Touch probe Next profile

 Profile 7
Mode
v [m/s] Position
Speed
...
Œ  Next TP profile
Profile 4 Profile 7 Next profile

Touch probe t [s]


n "Starting profile"
o "Residual path profile" that is defined in the profile parameter "TP sequence profile" of the starting profile.

[4-3] Examples for a "residual path positioning" after a touch probe is detected

r The profile parameters "TP window starting position" and "TP window end position"
the range in which touch probes are to be detected can be restricted.
– If both profile parameters = "0", touch probe detection will be active for the whole
profile/the whole traversing range.
r If no touch probe is detected and after the profile is executed, the positioning is
continued with the profile defined in the profile parameter "Sequence profile without
TP" (profile chaining).

Note!
If a profile is travelled with high speed and touch probe positioning is started,
the residual path of which is smaller than the result from current speed and set
deceleration ramp, the target position is "overtravelled".
• Normally a reversing movement occurs, i.e. the drive returns.
• If, for instance, a CCW rotation of the drive is forbidden by the safety module,
the target cannot be approached since in this case the reversing movement is
not permissible.
Further constellations are possible in connection with profile chaining in which
an approach of the target position is impossible.

L 1.4 EN - 08/2006 169


L-force | 9400 function library
Function blocks
L_PosPositionerTable - Profile data record management

Touch probe configuration


The touch probe channel for positioning with touch probe detection can be selected in the
»Engineer« via the parameter dialog of the FB L_PositionerTable.
r Go to the parameter dialog of the FB L_PositionerTable and press the Setting up touch
probe button to open the Setting up touch probe dialog box and select the desired
setting for the corresponding profile.
r The setting selected in this parameter dialog has a direct effect on the setting of
C04721/1...100 ("touch probe configuration") and vice versa.
r For a direct setting of C04721/1...100 (e.g. with keypad) the following table lists the
corresponding decimal values for all possible configurations.

Selection Touch probe response


Touch probe channel Positive edge Negative edge Both edges
DIGIN 1 1 2 3
DIGIN 2 4 8 12
DIGIN 3 16 32 48
DIGIN 4 64 128 192
DIGIN 5 256 512 768
DIGIN 6 1024 2048 3072
DIGIN 7 4096 8192 12288
DIGIN 8 16384 32768 49152
Motor encoder zero pulse 65536
Load encoder zero pulse 262144

r Example: For the selection of the touch probe channel "DIGIN 8" and the response to a
positive edge only, the decimal value "16384" must be set in C04721.

170 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosProfileInterface - Profile data interface

4.76 L_PosProfileInterface - Profile data interface

Function library: LenzePositioning


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB provides a profile data record for the SB LS_Positioner.

L_PosProfileInterface
dwPositioningMode ProfileData
dnTargetPosition_p
dnSpeed_s
dnAcceleration_x
dnDeceleration_x
dnJerk
dnEndSpeed_s
NextProfileData
NextTPProfileData
dnTPWindowStart
dnTPWindowEnd
dwTPConfig
dwProfileNumber

Inputs

Identifier/data type Information/possible settings


dwPositioningMode Positioning mode
DWORD • For absolute positioning, the home position must be known!
1 Absolute
2 Absolute TP
5 Relative
6 Relative TP
7 Speed
8 Speed TP
11 Absolute CW
12 Absolute CW TP
13 Absolute CCW
14 Absolute CCW TP
15 Absolute shortest way
16 Absolute shortest way TP
dnTargetPosition_p Target position in [inc]
DINT
dnSpeed_s Speed
DINT • Entry as speed
• Scaling: 226 ≡ 15000 [rpm]
dnAcceleration_x Acceleration
DINT • Entry as speed variation/time
• Scaling: 222 ≡ 15000000 [rpm/s]

L 1.4 EN - 08/2006 171


L-force | 9400 function library
Function blocks
L_PosProfileInterface - Profile data interface

Identifier/data type Information/possible settings


dnDeceleration_x Deceleration
DINT • Entry as speed variation/time
• Scaling: 222 ≡ 15000000 [rpm/s]
dnJerk S-ramp time in [ms]
DINT
dnEndSpeed_s Final speed
DINT • Entry as speed
• Scaling: 226 ≡ 15000 [rpm]
NextProfileData Profile data of the sequence profile without TP (for profile chaining)
ProfileData • This input can be connected e.g. with the output ProfileData of another instance
of the FB L_PosProfileInterface.
NextTPProfileData • Profile data of the sequence profile with TP (for touch probe residual path
ProfileData positioning)
• This input can be connected e.g. with the output ProfileData of another instance
of the FB L_PosProfileInterface.
dnTPWindowStart Area start for touch probe detection
DINT
dnTPWindowEnd Area end for touch probe detection
DINT
dwTPConfig Touch probe configuration
DWORD
dwProfileNumber Number assigned to the profile.
DINT • This number is displayed at the SB LS_Positioner.

Outputs

Identifier/data type Value/meaning


ProfileData Profile data for the SB LS_Positioner

172 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosProfileTable - Profile data record management (simple)

4.77 L_PosProfileTable - Profile data record management (simple)

Function library: LenzePositioning


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB is used to store and manage up to four traversing profiles and to "teach" target
positions.
r A profile describes a motion request which then can be implemented by the
SB LS_Positioner into a rotary motion.
r A profile is described via the following profile parameters: Mode (type of positioning),
position, speed, acceleration, deceleration, S-ramp time, TP sequence profile and TP
selection.
r Unlike the FB L_PosPositionerTable, this FB does not use any variable tables, but profile
parameter data is directly entered under the assigned codes.
r Furthermore, the position assigned to the input dnExtPos_p will be used as target
position if profile number 1 is selected.
r Another important task of this FB is the conversion of the table values according to the
scaling selected in the SB LS_DriveInterface.

L_PosProfileTable
dwProfileNumber dnState
Profiles
dnExtPos_p bBusy
1 2 3 4
bPosTeach MODE ProfileData
dwTeachProfileNumber POS FBData
SPEED
dnTeachPos_p
ACC
AxisData

Inputs

Identifier/data type Information/possible settings


dwProfileNumber Profile selection
DWORD • Number of the profile the profile parameters of which are to be transferred to the
SB LS_Positioner via the output ProfileData.
1 ... 4 Profile number
dnExtPos_p External target position in [inc] for profile number 1
DINT
bPosTeach "Teach" position
BOOL TRUE The position assigned to the input dnTeachPos_p is stored in the
profile selected via the input dwTeachProfileNumber.
TRUEÌFALSE The value of the last cycle is maintained in the table.
dwTeachProfileNumber Selection of the profile for the position to be "taught"
DWORD 0 No selection (selection in case the input is not assigned)
1 No selection (the position selected via the input dnExtPos_p will be
used as target position for profile number 1.)
2 ... 4 Profile 2 ... 4

L 1.4 EN - 08/2006 173


L-force | 9400 function library
Function blocks
L_PosProfileTable - Profile data record management (simple)

Identifier/data type Information/possible settings


dnTeachPos_p Position to be "taught" in [inc]
DINT
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 15 Fault is active.
Bit 16 Calculation is active.
Bit 17 Position taught.
Bit 28 Fault: Invalid machine parameters (AxisData).
Bit 29 Fault: Invalid profile number (dwProfileNumber).
Bit 30 Fault: Invalid teach-profile number.
bBusy Status signal "Conversion of the profile parameter is active"
BOOL FALSE Profile parameters are ready.
TRUE Conversion is active, no access possible to the profile parameters at
the moment.
ProfileData Interface to basic function "Positioning"
• Data structure with the profile parameters of the profile selected via the input
dwProfileNumber.
• Connect this output with the input of the same name of the SB LS_Positioner.
FBData FB interface for internal profiles/table data (L_PosGetProfile, L_PosGetTableAcc,
L_PosGetTableJerk, L_PosGetTablePos, L_PosGetTableSpeed)
• Data structure with the internal instance data.

Parameters

Parameters Possible settings Information


C04750/1...4 Positioning mode
(Subcode 1 ... 4 ≡ profile no. 1 ... 4)
1 Absolute • For absolute positioning, the
home position must be known.
2 Absolute TP
5 Relative
6 Relative TP
7 Speed
8 Speed TP
11 Absolute CW
12 Absolute CW TP
13 Absolute CCW
14 Absolute CCW TP
15 Absolute shortest way
16 Absolute shortest way TP
C04751/1...4 -214748.3647 unit 214748.3647 Position
(Subcode 1 ... 4 ≡ profile no. 1 ... 4)

174 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosProfileTable - Profile data record management (simple)

Parameters Possible settings Information


C04752/1...4 -214748.3647 unit/t 214748.3647 Speed
(Subcode 1 ... 4 ≡ profile no. 1 ... 4)

C04753/1...4 0.0000 unit/t2 214748.3647 Acceleration


(Subcode 1 ... 4 ≡ profile no. 1 ... 4)

C04754/1...4 0.0000 unit/t2 214748.3647 Deceleration


(Subcode 1 ... 4 ≡ profile no. 1 ... 4)

C04755/1...4 0.0000 s 214748.3647 S-ramp time


(Subcode 1 ... 4 ≡ profile no. 1 ... 4)

C04756/1...4 TP sequence profile


(Subcode 1 ... 4 ≡ profile no. 1 ... 4)
0 No residual path positioning • Sequence profile for touch probe
residual path positioning.
1 Profile no. 1
... ...
4 Profile no. 4
C04757/1...4 Value is bit-coded: Touch probe configuration
(Subcode 1 ... 4 ≡ profile no. 1 ... 4) • The touch probe channels to be
used are selected by setting the
corresponding bits to "1".
Bit 0 TP channel 1, rising edge Digital input 1
Bit 1 TP channel 1, falling edge
Bit 2 TP channel 2, rising edge Digital input 2
Bit 3 TP channel 2, falling edge
Bit 4 TP channel 3, rising edge Digital input 3
Bit 5 TP channel 3, falling edge
Bit 6 TP channel 4, rising edge Digital input 4
Bit 7 TP channel 4, falling edge
Bit 8 TP channel 5, rising edge Digital input 5
Bit 9 TP channel 5, falling edge
Bit 10 TP channel 6, rising edge Digital input 6
Bit 11 TP channel 6, falling edge
Bit 12 TP channel 7, rising edge Digital input 7
Bit 13 TP channel 7, falling edge
Bit 14 TP channel 8, rising edge Digital input 8
Bit 15 TP channel 8, falling edge
Bit 16 TP channel 9 Motor encoder zero pulse
Bit 17 TP channel 10 Load encoder zero pulse
Bit 18 TP channel 11 DFIN zero pulse
Bit 19 TP channel 12 DFOUT zero pulse
C04758 "Teach" position
0Ê1 The position assigned to the input • For execution via parameter
dnTeachPos_p is stored in the profile channel.
selected via the input
dwTeachProfileNumber.
C04760/1 -214748.3647 unit 214748.3647 External target position
• Display of the input signal
dnExtPos_p in the real unit of the
machine.
C04760/2 -214748.3647 unit 214748.3647 Teach position
• Display of the input signal
dnTeachPos_p in the real unit of
the machine.

L 1.4 EN - 08/2006 175


L-force | 9400 function library
Function blocks
L_PosProfileTable - Profile data record management (simple)

Parameters Possible settings Information


C04761/1 0 4 Selected profile
• Display of the input signal
dwProfileNumber.
C04761/2 0 4 Selected teach profile
• Display of the input signal
dwTeachProfileNumber.
C04763 DIS:bPosTeach
0 FALSE • Display of the input signal
bPosTeach.
1 TRUE
C04764 DIS:bBusy
0 Profile parameters are ready. • Display of the output signal
bBusy.
1 Conversion is active, no access
possible to the profile parameters at
the moment.
C04765 -2147483647 2147483647 Status
• Display of the bit-coded output
signal dnState.

4.77.1 Profile data table

Profile parameter data is directly entered under the assigned codes.


r Exception: The position assigned to the input dnExtPos_p will be used as target
position if profile number 1 is selected.

Profile parameters Unit Profile no. 1 Profile no. 2 Profile no. 3 Profile no. 4
Positioning mode - C04750/1 C04750/2 C04750/3 C04750/4
Position unit dnExtPos_p C04751/2 C04751/3 C04751/4
Speed unit/t C04752/1 C04752/2 C04752/3 C04752/4
Acceleration unit/t2 C04753/1 C04753/2 C04753/3 C04753/4
2
Deceleration unit/t C04754/1 C04754/2 C04754/3 C04754/4
S-ramp time s C04755/1 C04755/2 C04755/3 C04755/4
TP sequence profile - C04756/1 C04756/2 C04756/3 C04756/4
TP selection - C04757/1 C04757/2 C04757/3 C04757/4

Conversion of the values into internal values


The profile parameters are always entered in the application unit [unit].
r Since the SB LS_Positioner needs the profile parameters in the internal measuring
system, the FB L_PosProfileTable also stores the values in this measuring system.
r The values must only be reconverted by the FB if the machine parameters transmitted
by the drive interface via the input AxisData have changed.
– In this case the output bBusy is set to TRUE during the conversion and an access to
the profile parameters is not possible.

176 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosProfileTable - Profile data record management (simple)

Note!
Exceptions are the values to be "taught". These must be selected in the internal
measuring system.

L 1.4 EN - 08/2006 177


L-force | 9400 function library
Function blocks
L_PosProfileTable - Profile data record management (simple)

4.77.2 "Teach" function

In addition to the direct value entry via parameters, the target position for a profile can also
be stored by means of the "teach" function.
The "teaching" of a value can be activated via an FB input or by describing a parameter (e.g.
by master control):

DIGIN_bInX MUX L_PosProfileTable


CAN
dnExtPos_p
Powerlink
Profibus bPosTeach C04758 ³1 "Teach position"
dwTeachProfileNumber
Cxxxxx MUX
CAN 0
POS
dnTeachPos_p 1
Powerlink 1 200 [unit]/s
2
2
Profibus 3
3
4
4
dnActualPos_p MUX
CAN
Powerlink
Profibus

[4-1] "Teach" function principle

178 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosProfileTable - Profile data record management (simple)

4.77.3 Positioning modes

Depending on the traversing range/application, you can select between different


positioning modes which are described in the below table.

Note!
For absolute positioning, the home position must be known!
If an absolute positioning process (positioning modes 1 ... 2 and 11 ... 16) is
started although the home position is not known, a fault message occurs.
• In this case a programming error has occurred and the program flow must be
reset.
• If the error only occurs in a sequence profile, the last valid deceleration is used
to decelerate the drive to standstill.

Positioning mode
1 Absolute
The axis travels to an absolute position.
• Reference for the absolute position is zero position.
• The home position must be known.
• The traversing range is limited:
– to 214748.3647 [unit]
– by the internal display area (±231 increments)
• Not possible with "modulo" traversing range.
2 Absolute TP
Like mode 1, but with profile change on touch probe detection.
Touch probe positioning. (C 181)
5 Relative
The axis is traversed by a distance.
• Reference for the distance is the target position of the profile executed before.
• The feed per positioning is limited:
– to 214748.3647 [unit]
– by the internal display area (±231 increments)
6 Relative TP
Like mode 5, but with profile change on touch probe detection.
Touch probe positioning. (C 181)
7 Speed
Continuous constant travel.
• Only possible with "unlimited" and "limited" traversing range
• This mode does not approach a defined position, but follows the profile.
• Acceleration and deceleration are based on profile values.
• The traversing direction is defined by the sign of the traversing speed.
• Stopped through break signal.
8 Speed TP
Like mode 7, but with profile change on touch probe detection.
Touch probe positioning. (C 181)
11 Absolute CW
The axis travels in CW direction to an absolute position.
• Only possible with "modulo" traversing range
• Reference for the absolute position is zero position.
• In this direction the zero position of the axis can be overtravelled.
12 Absolute CW TP
Like mode 11, but with profile change on touch probe detection.
Touch probe positioning. (C 181)

L 1.4 EN - 08/2006 179


L-force | 9400 function library
Function blocks
L_PosProfileTable - Profile data record management (simple)

Positioning mode
13 Absolute CCW
The axis travels in CCW direction to an absolute position.
• Only possible with "modulo" traversing range
• Reference for the absolute position is zero position.
• In this direction the zero position of the axis can be overtravelled.
14 Absolute CCW TP
Like mode 13, but with profile change on touch probe detection.
Touch probe positioning. (C 181)
15 Absolute shortest way
The axis travels in best time to an absolute position.
• Only possible with "modulo" traversing range
• Reference for the absolute position is zero position.
• The rotary table positioning is basically an absolute positioning with target positions between 0 and 360
angular degree [°]. In this mode the zero point can also be overtravelled if this is the shortest way to the
target position:
360°/0°

300° 60°

240° 120°

180°

16 Absolute shortest way TP


Like mode 15, but with profile change on touch probe detection.
Touch probe positioning. (C 181)

180 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosProfileTable - Profile data record management (simple)

4.77.4 Touch probe positioning

With touch probe positioning, the profile is first processed according to the set profile
parameters. If a touch probe is detected during profile processing, the profile automatically
changes to the profile specified under the profile parameter "TP sequence profile".
r Here the current actual position is stored at the time of the touch probe activation (by
a touch probe sensor).
r In the following relative positioning process, the "residual path" to this stored position
is travelled according to the increments.

v [m/s] Œ Profile 2
Mode
Position
Œ  Speed
Profile 2 Profile 4 ...
t [s] Next TP profile 4
Touch probe

 Profile 4
Mode
v [m/s] Position
Speed
...
Œ  Next TP profile
Profile 2 Profile 4

Touch probe t [s]


n "Starting profile"
o "Residual path profile" that is defined in the profile parameter "TP sequence profile" of the starting profile.

[4-2] Examples for a "residual path positioning" after a touch probe is detected

r If no touch probe is detected, positioning stops after profile processing without profile
linkage.

Note!
If a profile is travelled with high speed and touch probe positioning is started,
the residual path of which is smaller than the result from current speed and set
deceleration ramp, the target position is "overtravelled".
• Normally a reversing movement occurs, i.e. the drive returns.
• If, for instance, a CCW rotation of the drive is forbidden by the safety module,
the target cannot be approached since in this case the reversing movement is
not permissible.
Further constellations are possible in connection with profile chaining in which
an approach of the target position is impossible.

L 1.4 EN - 08/2006 181


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

4.78 L_PosSequencer - Sequence control

Function library: LenzePositioning


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB processes a positioning program based on a sequence table.


r The sequence table is an important part of this FB and is indicated by a code with 100
subcodes. Each subcode contains a reference to a single program segment, also known
as "action".
r Different action types are available which serve to implement, for instance, program
branching, switching operations, waiting times and counters. The actions themselves
are also indicated by codes.

Note!
For a complete sequence control, the FB L_PosSequencer must be connected
with further blocks, like the FB L_PosPositionerTable (profile data record
management) and the SB LS_Positioner (basic function "positioning").

L_PosSequencer
bStart dnState
bPause bProgramBusy
bCancel dwActStep
bBreak
bReset bEnablePositioner
bStartProfile
bProfileDone bAbortProfile
bHomingDone bRestartProfile
dwProfileNumber
dwStartStep
dwBranch1 bEnableHoming
dwBranch2 bActivateHoming
dwBranch3
dwBranch4 bEnableFollower
dwBranch5
dwDigitalInputs dwDigitalOutputs

182 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

Inputs

Identifier/data type Information/possible settings


bStart Start/continue positioning program
BOOL • Display parameter: C04690/2
FALSEÊTRUE The positioning program is started/continued.
• Counters and outputs are not automatically reset by this.
• A positioning program interrupted by bBreak is continued with
the sequence step.
TRUE If bStart remains on TRUE, the started positioning program
automatically starts at the beginning when the program end has
been reached.
TRUEÌFALSE The started positioning program is processed until the program end,
but after this there is no automatic start from the beginning.
bPause Interrupt the current step of the positioning program
BOOL • Display parameter: C04690/3
TRUE • An active positioning is interrupted.
– The drive is stopped with the current profile deceleration.
– An acceleration override is not considered.
• The sequence of an active timing element is stopped.
FALSE • The interrupted positioning is completed.
– The distance of the profile already covered is considered here.
• The deceleration of the stopped timing element is continued with
the residual time.
bCancel Cancel the current step and jump to the step defined in C04504
BOOL • Display parameter: C04690/6
FALSEÊTRUE The current step of the positioning program is cancelled
immediately and the positioning program is continued with the step
defined in C04504.
bBreak Interrupt positioning program
BOOL • This input is intended for a linkage with drive-relevant status signals (e.g. for
controller inhibit or quick stop).
• If the interruption is cancelled again by a reset to FALSE, a new FALSE/TRUE edge
is required at bStart so that the positioning program can be continued with the
sequence step.
• Display parameter: C04690/4
FALSE Condition for the program start via bStart.
TRUE The active positioning program is interrupted.
• If positioning is active, the drive is braked to standstill with the
deceleration time for stop.
• The system block LS_Positioner is deactivated.
• The system block LS_Homing is deactivated.
• The setpoint followers are deactivated.
• The digital output signals keep their state.
bReset Reset positioning program.
BOOL • Also possible when the positioning program is interrupted.
• Display parameter: C04690/5
FALSEÊTRUE The positioning program is reset.
• If positioning is active, the drive is braked to standstill with the
deceleration time for stop without considering an acceleration
override.
• The program flow is aborted ("program end").
• The digital output signals, counters and timing elements are
reset.
• In case a stand-by operation is active, it is aborted.

L 1.4 EN - 08/2006 183


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

Identifier/data type Information/possible settings


bProfileDone Interface to basic function "Positioning"
BOOL • Input for status signal "Profile has been executed".
• Connect this input with the status output of the same name of the
SB LS_Positioner.
• Display parameter: C04690/7
bHomingDone Interface to basic function "Homing"
BOOL • Input for status signal "Homing completed".
• Connect this input with the status output of the same name of the
SB LS_Homing.
• Display parameter: C04690/1
dwStartStep Step of the sequence table with which the positioning program is to start.
DWORD • Display parameter: C04692/6
0 Positioning program starts with step 1 of the sequence table.
1 ... 100 Starting step
other Positioning program does not start.
Not assigned Positioning program starts with step 1 of the sequence table.
dwBranch1 Input signal for action 1 of type "Variable branch"
DWORD • Display parameter: C04692/1
• If the positioning program contains the action 1 of type "Variable branch", a
branch is carried out depending on the value applied to this input.
0 Branch to the next step.
1 Branch to the step defined in C04540/1.
2 Branch to the step defined in C04541/1.
... ...
20 Branch to the step defined in C04559/1.
> 20 Branch to the next step.
dwBranch2 Input signal for action 2 of type "Variable branch"
DWORD • Display parameter: C04692/2
• If the positioning program contains the action 2 of type "Variable branch", a
branch is carried out depending on the value applied to this input.
0 Branch to the next step.
1 Branch to the step defined in C04540/2.
2 Branch to the step defined in C04541/2.
... ...
20 Branch to the step defined in C04559/2.
> 20 Branch to the next step.
dwBranch3 Input signal for action 3 of type "Variable branch"
DWORD • Display parameter: C04692/3
• If the positioning program contains the action 3 of type "Variable branch", a
branch is carried out depending on the value applied to this input.
0 Branch to the next step.
1 Branch to the step defined in C04540/3.
2 Branch to the step defined in C04541/3.
... ...
20 Branch to the step defined in C04559/3.
> 20 Branch to the next step.

184 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

Identifier/data type Information/possible settings


dwBranch4 Input signal for action 4 of type "Variable branch"
DWORD • Display parameter: C04692/4
• If the positioning program contains the action 4 of type "Variable branch", a
branch is carried out depending on the value applied to this input.
0 Branch to the next step.
1 Branch to the step defined in C04540/4.
2 Branch to the step defined in C04541/4.
... ...
20 Branch to the step defined in C04559/4.
> 20 Branch to the next step.
dwBranch5 Input signal for action 5 of type "Variable branch"
DWORD • Display parameter: C04692/5
• If the positioning program contains the action 5 of type "Variable branch", a
branch is carried out depending on the value applied to this input.
0 Branch to the next step.
1 Branch to the step defined in C04541/5.
2 Branch to the step defined in C04541/5.
... ...
20 Branch to the step defined in C04559/5.
> 20 Branch to the next step.
dwDigitalInputs Sequencer inputs 1 ... 32 (bit coded)
DWORD • The action types "Positioning", Branching", "Waiting" and "Stand-by" have the
parameter "Input for...". If this is non-zero, it describes the number of the
sequencer input where the positioning program awaits the level defined before
it executes the action.
• For the transmission of individual control signals a BOOL-to-DWORD converter
can be connected to this input.
• Display parameter: C04693/1
Bit 0 Sequencer input 1
Bit 1 Sequencer input 2
... ...
Bit 31 Sequencer input 32

L 1.4 EN - 08/2006 185


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT • Display parameter: C04691
Bit 15 Fault is active.
Bit 16 READY: Positioning program is ready to start/program end has been
reached.
Bit 17 RUN: Positioning program is running.
Bit 18 PAUSE: Positioning program is started, pause is active.
Bit 19 BREAK: Positioning program has been stopped.
Bit 20 RESET: Positioning program has been reset.
Bit 22 "Watchdog" monitoring function for positioning has been activated.
Bit 25 Wrong value at branch input.
bProgramBusy Status signal "Positioning program is running"
BOOL • Display parameter: C04690/15
FALSE Positioning program has not been started or stopped.
TRUE Positioning program is running.
dwActStep Current step which is processed by the positioning program.
DWORD • Display parameter: C04501
0 Positioning program has not been started.
1 ... 100 Current step
bEnablePositioner Interface to basic function "Positioning"
BOOL • Control signal for enabling the basic function.
• Connect this output with the input bEnable of the SB LS_Positioner.
• Display parameter: C04690/10
bStartProfile Interface to basic function "Positioning"
BOOL • Control signal for starting the positioning.
• Connect this output with the input bStart of the SB LS_Positioner.
• Display parameter: C04690/11
bAbortProfile Interface to basic function "Positioning"
BOOL • Control signal for aborting the positioning.
• Connect this output with the input bAbort of the SB LS_Positioner.
• Display parameter: C04690/12
bRestartProfile Interface to basic function "Positioning"
BOOL • Control signal for restarting the positioning.
• Connect this output with the input bRestart of the SB LS_Positioner.
• Display parameter: C04690/13
dwProfileNumber Interface to profile data record management
DINT • Transmission of the profile number for selecting the next profile .
• Connect this output with the input of the same name of the
FB L_PosPositionerTable.
• Display parameter: C04692/8
bEnableHoming Interface to basic function "Homing"
BOOL • Control signal for enabling the basic function.
• Connect this output with the input bEnable of the SB LS_Homing.
• Display parameter: C04690/8
bActivateHoming Interface to basic function "Homing"
BOOL • Control signal for starting homing.
• Connect this output with the input of the same name of the SB LS_Homing.
• Display parameter: C04690/9

186 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

Identifier/data type Value/meaning


bEnableFollower Enable signal for setpoint follower
BOOL • This output is intended for the enable of a setpoint follower during a stand-by
program step.
• Connect this output, if required, with the input bEnable of the corresponding
setpoint follower (SB LS_SpeedFollower, SB LS_TorqueFollower or
SB LS_PositionFollower).
• Display parameter: C04690/10
FALSE No enable since the basic function "Positioning" is active.
TRUE Enable is possible since stand-by program step is active.
dwDigitalOutputs Sequencer outputs 1 ... 32 (bit coded)
DWORD • The sequencer outputs can be set to "0" or "1" by means of the action type
"Switching" during the runtime of the positioning program.
• For the transmission of individual control signals a DWORD-to-BOOL converter
can be connected to this input.
• Display parameter: C04693/2
Bit 0 Sequencer output 1
Bit 1 Sequencer output 2
... ...
Bit 31 Sequencer output 32

L 1.4 EN - 08/2006 187


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

General parameters

Note!
The parameters of the different actions for the sequence tables are described in
the corresponding action subchapters.

Parameters Possible settings Information


C04500/1...100 Sequence table
0 Program end • In the subcodes the calls for the
actions required for the
xxyyy Action call positioning program are stored.
• xx ≡ action type • Thus, the basic sequence (except
• yyy ≡ action number for the branches) is described.
C04501 1 100 Current program step
• Read only
C04502 Status of sequence control
0 READY: Positioning program is ready • Read only
to start/program end has been
reached.
1 RUN: Positioning program is
running.
2 PAUSE: Current step is interrupted,
pause is active.
3 BREAK: Positioning program is
interrupted.
4 RESET: Positioning program has
been reset.
C04503 Sequence control
Bit 0 Start • Bit-coded code for controlling the
sequencer by a PC or master
Bit 1 Pause control via parameter channel.
Bit 2 BREAK • By setting a bit to "1" the
corresponding function is
Bit 3 Cancel activated.
Bit 4 Reset
C04504 Program step at abort
0 Sequence step • This step is processed when the
input bCancel is set to TRUE.
1 ... Step 1 ... 100
100
101 Program end
C04505 Text Current comment
• Read only

4.78.1 Priorities of the control signals

The boolean control signals are evaluated in the following sequence:

1. bReset 2. bBreak 3. bPause 4. bStart 5. bCancel

188 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

4.78.2 States of the sequencer

The internal state machine of the sequencer distinguishes the following five states:

Status Display Information


C04502
Ready 0 Positioning program ready to start/Program end reached.
• If the "Break" function is not activated, the positioning program can be started by
e.g. a FALSE/TRUE edge at bStart.
RUN 1 Positioning program is running.
• The sequence table is processed.
PAUSE 2 Positioning program is started, pause has been activated.
• An active positioning is interrupted.
– The drive is stopped with the current profile deceleration.
– An acceleration override is not considered.
• The sequence of an active timing element is stopped.
• After the pause is cancelled, the positioning program and a positioning activated
before or a stopped timing element are continued at the same position.
BREAK 3 Positioning program is interrupted.
• If positioning is active, the drive is braked to standstill with the deceleration time
for stop.
• The system block LS_Positioner is deactivated.
• The digital output signals keep their state.
• After the interruption is cancelled, a new start signal is required to continue the
positioning program with the sequence step.
Reset 4 Positioning program is reset.
• If positioning is active, the drive is braked to standstill with the deceleration time
for stop without considering an acceleration override.
• The program flow is aborted ("program end").
• The digital output signals, counters and timing elements are reset.
• In case a stand-by operation is active, it is aborted.

Reset = TRUE Break = FALSE


READY
Pause = TRUE
C04502 = 0 Start = FALSEäTRUE
bProgramBusy = FALSE
Reset = TRUEæFALSE

Break = FALSE
Program done Pause = FALSE
Start = FALSE Start = FALSEäTRUE

Reset = TRUE Pause = TRUE


RESET RUN PAUSE
C04502 = 4 C04502 = 1 C04502 = 2
bProgramBusy = FALSE bProgramBusy = TRUE bProgramBusy = TRUE
Pause = FALSE

Break = FALSE Break = TRUE


Start = FALSEäTRUE

Reset = TRUE Break = TRUE


BREAK
C04502 = 3
bProgramBusy = FALSE

Reset = TRUE

[4-1] Internal state machine of the sequencer

L 1.4 EN - 08/2006 189


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

4.78.3 Action types available for creating the positioning program

The program flow of the multi-purpose positioning is selected according to a sequence


table which can contain up to 100 references to "actions".
0 1
3
2 000
Set
12
4
Standby End
1 n

r An action comprises a clear functionality which is described with a few parameters.


r Different action types are available which serve to implement, for instance, program
branching, switching operations, waiting times and counters.
r Each action type provides a certain number of actions which can be parameterised
individually.
r One action can be called from several positions in the sequence table.
r After an action has been processed, the action in the next step of the sequence table is
automatically processed unless it is jumped to another step in the sequence table due
to a branch.
r One action can be maximally processed per computing cycle.
r The sequence table and the actions are displayed by parameters (codes with subcodes).
r Action calls are entered into the sequence table using a decimal number which
contains the action type  and the action number .
0 1

Overview

Action Action type Action number Number of available Parameter range


  actions (first instance)
Program end 0 000 1 -
Positioning 1 001 ... 050 50 C04510 ... C04516
Switching 2 001 ... 025 25 C04520 ... C04523
Branching 3 001 ... 025 25 C04530 ... C04532
Variable branching 4 001 ... 005 5 C04540 ... C04559
Homing 5 000 1 -
Wait 7 001 ... 025 25 C04570 ... C04573
Set counter 8 001 ... 010 10 C04580 ... C04582
Count 9 001 ... 025 25 C04590 ... C04593
Stand-by 10 001 ... 005 5 C04600 ... C04602

Detailed information of the action types can be found in the following subchapters.

190 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

[Link] Action type "Program end"

End

To define the program end in the sequence table, the action of type "Program end" is
available.

Action call (entry in the sequence table)

0 (Leading zeros can be left out).


r If the input bStart remains set on TRUE after the FALSE/TRUE edge for starting the
positioning program, the positioning program automatically starts from the beginning
after the program end has been reached.
r If the input bStart is reset to FALSE while the positioning program is running, the
processing is only continued until the program end has been reached.
r In the Lenze setting all entries of the sequence table are set to "0" and thus to "program
end".

L 1.4 EN - 08/2006 191


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

[Link] Action type "Positioning"

To execute a profile, 50 actions of type "Positioning" are available.

Action call (entry in the sequence table)

1 x x x with action number xxx = 001 ... 050

Waiting function
The execution of the set profile with activated waiting function is only started, if the bit 1
... 32 of the input signal dwDigitalInputs selected for the waiting function adopts the
selected signal state ("0" or "1").

"Watchdog" monitoring function


You can select an individual "watchdog time" for every "positioning" action.
r If positioning takes longer than the selected watchdog time, there will be a branch to
the next watchdog step.
r If the watchdog time is set to 0 s, the monitoring function is deactivated (Lenze
setting).

192 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

Parameters
The available actions 1 ... 50 are indicated via the subcodes 1 ... 50.

Parameters Possible settings Information


C04510/1...50 Text Comment on positioning step
• Option for description of the
function for keypad/HMI.
C04511/1...50 Input for waiting function
0 Waiting function is deactivated. • With the default setting "0" the
waiting function is skipped and
1 Sequencer input 1 the profile execution is started
(Bit 0 of dwDigitalInputs) immediately.
2 Sequencer input 2
(Bit 1 of dwDigitalInputs)
... ...
32 Sequencer input 32
(Bit 31 of dwDigitalInputs)
C04512/1...50 Signal state for waiting function
0 Profile start when bit state is "0" • Only when the input for the
waiting function has adopted this
1 Profile start when bit state is "1" state, the profile is executed.
C04513/1...50 Profile number
0 No profile execution. • A sequence profile can be set in
the corresponding profile
1 ... Execute profile no. 1 ... 100. parameter.
100
C04514/1...50 Sequence step
0 Sequence step • Step inside the sequence table
which will be processed after the
1 ... Step 1 ... 100 profile has been executed.
100
C04515/1...50 Watchdog time
0 Monitoring function is deactivated. • Monitoring time within which
positioning must be completed.
> 0 Monitoring time in [s] Otherwise, there will be a branch
to the next watchdog step
defined under C04516.
C04516/1...50 Watchdog sequence step
0 Sequence step • Executed when the watchdog
time is exceeded.
1 ... Step 1 ... 100
100

L 1.4 EN - 08/2006 193


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

[Link] Action type "Switching"

In order to switch digital output signals 25 actions of type "Switching" are available.
r Each action can set two selectable bits of the output signal dwDigitalOutputs to "0" or
"1" independently of each other.

Action call (entry in the sequence table)

2 x x x with action number xxx = 001 ... 025

Parameters
The available actions 1 ... 25 are indicated via the subcodes 1 ... 25.

Parameters Possible settings Information


C04520/1...25 Output A switching
0 Switching is deactivated.
1 Sequencer output 1
(Bit 0 of dwDigitalOutputs)
2 Sequencer output 2
(Bit 1 of dwDigitalOutputs)
... ...
32 Sequencer output 32
(Bit 31 of dwDigitalOutputs)
C04521/1...25 Signal state for A switching
0 Set bit to "0".
1 Set bit to "1".
C04522/1...25 Output for B switching
0 Switching is deactivated.
1 Sequencer output 1
(Bit 0 of dwDigitalOutputs)
2 Sequencer output 2
(Bit 1 of dwDigitalOutputs)
... ...
32 Sequencer output 32
(Bit 31 of dwDigitalOutputs)
C04523/1...25 Signal state for B switching
0 Set bit to "0".
1 Set bit to "1".

194 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

[Link] Action type "Branching"

25 actions of type "Branching" are available for conditional and unconditional branches
(jumps).
r A branch to the indicated step is executed when the comparison is deactivated or the
selected bit 1 ... 32 of the input signal dwDigitalInputs has the selected signal state at
the time of processing ("0" or "1"). If not, the sequence step is processed in the sequence
table.

Action call (entry in the sequence table)

3 x x x with action number xxx = 001 ... 025

Parameters
The available actions 1 ... 25 are indicated via the subcodes 1 ... 25.

Parameters Possible settings Information


C04530/1...25 Input for comparison
0 Comparison is deactivated.
(The sequence step set in C04532/
1...25 is processed).
1 Sequencer input 1
(Bit 0 of dwDigitalInputs)
2 Sequencer input 2
(Bit 1 of dwDigitalInputs)
... ...
32 Sequencer input 32
(Bit 31 of dwDigitalInputs)
C04531/1...25 Comparison value
0 Comparison with "0" • State which is compared with the
bit to be evaluated of the input
1 Comparison with "1" signal dwDigitalInputs.
C04532/1...25 Sequence step in case of equality
0 Sequence step • If the bit to be evaluated of the
input signal dwDigitalInputs
1 ... Step 1 ... 100 equals the comparison value, a
100 branch to the step set here is
executed.
• In case of inequality or "0" setting,
the next step in the sequence
table is processed.

L 1.4 EN - 08/2006 195


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

[Link] Action type "Variable branching"

1
2
n

For variable branches (jumps) 5 actions of type "Variable branching" are available.
r The branch to one of 20 possible steps is executed depending on the input signal
dwBranch1...5 at the time of processing.
r The input signals dwBranch1...5 are firmly assigned to the five available actions
– Input signal dwBranch1 determines the branch for action 1,
– Input signal dwBranch2 determines the branch for action 2, etc.
r Example: When the input signal dwBranch2 has the value "15" at the time of
processing the action no. 2, it is branched to the step which is entered in the parameter
"Sequence step at branch 15" for action no. 2 (C04554/2).

Action call (entry in the sequence table)

4 x x x with action number xxx = 001 ... 005

196 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

Parameters
The available actions 1 ... 5 are indicated via the subcodes 1 ... 5.

Parameters Possible settings Information


C04540/1...5 Sequence step at branch value 1
0 Branching is deactivated. • Step which is executed next when
input dwBranch1...5 = "1".
(The next step in the sequence table
is processed.)
1 ... Step 1 ... 100
100
C04541/1...5 See possible settings for C04540. Sequence step at branch value 2
C04542/1...5 Sequence step at branch value 3
C04543/1...5 Sequence step at branch value 4
C04544/1...5 Sequence step at branch value 5
C04545/1...5 Sequence step at branch value 6
C04546/1...5 Sequence step at branch value 7
C04547/1...5 Sequence step at branch value 8
C04548/1...5 Sequence step at branch value 9
C04549/1...5 Sequence step at branch value 10
C04550/1...5 Sequence step at branch value 11
C04551/1...5 Sequence step at branch value 12
C04552/1...5 Sequence step at branch value 13
C04553/1...5 Sequence step at branch value 14
C04554/1...5 Sequence step at branch value 15
C04555/1...5 Sequence step at branch value 16
C04556/1...5 Sequence step at branch value 17
C04557/1...5 Sequence step at branch value 18
C04558/1...5 Sequence step at branch value 19
C04559/1...5 Sequence step at branch value 20

L 1.4 EN - 08/2006 197


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

[Link] Action type "Homing"

In order to execute a homing function, the action of type "Homing" is available.

Action call (entry in the sequence table)

5 0 0 0

Note!
The "Homing" action has no own parameters.
The settings for homing are carried out via the parameters of the basic function
"Homing".

Required connections
This functionality requires the following connections between the FB and the basic
function "Homing":
r Output bEnableHoming  input HM_bEnable of the SB LS_Homing.
r Output bActivateHoming  input HM_bActivateHoming of the SB LS_Homing.
r Output HM_bDone of the SB LS_Homing  input bHomingDone.

Sequence
1. The call of the action causes the enable of the SB LS_Positioner to be deactivated and
the SB LS_Homing to be enabled instead.
2. The output bActivateHoming for activating homing is set to TRUE.
3. After the feedback via input bHomingDone that homing has been executed, the enable
of the SB LS_Homing is deactivated again.
4. The SB LS_Positioner is enabled again and the program flow is continued.

198 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

[Link] Action type "Waiting"

25 actions of type "Wait" are available for the insertion into the program flow.
r The sequence step is only processed after the waiting time has expired or when the
selected bit 1 ... 32 of the input signal dwDigitalInputs has the selected signal state ("1"
or "2") at the time of processing.

Waiting time Input Function


C04571 C04572
0 0 Sequence step is processed immediately (default setting).
(deactivated) (deactivated)
> 0 [s] 0 After the waiting time has expired, the sequence step will be processed.
(deactivated)
> 0 [s] 1 ... 32 The sequence step will be processed when the input for the waiting time has the set
state, but no later than after the set waiting time has elapsed.
0 1 ... 32 If the input for the waiting function has the set state, the sequence step will be
(deactivated) processed.

Action call (entry in the sequence table)

7 x x x with action number xxx = 001 ... 025

Parameters
The available actions 1 ... 25 are indicated via the subcodes 1 ... 25.

Parameters Possible settings Information


C04570/1...25 Text Comment on waiting step
• Option for description of the
function for keypad/HMI.
C04571/1...25 0 Waiting time is deactivated. Waiting time
> 0 Waiting time in [s]
C04572/1...25 Input for waiting function
0 Input is deactivated.
1 Sequencer input 1
(Bit 0 of dwDigitalInputs)
2 Sequencer input 2
(Bit 1 of dwDigitalInputs)
... ...
32 Sequencer input 32
(Bit 31 of dwDigitalInputs)
C04573/1...50 Signal state for waiting function
0 Sequence step when bit state is "0" • Only when the input for the
waiting function has adopted this
1 Sequence step when bit state is "1" state, the sequence step will be
processed.

L 1.4 EN - 08/2006 199


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

[Link] Action type "Counter setting"

000
Set

10 actions of type "Set counter" are available for setting one of the 10 available counters to
a certain starting value.
r The 10 actions of type "Set counter" are not firmly assigned to the 10 counters.
r You can use, for instance, an action of type "Set counter" to set a counter to a value and
later you can set the same counter with another action of type "Set counter" to another
value.

Action call (entry in the sequence table)

8 x x x with action number xxx = 001 ... 010

Parameters
The available actions 1 ... 10 are indicated via the subcodes 1 ... 10.

Parameters Possible settings Information


C04580/1...10 Counter selection
0 "Counter setting" is deactivated.
1 ... 10 Counter 1 ...10
C04581/1...10 -2147483648 2147483648 New counter content
C04582/1...10 -2147483648 2147483648 Current counter content
• Read only

200 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

[Link] Action type "Counting"

3
12
4

25 actions of type "Count" are available for counting processes.


r With each action processing the counter content of the respective counter is increased
or reduced by the set step value (count upwards or downwards).
r When the comparison condition for comparing the counter content with an adjustable
comparison value is fulfilled, a branch to any step is possible.
r 10 actions of type "Set counter" are available for setting a counter to a starting value.

Action call (entry in the sequence table)

9 x x x with action number xxx = 001 ... 025

Parameters
The available actions 1 ... 25 are indicated via the subcodes 1 ... 25.

Parameters Possible settings Information


C04590/1...25 Counter selection
0 Counting is deactivated.
(Sequence step is processed.)
1 ... 10 Counter 1 ...10
C04591/1...25 -2147483648 2147483648 Step value
• Value by which the counter is
increased or reduced.
C04592/1...25 -2147483648 2147483648 Comparison value
• Value with which the counter is
compared.
C04593/1...25 Sequence step
0 Sequence step • When the set comparison
condition is met, a branch to the
1 ... Step 1 ... 100 step set here is executed.
100 • If the condition is not fulfilled or
with "0" setting, the next step in
the sequence table is processed.
C04594/1...25 Comparison condition
1 Counter content = comparison value
2 Counter content > comparison value
3 Counter content ≥ comparison value
4 Counter content < comparison value
5 Counter content ≤ comparison value

L 1.4 EN - 08/2006 201


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

[Link] Action type "Stand-by"

Standby

5 actions of type "Stand-by" are available for the temporary activation of a setpoint
follower.
r For this purpose the output bEnableFollower must be connected with the enable input
bEnable of the corresponding setpoint follower (SB LS_SpeedFollower,
SB LS_TorqueFollower or SB LS_PositionFollower).
r The enable signal at the output bEnableFollower is applied until the condition for
exiting the stand-by is met.

Action call (entry in the sequence table)

1 0 x x x with action number xxx = 001 ... 005

Parameters
The available actions 1 ... 5 are indicated via the subcodes 1 ... 5.

Parameters Possible settings Information


C04600/1...5 Text Comment on "Stand-by" step
• Option for description of the
function for keypad/HMI.
C04601/1...5 Input for "Stand-by" end
1 Sequencer input 1
(Bit 0 of dwDigitalInputs)
2 Sequencer input 2
(Bit 1 of dwDigitalInputs)
... ...
32 Sequencer input 32
(Bit 31 of dwDigitalInputs)
C04602/1...5 Signal state for "Stand-by" end
0 Sequence step when bit state is "0" • Only when the input for the end
of "Stand-by" has reached this
1 Sequence step when bit state is "1" state, this stand-by step is exited
and the sequence step is
processed.

202 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_PosSequencer - Sequence control

4.78.4 Example: Sequence table

Parameters Entry ≡ Action type/action no. Meaning


C04500/1 5000 - Execute homing

C04500/2 3001 1 Process action 1 of type "Branching" (3)


0

C04500/3 9005 5 Process action 5 of type "Counting" (9)


3
12
4

C04500/4 1001 1 Process action 1 of type "Positioning" (1)

C04500/5 7003 3 Process action 3 of type "Waiting" (7)

C04500/6 1002 2 Process action 2 of type "Positioning" (1)

C04500/7 3002 2 Process action 2 of type "Branching" (3)


0

C04500/8 9005 5 Process action 5 of type "Counting" (9)


3
12
4

C04500/9 3004 4 Process action 4 of type "Branching" (3)


0

C04500/... yyxxx yy xxx Process action xxx of type yy


C04500/24 1012 12 Process action 12 of type "Positioning" (1)

C04500/25 0 - Program end


End

C04500/26 0 - Program end


End

C04500/... ... ... ... ...


C04500/100 0 - Program end
End

L 1.4 EN - 08/2006 203


L-force | 9400 function library
Function blocks
L_SdDelayComp - Dead time compensation

4.79 L_SdDelayComp - Dead time compensation

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB extrapolates a signal by a set time. In this way, the FB can compensate for the dead
times of incoming signals resulting from the bus transfer.
r The FB considers a modulo measuring system and the cycle of the selected machine
parameters.

L_SdDelayComp
dnPosIn_p Out dnPosOut_p
In
AxisData
Dt

Inputs

Identifier/data type Information/possible settings


dnPosIn_p Position in [inc]
DINT
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnPosOut_p Compensated position in [inc]
DINT

Parameters

Parameters Possible settings Information


C04320 0.000 ms 8.000 Compensation time
• Initialisation: 0.000 ms

204 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_SdDifferentiate - Differentiation

4.80 L_SdDifferentiate - Differentiation

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB creates a speed signal from a position value.

Note!
The FB is not suitable for clocked (modulo) positions!

L_SdDifferentiate
dnPosIn_p dnSpeedOut_s
AxisData

Inputs

Identifier/data type Information/possible settings


dnPosIn_p Position in [inc]
DINT • Scaling: 1 motor revolution ≡ 216 (or acc. to AxisData)
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnSpeedOut_s Speed output in [rpm]
DINT • Scaling: 15000 rpm ≡ 226 ≡ 67108864

L 1.4 EN - 08/2006 205


L-force | 9400 function library
Function blocks
L_SdFactor - Stretching factor

4.81 L_SdFactor - Stretching factor

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB provides the "stretching factor" function for the application "Electronic gearbox".
r The calculation is made with remainder handling.

L_SdFactor
dnIn dnOut
dnNumerator bLimit
a
dnDenominator
b
bNegOutput

Inputs

Identifier/data type Information/possible settings


dnIn Input signal
DINT
dnNumerator Stretching factor (numerator)
DINT • 0 ... 231-1
• If an invalid value is selected, the gain will be set to "0".
dnDenominator Stretching factor (denominator)
DINT • 0 ... 231-1
• If an invalid value is selected, the gain will be set to "0".
bNegOutput Reverse output signal
BOOL FALSE Inversion is deactivated.
TRUE The output signal is reversed compared to the input signal if a
positive value is applied to the input dnNumerator.

Outputs

Identifier/data type Value/meaning


dnOut Output signal
DINT
bLimit Status "Output signal is limited"
BOOL TRUE The output signal is limited, the drive does not follow the setpoint.

206 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_SdGetPosition - Position conversion

4.82 L_SdGetPosition - Position conversion

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB uses the transmitted machine parameters and converts a position in [inc] into a
position in the real unit of the machine. The converted position is displayed in C04273.

L_SdGetPosition
dnPosIn_p dnState
AxisData bError

Inputs

Identifier/data type Information/possible settings


dnPosIn_p Position in [inc]
DINT • Scaling: 1 motor revolution ≡ 216 (or acc. to AxisData)
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnState Status
DINT 0 Ok - no fault
-1 No machine parameters are applied to the input AxisData.
bError "Fault" status signal
BOOL TRUE The conversion was incorrect.

Parameters

Parameters Possible settings Information


C04271 -2147483647 2147483647 Status
• Display of the bit-coded output
signal dnState.
C04273 -214748.3647 unit 214748.3647 Position value
• Display of the input signal
dnPosIn_p in the real unit of the
machine.

L 1.4 EN - 08/2006 207


L-force | 9400 function library
Function blocks
L_SdGetSpeed - Speed conversion

4.83 L_SdGetSpeed - Speed conversion

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB uses the transmitted machine parameters and converts a speed into a velocity. The
converted value is displayed in C04283.

L_SdGetSpeed
dnSpeedIn_s dnState
AxisData bError

Inputs

Identifier/data type Information/possible settings


dnSpeedIn_s Speed in [rpm]
DINT • Scaling: 15000 rpm ≡ 226 ≡ 67108864
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnState Status
DINT 0 Ok - no fault
-1 No machine parameters are applied to the input AxisData.
bError "Fault" status signal
BOOL TRUE The conversion was incorrect.

Parameters

Parameters Possible settings Information


C04281 -2147483647 2147483647 Status
• Display of the bit-coded output
signal dnState.
C04283 -214748.3647 unit/t 214748.3647 Speed value
• Read only
• Calculated from the speed signal
dnSpeedIn_s.

208 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_SdIntegrate - integration

4.84 L_SdIntegrate - integration

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB integrates a speed to a position.


r The calculation is made with remainder handling.

L_SdIntegrate
dnSpeedIn_s dnPosOut_p
bLoadStartPos bError
dnStartPos_p
AxisData

Inputs

Identifier/data type Information/possible settings


dnSpeedIn_s Speed in [rpm]
DINT • 15000 rpm ≡ 226 ≡ 67108864
bLoadStartPos Load integrator with starting position and reset overflow signal.
BOOL TRUE Load the integrator with the value applied to input dnStartPos_p and
reset bError to FALSE.
dnStartPos_p Starting position in [inc] with which the integrator is loaded by setting
DINT bLoadStartPos to TRUE.
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)
• If this input is released, the following scaling applies:
1 motor revolution ≡ 216

Outputs

Identifier/data type Value/meaning


dnPosOut_p Position in [inc]
DINT • Overflow is possible (display via bError)
bError Status signal "Overflow occurs"
BOOL • Status signal can be reset via bLoadStartPos.
TRUE Overflow has occurred.

L 1.4 EN - 08/2006 209


L-force | 9400 function library
Function blocks
L_SdLimitSpeed - Speed limitation

4.85 L_SdLimitSpeed - Speed limitation

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB is used to lead a speed setpoint to defined limit ranges.


r The overflow buffer has a sample rate of 8 revolutions/ms.

L_SdLimitSpeed
dnSpeedIn_s 0 dnState
1 dnSpeedOut_s
dnUpperLimit_s bLimit
dnLowerLimit_s CTRL
bEnable
AxisData

Inputs

Identifier/data type Information/possible settings


dnSpeedIn_s Speed input signal in [rpm]
DINT • 15000 rpm ≡ 226 ≡ 67108864
dnUpperLimit_s Upper speed limit in [rpm]
DINT • 15000 rpm ≡ 226 ≡ 67108864
dnLowerLimit_s Lower speed limit in [rpm]
DINT • 15000 rpm ≡ 226 ≡ 67108864
bEnable Activate speed limitation
BOOL FALSE Speed limitation is deactivated.
• The input signal dnSpeedIn_s is output unchanged to the output
dnSpeedOut_s.
• The overflow buffer is cleared.
TRUE Speed limitation is activated.
• The input signal dnSpeedIn_s is output to the output
dnSpeedOut_s considering the defined speed ranges.
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

210 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_SdLimitSpeed - Speed limitation

Outputs

Identifier/data type Value/meaning


dnState Status (bit-coded)
DINT Bit 0 Ok - no fault
Bit 15 Fault (group signal)
Bit 16 Speed output signal is limited to the upper speed limit.
Bit 17 Speed output signal is limited to the lower speed limit.
Bit 18 No speed limits defined, the speed limitation is not active.
Bit 19 Speed limits are invalid.
Bit 20 Overflow of the overflow buffer
dnSpeedOut_s Speed output signal in [rpm]
DINT
bLimit Status signal "Speed limitation is active"
BOOL TRUE The speed output signal is limited.

Parameters

Parameters Possible settings Information


C04300 -214748.3647 unit/t 214748.3647 Speed output
• Read only
• Calculated from the speed signal
dnSpeedOut_s.
C04301 -214748.3647 unit/t 214748.3647 Speed input
• Read only
• Calculated from the speed signal
dnSpeedIn_s.
C04303 Status
0 Speed limitation is deactivated. • Display of the input signal
bEnable.
1 Speed limitation is activated.
C04304 Status message
0 Speed output signal is not limited. • Display of the output signal
bLimit.
1 Speed output signal is limited.
C04305 -2147483647 2147483647 Status
• Display of the bit-coded output
signal dnState.

L 1.4 EN - 08/2006 211


L-force | 9400 function library
Function blocks
L_SdPosToUnit - Position conversion

4.86 L_SdPosToUnit - Position conversion

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB uses the transmitted machine parameters and converts a position defined in the
internal unit [inc] into a position in the real unit of the machine.

L_SdPosToUnit
dnPosIn_p dnPosOut_e4
[inc]W[unit]
AxisData bLimit

Inputs

Identifier/data type Information/possible settings


dnPosIn_p Position in [inc]
DINT
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnPosOut_e4 Position in [unit]
DINT • Output in "e4" format (fixed point with four decimal positions)
bLimit Status "Output signal is limited"
BOOL TRUE The output signal is limited to the value range that can be displayed.

Parameters

Identifier/data type Possible settings Information


Index
C04312 String from AxisData Position unit
• Read only

212 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_SdRampGenerator - Ramp function generator with S-ramp

4.87 L_SdRampGenerator - Ramp function generator with S-ramp

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB is a ramp function generator with S-shaped ramps for limiting the increase of
analog signals over time. The S-shape of the ramps results from a trapezoidal acceleration.
r The ramp function generator has a setting function for directly loading the value into
the internal ramp generator.
r The acceleration/deceleration times are set via C04340.
r An S-ramp time for a jerk-free acceleration can be set in C04341.
r The slope dy/dt of the output signal dnOut_n is output to the output dnDeltaOut_n.

L_SdRampGenerator
dnIn_n dnOut_n
bLoadStartValue
dnStartValue_n dnDeltaOut_n

Inputs

Identifier/data type Information/possible settings


dnIn_n Scaled input signal
DINT
bLoadStartValue Initialising ramp function generator
BOOL FALSE The ramp function generator runs with the Ti times set from the
value loaded via dnStartValue_n to the value at dnIn_n.
TRUE At the output dnOut_n dnStartValue_n is output, dnDeltaOut_n
remains on 0 %.
dnStartValue_n Scaled starting value for the ramp function generator
DINT • Acceptance when bLoadStartValue = TRUE

Outputs

Identifier/data type Value/meaning


dnOut_n Scaled output signal
DINT • Internally limited to ±200 %
dnDeltaOut_n Scaled acceleration of the ramp function generator
DINT • Internally limited to ±200 %

L 1.4 EN - 08/2006 213


L-force | 9400 function library
Function blocks
L_SdRampGenerator - Ramp function generator with S-ramp

Parameters

Identifier/data type Possible settings Information


Index
C04340 0.001 s 1000.000 Acceleration / deceleration time
• Initialisation: 1.000 s
C04349 0.001 s 10.000 S-ramp time
• Initialisation: 0.100 s

4.87.1 Loading the ramp function generator

By setting bLoadStartValue to TRUE the ramp function generator is loaded with the signal
at dnStartValue_n.
r This value is accepted immediately and output to nOut_n. No s-shape ramp-up or
ramp-down takes place.
r As long as bLoadStartValue = TRUE , the ramp function generator is inhibited.

214 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_SdRampGenerator - Ramp function generator with S-ramp

4.87.2 Acceleration and jerk

The maximum acceleration and the jerk can be adjusted separately.

dnIn_n

dnOut_n

dnDeltaOut_n
C04340

0 t

C04340

C04349

1 t

 acceleration
 S-ramp time

[4-1] Line diagram

Acceleration / deceleration time


The acceleration and deceleration time are set in C04340.
r The acceleration time describes the time necessary to reaching 100 %.
r The setting is done according to the formula:

1 s ⋅ 100 %-
--------------------------
C04340 [s]

S-ramp time
An S-ramp time for a jerk-free acceleration of the drive can be set in C04349.
r The jerk is entered in [s] until the ramp function generator operates with the maximum
acceleration.

L 1.4 EN - 08/2006 215


L-force | 9400 function library
Function blocks
L_SdRuntimeComp - Runtime compensation

4.88 L_SdRuntimeComp - Runtime compensation

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB is used for the runtime compensation of position signals that are, for instance,
transmitted by means of a bus system.
r The output signal leads the input signal by the last position difference.
r The resulting rate time equals the task runtime of the program in which the FB is used.

Note!
The FB is not suitable for clocked (modulo) positions!
The FB L_SdDelayComp can be used for dead time compensation. (C 204)

L_SdRuntimeComp
dnPosIn_p dnPosOut_p
bEnable

Inputs

Identifier/data type Information/possible settings


dnPosIn_p Position in [inc]
DINT
bEnable Activate compensation
BOOL TRUE Compensation is activated.

Outputs

Identifier/data type Value/meaning


dnPosOut_p Compensated position in [inc]
DINT • Leads the input signal dnPosIn_p by the last position difference.

216 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_SdSetAxisData - Machine parameter

4.89 L_SdSetAxisData - Machine parameter

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB serves to indicate the machine parameters of a master drive. The FB prepares the
machine parameters which you define with the physical units of the machine via
parameters for the internal measuring system of the profile generator.
r The FB outputs a pointer to the data structure with the prepared machine parameters
at the output AxisData.
r To transmit the machine parameters to another FB, which requires these data for
internal calculations, the output AxisData must simply be connected with the input of
the same name of the corresponding FB.

L_SdSetAxisData
AxisData

Outputs

Identifier/data type Value/meaning


AxisData Machine parameters
• Pointer to a data structure the elements of which contain the machine
parameters in the internal measuring system.
• Via this "interface" the machine parameters can be provided for other FBs which
require these data for internal calculations.

Parameters

Parameters Possible settings Information


C04240 1 2147483647 Gearbox ratio - numerator
• Initialisation: 1
C04241 1 2147483647 Gearbox ratio - denominator
• Initialisation: 1
C04242 0.0001 unit/inc 214748.3647 Feed constant
• Initialisation: 360 unit/inc
C04243 Path unit
0 User-defined Selection in C04244
1 inc
2 μM
3 mm
4 M
5 inch
6 yard
7 %
C04244 String of digits with max. 8 characters User-defined path unit

L 1.4 EN - 08/2006 217


L-force | 9400 function library
Function blocks
L_SdSetAxisData - Machine parameter

Parameters Possible settings Information


C04245 Time unit
• The time base unit is default set to
"s" and cannot be changed!
0 User-defined
1 ms
2 s
3 min
4 H
C04248 0.0000 unit 214748.3647 Cycle
• Initialisation: 360 unit
C04249 10 Bit 28 Resolution of encoder revolution
• Initialisation: 16 bits
C04251 -214748.3647 unit/t 214748.3647 Maximum speed
• Initialisation:
214748.3647 unit/t
C04258 -2147483.647 2147483.647 Resulting gearbox factor
• Read only
C04259 -214748.3647 inc 214748.3647 Resolution - application unit
• Read only

4.89.1 Typical application

L_SdSetPosition
dnState
L_SdSetAxisData
dnSetPos_p
Œ C04240 AxisData  AxisData bError
C04241
C04242

[4-1] Typical application

1. The machine data are specified with the physical units of the machine via the
corresponding parameters. n
2. The FB converts the machine parameters into the internal measuring system of the
profile generator and provides the data at the output AxisData as a data structure for
transfer to other FBs. o
– A modulo measuring system will always be output.

218 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_SdSetAxisData - Machine parameter

4.89.2 Selection and input of machine parameters

The following table lists absolutely necessary machine parameters:

Machine parameters Setting Unit Information


Gearbox ratio - numerator C04240 - Input according to the gearbox nameplate.
Gearbox ratio - denominator C04241 -
Feed constant (Vk) C04242 unit Enter the number in [unit] (e.g. [mm]), which is to be
fed when the gearbox output revolves once.
Maximum speed (vmax) C04251 unit/t This limit applies to the entire machine.
Caution: The limit must be set in a way that it can be
reached with max. motor speed:
Feed constant gearbox (denominator)
V max ≤ n max ⋅ ------------------------------------ ⋅ ------------------------------------------------------------
60 gearbox (numerator)
C04242 C04240
dwVmax ≤ C00011 ⋅ -------------------- ⋅ --------------------
60 C04241

L 1.4 EN - 08/2006 219


L-force | 9400 function library
Function blocks
L_SdSetAxisData - Machine parameter

4.89.3 Example

The machine parameters of a master value encoder are to be displayed in the application
for the purpose of master value processing.

i1 = 3.333 i2

l 1 = 600 mm
d1 = 150 mm d2

v max = 1000 mm/s

Œ 
n Machine parameters of the master value encoder
o Machine parameters of the drive/motor

[4-2] Schematic diagram of real master (master value encoder)

Settings

Machine parameters Setting Input Information


Gearbox ratio - numerator C04240 10 Enter gearbox ratio i1 = 3,333 for the master value
encoder as a quotient (numerator and denominator).
Gearbox ratio - denominator C04241 3
Feed constant C04242 471.2389 Vk = d1 * π = 150 mm * π = 471.2389 mm
Path unit C04243 3 Unit = [mm]
Cycle C04248 600 l1 = 600 mm
Maximum speed C04251 1000 vmax = 1000 mm/s

O Tip!
The machine parameters for the drive/motor are set via the drive interface
(SB LS_DriveInterface).

220 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_SdSetPosition - position conversion

4.90 L_SdSetPosition - position conversion

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB uses the transmitted machine parameters and converts a position which has been
selected via C04276 in the real machine units into a position in [inc] and outputs it at
dnSetPos_p for further processing within the FB interconnection.

L_SdSetPosition
dnState
dnSetPos_p
AxisData bError

Inputs

Identifier/data type Information/possible settings


AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)
• If this input is released, the following scaling applies:
1 motor revolution ≡ 216

Outputs

Identifier/data type Value/meaning


dnState Status
DINT 0 Ok - no fault
dnSetPos_p Position in [inc]
DINT • Scaling: 1 motor revolution ≡ 216 or via AxisData.
bError "Fault" status signal
BOOL TRUE The conversion was incorrect.

Parameters

Parameters Possible settings Information


C04276 -214000 unit 214000 Position value
• Initialisation: 0 unit
C04278 -2147483647 2147483647 Status
• Read only

L 1.4 EN - 08/2006 221


L-force | 9400 function library
Function blocks
L_SdSetSpeed - speed conversion

4.91 L_SdSetSpeed - speed conversion

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB uses the transmitted machine parameters and converts a velocity which has been
selected via C04286 in the real machine units into a speed and outputs it at dnSetSpeed_s
for further processing in the FB interconnection.

L_SdSetSpeed
dnState
dnSetSpeed_s
AxisData bError

Inputs

Identifier/data type Information/possible settings


AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnState Status
DINT 0 Ok - no fault

dnSetSpeed_s Speed output in [rpm]


DINT • 15000 rpm ≡ 226 ≡ 67108864
bError "Fault" status signal
BOOL TRUE The conversion was incorrect.

Parameters

Parameters Possible settings Information


C04286 -214748.3647 unit/t 214748.3647 Speed value
• Initialisation: 0 unit/t
C04288 -2147483647 2147483647 Status
• Display of the bit-coded output
signal dnState.

222 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_SdSpeedFilter - Speed signal delay

4.92 L_SdSpeedFilter - Speed signal delay

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB is used to filter or delay a speed signal according to the PT1 principle. The resulting
position loss is compensated by an internal overflow buffer.

L_SdSpeedFilter
dnSpeedIn_s 0 dnSpeedOut_s
1
bEnable bLimitActive
AxisData

Inputs

Identifier/data type Information/possible settings


dnSpeedIn_s Speed selection in [rpm]
DINT • 15000 rpm ≡ 226 ≡ 67108864
bEnable Activate filter function
BOOL FALSE Filter is deactivated.
• Use these settings during the acceleration and deceleration
phases to prevent a drifting of the position.
TRUE Filter is activated.
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnSpeedOut_s Filtered speed in [rpm]
DINT
bLimitActive Status signal "Overflow/underflow"
BOOL TRUE An overflow/underflow has occurred.

Parameters

Parameters Possible settings Information


C04290 0.0000 unit/s 214000.0000 Compensating speed
• For compensating the phase
differences.
• Initialisation: 0.0010 unit/s
C04291 0.000 s 60.000 Filter time constant
• Initialisation: 0.003 s

L 1.4 EN - 08/2006 223


L-force | 9400 function library
Function blocks
L_SdSpeedFilter - Speed signal delay

Parameters Possible settings Information


C04294 -214748.3647 unit/t 214748.3647 Speed output
• Read only
• Calculated from the speed signal
dnSpeedOut_s.
C04295 -214748.3647 unit/t 214748.3647 Speed input
• Read only
• Calculated from the speed signal
dnSpeedIn_s.
C04299 Status - filter
0 Filter is not active • Read only

1 Filter is active

224 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_SdSpeedSet - Setpoint ramp generator

4.93 L_SdSpeedSet - Setpoint ramp generator

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB contains a ramp generator with comprehensive parameterisation and control


options for conditioning a setpoint signal.

L_SdSpeedSet
dnSpeedSetpointIn_n dnSpeedSetpointOut_n
C04221
bInvertSetpoint C04223
C04207 C04208
bHoldOutput dnTargetSetpoint_n
bStop 0 C04222

0 bSetpointOutInTarget
1
Fixed setpoints 0
1 C04224
C04200/1
200 %
C04201 1

bJog1
20 C04200/15 15
bStoppingActive
bJog2
21 0
bJog4
22 15 Tir Tif Jerk time
bJog8
23 C04202 C04203 C04204 0

1
C04212/1 C04213/1 C04214/1
C04215
bTi1
20 C04212/15 C04213/15 C04214/15 15

bTi2
21 0
bTi4
22 15
bTi8
23

bLoadExtSpeedSetpoint
dnExtSpeedSetpoint_n
bLoadActualMotorSpeed
C04225 Gear reference speed
dnActualMotorSpeed_n
C04226 Gear speed setpoint
dwRampMode
C04227 Machine reference speed
C04220 C04228 Machine speed setpoint
AxisData
C04229 Unit for speed

Inputs

Identifier/data type Information/possible settings


dnSpeedSetpointIn_n Input setpoint in [%]
DINT • Relating to the reference speed (C00011)
bInvertSetpoint Reversing the speed setpoint
BOOL TRUE Speed setpoint is inverted.
bHoldOutput Holding (freezing) the output value
BOOL TRUE The current value of the ramp generator is held.
bStop Activating "Ramp-down" to standstill
BOOL • This input has priority over the input bHoldOutput.
TRUE The current value of the ramp generator is led to "0" via the Ti time
set.
bJog1 ... bJog8 Binary coded selection of the setpoint.
BOOL • When all inputs are set to FALSE, the setpoint dnSpeedSetpointIn_n is selected,
otherwise the corresponding fixed setpoint (C04200/1...15).

L 1.4 EN - 08/2006 225


L-force | 9400 function library
Function blocks
L_SdSpeedSet - Setpoint ramp generator

Identifier/data type Information/possible settings


bTI1 ... bTI8 Binary coded selection of the acceleration, deceleration and S-ramp time.
BOOL • The times are set in the subcodes of C04212, C04213 and C04214.
• The conversion is controlled via dwRampMode and bStop.
bLoadExtSpeedSetpoint Loading of the ramp generator with the motor-based speed setpoint
BOOL dnExtSpeedSetpoint_n.
TRUE The input signal dnExtSpeedSetpoint_n is loaded into the ramp
generator.
dnExtSpeedSetpoint_n Motor-based speed setpoint in [%]
DINT • Is loaded into the ramp generator by setting bLoadExtSpeedSetpoint to TRUE.
bLoadActualMotorSpeed Loading of the ramp generator with the motor-based actual speed
BOOL dnActualMotorSpeed_n.
TRUE The input signal dnActualMotorSpeed_n is loaded into the ramp
generator.
dnActualMotorSpeed_n Motor-based actual speed value in [%]
DINT • Is loaded into the ramp generator by setting bLoadActualMotorSpeed to TRUE.
dwRampMode Type of profile generation
DWORD • Can also be set via C04220.
0 Profile generation with linear ramps.
• Relating to the reference speed (C00011).
1 Profile generation with jerk limitation (S ramps).
10 Profile generation with linear ramps.
• Relating to the reference speed (C00011).
• In case of edge change at the bStop input with regard to the
current setpoint (constant time).
• The setpoint applied to the input dnExtSpeedSetpoint_n is
adopted as starting value.
AxisData Machine parameters
• For calculation and display of reference values on the load side (output shaft
speed, machine speed) the reference speed (C00011), the gearbox factor and the
feed constant are required.
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.

Outputs

Identifier/data type Value/meaning


dnSpeedSetpointOut_n Output setpoint
DINT • Relating to the reference speed (C00011)
bStoppingActive Status signal "Ramp-down is active"
BOOL • Ramp-down can be activated via the input bStop.
TRUE The ramp generator leads the current output value to "0" (standstill).
TRUEÌFALSE The output value equals "0" (standstill).
dnTargetSetpoint_n Current target setpoint (at the input of the ramp generator)
DINT • Relating to the reference speed (C00011)
bSetpointOutInTarget Status signal "Default value reached"
BOOL TRUE The output of the ramp generator has reached the default value (in
consideration of the window set).

226 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_SdSpeedSet - Setpoint ramp generator

Parameters

Parameters Possible settings Information


C04200/1...15 -200.00 % 200.00 Fixed setpoint 1 ... 15
• Initialisation: 0.00 %
C04201 0 15 Active setpoint
• Read only
C04202 0.000 s 1000.000 Basic acceleration time
• Initialisation: 1.000 s
C04203 0.000 s 1000.000 Basic deceleration time
• Initialisation: 1.000 s
C04204 0.000 s 10.000 Basic S-ramp time
• Initialisation: 0.100 s
C04207 Polarity bStop input
0 HIGH active
1 LOW active
C04208 0.00 % 100.00 Tolerance setpoint reached
• Initialisation: 1.00 %
C04212/1...15 0.000 s 1000.000 Acceleration time 1 ... 15
• Initialisation: 0.000 s
C04213/1...15 0.000 s 1000.000 Deceleration time 1 ... 15
• Initialisation: 0.000 s
C04214/1...15 0.000 s 1000.000 S-ramp time 1 ... 15
• Initialisation: 0.000 s
C04215 0 15 Active profile parameters
• Read only
C04220 Profile mode
0 Profile generation with linear ramps • Can also be selected via input
dwRampMode.
• Relating to the reference speed
(C00011).
1 Profile generation with jerk
limitation (S ramps)
10 Profile generation with linear ramps
• Relating to the reference speed
(C00011).
• In case of edge change at the
bStop input with regard to the
current setpoint (constant time).
• The setpoint applied to the input
dnExtSpeedSetpoint_n is adopted
as starting value.
C04221 -200.00 % 200.00 Input setpoint
• Read only
C04222 -200.00 % 200.00 Target setpoint
• Read only
C04223 -200.00 % 200.00 Output setpoint
• Read only
C04224 Status "Target setpoint reached"
0 Target setpoint not yet reached • Read only

1 Target setpoint reached


C04225 0.000 rpm 50000.000 Gearbox reference speed
• Read only

L 1.4 EN - 08/2006 227


L-force | 9400 function library
Function blocks
L_SdSpeedSet - Setpoint ramp generator

Parameters Possible settings Information


C04226 0.000 rpm 50000.000 Gearbox setpoint speed
• Read only
C04227 0.0000 unit/t 214000.0000 Machine reference speed
• Read only
C04228 -214000.0000 unit/t 214000.0000 Machine setpoint speed
• Read only
C04229 String from AxisData Unit for speed
• Read only
C04237 -200.00 % 200.00 External setpoint
• Display of the input signal
dnExtSpeedSetpoint_n.
C04238 -200.00 % 200.00 Current motor speed
• Display of the input signal
dnActualMotorSpeed_n.
C04239/1 Reverse setpoint
0 Setpoint not inverted • Display of the input signal
bInvertSetpoint.
1 Setpoint inverted
C04239/2 Hold setpoint output
0 Setpoint output enabled • Display of the input signal
bHoldOutput.
1 Hold setpoint output
C04239/3 Stop
0 Stop not active • Display of the input signal bStop.

1 Stop requested
C04239/4...7 Jog input 1 ... 8
0 Jog input not active • Display of the input signals bJog1
... bJog8.
1 Jog input active
C04239/8...11 Ti input 1 ... 8
0 Ti input not active • Display of the input signals bTi1 ...
bTi8.
1 Ti input active
C04239/12 Load external setpoint
0 Loading not active • Display of the input signal
bLoadExtSpeedSetpoint.
1 Load external setpoint
C04239/13 Load motor speed
0 Loading not active • Display of the input signal
bLoadActualMotorSpeed.
1 Load motor speed

228 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_SdSpeedSet - Setpoint ramp generator

4.93.1 Setpoint path

r The signals in the setpoint path are limited to ±200.00 % of the reference speed.
r The signal at dnSpeedSetpointIn_n is first led via the function "Selection of fixed
setpoints".
r A selected fixed setpoint switches the input dnSpeedSetpointIn_n inactive and the
subsequent signal conditioning uses the selected fixed setpoint.
r By setting the input bInvertSetpoint to TRUE the input signal of the ramp generator can
be inverted.

4.93.2 Fixed setpoints

In addition to the direct setpoint selection via the input dnSpeedSetpointIn_n fixed
setpoints can be preset in C04200/1...15.
r These fixed setpoint can be called binary coded any time via the selection inputs
bJog1 ... bJog8, so 15 options are available.

Selected inputs Used


bJog8 bJog4 bJog2 bJog1 Setpoint

FALSE FALSE FALSE FALSE dnSpeedSetpointIn_n


FALSE FALSE FALSE TRUE C04200/1
FALSE FALSE TRUE FALSE C04200/2
FALSE FALSE TRUE TRUE C04200/3
FALSE TRUE FALSE FALSE C04200/4
FALSE TRUE FALSE TRUE C04200/5
FALSE TRUE TRUE FALSE C04200/6
FALSE TRUE TRUE TRUE C04200/7
TRUE FALSE FALSE FALSE C04200/8
TRUE FALSE FALSE TRUE C04200/9
TRUE FALSE TRUE FALSE C04200/10
TRUE FALSE TRUE TRUE C04200/11
TRUE TRUE FALSE FALSE C04200/12
TRUE TRUE FALSE TRUE C04200/13
TRUE TRUE TRUE FALSE C04200/14
TRUE TRUE TRUE TRUE C04200/15

r The number of selected inputs to be assigned depends on the number of required fixed
setpoints.

Number of the fixed setpoints required Number of the selection inputs to be assigned (bJog1 ... bJog8)
1 at least 1
1 ... 3 at least 2
4 ... 7 at least 3
8 ... 15 4

L 1.4 EN - 08/2006 229


L-force | 9400 function library
Function blocks
L_SdSpeedSet - Setpoint ramp generator

4.93.3 Ramp generator

Afterwards, the setpoint is led via a ramp generator with S-ramp characteristic. The ramp
generator transfers setpoint step-changes at the input to a ramp.

RFG-OUT
100 %
w2

w1 t ir t ir

0%
t
Tir Tir

w1, w2 = change of the setpoint as a function of tir or tif


RFG-OUT = output of the ramp generator

[4-1] Acceleration and deceleration times

r tir and tif are the desired times for changing between w1 and w2.
r S-ramps are possible if an S-ramp time is selected.
r The tir/tif values are converted into the required Ti times according to the following
formula:

100 % 100 %
T = t ⋅ ----------------------- T = t ⋅ -----------------------
ir ir w2 – w1 if if w2 – w1

230 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_SdSpeedSet - Setpoint ramp generator

4.93.4 Setting and selection of the Ti times

16 different Tir, Tif and S-ramp times can be selected via parameters for the ramp
generator.
r The selection is carried out binary coded via the selection inputs bTI1 ... bTI8:

Selected inputs Selection


bTI8 bTI4 bTI2 bTI1 Tir Tif S-ramp time
FALSE FALSE FALSE FALSE C04202 C04203 C04204
FALSE FALSE FALSE TRUE C04212/1 C04213/1 C04214/1
FALSE FALSE TRUE FALSE C04212/2 C04213/2 C04214/2
FALSE FALSE TRUE TRUE C04212/3 C04213/3 C04214/3
FALSE TRUE FALSE FALSE C04212/4 C04213/4 C04214/4
FALSE TRUE FALSE TRUE C04212/5 C04213/5 C04214/5
FALSE TRUE TRUE FALSE C04212/6 C04213/6 C04214/6
FALSE TRUE TRUE TRUE C04212/7 C04213/7 C04214/7
TRUE FALSE FALSE FALSE C04212/8 C04213/8 C04214/8
TRUE FALSE FALSE TRUE C04212/9 C04213/9 C04214/9
TRUE FALSE TRUE FALSE C04212/10 C04213/10 C04214/10
TRUE FALSE TRUE TRUE C04212/11 C04213/11 C04214/11
TRUE TRUE FALSE FALSE C04212/12 C04213/12 C04214/12
TRUE TRUE FALSE TRUE C04212/13 C04213/13 C04214/13
TRUE TRUE TRUE FALSE C04212/14 C04213/14 C04214/14
TRUE TRUE TRUE TRUE C04212/15 C04213/15 C04214/15

4.93.5 Display of the machine-based variables

For a better assessment of the created setpoints/parameterised fixed values (% value) the
machine-based reference values are calculated and displayed:

Parameters Information
C04225 Gearbox reference speed
C04226 Gearbox setpoint speed
C04227 Machine reference speed
C04228 Machine setpoint speed

The current setpoint is also calculated and displayed correspondingly.

Parameters Information
C04221 Input setpoint
C04222 Target setpoint
C04223 Output setpoint

L 1.4 EN - 08/2006 231


L-force | 9400 function library
Function blocks
L_SdSpeedToUnit - Speed conversion

4.94 L_SdSpeedToUnit - Speed conversion

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB uses the transmitted machine parameters and converts a speed value defined in
the internal unit [rpm] into a speed value in the real unit of the machine.

L_SdSpeedToUnit
dnSpeedIn_s dnSpeedOut_e4
[rpm]W[unit]
AxisData bLimit

Inputs

Identifier/data type Information/possible settings


dnSpeedIn_s Speed as speed in [rpm]
DINT • 15000 rpm ≡ 226 ≡ 67108864
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnSpeedOut_e4 Speed in [unit/s]
DINT • Output in "e4" format (fixed point with four decimal positions)
bLimit Status "Output signal is limited"
BOOL TRUE The output signal is limited to the value range that can be displayed.

Parameters

Identifier/data type Possible settings Information


Index
C04316 String from AxisData Speed unit
• Read only

232 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_SdSwitchPoint - Position switch points

4.95 L_SdSwitchPoint - Position switch points

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB serves to implement up to 8 simple position switch points (cams). When the current
drive position is inside a range defined via parameters, the output assigned to this
"switching area" is set to TRUE.
r The output setting does not depend on whether the switching range is approached by
the positive or negative side.
r In the modulo measuring system (rotary table) the switching ranges can also be
defined beyond the 0° position (e.g. switching on at 350° and off at 10° in CW rotation).

L_SdSwitchPoint
bEnable rotary axis bSwitchPoint1
dnPosIn_p bSwitchPoint2
AxisData bSwitchPoint3
bSwitchPoint4
linear axis
bSwitchPoint5
bSwitchPoint6
bSwitchPoint7
bSwitchPoint8

Inputs

Identifier/data type Information/possible settings


bEnable Enable FB
BOOL TRUE Position switch points are activated.
dnPosIn_p Input for accepting the current position
DINT • Connect this input with the position signal to be accepted. Depending on the
application, this can be a setpoint or an actual position.
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


bSwitchPoint1 Position switch point 1
BOOL TRUE The current position (dnPosIn_p) is inside the switching range
defined via C04997/1 and C04998/1.
bSwitchPoint2 Position switch point 2
BOOL TRUE The current position (dnPosIn_p) is inside the switching range
defined via C04997/2 and C04998/2.

L 1.4 EN - 08/2006 233


L-force | 9400 function library
Function blocks
L_SdSwitchPoint - Position switch points

Identifier/data type Value/meaning


bSwitchPoint3 Position switch point 3
BOOL TRUE The current position (dnPosIn_p) is inside the switching range
defined via C04997/3 and C04998/3.
bSwitchPoint4 Position switch point 4
BOOL TRUE The current position (dnPosIn_p) is inside the switching range
defined via C04997/4 and C04998/4.
bSwitchPoint5 Position switch point 5
BOOL TRUE The current position (dnPosIn_p) is inside the switching range
defined via C04997/5 and C04998/5.
bSwitchPoint6 Position switch point 6
BOOL TRUE The current position (dnPosIn_p) is inside the switching range
defined via C04997/6 and C04998/6.
bSwitchPoint7 Position switch point 7
BOOL TRUE The current position (dnPosIn_p) is inside the switching range
defined via C04997/7 and C04998/7.
bSwitchPoint8 Position switch point 8
BOOL TRUE The current position (dnPosIn_p) is inside the switching range
defined via C04997/8 and C04998/8.

Parameters

Parameters Possible settings Information


C04400/1...8 Status of switching range 1 ... 8
0 Switch off • Read only

1 Switch on
C04402/1...8 -2147483648 unit 2147483648 Switch-on limit - switching range
1 ... 8
C04403/1...8 -2147483648 unit 2147483648 Switch-off limit - switching range
1 ... 8
C04404/1...8 Enable - switching range 1 ... 8
0 Switching range not enabled
1 Switching range enabled

234 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_SdTouchProbe - Touch probe evaluation

4.96 L_SdTouchProbe - Touch probe evaluation

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB takes over the interpolation of the input signal based on the time stamp handed
over by a touch probe system block and outputs the interpolated value and the difference
compared with the last input signal.
r The FB considers a modulo measuring system and the cycle of the selected machine
parameters.

L_SdTouchProbe
dnActPos_p dnTpPos_p
dnTpTimeLag dnTpPosDiff_p
TP
bTpReceived
AxisData

Inputs

Identifier/data type Information/possible settings


dnActPos_p Input for accepting the current position in [inc]
DINT • Connect this input with the signal to be interpolated, e.g. the master value of a
line drive.
dnTpTimeLag Input for accepting the time stamp
DINT • Connect this input with the output dnTouchProbeTimeLag of the corresponding
touch probe system block.
bTpReceived Input for taking over the status "Touch probe detected""
BOOL • Connect this input with the output dnTouchProbeReceived of the corresponding
touch probe system block.
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnTpPos_p Interpolated TP position in [inc]
DINT
dnTpPosDiff_p Difference between the TP position and the current position in [inc]
DINT

L 1.4 EN - 08/2006 235


L-force | 9400 function library
Function blocks
L_SdTouchProbe - Touch probe evaluation

4.96.1 Actual value interpolation (principle)

If a touch probe is detected, the (residual) time to the following task cycle is determined
and a time stamp is created from it. Based on this time stamp the FB L_SdTouchProbe can
execute a linear interpolation between both actual position points. The result is the exact
actual position at the time of the physical touch probe event.

Task cycle Task cycle Task cycle

Data Data Data


processing Application processing Application processing Application
t

Position
Touch probe received p2

p1
t1
0
t
Œ 
n Actual position point 1
o Actual position point 2
 Residual time (dnTpTimeLag)

[4-1] Actual value determination through linear interpolation (principle)

4.96.2 Example

Connections required for a touch probe detection via the digital input DI4:

Œ
LS_TouchProbe4 L_SdTouchProbe
TP4_dnTouchProbeTimeLag dnActPos_p dnTpPos_p
TP4_bTouchProbeReceived dnTpTimeLag TP dnTpPosDiff_p
TP4_bTouchProbeLost bTpReceived
TP4_bNegativeEdge AxisData

n Transfer of the machine parameters (e.g. from SB LS_DriveInterface)


o Transfer of the current position (e.g. from SB LS_Feedback)

[4-2] Transfer of the FB L_SdTouchProbe

236 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_SdUnitToPos - Position conversion

4.97 L_SdUnitToPos - Position conversion

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB uses the transmitted machine parameters and converts a position defined in the
real unit of the machine into an internal position.

L_SdUnitToPos
dnPosIn_e4 dnPosOut_p
[unit]W[inc]
AxisData bLimit

Inputs

Identifier/data type Information/possible settings


dnPosIn_e4 Position in [unit]
DINT • Selection in "e4" format (fixed point with four decimal positions)
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnPosOut_p Position in [inc]
DINT
bLimit Status "Output signal is limited"
BOOL TRUE The output signal is limited to the value range that can be displayed.

Parameters

Identifier/data type Possible settings Information


Index
C04310 String from AxisData Position unit
• Read only

L 1.4 EN - 08/2006 237


L-force | 9400 function library
Function blocks
L_SdUnitToSpeed - Speed conversion

4.98 L_SdUnitToSpeed - Speed conversion

Function library: LenzeServoDrive


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB uses the transmitted machine parameters and converts a speed defined in the real
unit of the machine into an internal speed.

L_SdUnitToSpeed
dnSpeedIn_e4 dnSpeedOut_s
[unit]W[rpm]
AxisData bLimit

Inputs

Identifier/data type Information/possible settings


dnSpeedIn_e4 Speed in [unit/s]
DINT • Selection in "e4" format (fixed point with four decimal positions)
AxisData Machine parameters
• For accepting the machine parameters of the drive/motor, connect this input
with the output DI_AxisData of the SB LS_DriveInterface.
• The machine parameters of a master drive can be displayed with the
FB L_SdSetAxisData. In this case the FB output AxisData must be connected with
this input. (C 217)

Outputs

Identifier/data type Value/meaning


dnSpeedOut_s Speed as speed in [rpm]
DINT • 15000 rpm ≡ 226 ≡ 67108864
bLimit Status "Output signal is limited"
BOOL TRUE The output signal is limited to the value range that can be displayed.

Parameters

Identifier/data type Possible settings Information


Index
C04314 String from AxisData Speed unit
• Read only

238 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_Tb5And - AND with 5 inputs

4.99 L_Tb5And - AND with 5 inputs

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a logic AND operation of binary signals.

L_Tb5And
bIn1 bOut
bIn2 &
bIn3
bIn4
bIn5

Inputs

Identifier/data type Information/possible settings


bIn1 Input 1
BOOL
bIn2 Input 2
BOOL
bIn3 Input 3
BOOL
bIn4 Input 4
BOOL
bIn5 Input 5
BOOL

Outputs

Identifier/data type Value/meaning


bOut Result of the AND operation
BOOL

O Tip!
If you want to combine less than five signals, set the unused inputs to TRUE or
assign several inputs with the same signal.

L 1.4 EN - 08/2006 239


L-force | 9400 function library
Function blocks
L_Tb5Nand - NAND with 5 inputs

4.100 L_Tb5Nand - NAND with 5 inputs

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a logic NAND operation of binary signals.

L_Tb5Nand
bIn1 bOut
bIn2 &
bIn3
bIn4
bIn5

Inputs

Identifier/data type Information/possible settings


bIn1 Input 1
BOOL
bIn2 Input 2
BOOL
bIn3 Input 3
BOOL
bIn4 Input 4
BOOL
bIn5 Input 5
BOOL

Outputs

Identifier/data type Value/meaning


bOut Result of the NAND operation
BOOL

O Tip!
If you want to combine less than five signals, set the unused inputs to TRUE or
assign several inputs with the same signal.

240 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_Tb5Nor - NOR with 5 inputs

4.101 L_Tb5Nor - NOR with 5 inputs

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a logic NOR operation of binary signals.

L_Tb5Nor
bIn1 bOut
bIn2 ³1
bIn3
bIn4
bIn5

Inputs

Identifier/data type Information/possible settings


bIn1 Input 1
BOOL
bIn2 Input 2
BOOL
bIn3 Input 3
BOOL
bIn4 Input 4
BOOL
bIn5 Input 5
BOOL

Outputs

Identifier/data type Value/meaning


bOut Result of the OR operation
BOOL

O Tip!
If you want to combine less than five signals, set the unused inputs to FALSE.

L 1.4 EN - 08/2006 241


L-force | 9400 function library
Function blocks
L_Tb5Or - OR with 5 inputs

4.102 L_Tb5Or - OR with 5 inputs

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a logic OR operation of binary signals.

L_Tb5Or
bIn1 bOut
bIn2 ³1
bIn3
bIn4
bIn5

Inputs

Identifier/data type Information/possible settings


bIn1 Input 1
BOOL
bIn2 Input 2
BOOL
bIn3 Input 3
BOOL
bIn4 Input 4
BOOL
bIn5 Input 5
BOOL

Outputs

Identifier/data type Value/meaning


bOut Result of the OR operation
BOOL

O Tip!
If you want to combine less than five signals, set the unused inputs to FALSE.

242 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_Tb5Xor - XOR with 5 inputs

4.103 L_Tb5Xor - XOR with 5 inputs

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a logic EXCLUSIVE OR operation of binary signals.

L_Tb5Xor
bIn1 bOut
bIn2 =1
bIn3
bIn4
bIn5

Inputs

Identifier/data type Information/possible settings


bIn1 Input 1
BOOL
bIn2 Input 2
BOOL
bIn3 Input 3
BOOL
bIn4 Input 4
BOOL
bIn5 Input 5
BOOL

Outputs

Identifier/data type Value/meaning


bOut Result of the exclusive OR operation
BOOL

L 1.4 EN - 08/2006 243


L-force | 9400 function library
Function blocks
L_Tb8Select - 1-out of-8-selector

4.104 L_Tb8Select - 1-out of-8-selector

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB connects one of eight analog input signals through to the output.
r The input is selected via the input dwSelect.

L_Tb8Select
dnIn1 1 dnOut
dnIn2
2
dnIn3
3
dnIn4
4
dnIn5
5
dnIn6
6
dnIn7
7
dnIn8
8
dwSelect

Inputs

Identifier/data type Information/possible settings


dnIn1 Input signal 1 ... 8
...
dnIn8
DINT
dwSelect Selection of the input signal for the output to dnOut
BOOL 0 0
1 dnIn1
2 dnIn2
3 dnIn3
4 dnIn4
5 dnIn5
6 dnIn6
7 dnIn7
8 dnIn8
>8 0

Outputs

Identifier/data type Value/meaning


dnOut Output signal
DINT

244 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbAbs - Absolute value

4.105 L_TbAbs - Absolute value

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This function block converts a bipolar signal into a unipolar signal, i.e. the absolute value
of the input signal is generated.

L_TbAbs
dnIn dnOut

Inputs

Identifier/data type Information/possible settings


dnIn Input signal
DINT

Outputs

Identifier/data type Value/meaning


dnOut Output signal
INT

L 1.4 EN - 08/2006 245


L-force | 9400 function library
Function blocks
L_TbAdd - Addition

4.106 L_TbAdd - Addition

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out an addition without limitation.

L_TbAdd
dnIn1 dnOut
dnIn2 a+b

Inputs

Identifier/data type Information/possible settings


dnIn1 1st summand
DINT
dnIn2 2nd summand
DINT

Outputs

Identifier/data type Value/meaning


dnOut Cumulative value (result of the addition)
DINT • No internal limitation, thus an overflow is possible:
– If the result > 231-1: dnOut = dnIn1 + dnIn2 - 232
– If the result < 231: dnOut = dnIn1 + dnIn2 + 232

246 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbAddLim - Addition with limitation

4.107 L_TbAddLim - Addition with limitation

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out an addition with limitation.


r The value output to output dnOut is internally limited to ±231-1.
r The output bLimitActive displays if a limitation is active.

L_TbAddLim
dnIn1 dnOut
dnIn2 a+b bLimitActive

Inputs

Identifier/data type Information/possible settings


dnIn1 1st summand
DINT
dnIn2 2nd summand
DINT

Outputs

Identifier/data type Value/meaning


dnOut Cumulative value (result of the addition)
DINT • Internally limited to ±231-1
bLimitActive Status signal "Limitation active"
BOOL TRUE The output signal is limited.

L 1.4 EN - 08/2006 247


L-force | 9400 function library
Function blocks
L_TbAnd - AND with 2 inputs

4.108 L_TbAnd - AND with 2 inputs

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a logic AND operation of binary signals.

L_TbAnd
bIn1 bOut
bIn2 &

Inputs

Identifier/data type Information/possible settings


bIn1 Input 1
BOOL
bIn2 Input 2
BOOL

Outputs

Identifier/data type Value/meaning


bOut Result of the AND operation
BOOL

Function

bIn2 bIn1 bOut


FALSE FALSE FALSE
FALSE TRUE FALSE
TRUE FALSE FALSE
TRUE TRUE TRUE

248 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbCompare - comparison

4.109 L_TbCompare - comparison

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This function block compares two signals of the "DINT" data type and can be used e.g. for
implementing a trigger.
r The comparison function is selected via C04085.
r In contrast to the FB L_TbCompare_n, the window and hysteresis of this FB can be
adjusted via inputs instead of parameters.

L_TbCompare
dnIn1 bOut
dnIn2
dnTolerance
dnHysteresis

Inputs

Identifier/data type Information/possible settings


dnIn1 Input signal 1
DINT
dnIn2 Input signal 2
DINT
dnTolerance Window for comparison operation
DINT • Value is internally limited to ≥0.
dnHysteresis Hysteresis for comparison operation
DINT • Value is internally limited to ≥0.

Outputs

Identifier/data type Value/meaning


bOut Status signal "Comparison statement is true"
BOOL TRUE The statement of the selected comparison mode is true.

Parameters

Parameters Possible settings Information


C04085 Comparison operation
0 dnIn1 = dnIn2 Lenze setting
1 dnIn1 > dnIn2
2 dnIn1 < dnIn2
3 |dnIn1| = |dnIn2|
4 |dnIn1| > |dnIn2|
5 |dnIn1| < |dnIn2|

L 1.4 EN - 08/2006 249


L-force | 9400 function library
Function blocks
L_TbCompare - comparison

4.109.1 Function 1: dnIn1 = dnIn2

Selection: C04085 = "0"


r This function compares two signals with regard to equality. They can, for instance,
provide the comparison "actual speed equals setpoint speed " (nact = nset).
r Use the input dnTolerance to select the window within which the equality is to apply:
r Use the input dnHysteresis to select a hysteresis if the input signals are not stable and
the output oscillates.

bOut dnTolerance dnTolerance


TRUE

FALSE
dnIn1
dnHysteresis dnHysteresis
dnIn2

[4-1] Function 1: Switching performance

O Tip!
With this function, you must use the FB in a fast task, to achieve optimum
sampling of the signals.

dnIn1
dnHysteresis
dnTolerance
dnIn2
dnTolerance
dnHysteresis

t
bOut
TRUE

FALSE
t

[4-2] Function 1: Example

250 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbCompare - comparison

4.109.2 Function 2: dnIn1 > dnIn2

Selection: C04085 = "1"


r This function serves, for instance, to implement the comparison "actual speed is higher
than a limit value" (nact > nx) for one direction of rotation.

dnHysteresis
bOut
TRUE

FALSE
dnIn1
dnIn2

[4-3] Function 2: Switching performance

Functional sequence
1. If the value at dnIn1 exceeds the value at dnIn2, bOut changes from FALSE to TRUE.
2. Only if the signal at dnIn1 falls below the value at dnIn2 - dnHysteresis again, bOut
changes from TRUE to FALSE.

dnIn1

dnIn2

dnHysteresis

t
bOut
TRUE

FALSE
t

[4-4] Function 2: Example

L 1.4 EN - 08/2006 251


L-force | 9400 function library
Function blocks
L_TbCompare - comparison

4.109.3 Function 3: dnIn1 < dnIn2

Selection: C04085 = "2"


r This function serves, for instance, to implement the comparison "actual speed is lower
than a limit value" (nact nx) for one direction of rotation.

dnHysteresis
bOut
TRUE

FALSE
dnIn1
dnIn2

[4-5] Function 3: Switching performance

Functional sequence
1. If the value at dnIn1 falls below the value at dnIn2, bOut_b changes from FALSE to TRUE.
2. Only if the signal at dnIn1 exceeds the value at dnIn2 - dnHysteresis again, bOut_b
changes from TRUE to FALSE.

dnIn1
dnHysteresis

dnIn2

t
bOut
TRUE

FALSE
t

[4-6] Function 3: Example

252 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbCompare - comparison

4.109.4 Function 4: |dnIn1| = |dnIn2|

Selection: C04085 = "3"


r This function serves, for instance, to implement the comparison "nact = 0".
r This function behaves like function 1. However, the amount is generated by the input
signals before signal processing (without sign).
Function 1: dnIn1 = dnIn2 (C 250)

4.109.5 Function 5: |dnIn1| > |dnIn2|

Selection: C04085 = "4"


r This function serves, for instance, to implement the comparison "|nact| > |nx|"
independent of the direction of rotation.
r This function behaves like function 2. However, the amount is generated by the input
signals before signal processing (without sign).
Function 2: dnIn1 > dnIn2 (C 251)

4.109.6 Function 6: |dnIn1| < |dnIn2|

Selection: C04085 = "5"


r This function serves to implement the comparison "|nact| < |nx|" independent of the
direction of rotation.
r This function behaves like function 3. However, the amount is generated by the input
signals before signal processing (without sign).
Function 3: dnIn1 < dnIn2 (C 252)

L 1.4 EN - 08/2006 253


L-force | 9400 function library
Function blocks
L_TbCompare_n - scaled comparison

4.110 L_TbCompare_n - scaled comparison

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This function block compares two scaled signals and can be used e.g. for implementing a
trigger.
r The comparison function is selected via C04080.
r In contrast to the FB L_TbCompare, the window and hysteresis of this FB can be
adjusted via parameters instead of inputs.

L_TbCompare_n
dnIn1_n bOut
dnIn2_n

Inputs

Identifier/data type Information/possible settings


dnIn1_n Input signal 1
DINT • Scaling: 100 % ≡ 230 ≡ 1073741824
dnIn2_n Input signal 2
DINT • Scaling: 100 % ≡ 230 ≡ 1073741824

Outputs

Identifier/data type Value/meaning


bOut Status signal "Comparison statement is true"
BOOL TRUE The statement of the selected comparison mode is true.

Parameters

Parameters Possible settings Information


C04080 Comparison operation
0 dnIn1_n = dnIn2_n Lenze setting
1 dnIn1_n > dnIn2_n
2 dnIn1_n < dnIn2_n
3 |dnIn1_n| = |dnIn2_n|
4 |dnIn1_n| > |dnIn2_n|
5 |dnIn1_n| < |dnIn2_n|
C04081 0.00 % 100.00 Tolerance
• Initialisation: 1.00 %
C04082 0.00 % 100.00 Hysteresis
• Initialisation: 1.00 %

254 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbCompare_n - scaled comparison

4.110.1 Function 1: dnIn1_n = dnIn2_n

Selection: C04080 = "0"


r This function compares two signals with regard to equality. They can, for instance,
provide the comparison "actual speed equals setpoint speed " (nact = nset).
r Use C04081 to select the window within which the equality is to apply.
r Use C04082 to select a hysteresis if the input signals are not stable and the output
oscillates.

bOut C04081 C04081


TRUE

FALSE
dnIn1_n
C04082 C04082
dnIn2_n

[4-1] Function 1: Switching performance

O Tip!
With this function, you must use the FB in a fast task, to achieve optimum
sampling of the signals.

dnIn1_n
C04082
C04081
dnIn2_n
C04081
C04082

t
bOut
TRUE

FALSE
t

[4-2] Function 1: Example

L 1.4 EN - 08/2006 255


L-force | 9400 function library
Function blocks
L_TbCompare_n - scaled comparison

4.110.2 Function 2: dnIn1_n > dnIn2_n

Selection: C04080 = "1"


r This function serves, for instance, to implement the comparison "actual speed is higher
than a limit value" (nact > nx) for one direction of rotation.

C04082
bOut
TRUE

FALSE
dnIn1_n
dnIn2_n

[4-3] Function 2: Switching performance

Functional sequence
1. If the value at dnIn1_n exceeds the value at dnIn2_n, bOut changes from FALSE to TRUE.
2. Only if the signal at dnIn1_n falls below the value at dnIn2_n - C04082 again, bOut
changes from TRUE to FALSE.

dnIn1_n

dnIn2_n

C04082

t
bOut
TRUE

FALSE
t

[4-4] Function 2: Example

256 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbCompare_n - scaled comparison

4.110.3 Function 3: dnIn1_n < dnIn2_n

Selection: C04080 = "2"


r This function serves, for instance, to implement the comparison "actual speed is lower
than a limit value" (nact nx) for one direction of rotation.

C04082
bOut
TRUE

FALSE
dnIn1_n
dnIn2_n

[4-5] Function 3: Switching performance

Functional sequence
1. If the value at dnIn1_n falls below the value at dnIn2_n, bOut_b changes from FALSE to
TRUE.
2. Only if the signal at dnIn1_n exceeds the value at dnIn2_n - C04082 again, bOut_b
changes from TRUE to FALSE.

dnIn1_n
C04082

dnIn2_n

t
bOut
TRUE

FALSE
t

[4-6] Function 3: Example

L 1.4 EN - 08/2006 257


L-force | 9400 function library
Function blocks
L_TbCompare_n - scaled comparison

4.110.4 Function 4: |dnIn1_n| = |dnIn2_n|

Selection: C04080 = "3"


r This function serves, for instance, to implement the comparison "nact = 0".
r This function behaves like function 1. However, the amount is generated by the input
signals before signal processing (without sign).
Function 1: dnIn1_n = dnIn2_n (C 255)

4.110.5 Function 5: |dnIn1_n| > |dnIn2_n|

Selection: C04080 = "4"


r This function serves, for instance, to implement the comparison "|nact| > |nx|"
independent of the direction of rotation.
r This function behaves like function 2. However, the amount is generated by the input
signals before signal processing (without sign).
Function 2: dnIn1_n > dnIn2_n (C 256)

4.110.6 Function 6: |dnIn1_n| < |dnIn2_n|

Selection: C04080 = "5"


r This function serves to implement the comparison "|nact| < |nx|" independent of the
direction of rotation.
r This function behaves like function 3. However, the amount is generated by the input
signals before signal processing (without sign).
Function 3: dnIn1_n < dnIn2_n (C 257)

258 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbCount - Up/downcounter

4.111 L_TbCount - Up/downcounter

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB is a digital up/downcounter with adjustable limitation.


r Under C04005 you can select if the counter is to be stopped or reset automatically
when reaching the limitation.

L_TbCount
bClockUp dnActualCount
bClockDown bCountEQReference
bLoadStartValue CTRL
dnStartValue
dnReferenceValue

Inputs

Identifier/data type Information/possible settings


bClockUp Upcounter
BOOL FALSEÊTRUE Increase counter by "1".
bClockDown Downcounter
BOOL FALSEÊTRUE Reduce counter by "1".
bLoadStartValue Accept starting value
BOOL • This input has the highest priority.
TRUE The starting value specified via dnStartValue is loaded into the
counter.
dnStartValue Starting value
DINT
dnReferenceValue Comparison value
DINT

Outputs

Identifier/data type Value/meaning


dnActualCount Current counter content
DINT
bCountEQReference Result of the comparison of current counter content and comparison value
BOOL TRUE |dnActualCount| ≥ |dnReferenceValue|

L 1.4 EN - 08/2006 259


L-force | 9400 function library
Function blocks
L_TbCount - Up/downcounter

Parameters

Parameters Possible settings Information


C04005 Reset function
0 After reaching the reference value Lenze setting
the counter is automatically reset to
the starting value.
1 The reached reference value is
maintained until a reset via
bLoadStartValue is executed.

4.111.1 Function 1: Automatic counter reset

Selection: C04005 = "0"

Functional sequence
1. If the amount of the current counter content ≥ the amount of the comparison value,
the output bCountEQReference is set to TRUE (|dnActualCount| ≥ |dnReferenceValue|).
2. In the next cycle the counter is reset to the starting value dnStartValue and the output
bCountEQReference is reset to FALSE.

4.111.2 Function 2: Counter stop at upper limit

Selection: C04005 = "1"

Functional sequence
1. If the amount of the current counter content ≥ the amount of the comparison value,
the output bCountEQReference is set to TRUE (|dnActualCount| ≥ |dnReferenceValue|).
2. The counter inputs bClockUp and bClockDown are deactivated at the same time, i.e.
counting upwards or downwards is not possible anymore.
3. By setting bLoadStartValue to TRUE the counter is reset to the starting value
dnStartValue and the counter inputs bClockUp and bClockDown are evaluated again.

260 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbCurve - characteristic function

4.112 L_TbCurve - characteristic function

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; MotionControl StateLevel ; MotionControl HighLevel ; MotionControl TopLevel ; PLC

This FB represents a characteristic/curve function y = f(x). Here, the input signal


corresponds to the x axis and the output signal corresponds to the y axis.
r The characteristic can consist of up to nine points which are defined by parameters.
r Between the points a linear interpolation takes place.
r The characteristic can be entered over the entire value range and can also be created
symmetrically to the y axis or zero point by selecting the corresponding characteristic
mode in C04100.

L_TbCurve
dnIn_n dnOut_n

Inputs

Identifier/data type Information/possible settings


dnIn_n Input signal
DINT

Outputs

Identifier/data type Value/meaning


dnOut_n Output signal
DINT

Parameters

Identifier/data type Possible settings Information


Index
C04100 Characteristic mode
0 Entire range Lenze setting
1 Symmetrically to the y axis
2 Symmetrically to the zero point
C04101/1...9 -200.00 % 200.00 X values of the characteristic
function
• Subcode 1 ... 9 correspond to the
point values X1 ... X9.
• Initialisation: 0.00 %
C04102/1...9 -200.00 % 200.00 Y values of the characteristic
function
• Subcode 1 ... 9 correspond to the
point values Y1 ... Y9.
• Initialisation: 0.00 %

L 1.4 EN - 08/2006 261


L-force | 9400 function library
Function blocks
L_TbCurve - characteristic function

4.112.1 Selection of the characteristic

The up to nine points of the characteristic are selected via the subcodes of C04101 and
C04102.
r The same subcodes of C04101 and C04102 correspond to a pair of variates/point (Xn,
Yn).

1 2 ... 9
x C04101/1 C04101/2 C04101/... C04101/9
Y C04102/1 C04102/2 C04102/... C04102/9

r The first pair of variates (C04101/1 and C04102/1) is always valid.


r The X values of the characteristic must be entered in ascending order
(X1 < X2 < … < X9).
r If the ascending chain of x values is interrupted, this corresponds to the end of the
characteristic (in the example X5 < X4):

1 2 3 4 5 6 7 8 9
x -140 % -90 % 70 % 145 % 0% 0% 0% 0% 0%
Y -140 % -40 % 115 % 160 % 0% 0% 0% 0% 0%

r Based on the last valid pair of variates, an extrapolation is executed to the end of the x
value range (±200 %) on both sides.
r In the characteristic modes 1 and 2, only the range of the characteristic entered in the
quadrants I. and IV. is used.

Special cases
r Jumps/discontinuities can be displayed by parameterising two successive x values the
same way. A jump is only valid if a valid pair of variates exists after that, otherwise the
extrapolation is executed starting from the last valid pair of variates.

1 2 3 4 5 6 7 8 9
x -130 % -70 % -70 % 80 % 0% 0% 0% 0% 0%
Y -150 % -75 % 85 % 160 % 0% 0% 0% 0% 0%

dnOut_n 200 % / 200 %

X4, Y4
X3, Y3

dnIn_n

X2, Y2

X1, Y1

-200 % / -200 %

[4-1] Example: Characteristic in the characteristic mode 0 (entire range) with jump

262 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbCurve - characteristic function

r If only one point X1 is defined in the negative range, X2 exists with the Lenze setting
"0 %" as valid point (X2 > X1) both points form a line:

1 2 3 4 5 6 7 8 9
x -130 % 0% 0% 0% 0% 0% 0% 0% 0%
Y 40 % 0% 0% 0% 0% 0% 0% 0% 0%

dnOut_n 200 % / 200 %

X1, Y1 X2, Y2

dnIn_n

-200 % / -200 %

[4-2] Example: Characteristic in characteristic mode 0 (entire range) with only one defined point and X1 < 0

r If only one point X1 is defined in the positive range, a line is extrapolated:

1 2 3 4 5 6 7 8 9
x 120 % 0% 0% 0% 0% 0% 0% 0% 0%
Y 40 % 0% 0% 0% 0% 0% 0% 0% 0%

dnOut_n 200 % / 200 %

X1, Y1

dnIn_n

-200 % / -200 %

[4-3] Example: Characteristic in characteristic mode 0 (entire range) with only one defined point and X1 < 0

L 1.4 EN - 08/2006 263


L-force | 9400 function library
Function blocks
L_TbCurve - characteristic function

4.112.2 Characteristic mode 0: Entire range

If "Entire range" is selected in C04100, the entire characteristic range (quadrants I ... IV) is
valid.

Example

1 2 3 4 5 6 7 8 9
x -140 % -90 % 70 % 130 % 0% 0% 0% 0% 0%
Y -140 % -40 % 120 % 160 % 0% 0% 0% 0% 0%

dnOut_n 200 % / 200 %

X4, Y4

X3, Y3

II. I.
dnIn_n
X2, Y2
III. IV.

X1, Y1

-200 % / -200 %

[4-4] Example: Characteristic in characteristic mode 0 (entire range)

4.112.3 Characteristic mode 1: Symmetrically to y axis

If "Symmetrically to y axis" is selected in C04100, the resulting characteristic is mirrored


along the y axis in the I. and IV. quadrant.

Example

1 2 3 4 5 6 7 8 9
x -140 % -90 % 70 % 130 % 0% 0% 0% 0% 0%
Y -140 % -40 % 120 % 160 % 0% 0% 0% 0% 0%

dnOut_n 200 % / 200 %

X4, Y4

X3, Y3

II. I.
dnIn_n
X2, Y2
III. IV.

X1, Y1

-200 % / -200 %

[4-5] Example: Characteristic in characteristic mode 1 (symmetrically to y axis)

264 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbCurve - characteristic function

4.112.4 Characteristic mode 2: Symmetrically to zero point

If "Symmetrically to zero point" is selected in C04100, the resulting characteristic is


mirrored along the zero point in the I. and IV. quadrant.

Example

1 2 3 4 5 6 7 8 9
x -140 % -90 % 70 % 130 % 0% 0% 0% 0% 0%
Y -140 % -40 % 120 % 160 % 0% 0% 0% 0% 0%

dnOut_n 200 % / 200 %

X4, Y4

X3, Y3

II. I.
dnIn_n
X2, Y2
III. IV.
X1, Y1

-200 % / -200 %

[4-6] Example: Characteristic in characteristic mode 2 (symmetrically to zero point)

L 1.4 EN - 08/2006 265


L-force | 9400 function library
Function blocks
L_TbDeadband - Dead band with gain

4.113 L_TbDeadband - Dead band with gain

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB produces a symmetrical dead band around zero.


r The attenuation of the input signal caused by the dead band can be compensated by a
parameterisable gain.
r The value output to output dnOut is internally limited to ±231-1.
r The output bLimitActive displays if a limitation is active.
r The function corresponds by approximation to the function "DB" of the 9300 servo
inverter.

L_TbDeadband
dnIn dnOut
dnDeadband bLimitActive

Inputs

Identifier/data type Information/possible settings


dnIn Input signal
DINT
dnDeadband Dead band area for the input signal
DINT • Value is internally limited to ≥0.

Outputs

Identifier/data type Value/meaning


dnOut Output signal
DINT • If |dnIn| ≤ dnDeadband the output is set to zero.
• If |dnIn| > dnDeadband the difference multiplied by the parameterised gain is
output as output signal.
• The sign results from the sign of dnIn and the sign of the selected gain.
• Internally limited to ±231-1
bLimitActive Output signal within the limitation
BOOL TRUE The output signal dnOut is limited.

Parameters

Parameters Possible settings Information


C04065 -214748.3647 214748.3647 Gain
• Initialisation: 1.0000

266 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbDeadband - Dead band with gain

Function

dnOut dnOut C04065

dnDeadBand
(C04065 = 1) (dnDeadBand = 0)

dnIn dnIn

[4-1] Dead band and gain

L 1.4 EN - 08/2006 267


L-force | 9400 function library
Function blocks
L_TbDeadband_n - Scaled dead band with gain

4.114 L_TbDeadband_n - Scaled dead band with gain

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB produces a symmetrical dead band around zero.


r The attenuation of the input signal caused by the dead band can be compensated by a
parameterisable gain.
r The value output to dnOut is internally limited to ±200 %.
r The output bLimitActive displays if a limitation is active.
r The function corresponds by approximation to the function "DB" of the 9300 servo
inverter.

L_TbDeadband_n
dnIn_n dnOut_n
bLimitActive

Inputs

Identifier/data type Information/possible settings


dnIn_n Input signal
DINT

Outputs

Identifier/data type Value/meaning


dnOut_n Output signal
DINT • If |dnIn_n| ≤ C04060 the output is set to zero.
• If |dnIn_n| > C04060 the difference multiplied by the parameterised gain is
output as output signal.
• The sign results from the sign of dnIn_n and the sign of the selected gain.
• Internally limited to ±200 %
bLimitActive Output signal within the limitation
BOOL TRUE The output signal dnOut_n is limited.

Parameters

Parameters Possible settings Information


C04060 0.00 % 100.00 Dead band
• Initialisation: 1.00 %
C04061 -214748.3647 214748.3647 Gain
• Initialisation: 1.0000

268 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbDeadband_n - Scaled dead band with gain

Function

dnOut_n dnOut_n
C04061

C04060
(C04061 = 1) (C04060 = 0 %)

dnIn_n dnIn

[4-1] Dead band and gain

L 1.4 EN - 08/2006 269


L-force | 9400 function library
Function blocks
L_TbDelay - Delay

4.115 L_TbDelay - Delay

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB delays binary signals.


r The edge to be delayed is selected via the parameter C04010.
r The delay time is set via the parameter C04011.
r The function corresponds to the function "DIGDEL" of the 9300 servo inverter.

L_TbDelay
bIn bOut
0 t

Inputs

Identifier/data type Information/possible settings


bin Input
BOOL

Outputs

Identifier/data type Value/meaning


bOut Output with time-delayed input signal
BOOL

Parameters

Parameters Possible settings Information


C04010 Selection of the edge to be delayed
0 Rising edge Lenze setting
1 Falling edge
2 Both edges
C04011 0.000 s 60.000 Delay time
• Initialisation: 0.001 s

270 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbDelay - Delay

4.115.1 Function 1: ON-delay

Selection: C04010 = "0" (Lenze setting)


r In this mode, the FB operates like a retriggerable monoflop.
 = internal timing element
bIn
TRUE

FALSE
t
bOut
TRUE

FALSE
t
C04011 C04011

C04011

0
t

Functional sequence
1. A FALSE-TRUE edge at bIn starts the internal timing element ().
2. After the delay time set via C04011 has elapsed, bOut is set to TRUE.
3. A TRUE-FALSE edge at bIn sets bOut to FALSE again. Simultaneously, the internal timing
element is reset.

L 1.4 EN - 08/2006 271


L-force | 9400 function library
Function blocks
L_TbDelay - Delay

4.115.2 Function 2: OFF-delay

Selection: C04010 = "1"


 = internal timing element
bIn
TRUE

FALSE
t
bOut
TRUE

FALSE
t
C04011 C04011 C04011

C04011

0
t

Functional sequence
1. A FALSE-TRUE edge at bIn sets bOut to TRUE. Simultaneously, the internal timing
element () is reset.
2. A TRUE-FALSE edge at bIn starts the internal timing element.
3. After the delay time set via C04011 has elapsed, bOut is reset to FALSE.

4.115.3 Function 3: General delay

Selection: C04010 = "2"


 = internal timing element
bIn
TRUE

FALSE
t
bOut
TRUE

FALSE
t
C04011 C04011

C04011

0
t

Functional sequence
1. Any edge at bIn resets and starts the internal timing element ().
2. After the delay time set via C04011 has elapsed, the input signal bIn is output to bOut.

272 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbDifferentiate - Differentiator with low-pass filter

4.116 L_TbDifferentiate - Differentiator with low-pass filter

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB represents a differentiator with low pass.


r The input signal is differentiated and the filtered with the filter time constant set via
the parameter C04050.
r The value output to output dnOut is internally limited to ±231-1.
r The output bLimitActive displays if a limitation is active.

L_TbDifferntiate
dnIn dnOut
bLimitActive

Inputs

Identifier/data type Information/possible settings


dnIn Input signal
DINT

Outputs

Identifier/data type Value/meaning


dnOut Output signal
DINT • Internally limited to ±231-1
bLimitActive Status signal "Limitation active"
BOOL TRUE The output signal is limited.

Parameters

Parameters Possible settings Information


C04050 0.001 s 60.000 Filter time constant TFilter
• Initialisation: 0.001 s

L 1.4 EN - 08/2006 273


L-force | 9400 function library
Function blocks
L_TbDifferentiate - Differentiator with low-pass filter

Function
Considering the signalling technique, the FB consists of the series connection of a time-
discrete differentiator and a PT1 filter.
r The filtering of the output signal can be switched off with the setting of the filter time
constant TFilter to "0.001 s". In this case, the output signal results directly from:

1s
dnOut = ΔdnIn ⋅ ---------------------------------------
Task cycle time
[4-1] Formula for the output signal when the filter is switched off

dnOut

1s
TCycle

t
TCycle

[4-2] Step response when filter is switched off

r When the filter is switched on, each change of the input signal is evaluated with 1 s/
TFilter. Then the output signal tends to zero with the filter time constant TFilter:

dnOut

1s
TFilter

t
TFilter
C04050: Filter time constant TFilter

[4-3] Step response when the filter is switched on

274 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbDiv - Division

4.117 L_TbDiv - Division

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a division with remainder.

L_TbDiv
dnNumerator dnOut
a
dnDenominator dnResidualValue
b

Inputs

Identifier/data type Information/possible settings


dnNumerator Dividend (numerator)
DINT
dnDenominator Divisor (denominator)
DINT

Outputs

Identifier/data type Value/meaning


dnOut Quotient value (integer result of division)
DINT
dnResidualValue Remainder
DINT

L 1.4 EN - 08/2006 275


L-force | 9400 function library
Function blocks
L_TbDiv_n - Scaled division

4.118 L_TbDiv_n - Scaled division

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a division. The divisor (denominator) must be specified as a scaled signal
[%].
r With a divisor of 100 % the dividend is output unchanged.
r The value output to output dnOut is internally limited to ±231-1.
r The output bLimitActive displays if a limitation is active.

L_TbDiv_n
dnNumerator dnOut
a
dnDenominator_n bLimitActive
b

Inputs

Identifier/data type Information/possible settings


dnNumerator Dividend (numerator)
DINT
dnDenominator_n Divisor (denominator)
DINT • Scaling: 100 % ≡ 230 ≡ 1073741824

Outputs

Identifier/data type Value/meaning


dnOut Quotient value (result of the division)
DINT • Internal limitation to ±231-1 (≡ ±200 %)
bLimitActive Status signal "Limitation active"
BOOL TRUE The output signal is limited.

276 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbFlipFlopD - D flipflop

4.119 L_TbFlipFlopD - D flipflop

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB is created as a D flipflop and can be used to evaluate and save digital signal edges.
r With each rising edge at the clock input bClk the current status of the input bD is saved
internally and output to the output bOut.
r The flipflop can be reset by a TRUE signal at the reset input bR which has the highest
priority.

L_TbFlipFlopD
bD bQ
D Q
bClk
bR bQn
CLR Q

Inputs

Identifier/data type Information/possible settings


BD Input
BOOL
bClk Saving of input value
BOOL FALSEÊTRUE The input value bD is saved internally and output to bOut until a new
value is saved or the flipflop is reset via bR.
bR Flipflop reset
BOOL • This input has the highest priority.
TRUE The output bOut is reset to FALSE.

Outputs

Identifier/data type Value/meaning


bQ State of the D flipflop
BOOL
bQn Inverted state of the D flipflop (≡ bQ)
BOOL

L 1.4 EN - 08/2006 277


L-force | 9400 function library
Function blocks
L_TbFlipFlopD - D flipflop

Function

bD
TRUE

FALSE
t
bClk
TRUE

FALSE
t
bR
TRUE

FALSE
t
bQ
TRUE

FALSE
t

[4-1] Switching performance of the D flipflop

278 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbFlipFlopRS - Status-controlled RS flipflop

4.120 L_TbFlipFlopRS - Status-controlled RS flipflop

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB is created as an RS flipflop and can be used to evaluate and save digital signals.
r The RS flipflop is set with a TRUE signal at the set input bS and reset with a TRUE signal
at the reset input bR.
r If both inputs are applied with a FALSE signal, the output state is maintained.

L_TbFlipFlopRS
bS bQ
S Q

bR bQn
R Q

Inputs

Identifier/data type Information/possible settings


bS Set input
BOOL TRUE Set RS flipflop.
bR Reset input
BOOL TRUE Reset RS flipflop.

Outputs

Identifier/data type Value/meaning


bQ State of the RS flipflop
BOOL
bQn Inverted state of the RS flipflop (≡ bQ)
BOOL

Function

bS bR bQ bQn
FALSE FALSE unchanged unchanged
TRUE FALSE TRUE FALSE
FALSE TRUE FALSE TRUE
TRUE TRUE FALSE TRUE

L 1.4 EN - 08/2006 279


L-force | 9400 function library
Function blocks
L_TbGainLim - Gain with limitation

4.121 L_TbGainLim - Gain with limitation

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB amplifies the input signal.


r The gain is set via the parameter C04030.

r The value output to output dnOut is internally limited to ±231-1.


r The output bLimitActive displays if a limitation is active.

L_TbGainLim
dnIn dnOut
bLimitActive

Inputs

Identifier/data type Information/possible settings


dnIn Input signal
DINT

Outputs

Identifier/data type Value/meaning


dnOut Output signal
DINT • Internally limited to ±231-1
bLimitActive Output signal within the limitation
BOOL TRUE The output signal dnOut is limited.

Parameters

Parameters Possible settings Information


C04030 -214748.3647 214748.3647 Gain
• Initialisation: 1.0000

280 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbGainLim - Gain with limitation

Function

dnOut
31
2 -1
C04030 > 1

dnIn

31
-2 -1

[4-1] Gain and limitation

L 1.4 EN - 08/2006 281


L-force | 9400 function library
Function blocks
L_TbIntegrate - Integration with limitation

4.122 L_TbIntegrate - Integration with limitation

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out an integration with limitation.


r The value output to output dnOut is internally limited to ±231-1.
r The output bLimitActive displays if a limitation is active.

L_TbIntegrate
dnIn dnOut

bLoadStartValue bLimitActive
dnStartValue

Inputs

Identifier/data type Information/possible settings


dnIn Input signal
DINT
bLoadStartValue Loading of the integrator
BOOL TRUE Load the integrator with the value at the dnStartValue input.
dnStartValue Value with which the integrator is loaded by setting bLoadStartValue to TRUE.
DINT

Outputs

Identifier/data type Value/meaning


dnOut Output signal
DINT • Internally limited to ±231-1
bLimitActive Status signal "Limitation active"
BOOL TRUE The output signal is limited.

282 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbLimit - Limit

4.123 L_TbLimit - Limit

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB limits a signal of "DINT" data type to an adjustable value range.

L_TbLimit
dnIn dnOut
MaxLimit
dnMaxLimit
MinLimit
dnMinLimit

Inputs

Identifier/data type Information/possible settings


dnIn Input signal
DINT
dnMaxLimit Upper limitation
DINT
dnMinLimit Lower limitation
DINT

Outputs

Identifier/data type Value/meaning


dnOut Output signal
DINT

O Tip!
The lower limit must always be set smaller than the upper limit, otherwise the
value "0" is output at dnOut.

L 1.4 EN - 08/2006 283


L-force | 9400 function library
Function blocks
L_TbLimit_n - Scaled limitation

4.124 L_TbLimit_n - Scaled limitation

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB limits a scaled signal [%] to an adjustable value range.


r The upper and lower limits of the value range are set via the parameters C04070 and
C04071.
r The output bLimitActive displays if a limitation is active.

L_TbLimit_n
dnIn_n dnOut_n
C04070

C04071
bLimitActive

Inputs

Identifier/data type Information/possible settings


dnIn_n Input signal
DINT • Scaling: 100 % ≡ 230 ≡ 1073741824

Outputs

Identifier/data type Value/meaning


dnOut_n Output signal
DINT • Scaling: 100 % ≡ 230 ≡ 1073741824
bLimitActive Output signal within the limitation
BOOL TRUE The output signal dnOut_n is limited.

Parameters

Identifier/data type Possible settings Information


Index
C04070 -200.00 % 200.00 Upper limitation
• Initialisation: 100.00 %
C04071 -200.00 % 200.00 Lower limitation
• Initialisation: -100.00 %

O Tip!
The lower limit must always be set smaller than the upper limit, otherwise the
value "0" is output at dnOut_n.

284 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbMul - Multiplication

4.125 L_TbMul - Multiplication

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a multiplication without limitation.

L_TbMul
dnIn1 dnOut
dnIn2 a*b

Inputs

Identifier/data type Information/possible settings


dnIn1 Multiplier (1st factor)
DINT
dnIn2 Multiplicand (2nd factor)
DINT

Outputs

Identifier/data type Value/meaning


dnOut Product value (result of the multiplication) with overflow
DINT • No internal limitation, thus an overflow is possible.

L 1.4 EN - 08/2006 285


L-force | 9400 function library
Function blocks
L_TbMul_n - Scaled multiplication with limitation

4.126 L_TbMul_n - Scaled multiplication with limitation

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a multiplication. The multiplicand (2. factor) must be specified as a
scaled signal [%].
r The value output to output dnOut is internally limited to ±231-1.
r The output bLimitActive displays if a limitation is active.

L_TbMul_n
dnIn1 dnOut
dnIn2_n a*b bLimitActive

Inputs

Identifier/data type Information/possible settings


dnIn1 Multiplier (1st factor)
DINT
dnIn2_n Multiplicand (2nd factor)
DINT • Scaling: 100 % ≡ 230 ≡ 1073741824

Outputs

Identifier/data type Value/meaning


dnOut Product value (result of the multiplication)
DINT • Internally limited to ±231-1
bLimitActive Status signal "Limitation active"
BOOL TRUE The output signal is limited.

286 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbMulLim - Multiplication with limitation

4.127 L_TbMulLim - Multiplication with limitation

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a multiplication with limitation.


r The value output to output dnOut is internally limited to ±231-1.
r The output bLimitActive displays if a limitation is active.

L_TbMulLim
dnIn1 dnOut
dnIn2 a*b bLimitActive

Inputs

Identifier/data type Information/possible settings


dnIn1 Multiplier (1st factor)
DINT
dnIn2 Multiplicand (2nd factor)
DINT

Outputs

Identifier/data type Value/meaning


dnOut Product value (result of the multiplication)
DINT • Internally limited to ±231-1
bLimitActive Status signal "Limitation active"
BOOL TRUE The output signal is limited.

L 1.4 EN - 08/2006 287


L-force | 9400 function library
Function blocks
L_TbNand - NAND with 2 inputs

4.128 L_TbNand - NAND with 2 inputs

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a logic NAND operation of binary signals.

L_TbNand
bIn1 bOut
bIn2 &

Inputs

Identifier/data type Information/possible settings


bIn1 Input 1
BOOL
bIn2 Input 2
BOOL

Outputs

Identifier/data type Value/meaning


bOut Result of the NAND operation
BOOL

Function

bIn2 bIn1 bOut


FALSE FALSE TRUE
FALSE TRUE TRUE
TRUE FALSE TRUE
TRUE TRUE FALSE

288 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbNeg - Negation

4.129 L_TbNeg - Negation

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This function block inverts the sign of the input signal, i.e. the input signal is multiplied by
-1 and is then output.

L_TbNeg
dnIn dnOut
*(-1)

Inputs

Identifier/data type Information/possible settings


dnIn Input signal
DINT

Outputs

Identifier/data type Value/meaning


dnOut Output signal
DINT

L 1.4 EN - 08/2006 289


L-force | 9400 function library
Function blocks
L_TbNor - NOR with 2 inputs

4.130 L_TbNor - NOR with 2 inputs

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a logic OR operation of binary signals.

L_TbNor
bIn1 bOut
bIn2 ³1

Inputs

Identifier/data type Information/possible settings


bIn1 Input 1
BOOL
bIn2 Input 2
BOOL

Outputs

Identifier/data type Value/meaning


bOut Result of the NOR operation
BOOL

Function

bIn2 bIn1 bOut


FALSE FALSE TRUE
FALSE TRUE FALSE
TRUE FALSE FALSE
TRUE TRUE FALSE

290 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbNormalize - Signal scaling with limitation

4.131 L_TbNormalize - Signal scaling with limitation

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB scales any signal to a parameterisable reference variable.

L_TbNormalize
dnIn dnOut_n
bLimitActive

Inputs

Identifier/data type Information/possible settings


dnIn Input signal
DINT

Outputs

Identifier/data type Value/meaning


dnOut_n Scaled output signal
DINT • Internally limited to ±200 %
bLimitActive Output signal within the limitation
BOOL TRUE The output signal dnOut_n is limited.

Parameters

Parameters Possible settings Information


C04035 -2147483647 2147483647 Reference variable
• Setting "0" is not possible.
• Initialisation: 1073741824

Function

dnIn
dnOut_n = -------------------- ⋅ 100 %
C04035

L 1.4 EN - 08/2006 291


L-force | 9400 function library
Function blocks
L_TbNot - Negation

4.132 L_TbNot - Negation

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB negates a signal from the BOOL data type.

L_TbNot
bIn bOut
1

Inputs

Identifier/data type Information/possible settings


bin Input
BOOL

Outputs

Identifier/data type Value/meaning


bOut Result of the NOT operation
BOOL

Function

bin bOut
FALSE TRUE
TRUE FALSE

292 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbOr - OR with 2 inputs

4.133 L_TbOr - OR with 2 inputs

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a logic OR operation of binary signals.

L_TbOr
bIn1 bOut
bIn2 ³1

Inputs

Identifier/data type Information/possible settings


bIn1 Input 1
BOOL
bIn2 Input 2
BOOL

Outputs

Identifier/data type Value/meaning


bOut Result of the OR operation
BOOL

Function

bIn2 bIn1 bOut


FALSE FALSE FALSE
FALSE TRUE TRUE
TRUE FALSE TRUE
TRUE TRUE TRUE

L 1.4 EN - 08/2006 293


L-force | 9400 function library
Function blocks
L_TbOscillator - Rectangular signal generator

4.134 L_TbOscillator - Rectangular signal generator

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB can be used to generate a Boolean square wave signal with a variable high/low
time.

L_TbOscillator
bEnable bOut

Inputs

Identifier/data type Information/possible settings


bEnable Activating the signal generator
BOOL FALSE Signal generator deactivated, bOut = FALSE.
TRUE Signal generator activated.

Outputs

Identifier/data type Value/meaning


bOut Boolean square wave signal
BOOL

Parameters

Parameters Possible settings Information


C04020 0.000 s 60.000 ON time
• Initialisation: 0.001 s
C04021 0.000 s 60.000 OFF time
• Initialisation: 0.001 s

4.134.1 Function

If the FB is activated by setting bEnable to TRUE, the set square wave signal is output to
bOut, starting with the HIGH state:

bEnable

C04020

bOut

C04021

r If bEnable is reset to FALSE, the output bOut is also immediately reset to FALSE.

294 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbOscillator - Rectangular signal generator

4.134.2 Optimising the accuracy of the output signal

Enter only integer multiples of the task cycle time via C04020 and C04021 for a maximum
accuracy of the rectangular signal to be output.
r In case of an asymmetrical entry of the pulse/pause time and non-compliance with the
times selected as integer multiples of the task cycle time, the times selected are
internally rounded up to integer multiples of the task cycle times.
r With a minimum timing below the task cycle time the permanent level arises according
to the following rule: bOut = TRUE if C04020 > C04021.
r The following table lists the possible input signal states and the resulting output
signal:

Task running On time Off time State of ON and OFF time Output signal
time C04020 C04021 bOut
t
1 ms 3 ms 2 ms ON time, OFF time ≥ T TRUE: 3 ms, FALSE: 2 ms
ON time > OFF time
3 ms 3 ms 2 ms ON time ≥ T TRUE
OFF time < T
ON time > OFF time
3 ms 2 ms 1 msec On time, OFF time < T TRUE
ON time > OFF time
3 ms 1 msec 2 ms On time, OFF time < T FALSE
ON time < OFF time
3 ms 2 ms 2 ms On time, OFF time < T FALSE
ON time = OFF time
3 ms 2 ms 3 ms ON time < T FALSE
OFF time ≥ T
ON time < OFF time
3 ms 3 ms 5 ms ON time, OFF time ≥ T TRUE: 3 ms, FALSE: 6 ms
ON time < OFF time
OFF time ≠ (n * T)
3 ms 5 ms 3 ms ON time, OFF time ≥ T TRUE: 6 ms, FALSE: 3 ms
ON time > OFF time
ON time ≠ (n * T)
3 ms 5 ms 4 ms ON time, OFF time ≥ T TRUE: 6 ms, FALSE: 3 ms
ON time > OFF time
ON time, OFF time ≠ (n * T)
3 ms 4 ms 5 ms ON time, OFF time ≥ T TRUE: 3 ms, FALSE: 6 ms
ON time < OFF time
ON time, OFF time ≠ (n * T)
3 ms 5 ms 5 ms ON time, OFF time ≥ T TRUE: 6 ms, FALSE: 6 ms
ON time = OFF time
ON time, OFF time ≠ (n * T)

L 1.4 EN - 08/2006 295


L-force | 9400 function library
Function blocks
L_TbPIController - PI controller with limitation

4.135 L_TbPIController - PI controller with limitation

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB provides a simple PI controller with different control functions.


r The value output to the output dnOut is internally limited to the limit range
parameterised in C04095 and C04096 (default setting ±200 %).
r The output bLimitActive displays if a limitation is active.
r The function corresponds by approximation to the function "PCTRL" of the 9300 servo
inverter.

L_TbPIController
dnSetValue
dnActValue dnOut
bLoadIntValue bLimitActive
dnIntValue
bReset

Inputs

Identifier/data type Information/possible settings


dnSetValue Setpoint signal
DINT
dnActValue Actual signal
DINT
bLoadIntValue Loading of the integrator
BOOL TRUE Set the integral action component of the PI controller to the value
applied to the input dnIntValue.
dnIntValue Value on which the integral action component of the PI controller is adjusted by
DINT setting bLoadIntValue to TRUE.
bReset Reset PI controller to zero.
BOOL TRUE PI controller is reset to zero.

Outputs

Identifier/data type Value/meaning


dnOut Output signal
DINT • Is internally limited to the limit range parameterised in C04095 and C04096
(default setting ±200 %).
bLimitActive Status signal "Limitation active"
BOOL TRUE The output signal is limited.

296 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbPIController - PI controller with limitation

Parameters

Parameters Possible settings Information


C04090 0.0000 214748.3647 Controller gain
• Setting 0.0000 resets the PI
controller.
• Initialisation: 1.0000
C04091 0.001 s 1000.000 Controller reset time
• Setting 1000.000 resets the PI
controller.
• Initialisation: 1.000 s
C04095 0.00 % 200.00 Positive output limit value
• Initialisation: 200.00 %
C04096 -200.00 % 0.00 Negative output limit value
• Initialisation: -200.00 %

Function
The FB contains the calculation of the system deviation and the PI controller.
r The dynamics of the controller is parameterised according to the gain Vp (C04090) and
the reset time Tn (C04091):

dnOut

2 VP

VP

t
Tn

[4-1] Step response of the controller

r By setting bReset to TRUE the controller is reset (P and I component).


r The I component of the controller can be set via the inputs bLoadIntValue and
dnIntValue.
– This function is also active when the controller is reset via the input bReset, i.e. the
integral action component is loaded while a zero is output to the output. This
provides the opportunity to reset the controller with a signal and simultaneously
initialise the integral action component for the following enable:
r The correcting variable of the controller is automatically limited to the range ±231-1
(±200 %).
– If a small setting range is required, the positive and negative output limit value can
be set individually via C04095 and C04096.
– When the controller reaches the output limitation, the P component has priority over
the I component.

L 1.4 EN - 08/2006 297


L-force | 9400 function library
Function blocks
L_TbPT1Filter - Delay

4.136 L_TbPT1Filter - Delay

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB filters and delays analog signals.


r The filter time constant T is set via the parameter C04040.
r The gain is fixed at V = 1.
r The function corresponds to the function "PT1" of the 9300 servo inverter.

L_TbPT1Filter
dnIn dnOut

Inputs

Identifier/data type Information/possible settings


dnIn Input signal
DINT

Outputs

Identifier/data type Value/meaning


dnOut Output signal
DINT

Parameters

Parameters Possible settings Information


C04040 0.001 s 60.000 Filter time constant
• With the setting 0.001 s the filter
is not active.
• Initialisation: 0.001 s

298 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbPT1Filter - Delay

Function

V=1

T t

[4-1] Filter time constant T of the first-order delay element

L 1.4 EN - 08/2006 299


L-force | 9400 function library
Function blocks
L_TbRateAction - Rate action with limitation

4.137 L_TbRateAction - Rate action with limitation

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB contains a rate action function to compensate disturbing low passes.


r Therefore the rate time constant must be adjusted to the filter time constant of the low
pass via the parameter C04055.
r The value output to output dnOut is internally limited to ±231-1.

L_TbRateAction
dnIn dnOut
bLimitActive

Inputs

Identifier/data type Information/possible settings


dnIn Input signal
DINT

Outputs

Identifier/data type Value/meaning


dnOut Output signal
DINT • Internally limited to ±231-1
bLimitActive Status signal "Limitation active"
BOOL TRUE The output signal is limited.

Parameters

Parameters Possible settings Information


C04055 0.000 s 60.000 Rate time constant TV
• Initialisation: 0.001 s

300 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbRateAction - Rate action with limitation

Function
The input signal is differentiated by means of the parameterised rate time constant TV and
added to the input signal.
r The differentiation of the input signal can be switched off when the rate time constant
TV is set to "0.000 s". In this case the differential component is zero and the input signal
output unchanged to the output.
r When the rate time constant TV is greater than "0.000 s" the following step response is
the result:

dnOut

TV
1+
TCycle

t
TCycle
C04055: Rate time constant TV

[4-1] Step response when the rate time constant > 0 s

L 1.4 EN - 08/2006 301


L-force | 9400 function library
Function blocks
L_TbSampleHold - Sample & Hold

4.138 L_TbSampleHold - Sample & Hold

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB can save a signal.


r The stored value is also available after mains disconnection.

L_TbSampleHold
dnIn dnOut
S&H
bLoad

Inputs

Identifier/data type Information/possible settings


dnIn Input signal
DINT
bLoad Saving of input signal
BOOL FALSE The value valid last at dnIn is stored and output to dnOut. A signal
change at dnIn does not change dnOut.
TRUE dnIn is output at the output dnOut.

Outputs

Identifier/data type Value/meaning


dnOut Output signal
DINT

Behaviour when switching the mains


The value loaded last is stored permanently when the supply voltage is switched off and
reloaded after the mains is switched on again.
r In order that the stored value is not immediately overwritten by the current input
signal at dnIn after switching on the mains again, bLoad must be set to FALSE when the
mains is switched on again.

302 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbSelect - Switch-over

4.139 L_TbSelect - Switch-over

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This function block switches between two signals. The switch-over is controlled via a
boolean input signal.
r So it is, for example, possible to switch between an initial diameter and a calculated
diameter during winding.

L_TbSelect
dnIn1 0 dnOut
dnIn2
1
bSelectIn2

Inputs

Identifier/data type Information/possible settings


dnIn1 Input signal 1
DINT
dnIn2 Input signal 2
DINT
bSelectIn2 Selection of the input signal for the output to dnOut
BOOL FALSE dnIn1
TRUE dnIn2

Outputs

Identifier/data type Value/meaning


dnOut Output signal
DINT

L 1.4 EN - 08/2006 303


L-force | 9400 function library
Function blocks
L_TbSub - Subtraction

4.140 L_TbSub - Subtraction

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a subtraction without limitation.

L_TbSub
dnIn1 dnOut
dnIn2 a-b

Inputs

Identifier/data type Information/possible settings


dnIn1 Minuend
DINT
dnIn2 Subtrahend
DINT

Outputs

Identifier/data type Value/meaning


dnOut Differential value (result of the subtraction)
DINT • No internal limitation, thus an overflow is possible:
– If the result > 231-1: dnOut = dnIn1 - dnIn2 - 232
– If the result < 231: dnOut = dnIn1 - dnIn2 + 232

304 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbSubLim - Subtraction with limitation

4.141 L_TbSubLim - Subtraction with limitation

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a subtraction with limitation.


r The value output to output dnOut is internally limited to ±231-1.
r The output bLimitActive displays if a limitation is active.

L_TbSubLim
dnIn1 dnOut
dnIn2 a-b bLimitActive

Inputs

Identifier/data type Information/possible settings


dnIn1 Minuend
DINT
dnIn2 Subtrahend
DINT

Outputs

Identifier/data type Value/meaning


dnOut Differential value (result of the subtraction)
DINT • Internally limited to ±231-1
bLimitActive Status signal "Limitation active"
BOOL TRUE The output signal is limited.

L 1.4 EN - 08/2006 305


L-force | 9400 function library
Function blocks
L_TbTransition - Edge evaluation

4.142 L_TbTransition - Edge evaluation

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB serves to evaluate digital signal edges and converts them into time-defined and
retriggerable pulses.
r This function corresponds to the function "TRANS" of the 9300 servo inverter.

L_TbTransition
bIn bOut
0 t

Inputs

Identifier/data type Information/possible settings


bin Input for edge evaluation
BOOL • Function depends on the selection of the trigger edge in C04000.

Outputs

Identifier/data type Value/meaning


bOut Output (retriggerable)
BOOL

Parameters

Parameters Possible settings Information


C04000 Trigger edge
0 Rising edge Lenze setting
1 Falling edge
2 Both edges
C04001 0.001 s 60.000 Pulse duration
• Initialisation: 0.001 s

Note!
When the task interval time is set to >1 ms and the pulse duration set in C04001
is not an integer multiple of the interval time, the pulse duration is
automatically extended to the next integer multiple of the interval time.

306 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbTransition - Edge evaluation

4.142.1 Function 1: Evaluating rising edges

C04000 = "0"

bIn
TRUE

FALSE
t
bOut
TRUE

FALSE
t
C04001 C04001 C04001

[4-1] Switching performance when evaluating rising edges

Functional sequence
1. A FALSE-TRUE edge at the input bIn sets the output bOut to TRUE.
2. After the time specified via C04001 the output bOut is reset to FALSE provided that no
other FALSE/TRUE edge has taken place at the output bIn in the meantime.
– If another FALSE/TRUE edge takes place at the bIn input, the time C04001 restarts to
elapse, i.e. the output bOut is retriggerable.

4.142.2 Function 2: Evaluating falling edges

C04000 = "1"

bIn
TRUE

FALSE
t
bOut
TRUE

FALSE
t
C04001 C04001 C04001

[4-2] Switching performance when evaluating falling edges

Functional sequence
1. A TRUE-FALSE edge at the input bIn sets the output bOut to TRUE.
2. After the time specified via C04001 the output bOut is reset to FALSE provided that no
other TRUE/FALSE edge has taken place at the bIn input in the meantime.
– If another TRUE/FALSE edge takes place at the bIn input, the time C04001 restarts to
elapse, i.e. the output bOut is retriggerable.

L 1.4 EN - 08/2006 307


L-force | 9400 function library
Function blocks
L_TbTransition - Edge evaluation

4.142.3 Function 3: Evaluating rising and falling edges

C04000 = "2"

bIn
TRUE

FALSE
t
bOut
TRUE

FALSE
t
C04001 C04001 C04001

[4-3] Switching performance when evaluating rising and falling edges

Functional sequence
1. A signal change (FALSE-TRUE or TRUE-FALSE edge) at the input bIn sets the output bOut
to TRUE.
2. After the time specified via C04001 the output bOut is reset to FALSE provided that no
other signal change has taken place at the bIn input in the meantime.
– If another signal change takes place at the bIn input, the time C04001 restarts to
elapse, i.e. the output bOut is retriggerable.

308 1.4 EN - 08/2006 L


L-force | 9400 function library
Function blocks
L_TbXor - XOR with 2 inputs

4.143 L_TbXor - XOR with 2 inputs

Function library: LenzeToolbox


FB available for: ; 9400 StateLine ; 9400 HighLine ; 9400 TopLine
Runtime software license: ; Motion Control StateLevel ; Motion Control HighLevel ; Motion Control TopLevel ; PLC

This FB carries out a logic EXCLUSIVE OR operation of binary signals.

L_TbXor
bIn1 bOut
bIn2 =1

Inputs

Identifier/data type Information/possible settings


bIn1 Input 1
BOOL
bIn2 Input 2
BOOL

Outputs

Identifier/data type Value/meaning


bOut Result of the exclusive OR operation
BOOL

Function

bIn2 bIn1 bOut


FALSE FALSE FALSE
FALSE TRUE TRUE
TRUE FALSE TRUE
TRUE TRUE FALSE

L 1.4 EN - 08/2006 309


L -fo r c e | 9 4 0 0 fu n c t io n lib ra ry
Index

5 Index
Numbers C4204 227
1-from-8-selector 244 C4207 227
C4208 227
A C4212 227
Absolute value 245 C4213 227
Acceleration table 153 C4214 227
Addition 246, 247 C4215 227
AND with five inputs 239 C4220 227
AND with two inputs 248 C4221 227
Application notes 11 C4222 227
C4223 227
B C4224 227
Bit combination 52, 53, 54 C4225 227
Bit demultiplexer 48, 57, 79 C4226 228
Bit multiplexer 44, 45, 47 C4227 228
Bit operation 61, 62, 63, 69, 70, 71, 72, 73, 74 C4228 228
C4229 228
C C4237 228
C4000 306 C4238 228
C4001 306 C4239 228
C4005 260 C4240 217
C4010 270 C4241 217
C4011 270 C4242 217
C4020 294 C4243 217
C4021 294 C4244 217
C4030 280 C4245 218
C4035 291 C4248 218
C4040 298 C4249 218
C4050 273 C4251 218
C4055 300 C4258 218
C4060 268 C4259 218
C4061 268 C4271 207
C4065 266 C4273 207
C4070 284 C4276 221
C4071 284 C4278 221
C4080 254 C4281 208
C4081 254 C4283 208
C4082 254 C4286 222
C4085 249 C4288 222
C4090 297 C4290 223
C4091 297 C4291 223
C4095 297 C4294 224
C4096 297 C4295 224
C4100 261 C4299 224
C4101 261 C4300 211
C4102 261 C4301 211
C4190 43 C4303 211
C4200 227 C4304 211
C4201 227 C4305 211
C4202 227 C4310 237
C4203 227 C4312 212

310 1.4 EN - 08/2006 L


L-force | 9400 function library
Index

C4314 238 C4580 200


C4316 232 C4581 200
C4320 204 C4582 200
C4340 214 C4590 201
C4349 214 C4591 201
C4400 234 C4592 201
C4402 234 C4593 201
C4403 234 C4594 201
C4404 234 C4600 202
C4500 188 C4601 202
C4501 188 C4602 202
C4502 188 C4700 160
C4503 188 C4701 161
C4504 188 C4702 161
C4505 188 C4703 161
C4510 193 C4705 161
C4511 193 C4706 161
C4512 193 C4707 162
C4513 193 C4708 162
C4514 193 C4710 162
C4515 193 C4711 162
C4516 193 C4712 162
C4520 194 C4713 162
C4521 194 C4714 163
C4522 194 C4715 163
C4523 194 C4716 163
C4530 195 C4717 163
C4531 195 C4718 163
C4532 195 C4719 163
C4540 197 C4720 163
C4541 197 C4721 164
C4542 197 C4750 174
C4543 197 C4751 174
C4544 197 C4752 175
C4545 197 C4753 175
C4546 197 C4754 175
C4547 197 C4755 175
C4548 197 C4756 175
C4549 197 C4757 175
C4550 197 C4758 175
C4551 197 C4760 175
C4552 197 C4761 176
C4553 197 C4763 176
C4554 197 C4764 176
C4555 197 C4765 176
C4556 197 C5000 107
C4557 197 C5007 107
C4558 197 C5008 107
C4559 197 C5009 107
C4570 199 C5010 139
C4571 199 C5011 139
C4572 199 C5012 139
C4573 199 C5013 139

L 1.4 EN - 08/2006 311


L-force | 9400 function library
Index

C5014 139 C5126 120


C5015 139 C5127 120
C5025 139 C5142 136
C5026 139 C5147 136
C5027 140 C5148 136
C5028 140 C5149 136
C5034 126 C5150 136
C5036 126 C5151 136
C5041 127 C5152 136
C5042 127 C5153 136
C5043 127 C5154 136
C5048 127 C5155 136
C5049 127 C5160 103
C5050 122 C5161 103
C5051 122 C5162 103
C5053 122 C5163 103
C5056 123 C5165 103
C5065 123 C5169 103
C5067 123 C5175 118
C5069 123 C5178 118
C5070 98 C5179 118
C5074 98 C5181 113
C5076 98 C5183 113
C5077 98 C5184 113
C5078 98 C5186 113
C5079 98 C5187 114
C5080 100 C5188 114
C5083 100 C5189 114
C5085 100 C5900 84
C5087 100 C5901 84
C5088 101 C5902 84
C5089 101 Cam 233
C5090 132 Cams 233
C5091 132 Characteristic function 261
C5092 132 Comparison 249, 254
C5093 132 Conventions used 10
C5094 132 Conventions used for variable identifiers 14
C5095 132 Copyright 2
C5096 132 Copyright information 2
C5097 132
C5098 133 D
C5099 133 Data type conversion 40, 41, 42, 55, 56, 78
C5100 143 Data type entry 14
C5103 143 Dead band with gain 266
C5104 144 Dead band with gain (scaled) 268
C5105 144 Dead time compensation 204
C5114 144 Deceleration 270, 298
C5117 144 Differentiation 205
C5118 144 Differentiation (cyclic) 105
C5122 120 Differentiator with low-pass filter 273
C5123 120 Division 275, 276
C5124 120
C5125 120

312 1.4 EN - 08/2006 L


L-force | 9400 function library
Index

E L_DcSetBitOfDWord 73
Edge evaluation 306 L_DcSetBitOfWord 74
E-mail to Lenze 316 L_DcSpeed_sToNorm_n 75
Error tripping 83 L_DcSpeed_sToSpeed_v 76
Extrapolation 106 L_DcSpeed_vToSpeed_s 77
L_DcWordTo2Bytes 78
F L_DcWordToBits 79
Feedback to Lenze 316 L_DcWordToByte 80
Flipflop 277 L_DcWordToDWord 81
Following error monitoring 117 L_DcWordToInt 82
Function block 12 L_DevApplErr 83
Function library 12 L_DevBrakeStateDecoder 85
L_DevDriveInterfaceStateDecoder 87
G L_DevHomingStateDecoder 89
Gain 280 L_DevLimiterStateDecoder 91
General delay 272 L_DevManualJogStateDecoder 93
L_LdAddOffsetCyclic 95
I L_LdClutchAxisP 96
Imprint 2 L_LdClutchV 99
Integration 110, 209, 282 L_LdConvAxisV 102
L_LdDifferentiateCyclic 105
L L_LdExtrapolate 106
L_Dc2BytesToWord 40 L_LdIntegrateCyclic 110
L_Dc2WordsToDWord 41 L_LdLinearCoupling 112
L_Dc4BytesToDWord 42 L_LdMarkSync 115
L_DcBitShift 43 L_LdMonitFollowError 117
L_DcBitsToByte 44 L_LdMPot 119
L_DcBitsToDWord 45 L_LdPosCtrlLin 121
L_DcBitsToWord 47 L_LdSetAxisVelocity 124
L_DcByteToBits 48 L_LdStateDecoder 128
L_DcByteToWord 49 L_LdSyncOperation 131
L_DcDIntToDWord 50 L_LdToolControl 134
L_DcDIntToInt 51 L_LdVirtualMasterP 137
L_DcDWordBitand 52 L_LdVirtualMasterV 142
L_DcDWordBitor 53 L_LdZeroDetect 146
L_DcDWordBitxor 54 L_PosDecoderStatePositioner 147
L_DcDWordTo2Words 55 L_PosDecoderStateSequencer 149
L_DcDWordTo4Bytes 56 L_PosGetProfile 150
L_DcDWordToBits 57 L_PosGetProfileData 151
L_DcDWordToDInt 59 L_PosGetTableAcc 153
L_DcDWordToWord 60 L_PosGetTableJerk 155
L_DcGetBitOfByte 61 L_PosGetTablePos 156
L_DcGetBitOfDWord 62 L_PosGetTableSpeed 157
L_DcGetBitOfWord 63 L_PosPositionerTable 158
L_DcIntToDInt 64 L_PosProfileInterface 171
L_DcIntToWord 65 L_PosProfileTable 173
L_DcNorm_aToNorm_n 66 L_PosSequencer 182
L_DcNorm_nToNorm_a 67 L_SdDelayComp 204
L_DcNorm_nToSpeed_s 68 L_SdDifferentiate 205
L_DcResetBitOfByte 69 L_SdFactor 206
L_DcResetBitOfDWord 70 L_SdGetPosition 207
L_DcResetBitOfWord 71 L_SdGetSpeed 208
L_DcSetBitOfByte 72 L_SdIntegrate 209

L 1.4 EN - 08/2006 313


L-force | 9400 function library
Index

L_SdLimitSpeed 210 L_TbSelect 303


L_SdPosToUnit 212, 232 L_TbSub 304
L_SdRampGenerator 213 L_TbSubLim 305
L_SdRuntimeComp 216 L_TbTransition 306
L_SdSetAxisData 217 L_TbXor 309
L_SdSetPosition 221 Layout of the safety information 11
L_SdSetSpeed 222 Layout of the safety instructions
L_SdSpeedFilter 223 11
L_SdSpeedSet 225 Liability 2
L_SdSwitchPoint 233 Limit 283, 284
L_SdTouchProbe 235
L_SdUnitToPos 237 M
L_SdUnitToSpeed 238 Machine parameters 217
L_Tb5And 239 Mark synchronisation 115
L_Tb5Nand 240 Master value adjustment 119
L_Tb5Nor 241 Master value adjustment via position 121
L_Tb5Or 242 Master value connection 112, 131
L_Tb5Xor 243 Master value processing 124
L_Tb8Select 244 Multiplication 285, 286, 287
L_TbAbs 245
L_TbAdd 246 N
L_TbAddLim 247 NAND with five inputs 240
L_TbAnd 248 NAND with two inputs 288
L_TbCompare 249 Negation 289, 292
L_TbCompare_n 254 NOR with five inputs 241
L_TbCount 259 NOR with two inputs 290
L_TbCurve 261
L_TbDeadband 266
O
L_TbDeadband_n 268 OFF-delay 272
L_TbDelay 270 Offset addition 95
L_TbDifferentiate 273 ON-delay 271
L_TbDiv 275 OR with five inputs 242
L_TbDiv_n 276 OR with two inputs 293
L_TbFlipFlopD 277
P
L_TbFlipFlopRS 279
PI controller 296
L_TbGainLim 280
Position conversion 207, 212, 221, 237
L_TbIntegrate 282
Position table 156
L_TbLimit 283
Profile data interface 171
L_TbLimit_n 284
Profile data output 151
L_TbMul 285
Profile data record management 158, 173
L_TbMul_n 286
Profile data tables 150
L_TbMulLim 287
L_TbNand 288
R
L_TbNeg 289
Ramp function generator with S ramp 213
L_TbNor 290
Ramp generator 225
L_TbNormalize 291
Rate action 300
L_TbNot 292
Rectangular signal generator 294
L_TbOr 293
RS flipflop (status-controlled) 279
L_TbOscillator 294
Runtime compensation 216
L_TbPIController 296
L_TbPT1Filter 298
S
L_TbRateAction 300
Safety instructions 11
L_TbSampleHold 302
Sample & Hold 302

314 1.4 EN - 08/2006 L


L-force | 9400 function library
Index

Sequence control 182


Setpoint conditioning 134
Setpoint ramp generator 225
Shift operation 43
Signal converter 66, 67, 68, 75, 76, 77
Signal scaling 291
Signal type entry 15
Speed conversion 208, 222, 232, 238
Speed limitation 210
Speed ratio 102
Speed signal delay 223
Speed table 157
S-ramp time table 155
Status signals (drive interface) 87
Status signals (LineDrive-FBs) 128
Status signals (LS_Brake) 85
Status signals (LS_Homing) 89
Status signals (LS_Limiter) 91
Status signals (LS_ManualJog) 93
Status signals (positioning) 147
Status signals (sequence control) 149
Stretching factor (electronic gearbox) 206
Subtraction 304, 305
Switching points 233
Switch-over 303

T
Touch probe evaluation 235
Type converter 49, 50, 51, 59, 60, 64, 65, 80, 81, 82

U
Up/downcounter 259

V
Virtual clutch (electronic gearbox) 99
Virtual clutch (synchronism) 96
Virtual master (electronic gearbox) 142
Virtual master (synchronism) 137

X
XOR with five inputs 243
XOR with two inputs 309

Z
Zero crossing detection 146

L 1.4 EN - 08/2006 315


Your opinion is important to us

)(('%$&.
These Instructions were created to the best of our knowledge
and belief to give you the best possible support for handling
our product.
If you have suggestions for improvement, please e-mail us to:
feedback-docu@[Link]

Thank you for your support.


Your Lenze documentation team

316 L

You might also like