You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong><br />
Function blocks<br />
Software manual<br />
V2.09, 04.2012<br />
www.schneider-electric.com<br />
SoMachine
Important information <strong>Lexium</strong> <strong>Library</strong><br />
Important information<br />
This manual is part of the product.<br />
Carefully read this manual and observe all instructions.<br />
Keep this manual for future reference.<br />
Hand this manual and all other pertinent product documentation over<br />
to all users of the product.<br />
Carefully read and observe all safety instructions and the chapter<br />
"Before you begin - safety information".<br />
Some products are not available in all countries.<br />
For information on the availability of products, please consult the catalog.<br />
Subject to technical modifications without notice.<br />
All details provided are technical data which do not constitute warranted<br />
qualities.<br />
Most of the product designations are registered trademarks of their<br />
respective owners, even if this is not explicitly indicated.<br />
2 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> Table of contents<br />
Table of contents<br />
Important information 2<br />
Table of contents 3<br />
About this manual 7<br />
1 Before you begin - safety information 9<br />
1.1 Qualification of personnel 9<br />
1.2 Intended use 9<br />
1.3 Hazard categories 10<br />
1.4 Basic information 11<br />
1.5 Standards and terminology 12<br />
2 <strong>Lexium</strong> <strong>Library</strong> Guide 13<br />
2.1 PLCopen state diagram 14<br />
2.2 List of the function blocks 15<br />
2.3 Compatibility of the function blocks 19<br />
2.4 Memory structure during parameter transmission 23<br />
2.5 Transitions between function blocks 24<br />
2.6 Basic inputs and outputs 27<br />
2.6.1 Signal behavior of function blocks with the input Enable 29<br />
2.6.2 Signal behavior of function blocks with the input Execute 31<br />
2.7 Single axis 33<br />
2.7.1 Initialization 33<br />
2.7.1.1 MC_Power_LXM 33<br />
2.7.2 Operating mode Jog 34<br />
2.7.2.1 MC_Jog_LXM 34<br />
2.7.3 Operating mode Current Control 36<br />
2.7.3.1 CurrentControl_LXM 36<br />
2.7.4 Operating mode Profile Torque 38<br />
2.7.4.1 MC_TorqueControl_LXM 38<br />
2.7.5 Operating mode Speed Control / Oscillator 40<br />
2.7.5.1 VelocityControl_LXM 40<br />
2.7.6 Operating mode Profile Velocity 42<br />
2.7.6.1 MC_MoveVelocity_LXM 42<br />
2.7.7 Operating mode Profile Position 43<br />
2.7.7.1 MC_MoveAbsolute_LXM 43<br />
2.7.7.2 MC_MoveAdditive_LXM 44<br />
2.7.7.3 MC_MoveRelative_LXM 44<br />
2.7.8 Operating mode Homing 46<br />
Function blocks 3
Table of contents <strong>Lexium</strong> <strong>Library</strong><br />
2.7.8.1 MC_Home_LXM 46<br />
2.7.8.2 MC_SetPosition_LXM 48<br />
2.7.9 Stopping 49<br />
2.7.9.1 MC_Stop_LXM 49<br />
2.7.9.2 MC_Halt_LXM 49<br />
2.7.10 Position capture via signal input 51<br />
2.7.10.1 MC_TouchProbe_LXM 51<br />
2.7.10.2 MC_AbortTrigger_LXM 52<br />
2.8 Multi axis 53<br />
2.8.1 Operating mode Electronic Gear 53<br />
2.8.1.1 GearInSync_LXM 53<br />
2.8.1.2 MC_GearIn_LXM 54<br />
2.8.1.3 MC_GearOut_LXM 56<br />
2.9 Motion Sequence 57<br />
2.9.1 Operating mode Motion Sequence 57<br />
2.9.1.1 ReadMotionSequenceStatus_LXM 57<br />
2.9.1.2 ReadDataSet_LXM 57<br />
2.9.1.3 WriteDataSet_LXM 58<br />
2.9.1.4 WriteTransitionCondition_LXM 58<br />
2.9.1.5 StartMotionSequence_LXM 58<br />
2.9.1.6 AbortMotionSequence_LXM 59<br />
2.10 Administrative 60<br />
2.10.1 Reading a parameter 60<br />
2.10.1.1 MC_ReadActualTorque_LXM 60<br />
2.10.1.2 MC_ReadActualVelocity_LXM 60<br />
2.10.1.3 MC_ReadActualPosition_LXM 61<br />
2.10.1.4 MC_ReadStatus_LXM 62<br />
2.10.1.5 MC_ReadParameter_LXM 64<br />
2.10.1.6 GetSupplierVersion 66<br />
2.10.2 Writing a parameter 67<br />
2.10.2.1 MC_WriteParameter_LXM 67<br />
2.10.2.2 SetDriveRamp_LXM 68<br />
2.10.2.3 SetStopRamp_LXM 69<br />
2.10.2.4 SetLimitSwitch_LXM 70<br />
2.10.2.5 ResetParameters_LXM 71<br />
2.10.2.6 StoreParameters_LXM 71<br />
2.10.3 Saving and restoring device configuration 73<br />
2.10.3.1 UploadDriveParameter_LXM 73<br />
2.10.3.2 DownloadDriveParameter_LXM 73<br />
2.10.4 Inputs and outputs 75<br />
2.10.4.1 ReadAnalogInputs_LXM 75<br />
2.10.4.2 MC_ReadDigitalInput_LXM 75<br />
2.10.4.3 MC_ReadDigitalOutput_LXM 76<br />
2.10.4.4 MC_WriteDigitalOutput_LXM 77<br />
2.10.5 Error handling 79<br />
2.10.5.1 ReadAxisWarning_LXM 79<br />
2.10.5.2 MC_ReadAxisError_LXM 79<br />
2.10.5.3 MC_Reset_LXM 82<br />
2.11 Device Function 83<br />
2.11.1 Startup 83<br />
2.11.1.1 Servo_Startup 83<br />
4 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> Table of contents<br />
2.11.1.2 Stepper_Startup 89<br />
3 Glossary 97<br />
3.1 Units and conversion tables 97<br />
3.1.1 Length 97<br />
3.1.2 Mass 97<br />
3.1.3 Force 97<br />
3.1.4 Power 97<br />
3.1.5 Rotation 98<br />
3.1.6 Torque 98<br />
3.1.7 Moment of inertia 98<br />
3.1.8 Temperature 98<br />
3.1.9 Conductor cross section 98<br />
3.2 Terms and Abbreviations 99<br />
4 Index 101<br />
Function blocks 5
<strong>Lexium</strong> <strong>Library</strong><br />
6 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> About this manual<br />
About this manual<br />
Purpose of this document<br />
Validity note<br />
This manual is an extract of the SoMachine Online Help. Fully read<br />
and understand all manuals of the SoMachine Online Help and of the<br />
products used.<br />
This document describes the functions of the <strong>Lexium</strong> <strong>Library</strong>.<br />
Software environment Devices Fieldbus<br />
Device Descriptions of version<br />
3.2 and higher are<br />
supported.<br />
LXM05<br />
SD328<br />
LXM32<br />
This document is valid for SoMachine as of Version 2.0.<br />
CANopen<br />
Source manuals The latest versions of the manuals can be downloaded from the Internet<br />
at:<br />
http://www.schneider-electric.com<br />
Corrections and suggestions We always try to further optimize our manuals. We welcome your suggestions<br />
and corrections.<br />
Please get in touch with us by e-mail:<br />
techcomm@schneider-electric.com.<br />
Work steps If work steps must be performed consecutively, this sequence of steps<br />
is represented as follows:<br />
■ Special prerequisites for the following work steps<br />
▶ Step 1<br />
◁ Specific response to this work step<br />
▶ Step 2<br />
If a response to a work step is indicated, this allows you to verify that<br />
the work step has been performed correctly.<br />
Unless otherwise stated, the individual steps must be performed in the<br />
specified sequence.<br />
SI units SI units are the original values. Converted units are shown in brackets<br />
behind the original value; they may be rounded.<br />
Example:<br />
Minimum conductor cross section: 1.5 mm 2 (AWG 14)<br />
Glossary Explanations of special technical terms and abbreviations.<br />
Index List of keywords with references to the corresponding page numbers.<br />
Function blocks 7
About this manual <strong>Lexium</strong> <strong>Library</strong><br />
Disclaimer The information provided in this documentation contains general<br />
descriptions and/or technical characteristics of the performance of the<br />
products described here. This documentation is not intended as a<br />
substitute for and is not to be used for determining suitability or reliability<br />
of these products for specific user applications. It is the duty of<br />
any user or integrator to perform the appropriate and fully comprehensive<br />
risk analyses, evaluation and testing of the products with respect<br />
to the relevant specific application or use of the products. Neither<br />
Schneider Electric nor any of its affiliate or subsidiaries shall be<br />
responsible or liable for misuse of the information contained herein. If<br />
you have any suggestions for improvements or amendments or have<br />
found errors in this publication, please notify us.<br />
No part of this document may be reproduced in any form or by any<br />
means, electronic or mechanical, including photocopying, without<br />
express written permission of Schneider Electric.<br />
All pertinent state, regional, and local safety regulations must be<br />
observed when installing and using this product. For reasons of safety<br />
and to help ensure compliance with documented system data, only<br />
the manufacturer should perform repairs to components.<br />
When devices are used for applications with technical safety requirements,<br />
the relevant instructions must be followed.<br />
Failure to use Schneider Electric software or approved software with<br />
our hardware products may result in injury, harm, or improper operating<br />
results.<br />
Failure to observe this information can result in injury or equipment<br />
damage.<br />
8 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 1 Before you begin - safety information<br />
1 Before you begin - safety information<br />
1.1 Qualification of personnel<br />
1.2 Intended use<br />
1<br />
Only appropriately trained persons who are familiar with and understand<br />
the contents of this manual and all other pertinent product documentation<br />
are authorized to work on and with this product. In addition,<br />
these persons must have received safety training to recognize and<br />
avoid hazards involved. These persons must have sufficient technical<br />
training, knowledge and experience and be able to foresee and detect<br />
potential hazards that may be caused by using the product, by changing<br />
the settings and by the mechanical, electrical and electronic equipment<br />
of the entire system in which the product is used.<br />
All persons working on and with the product must be fully familiar with<br />
all applicable standards, directives, and accident prevention regulations<br />
when performing such work.<br />
This product is a library for industrial use with the appropriate controllers<br />
and drives.<br />
The product may only be used in compliance with all applicable safety<br />
regulations and directives, the specified requirements and the technical<br />
data.<br />
Prior to using the product, you must perform a risk assessment in view<br />
of the planned application. Based on the results, the appropriate<br />
safety measures must be implemented.<br />
Since the product is used as a component in an entire system, you<br />
must ensure the safety of persons by means of the design of this<br />
entire system (for example, machine design).<br />
Any use other than the use explicitly permitted is prohibited and can<br />
result in hazards.<br />
Electrical equipment should be installed, operated, serviced, and<br />
maintained only by qualified personnel.<br />
Function blocks 9
1 Before you begin - safety information <strong>Lexium</strong> <strong>Library</strong><br />
1.3 Hazard categories<br />
Safety instructions to the user are highlighted by safety alert symbols<br />
in the manual. In addition, labels with symbols and/or instructions are<br />
attached to the product that alert you to potential hazards.<br />
Depending on the seriousness of the hazard, the safety instructions<br />
are divided into 4 hazard categories.<br />
DANGER<br />
DANGER indicates an imminently hazardous situation, which, if not<br />
avoided, will result in death or serious injury.<br />
WARNING<br />
WARNING indicates a potentially hazardous situation, which, if not<br />
avoided, can result in death, serious injury, or equipment damage.<br />
CAUTION<br />
CAUTION indicates a potentially hazardous situation, which, if not<br />
avoided, can result in injury or equipment damage.<br />
CAUTION<br />
CAUTION used without the safety alert symbol, is used to address<br />
practices not related to personal injury (e.g. can result in equipment<br />
damage).<br />
10 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 1 Before you begin - safety information<br />
1.4 Basic information<br />
LOSS OF CONTROL<br />
WARNING<br />
• The designer of any control scheme must consider the potential<br />
failure modes of control paths and, for certain critical functions,<br />
provide a means to achieve a safe state during and after a path<br />
failure. Examples of critical control functions are emergency stop,<br />
overtravel stop, power outage and restart.<br />
• Separate or redundant control paths must be provided for critical<br />
functions.<br />
• System control paths may include communication links. Consideration<br />
must be given to the implication of unanticipated transmission<br />
delays or failures of the link.<br />
• Observe all accident prevention regulations and local safety<br />
guidelines. 1)<br />
• Each implementation of the product must be individually and thoroughly<br />
tested for proper operation before being placed into service.<br />
Failure to follow these instructions can result in death or serious<br />
injury.<br />
1) For USA: Additional information, refer to NEMA ICS 1.1 (latest edition), “Safety<br />
Guidelines for the Application, Installation, and Maintenance of Solid State Control”<br />
and to NEMA ICS 7.1 (latest edition), “Safety Standards for Construction and Guide<br />
for Selection, Installation and Operation of Adjustable-Speed Drive Systems”.<br />
WARNING<br />
UNINTENDED BEHAVIOR DUE TO IMPROPER ERROR HANDLING<br />
Improper error handling can change movements or signals or deactivate<br />
monitoring functions.<br />
• Carefully program the error handling routines.<br />
• Verify the effectiveness of error handling.<br />
Failure to follow these instructions can result in death, serious<br />
injury or equipment damage.<br />
WARNING<br />
UNINTENDED BEHAVIOR DUE TO CHANGES TO THE LIBRARY<br />
• Do not change or manipulate the library in any way whatsoever.<br />
Failure to follow these instructions can result in death, serious<br />
injury or equipment damage.<br />
Function blocks 11
1 Before you begin - safety information <strong>Lexium</strong> <strong>Library</strong><br />
1.5 Standards and terminology<br />
Technical terms, terminology and the corresponding descriptions in<br />
this manual are intended to use the terms or definitions of the pertinent<br />
standards.<br />
In the area of drive systems, this includes, but is not limited to, terms<br />
such as "safety function", "safe state", "fault", "fault reset", "failure",<br />
"error", "error message", "warning", "warning message", etc.<br />
Among others, these standards include:<br />
• IEC 61800: "Adjustable speed electrical power drive systems"<br />
• IEC 61158: "Digital data communications for measurement and<br />
control – Fieldbus for use in industrial control systems"<br />
• IEC 61784: "Industrial communication networks – Profiles"<br />
• IEC 61508: "Functional safety of electrical/electronic/programmable<br />
electronic safety-related systems"<br />
Also see the glossary at the end of this manual.<br />
12 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
<strong>Library</strong> name <strong>Lexium</strong> <strong>Library</strong> (LXM)<br />
Naming conventions<br />
Simple application<br />
Categorization of the function<br />
blocks<br />
Software environment Devices Fieldbus<br />
Device Descriptions of version<br />
3.2 and higher are<br />
supported.<br />
LXM05<br />
SD328<br />
LXM32<br />
CANopen<br />
2<br />
The function blocks described here are used to control LXM32,<br />
LXM05 and SD328 drives in CANopen fieldbuses under the SoMachine<br />
software environment. The function blocks are compliant with<br />
the IEC 61131-3 standard.<br />
• Function blocks with the prefix MC_ ("Motion Control") are compliant<br />
with the PLCopen specifications. They conform to a global<br />
standard for programming motion control applications.<br />
• Function blocks without a prefix are vendor-specific (Schneider<br />
Electric); however, they comply with the general PLC open rules.<br />
• The function blocks are used in the same way.<br />
• The function blocks comply with the PLCopen state diagram.<br />
• The function blocks feature a visualization that can be easily integrated<br />
into the application.<br />
• Single axis: These function blocks are used for movements or<br />
functions of a single, independent axis.<br />
• Multi axis: These function blocks are used for coordinated movements<br />
of several axes (for example, Electronic Gear).<br />
• Motion Sequence: These function blocks are used for movements<br />
whose target values are contained in parameterizable data sets.<br />
• Administrative: These function blocks are used for configuration<br />
tasks (such as reading and writing of parameters, restoring a<br />
device configuration, etc.).<br />
• Device Function: These function blocks support you in commissioning<br />
a drive at a controller. Before these function blocks can be<br />
used, you must correctly set the communication parameters baud<br />
rate and node address.<br />
Function blocks 13
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
2.1 PLCopen state diagram<br />
Error<br />
MC_MoveAbsolute<br />
MC_MoveRelative<br />
MC_MoveSuperImposed<br />
MC_MoveAdditive<br />
MC_PositionProfile<br />
MC_GearIn (Slave)<br />
MC_CamIn (Slave)<br />
Done<br />
At any given point in time, the drive is exactly in one state. If a function<br />
block is executed or an error occurs, this may cause a state transition.<br />
The function block "2.10.1.4 MC_ReadStatus_LXM" is used to read<br />
the current status of the drive.<br />
Done<br />
MC_MoveAbsolute<br />
MC_MoveRelative<br />
MC_PositionProfile<br />
MC_Stop<br />
MC_MoveAbsolute<br />
MC_MoveRelative<br />
MC_MoveAdditive<br />
MC_PositionProfile<br />
MC_GearIn (Slave)<br />
MC_CamIn (Slave)<br />
MC_MoveVelocity<br />
MC_GearOut<br />
MC_CamOut<br />
MC_VelocityProfile<br />
MC_AccelerationProfile<br />
MC_MoveSuperImposed<br />
MC_MoveVelocity<br />
MC_VelocityProfile<br />
MC_AccelerationProfile<br />
Discrete Motion<br />
MC_MoveVelocity<br />
MC_VelocityProfile<br />
MC_AccelerationProfile<br />
Continuous Motion<br />
MC_MoveAbsolute<br />
MC_MoveRelative<br />
MC_MoveSuperImposed<br />
MC_MoveAdditive<br />
MC_PositionProfile<br />
Homing<br />
MC_Stop<br />
Error<br />
MC_Stop<br />
Error<br />
MC_Home<br />
MC_GearIn (Slave)<br />
MC_CamIn (Slave)<br />
MC_Phasing (Slave)<br />
MC_MoveSuperImposed (Slave)<br />
Synchronized<br />
Motion<br />
Note 1<br />
Stopping<br />
Note 1<br />
ErrorStop<br />
MC_Reset<br />
Error<br />
StandStill<br />
MC_GearIn (Slave)<br />
MC_CamIn (Slave)<br />
Error<br />
Note 4<br />
MC_Stop<br />
Error<br />
MC_MoveVelocity<br />
MC_VelocityProfile<br />
MC_AccelerationProfile<br />
MC_Stop<br />
Note 3<br />
Note 2<br />
Disabled<br />
Note 1: In the states ErrorStop or Stopping, all function blocks can be<br />
called, but none of them will be executed, except for<br />
14 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.2 List of the function blocks<br />
"2.10.5.3 MC_Reset_LXM" and Error. Calling the function block<br />
"2.10.5.3 MC_Reset_LXM" will cause a transition to the states Stand-<br />
Still or ErrorStop, respectively.<br />
Note 2: Power.Enable = TRUE and there is an error<br />
Note 3: Power.Enable = TRUE and there is no error<br />
Note 4: "2.7.9.1 MC_Stop_LXM". Done AND NOT<br />
"2.7.9.1 MC_Stop_LXM" Execute.<br />
Category Subcategory Function block Type LXM05 SD328 LXM32<br />
Single axis<br />
Initialization "2.7.1.1<br />
MC_Power_LXM"<br />
Operating mode<br />
Jog<br />
Operating mode<br />
Current Control<br />
Operating mode<br />
Profile Torque<br />
Operating mode<br />
Speed Control /<br />
Oscillator<br />
Operating mode<br />
Profile Velocity<br />
Operating mode<br />
Profile Position<br />
Operating mode<br />
Homing<br />
"2.7.2.1<br />
MC_Jog_LXM"<br />
"2.7.3.1 Current-<br />
Control_LXM"<br />
"2.7.4.1 MC_TorqueControl_LXM"<br />
"2.7.5.1 Velocity-<br />
Control_LXM"<br />
"2.7.6.1<br />
MC_MoveVelocity_LXM"<br />
"2.7.7.1<br />
MC_MoveAbsolute_LXM"<br />
"2.7.7.2<br />
MC_MoveAdditive_LXM"<br />
"2.7.7.3 MC_MoveRelative_LXM"<br />
"2.7.8.1<br />
MC_Home_LXM"<br />
"2.7.8.2 MC_Set-<br />
Position_LXM"<br />
Stopping "2.7.9.1<br />
MC_Stop_LXM"<br />
Position capture<br />
via signal input<br />
"2.7.9.2<br />
MC_Halt_LXM"<br />
"2.7.10.1<br />
MC_TouchProbe_LXM"<br />
"2.7.10.2<br />
MC_AbortTrigger_LXM"<br />
PLCopen X X X<br />
PLCopen X X X<br />
Vendor-specific X - -<br />
PLCopen - - X<br />
Vendor-specific X X -<br />
PLCopen X X X<br />
PLCopen X X X<br />
PLCopen X X X<br />
PLCopen X X X<br />
PLCopen X X X<br />
PLCopen X X X<br />
PLCopen X X X<br />
PLCopen - - X<br />
PLCopen X X X<br />
PLCopen X X X<br />
Function blocks 15
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Category Subcategory Function block Type LXM05 SD328 LXM32<br />
Multi axis<br />
Operating mode<br />
Electronic Gear<br />
"2.8.1.1 GearIn-<br />
Sync_LXM"<br />
"2.8.1.2<br />
MC_GearIn_LXM"<br />
"2.8.1.3 MC_Gear-<br />
Out_LXM"<br />
Vendor-specific X X X<br />
PLCopen - - X<br />
PLCopen X X X<br />
Category Subcategory Function block Type LXM05 SD328 LXM32<br />
Motion Sequence<br />
Operating mode<br />
Motion Sequence<br />
"2.9.1.1 ReadMotionSequenceStatus_LXM"<br />
"2.9.1.2 ReadDataSet_LXM"<br />
"2.9.1.3 WriteDataSet_LXM"<br />
"2.9.1.4 WriteTransitionCondition_LXM"<br />
"2.9.1.5 StartMotionSequence_LXM"<br />
"2.9.1.6 AbortMotionSequence_LXM"<br />
Vendor-specific - - X<br />
Vendor-specific - - X<br />
Vendor-specific - - X<br />
Vendor-specific - - X<br />
Vendor-specific - - X<br />
Vendor-specific - - X<br />
16 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Category Subcategory Function block Type LXM05 SD328 LXM32<br />
Administrative<br />
Reading a parameter<br />
Writing a parameter<br />
Saving and restoring<br />
device configuration<br />
"2.10.1.1<br />
MC_ReadActual-<br />
Torque_LXM"<br />
"2.10.1.2<br />
MC_ReadActual-<br />
Velocity_LXM"<br />
"2.10.1.3<br />
MC_ReadActual-<br />
Position_LXM"<br />
"2.10.1.4<br />
MC_ReadStatus_LXM"<br />
"2.10.1.5<br />
MC_ReadParameter_LXM"<br />
"2.10.1.6 GetSupplierVersion"<br />
"2.10.2.1<br />
MC_WriteParameter_LXM"<br />
"2.10.2.2 SetDriveRamp_LXM"<br />
"2.10.2.3 SetStopRamp_LXM"<br />
"2.10.2.4 SetLimitSwitch_LXM"<br />
"2.10.2.5 Reset-<br />
Parameters_LXM"<br />
"2.10.2.6 Store-<br />
Parameters_LXM"<br />
"2.10.3.1 Upload-<br />
DriveParameter_LXM"<br />
"2.10.3.2 DownloadDriveParameter_LXM"<br />
Inputs and outputs "2.10.4.1 ReadAnalogInputs_LXM"<br />
"2.10.4.2<br />
MC_ReadDigitalInput_LXM"<br />
"2.10.4.3<br />
MC_ReadDigitalOutput_LXM"<br />
"2.10.4.4<br />
MC_WriteDigitalOutput_LXM"<br />
Error handling "2.10.5.1 ReadAxisWarning_LXM"<br />
"2.10.5.2<br />
MC_ReadAxisError_LXM"<br />
PLCopen - - X<br />
PLCopen X X X<br />
PLCopen X X X<br />
PLCopen X X X<br />
PLCopen X X X<br />
Vendor-specific X X X<br />
PLCopen X X X<br />
Vendor-specific X X X<br />
Vendor-specific - - X<br />
Vendor-specific X X X<br />
Vendor-specific X X X<br />
Vendor-specific X X X<br />
Vendor-specific X X X<br />
Vendor-specific X X X<br />
Vendor-specific X X -<br />
PLCopen X X X<br />
PLCopen X X X<br />
PLCopen - - X<br />
Vendor-specific - - X<br />
PLCopen X X X<br />
Function blocks 17
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Category Subcategory Function block Type LXM05 SD328 LXM32<br />
"2.10.5.3<br />
MC_Reset_LXM"<br />
PLCopen X X X<br />
Category Subcategory Function block Type LXM05 SD328 LXM32<br />
Device Function<br />
Startup "2.11.1.1<br />
Servo_Startup"<br />
"2.11.1.2 Stepper_Startup"<br />
Vendor-specific X - X<br />
Vendor-specific - X -<br />
18 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.3 Compatibility of the function blocks<br />
The table below shows the main differences between the previous<br />
library BL_Motion_CAN_Vyyy.lib (for LXM05 and SD328) and the<br />
<strong>Lexium</strong> <strong>Library</strong> (for LXM05, SD328 and LXM32).<br />
Function blocks 19
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Old function block New function block LXM05 SD328 LXM32 Remarks<br />
MC_Power_CAN "2.7.1.1 MC_Power_LXM" X X X<br />
MC_Jog_CAN "2.7.2.1 MC_Jog_LXM" X X X<br />
CurrentControl_CAN "2.7.3.1 CurrentControl_LXM"<br />
No equivalent "2.7.4.1 MC_TorqueControl_LXM"<br />
VelocityControl_CAN "2.7.5.1 VelocityControl_LXM"<br />
MC_MoveVelocity_CAN "2.7.6.1 MC_MoveVelocity_LXM"<br />
MC_MoveAbsolute_CAN "2.7.7.1 MC_MoveAbsolute_LXM"<br />
MC_MoveAdditive_CAN "2.7.7.2 MC_MoveAdditive_LXM"<br />
MC_MoveRelative_CAN "2.7.7.3 MC_MoveRelative_LXM"<br />
X X -<br />
- - X<br />
X X -<br />
X X X<br />
X X X<br />
X X X<br />
X X X<br />
MC_Home_CAN "2.7.8.1 MC_Home_LXM" X X X<br />
MC_SetPosition_CAN "2.7.8.2 MC_SetPosition_LXM"<br />
X X X<br />
MC_Stop_CAN "2.7.9.1 MC_Stop_LXM" X X X<br />
No equivalent "2.7.9.2 MC_Halt_LXM" - - X<br />
MC_TouchProbe_CAN "2.7.10.1 MC_TouchProbe_LXM"<br />
MC_AbortTrigger_CAN "2.7.10.2 MC_AbortTrigger_LXM"<br />
X X X<br />
X X X<br />
MC_GearIn_CAN "2.8.1.1 GearInSync_LXM" X X X This function block<br />
replaces the function<br />
block<br />
MC_GearIn_CAN.<br />
The functionality<br />
remains the same<br />
(position synchronization).<br />
No equivalent "2.8.1.2 MC_GearIn_LXM" - - X This new function<br />
block complies with<br />
the PLCopen specification<br />
(velocity<br />
synchronization).<br />
MC_GearOut_CAN "2.8.1.3 MC_Gear-<br />
Out_LXM"<br />
No equivalent "2.9.1.1 ReadMotionSequenceStatus_LXM"<br />
No equivalent "2.9.1.2 ReadData-<br />
Set_LXM"<br />
No equivalent "2.9.1.3 WriteData-<br />
Set_LXM"<br />
No equivalent "2.9.1.4 WriteTransition-<br />
Condition_LXM"<br />
No equivalent "2.9.1.5 StartMotionSequence_LXM"<br />
No equivalent "2.9.1.6 AbortMotionSequence_LXM"<br />
X X X<br />
- - X<br />
- - X<br />
- - X<br />
- - X<br />
- - X<br />
- - X<br />
20 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Old function block New function block LXM05 SD328 LXM32 Remarks<br />
No equivalent "2.10.1.1 MC_ReadActual-<br />
Torque_LXM"<br />
MC_ReadActualVelocity_CANReadRefActualVelocity_CANReadActualMasterVelocity_CAN<br />
MC_ReadActualPosition_CANReadActualPositionInc_CAN<br />
ReadRefPosition_CAN<br />
ReadRefPositionInc_CAN<br />
ReadActualMasterPosition_CAN<br />
"2.10.1.2 MC_ReadActual-<br />
Velocity_LXM"<br />
"2.10.1.3 MC_ReadActual-<br />
Position_LXM"<br />
MC_ReadStatus_CAN "2.10.1.4 MC_ReadStatus_LXM"<br />
MC_ReadParameter_CAN "2.10.1.5 MC_ReadParameter_LXM"<br />
GetVersion_CAN "2.10.1.6 GetSupplierVersion"<br />
MC_WriteParameter_CAN "2.10.2.1 MC_WriteParameter_LXM"<br />
SetDriveRamp_CAN "2.10.2.2 SetDriveRamp_LXM"<br />
No equivalent "2.10.2.3 SetStopRamp_LXM"<br />
SetLimitSwitch_CAN "2.10.2.4 SetLimitSwitch_LXM"<br />
ResetParameters_CAN "2.10.2.5 ResetParameters_LXM"<br />
StoreParameters_CAN "2.10.2.6 StoreParameters_LXM"<br />
UploadDriveParameter_CAN<br />
DownloadDriveParameter_CAN<br />
"2.10.3.1 UploadDrive-<br />
Parameter_LXM"<br />
"2.10.3.2 DownloadDrive-<br />
Parameter_LXM"<br />
ReadAnalogInputs_CAN "2.10.4.1 ReadAnalogInputs_LXM"<br />
MC_ReadDigitalInput_CAN<br />
MC_ReadDigitalOutput_CAN<br />
"2.10.4.2 MC_ReadDigitalInput_LXM"<br />
"2.10.4.3 MC_ReadDigitalOutput_LXM"<br />
- - X<br />
X X X The new function<br />
block allows you to<br />
read four different<br />
types of velocities.<br />
The type is selected<br />
via the new input<br />
VelocityType.<br />
X X X The new function<br />
block allows you to<br />
read eight different<br />
types of positions.<br />
The type is selected<br />
via the new input<br />
PositionType.<br />
X X X<br />
X X X<br />
X X X<br />
X X X<br />
X X X New inputs: Type,<br />
Torque<br />
- - X<br />
X X X<br />
X X X<br />
X X X<br />
X X X The interface<br />
(parameter structure)<br />
of the function<br />
block has changed.<br />
Output: The size<br />
has been suppressed.<br />
X X X The interface<br />
(parameter structure)<br />
of the function<br />
block has changed.<br />
X X -<br />
X X X<br />
X X X<br />
Outputs: Index and<br />
subindex have been<br />
suppressed.<br />
Function blocks 21
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Old function block New function block LXM05 SD328 LXM32 Remarks<br />
No equivalent "2.10.4.4 MC_WriteDigitalOutput_LXM"<br />
No equivalent "2.10.5.1 ReadAxisWarning_LXM"<br />
MC_ReadAxisError_CAN "2.10.5.2 MC_ReadAxisError_LXM"<br />
- - X<br />
- - X<br />
X X X New output:<br />
AxisErrorID<br />
MC_Reset_CAN "2.10.5.3 MC_Reset_LXM" X X X<br />
No equivalent "2.11.1.1 Servo_Startup" X - X<br />
No equivalent "2.11.1.2 Stepper_Startup" - X -<br />
22 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.4 Memory structure during parameter transmission<br />
Controller<br />
(LMC20, M238...)<br />
NV RAM*<br />
DownloadDriveParameter<br />
MC_Write...<br />
Set....<br />
Drive<br />
(LXM32, LXM05...)<br />
EEPROM<br />
RAM RAM<br />
MC_Read...<br />
UploadDriveParameter<br />
Factory<br />
settings<br />
StoreParameters<br />
ResetParameters<br />
Function blocks 23
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
2.5 Transitions between function blocks<br />
Function block 2<br />
The table below shows how the execution of a function block (function<br />
block 1) can be terminated by another function block (function block 2)<br />
in the case of LXM32.<br />
Function block 1 MC_Jog MC_Home MC_MoveAbsolute MC_MoveAdditive MC_MoveRelative<br />
MC_Jog On the fly Motor standstill Motor standstill 1) Motor standstill 1) Motor standstill 1)<br />
MC_Home Not permitted<br />
MC_MoveAbsolute Motor standstill<br />
MC_MoveAdditive Motor standstill<br />
MC_MoveRelative Motor standstill<br />
MC_MoveVelocity Motor standstill<br />
MC_TorqueControl Motor standstill<br />
MC_Stop Not permitted<br />
MC_Halt Not permitted<br />
GearInSync Motor standstill<br />
MC_GearIn Motor standstill<br />
Not permitted Not permitted Not permitted Not permitted<br />
Motor standstill On the fly On the fly On the fly<br />
Motor standstill On the fly On the fly On the fly<br />
Motor standstill On the fly On the fly On the fly<br />
Motor standstill Motor standstill 1) Motor standstill 1) Motor standstill 1)<br />
Motor standstill Motor standstill 1) Motor standstill 1) Motor standstill 1)<br />
Not permitted Not permitted Not permitted Not permitted<br />
Not permitted Not permitted Not permitted Not permitted<br />
Motor standstill Motor standstill 1) Motor standstill 1) Motor standstill 1)<br />
Motor standstill Motor standstill 1) Motor standstill 1) Motor standstill 1)<br />
1) Firmware version V01.04: Depends on the setting in parameter<br />
PP_OpmChgType.<br />
24 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Function block 2<br />
Function block 1 MC_MoveVelocity MC_TorqueControl MC_Stop MC_Halt GearInSync MC_GearIn<br />
MC_Jog On the fly On the fly On the fly On the fly Motor standstill<br />
MC_Home Not permitted Not permitted On the fly On the fly Not permitted<br />
MC_MoveAbsolute On the fly On the fly On the fly On the fly Motor standstill<br />
MC_MoveAdditive On the fly On the fly On the fly On the fly Motor standstill<br />
MC_MoveRelative On the fly On the fly On the fly On the fly Motor standstill<br />
MC_MoveVelocity On the fly On the fly On the fly On the fly Motor standstill<br />
MC_TorqueControl On the fly On the fly On the fly On the fly Motor standstill<br />
MC_Stop Not permitted Not permitted Not permitted<br />
Not permitted<br />
MC_Halt Not permitted Not permitted On the fly Not permitted<br />
Not permitted<br />
Not permitted<br />
On the fly<br />
Not permitted<br />
On the fly<br />
On the fly<br />
On the fly<br />
On the fly<br />
On the fly<br />
Not permitted<br />
Not permitted<br />
GearInSync On the fly On the fly On the fly On the fly On the fly On the fly<br />
MC_GearIn On the fly On the fly On the fly On the fly Motor standstill<br />
Example of On the fly<br />
On the fly<br />
On the fly The execution of function block 2 is started on the fly, i.e. immediately<br />
without any delay. The execution of function block 1 is aborted.<br />
v<br />
2000<br />
1000<br />
0 60<br />
1 2<br />
Running function<br />
block<br />
MC_MoveAbsolute_LXM<br />
Position = 100 usr_p, velocity = 1000 usr_v<br />
New function block MC_MoveVelocity_LXM<br />
Velocity = 2000 usr_v<br />
usr_p<br />
Motor standstill The execution of function block 2 first decelerates the motor to a<br />
standstill with the adjusted deceleration ramp. The movement as per<br />
function block 2 starts as soon as the motor has come to a standstill.<br />
The execution of function block 1 is aborted.<br />
Function blocks 25
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Examples of motor standstill<br />
v<br />
2000<br />
1000<br />
0 100 400<br />
1 2<br />
Running function<br />
block<br />
MC_MoveVelocity_LXM<br />
Velocity = 1000 usr_v<br />
New function block MC_MoveAbsolute_LXM<br />
Position = 400 usr_p, velocity = 2000 usr_v<br />
usr_p<br />
Not permitted Function block 1 cannot be aborted by the new function block. Function<br />
block 2 will not be executed.<br />
26 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.6 Basic inputs and outputs<br />
Input/output Data type Description<br />
Axis Axis_Ref_LXM Name of the axis (instance) for which the function block is to<br />
be executed. The name must be declared in the PLC configuration.<br />
The name of the axis can be found to the left in the tree<br />
structure of your software.<br />
Input Input_Ref_LXM Input is a special data type for digital and analog inputs. The<br />
data type corresponds to the name of the axis (instance) to<br />
which the inputs belong (similar to Axis).<br />
In the case of function blocks specifically provided for reading<br />
analog and digital inputs, Input replaces the input Axis.<br />
Output Output_Ref_LXM Output is a special data type for digital and outputs. The data<br />
type corresponds to the name of the axis (instance) to which<br />
the outputs belong (similar to Axis).<br />
Input Data type Description<br />
Enable BOOL Value range: TRUE, FALSE<br />
Initial value: FALSE<br />
In the case of function blocks specifically provided for writing<br />
and reading analog and digital inputs, Output replaces the<br />
input Axis.<br />
The input Enable starts or terminates the execution of a function<br />
block. (exception "2.7.1.1 MC_Power_LXM")<br />
FALSE: Execution of the function block is terminated. The outputs<br />
Valid, Busy, CommandAborted and Error are set to<br />
FALSE.<br />
TRUE: The function block is executed repeatedly.<br />
Execute BOOL Value range: TRUE, FALSE<br />
Initial value: FALSE<br />
The input Execute starts the execution of a function block in<br />
the case of a rising edge (FALSE->TRUE).<br />
If a second rising edge is detected during the execution of the<br />
function block, the current execution is aborted and the function<br />
block is executed again.<br />
Execution is terminated as soon as the output Busy is FALSE.<br />
FALSE and, at the same time, Busy = FALSE:<br />
Either Done, Error or CommandAborted are set to TRUE for<br />
one call.<br />
TRUE and, at the same time, Busy = FALSE:<br />
Either Done, Error or CommandAborted are set to TRUE<br />
and remain TRUE until Execute is set to FALSE.<br />
Function blocks 27
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Output Data type Description<br />
Done BOOL Value range: TRUE, FALSE<br />
Initial value: FALSE<br />
FALSE: Execution has not (yet) been terminated without an<br />
error.<br />
TRUE: Execution has been completed without an error.<br />
Valid BOOL Value range: TRUE, FALSE<br />
Initial value: FALSE<br />
Busy BOOL Value range: TRUE, FALSE<br />
Initial value: FALSE<br />
FALSE: Execution has not (yet) been terminated without an<br />
error. The values at the outputs are not (yet) valid.<br />
TRUE: Execution has been completed without an error. The<br />
values at the outputs are valid and can be further processed.<br />
FALSE: Execution of the function block has been terminated.<br />
TRUE: Function block is being executed.<br />
CommandAborted BOOL Value range: TRUE, FALSE<br />
Initial value: FALSE<br />
Error BOOL Value range: TRUE, FALSE<br />
Initial value: FALSE<br />
NOTE: In the operating mode Profile Velocity, the output<br />
remains TRUE even when the target velocity has been<br />
reached or Execute becomes FALSE. The output Busy is set<br />
to FALSE as soon as another function block such as MC_Stop<br />
is executed.<br />
FALSE: Execution has not (yet) been canceled without an<br />
error.<br />
TRUE: Execution has been aborted by another function block.<br />
FALSE: Execution of the function block is running, nor error<br />
has occurred up until now.<br />
TRUE: An error has occurred in the execution of the function<br />
block.<br />
28 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.6.1 Signal behavior of function blocks with the input Enable<br />
Example 1 Single execution without error (execution requires more than one call).<br />
Enable<br />
Error<br />
Valid<br />
Busy<br />
Example 2 Single execution with error (execution requires more than one call).<br />
Enable<br />
Error<br />
Valid<br />
Busy<br />
Example 3 Single execution without error (execution requires only one call).<br />
Enable<br />
Error<br />
Valid<br />
Busy<br />
Example 4 Single execution with error (execution requires only one call).<br />
Enable<br />
Function blocks 29<br />
Error<br />
Valid<br />
Busy
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Example 5 Repeated execution without error (execution requires more than one<br />
call).<br />
Enable<br />
Error<br />
Valid<br />
Busy<br />
Example 6 Repeated execution with error (execution requires more than one<br />
call).<br />
Enable<br />
Error<br />
Valid<br />
Busy<br />
Example 7 Repeated execution without error (execution requires only one call).<br />
Enable<br />
Error<br />
Valid<br />
Busy<br />
Example 8 Repeated execution with error (execution requires only one call).<br />
Enable<br />
30 Function blocks<br />
Error<br />
Valid<br />
Busy<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.6.2 Signal behavior of function blocks with the input Execute<br />
Example 1 Execution terminated without error.<br />
Execute<br />
Error<br />
Done<br />
CommandAborted<br />
Busy<br />
Example 2 Execution terminated with error.<br />
Execute<br />
Error<br />
Done<br />
CommandAborted<br />
Busy<br />
Example 3 Abortion of the execution because another function block takes over<br />
control.<br />
Execute<br />
Error<br />
Done<br />
CommandAborted<br />
Function blocks 31<br />
Busy
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Example 4 Execution completed without error after Execute has been set to<br />
FALSE during execution.<br />
Execute<br />
Error<br />
Done<br />
CommandAborted<br />
32 Function blocks<br />
Busy<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.7 Single axis<br />
2.7.1 Initialization<br />
2.7.1.1 MC_Power_LXM<br />
The initialization function block enables or disables the power stage.<br />
Other function blocks can only be used when the power stage is enabled.<br />
Function description The function block enables or disables the power stage. TRUE at the<br />
input Enable enables the power stage. Once the power stage is enabled,<br />
the output Status is set. FALSE at the input Enable disables<br />
the power stage. Once the power stage is disabled, the output<br />
Status is reset. If errors occur during execution, the output Error is<br />
set.<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Enable BOOL<br />
Compatible devices LXM05, SD3 and LXM32<br />
MC_Power_LXM<br />
Inputs/outputs The table below shows the outputs.<br />
Output Data type Description<br />
Status BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
FALSE: Power stage is disabled.<br />
TRUE: Power stage is enabled.<br />
"2.6 Basic inputs and outputs"<br />
BOOL Status<br />
BOOL Error<br />
Notes In the case of a Node Guarding error, the error memory must be reset<br />
by means of the function block "2.10.5.3 MC_Reset_LXM" before the<br />
power stage can be enabled again.<br />
If the input Enable = TRUE, an error is signaled if the power supply is<br />
lost.<br />
The output Status is set to FALSE and the output Error to TRUE.<br />
Once the power supply is available again, the output Status is set<br />
back to TRUE.<br />
Function blocks 33
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
2.7.2 Operating mode Jog<br />
2.7.2.1 MC_Jog_LXM<br />
In the operating mode Jog, a movement is made from the actual motor<br />
position in the desired direction. The velocity can be set. As long as<br />
the signal for the direction is available, a continuous movement is<br />
made in the desired direction.<br />
If movements in positive and negative directions are requested at the<br />
same time, there is no motor movement.<br />
Function description The function block starts the operating mode Jog. TRUE at the input<br />
Forward or the input Backward starts the jog movement. If both the<br />
inputs Forward and Backward are FALSE, the operating mode is<br />
terminated and the output Done is set. If both the inputs Forward and<br />
Backward are TRUE, the operating mode remains active, the jog<br />
movement is stopped and the output Busy remains set.<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Forward BOOL<br />
Backward BOOL<br />
Fast BOOL<br />
TipPos DINT<br />
WaitTime INT<br />
VeloSlow DINT<br />
VeloFast DINT<br />
Compatible devices LXM05, SD3 and LXM32<br />
MC_Jog_LXM<br />
BOOL Done<br />
BOOL Busy<br />
BOOL CommandAborted<br />
BOOL Error<br />
34 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
Forward BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
FALSE: No movement in positive direction<br />
TRUE: Movement in positive direction is started.<br />
Backward BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
FALSE: No movement in negative direction<br />
TRUE: Movement in negative direction is started.<br />
Fast BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
The velocity can be changed during the movement.<br />
FALSE: Movement at the velocity set in VeloSlow.<br />
TRUE: Movement at the velocity set in VeloFast.<br />
TipPos DINT Value range: 0 ... 2147483647<br />
Initial value: 20<br />
WaitTime INT Value range: 0 ... 65535<br />
Initial value: 500<br />
VeloSlow DINT Value range:<br />
Initial value: 60<br />
VeloFast DINT Value range:<br />
Initial value: 180<br />
0: Continuous movement is started immediately.<br />
>0: Movement by this distance value in increments [inc]. The<br />
movement is stopped, the waiting time WaitTime starts. After<br />
the waiting time WaitTime has elapsed, a continuous movement<br />
is started.<br />
Waiting time in [ms]. If TipPos is >0, the waiting time<br />
WaitTime starts as soon as the adjusted distance has been<br />
covered. After the waiting time WaitTime has elapsed, a continuous<br />
movement is started.<br />
Velocity in [min -1 ]. If Fast = FALSE, the movement is made at<br />
this velocity.<br />
Velocity in [min -1 ]. If Fast = TRUE, the movement is made at<br />
this velocity.<br />
"2.6 Basic inputs and outputs"<br />
Function blocks 35
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
2.7.3 Operating mode Current Control<br />
2.7.3.1 CurrentControl_LXM<br />
WARNING<br />
EXCESSIVELY HIGH VELOCITY DUE TO INCORRECT LIMIT VALUE<br />
Without a proper limit value, the motor can reach a very high velocity<br />
in this operating mode.<br />
• Check the parameterized velocity limitation.<br />
Failure to follow these instructions can result in death, serious<br />
injury or equipment damage.<br />
In the operating mode Current Control, you can set a reference value<br />
for the motor current. On the basis of this reference value, the device<br />
calculates a current with which the motor accelerates to a velocity limited<br />
by the load torque. Therefore, without a load, the motor accelerates<br />
up to the adjustable velocity limit.<br />
Function description The function block starts the operating mode Current Control. In the<br />
operating mode Current Control, a reference value for the motor current<br />
is supplied. The input Interface lets you set the source of the<br />
reference value. The reference value can be supplied either via the<br />
input Setpoint or via the analog input ANA1.<br />
Graphical representation<br />
Compatible devices LXM05<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Interface_ BOOL<br />
ZeroWindow UINT<br />
MaxCurrent INT<br />
Setpoint INT<br />
Inputs/outputs The table below shows the inputs.<br />
CurrentControl_LXM<br />
BOOL VelocityZero<br />
BOOL Busy<br />
BOOL CommandAborted<br />
BOOL Error<br />
36 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Input Data type Description<br />
Interface_ BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
ZeroWindow UINT Value range: 0 ... 1000<br />
Initial value: 0<br />
FALSE: The reference value is supplied via the 10V analog<br />
input.<br />
TRUE: The reference value is supplied via the input Setpoint.<br />
This input is effective only if the input Interface_ has the value<br />
FALSE.<br />
If the reference value is supplied via an analog input, you can<br />
specify a zero voltage window as an absolute value in millivolts.<br />
Example: ZeroWindow = 20:<br />
The voltage range -20 mV ... +20 mV is interpreted as 0 mV.<br />
MaxCurrent INT Value range: -30000 ... +30000<br />
Initial value: 300<br />
This input is effective only if the input Interface_ has the value<br />
FALSE.<br />
A current limitation [Apk x 100] is set according to the voltage<br />
at the 10V analog input.<br />
Setpoint INT Value range: -30000 ... +30000<br />
Initial value: 0<br />
This input is only effective if the input Interface_ has the value<br />
TRUE.<br />
Current limitation value [Apk x 100].<br />
The table below shows the outputs.<br />
Output Data type Description<br />
VelocityZero BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
FALSE: Velocity > 0.<br />
TRUE: Velocity = 0, motor standstill.<br />
"2.6 Basic inputs and outputs"<br />
Notes This function block is not available for LXM32. Use the function block<br />
"2.7.4.1 MC_TorqueControl_LXM" for LXM32.<br />
Function blocks 37
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
2.7.4 Operating mode Profile Torque<br />
2.7.4.1 MC_TorqueControl_LXM<br />
WARNING<br />
EXCESSIVELY HIGH VELOCITY DUE TO INCORRECT LIMIT VALUE<br />
Without a proper limit value, the motor can reach a very high velocity<br />
in this operating mode.<br />
• Check the parameterized velocity limitation.<br />
Failure to follow these instructions can result in death, serious<br />
injury or equipment damage.<br />
You can set a target torque in the operating mode Profile Torque. The<br />
movement is made with this target torque in the operating mode Profile<br />
Torque.<br />
Function description The function block starts the operating mode Profile Torque. In the<br />
operating mode Profile Torque, a movement is made with a desired<br />
target torque. The reference value for the target torque is supplied via<br />
the input Torque. When the target torque is reached, the output<br />
InTorque is set. The input TorqueRamp lets you set the slope of the<br />
motion profile for the torque.<br />
Graphical representation<br />
Compatible devices LXM32<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Torque INT<br />
TorqueRamp DINT<br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
MC_TorqueControl_LXM<br />
Torque INT Value range: -30000 ... 30000<br />
Initial value: 0<br />
Target torque<br />
TorqueRamp DINT Value range:<br />
Initial value: 100000<br />
BOOL InTorque<br />
BOOL Busy<br />
BOOL CommandAborted<br />
BOOL Error<br />
The value corresponds to 0.1% of the nominal torque of the<br />
motor.<br />
The input TorqueRamp is used in the operating mode Profile<br />
Torque. The value corresponds to 0.1% per second of the<br />
nominal torque of the motor. Example: If TorqueRamp = 1000,<br />
then 100% of the nominal torque of the motor is reached in<br />
one second. Use the parameter _M_M_O to get the nominal torque<br />
of the motor.<br />
The table below shows the outputs.<br />
38 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Output Data type Description<br />
InTorque BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
Notes<br />
FALSE: Target torque not yet reached<br />
TRUE: Target torque reached<br />
"2.6 Basic inputs and outputs"<br />
• This function block is not available for LXM05. Use the function<br />
block "2.7.3.1 CurrentControl_LXM" for LXM05.<br />
• In the operating mode Profile Torque, a position overtravel does<br />
not trigger an error. A position overtravel results in a loss of the<br />
zero point. After a position overtravel, an absolute positioning<br />
movement is still performed, but it is no longer consistent with the<br />
original homing. You can use the function block<br />
"2.10.1.4 MC_ReadStatus_LXM" to check whether the drive is still<br />
homed.<br />
Function blocks 39
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
2.7.5 Operating mode Speed Control / Oscillator<br />
2.7.5.1 VelocityControl_LXM<br />
You can set a reference velocity in the operating mode Speed Control<br />
/ Oscillator. The movement is performed with this reference velocity<br />
in the operating mode Speed Control.<br />
Function description The function block starts the operating mode Speed Control / Oscillator.<br />
In the operating mode Speed Control, a movement is made with a<br />
set target velocity. The target velocity is set at the input Velocity.<br />
When the motor is at a standstill, VelocityZero is set.<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Interface_ BOOL<br />
ZeroWindow UINT<br />
MaxVelocity INT<br />
Setpoint INT<br />
Compatible devices LXM05 and SD3<br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
VelocityControl_LXM<br />
Interface_ BOOL Value range: FALSE, TRUE<br />
Initial value:<br />
ZeroWindow UINT Value range: 0 ... 1000<br />
Initial value: 0<br />
BOOL VelocityZero<br />
BOOL Busy<br />
BOOL CommandAborted<br />
BOOL Error<br />
FALSE: The reference value is supplied via the analog input.<br />
TRUE: Reference value is supplied via the input Setpoint.<br />
Zero voltage window at analog input in mV. Example: If the<br />
value is 20, the range -20 ... 20 mV is interpreted as 0.<br />
MaxVelocity INT Value range: -30000 ... 30000<br />
Initial value: 3000<br />
Setpoint INT Value range: -30000 ... 30000<br />
Initial value: 0<br />
The value is only considered if the input Interface is<br />
FALSE. The value specifies the maximum speed of rotation<br />
(ANA1 = 10V) in min -1 . Adapt the value to your motor and the<br />
mechanical situation.<br />
The value is only considered if the input Interface is TRUE.<br />
The value specifies the reference value for the speed of rotation<br />
in min -1 .<br />
The table below shows the outputs.<br />
40 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Output Data type Description<br />
VelocityZero BOOL Value range: FALSE, TRUE<br />
Initial value:<br />
FALSE: The motor is not at a standstill.<br />
TRUE: The motor is at a standstill.<br />
"2.6 Basic inputs and outputs"<br />
Notes In the operating mode Speed Control / Oscillator, a position overtravel<br />
does not trigger an error. A position overtravel results in a loss of the<br />
zero point.<br />
Function blocks 41
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
2.7.6 Operating mode Profile Velocity<br />
2.7.6.1 MC_MoveVelocity_LXM<br />
You can set a target velocity in the operating mode Profile Velocity.<br />
The movement is performed with this target velocity in the operating<br />
mode Profile Velocity. The movement continues until a new target<br />
velocity is set or until the operating mode is aborted.<br />
Transitions between two target velocities are performed on the basis<br />
of a motion profile. The motion profile is determined by the profile generator<br />
in the drive on the basis of the actual velocity, the target velocity<br />
and the acceleration and deceleration ramps.<br />
Function description The function block starts the operating mode Profile Velocity with the<br />
velocity Velocity. When the target velocity is reached, InVelocity<br />
is set.<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Velocity DINT<br />
Compatible devices LXM05, SD3 and LXM32<br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
Velocity DINT Value range:<br />
Initial value: 0<br />
Target velocity<br />
MC_MoveVelocity_LXM<br />
The table below shows the outputs.<br />
Output Data type Description<br />
InVelocity BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
FALSE: Target velocity not yet reached.<br />
TRUE: Target velocity reached.<br />
"2.6 Basic inputs and outputs"<br />
BOOL InVelocity<br />
BOOL Busy<br />
BOOL CommandAborted<br />
BOOL Error<br />
Notes In the operating mode Profile Velocity, a position overtravel does not<br />
trigger an error. A position overtravel results in a loss of the zero point.<br />
42 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.7.7 Operating mode Profile Position<br />
2.7.7.1 MC_MoveAbsolute_LXM<br />
The following settings can be made in the operating mode Profile<br />
Position:<br />
• Target position<br />
• Type of movement (relative movement or absolute movement)<br />
• Target velocity<br />
• Acceleration and deceleration ramps<br />
The movement to the target position is made on the basis of a motion<br />
profile. The motion profile is calculated by the profile generator in the<br />
drive. The calculation is performed on the basis of the actual position<br />
and the target position, the actual velocity and the target velocity and<br />
the acceleration and deceleration ramps.<br />
In the operating mode Profile Position, absolute movements, relative<br />
movements and additive movements are possible.<br />
• Absolute movement with reference to the zero point<br />
• Relative movement with reference to the actual position<br />
• Additive movement with reference to the previous target position<br />
A zero point must be defined with the operating mode Homing prior to<br />
the first absolute movement.<br />
Function description The function block starts a movement to the absolute target position<br />
Position at velocity Velocity.<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Position DINT<br />
Velocity DINT<br />
Compatible devices LXM05, SD3 and LXM32<br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
Position DINT Value range:<br />
Initial value:<br />
MC_MoveAbsolute_LXM<br />
Target position absolute:<br />
Velocity DINT Value range:<br />
Initial value: 60<br />
Target velocity value<br />
LXM32: 1 ... 2147483647 [usr v]<br />
LXM05 and SD328: 1 ... 13200 [min -1 ]<br />
"2.6 Basic inputs and outputs"<br />
BOOL Done<br />
BOOL Busy<br />
BOOL CommandAborted<br />
BOOL Error<br />
Function blocks 43
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Notes<br />
2.7.7.2 MC_MoveAdditive_LXM<br />
• Absolute positioning requires a valid zero point. You can use the<br />
function block "2.10.1.4 MC_ReadStatus_LXM" to check for a valid<br />
zero point.<br />
Function description The function block starts a movement to the original target position<br />
plus distance Distance at velocity Velocity.<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Distance DINT<br />
Velocity DINT<br />
Compatible devices LXM05, SD3 and LXM32<br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
Distance DINT Value range:<br />
Initial value:<br />
Velocity DINT Value range:<br />
Initial value: 60<br />
2.7.7.3 MC_MoveRelative_LXM<br />
MC_MoveAdditive_LXM<br />
BOOL Done<br />
BOOL Busy<br />
BOOL CommandAborted<br />
BOOL Error<br />
Target position relative with reference to the previous target<br />
position<br />
Target velocity<br />
"2.6 Basic inputs and outputs"<br />
Function description The function block starts a movement by distance Distance at velocity<br />
Velocity.<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Distance DINT<br />
Velocity DINT<br />
Compatible devices LXM05, SD3 and LXM32<br />
Inputs/outputs The table below shows the inputs.<br />
MC_MoveRelative_LXM<br />
BOOL Done<br />
BOOL Busy<br />
BOOL CommandAborted<br />
BOOL Error<br />
44 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Input Data type Description<br />
Distance DINT Value range:<br />
Initial value:<br />
Velocity DINT Value range:<br />
Initial value: 60<br />
Target position relative with reference to actual position<br />
Target velocity<br />
"2.6 Basic inputs and outputs"<br />
Function blocks 45
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
2.7.8 Operating mode Homing<br />
2.7.8.1 MC_Home_LXM<br />
The operating mode Homing is used to define a reference point. The<br />
reference point establishes an absolute position reference between<br />
the motor position and a defined axis position. The reference point<br />
can be defined by means of a reference movement or by means of<br />
position setting.<br />
• Reference movement: Movement to a limit switch, a reference<br />
switch or the index pulse of the motor encoder. When the position<br />
is reached, a position reference is automatically created. This position<br />
becomes the absolute user-defined position.<br />
• Position setting: The current motor position is set to a desired position<br />
value. The zero point is defined by the position value.<br />
Position setting is only possible when the motor is at a standstill.<br />
The operating mode Homing must be completed without an error for<br />
the new reference point to be valid.<br />
Function description The function block configures and starts a reference movement.<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Position DINT<br />
HomingMode UINT<br />
VHome DINT<br />
VOutHome DINT<br />
POutHome DINT<br />
PDisHome DINT<br />
Compatible devices LXM05, SD3 and LXM32<br />
Inputs/outputs The table below shows the inputs.<br />
MC_Home_LXM<br />
BOOL Done<br />
BOOL Busy<br />
BOOL CommandAborted<br />
BOOL Error<br />
46 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Input Data type Description<br />
Position DINT Value range: -2147483648 ... 2147483647<br />
Initial value: 0<br />
HomingMode UINT Value range:<br />
Initial value: 1<br />
VHome DINT Value range:<br />
Initial value: 60<br />
HomingMode 1 ... 8: Position at reference point<br />
HomingMode 9: Position for Position Setting<br />
1: LIMN with index pulse<br />
2: LIMP with index pulse<br />
7: REF+ with index pulse, inverted, outside<br />
8: REF+ with index pulse, inv., inside<br />
9: REF+ with index pulse, not inv., inside<br />
10: REF+ with index pulse, not inv., outside<br />
11: REF- with index pulse, inv., outside<br />
12: REF- with index pulse, inv., inside<br />
13: REF- with index pulse, not inv., inside<br />
14: REF- with index pulse, not inv., outside<br />
17: LIMN<br />
18: LIMP<br />
23: REF+, inv., outside<br />
24: REF+, inv., inside<br />
25: REF+, not inv., inside<br />
26: REF+, not inverted, outside<br />
27: REF-, inv., outside<br />
28: REF-, inv., inside<br />
29: REF-, not inv., inside<br />
30: REF-, not inverted, outside<br />
33: Index pulse in negative direction<br />
34: Index pulse in positive direction<br />
35: Position setting<br />
Target velocity for searching the switch.<br />
HomingMode 1 ... 34 only.<br />
VOutHome DINT Value range:<br />
Initial value: 6<br />
Target velocity for moving away from switch.<br />
POutHome DINT Value range: 0 ... 2147483647<br />
Initial value: 0<br />
Maximum distance for search for switching point.<br />
0: Search distance monitoring disabled<br />
>0: Maximum distance<br />
After detection of the switch, the drive starts to search for the<br />
defined switching point. If the defined switching point is not<br />
found within the distance defined here, the reference movement<br />
is canceled with an error.<br />
PDisHome DINT Value range: 0 ... 2147483647<br />
Initial value: 200<br />
Maximum search distance after overtravel of switch.<br />
0: Search distance monitoring disabled<br />
>0: Search distance<br />
The switch must be activated again within this search distance,<br />
otherwise the reference movement is cancelled.<br />
"2.6 Basic inputs and outputs"<br />
Function blocks 47
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
2.7.8.2 MC_SetPosition_LXM<br />
Function description This function block sets a position value at the actual position of the<br />
motor. The zero point is defined by the position value. The function<br />
block can only be used when the motor is at a standstill.<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Position DINT<br />
Mode BOOL<br />
Compatible devices LXM05, SD3 and LXM32<br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
MC_SetPosition_LXM<br />
Position DINT Value range: -2147483648 ... 2147483647<br />
Initial value: 0<br />
Value for position setting in [usr].<br />
Mode BOOL Value range: FALSE, TRUE<br />
Initial value:<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
FALSE: The actual position is set to the value of the input<br />
Position.<br />
TRUE: The value of the input Position is added to the actual<br />
position.<br />
"2.6 Basic inputs and outputs"<br />
48 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.7.9 Stopping<br />
2.7.9.1 MC_Stop_LXM<br />
Each operating mode can be canceled by stopping. Stopping the<br />
operating mode does not generate an error.<br />
Function description The function block is used to stop the current movement. The operating<br />
mode is stopped by the function block.<br />
Graphical representation<br />
2.7.9.2 MC_Halt_LXM<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Compatible devices LXM05, SD3 and LXM32<br />
Inputs/outputs "2.6 Basic inputs and outputs"<br />
Notes<br />
MC_Stop_LXM<br />
• LXM05 and SD328:<br />
The deceleration ramp is set with the function block<br />
"2.10.2.2 SetDriveRamp_LXM".<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
LXM32:<br />
The deceleration ramp is set with the function block<br />
"2.10.2.3 SetStopRamp_LXM".<br />
• The function block can only be interrupted by disabling the power<br />
stage via the function block "2.7.1.1 MC_Power_LXM".<br />
• As long as the input Execute is TRUE, no other function block<br />
with the exception of "2.7.1.1 MC_Power_LXM" can be started.<br />
Function description The function block is used to stop the motor under normal operating<br />
conditions. The current movement is interrupted; it can be resumed. If<br />
a Halt is triggered, there is a transition of the PLCopen state to "DiscreteMotion"<br />
until the motor has reached a standstill. Once the motor<br />
has reached a standstill, the output Done is set and the state transitions<br />
to "StandStill".<br />
Graphical representation<br />
Compatible devices LXM32<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Inputs/outputs "2.6 Basic inputs and outputs"<br />
MC_Halt_LXM<br />
BOOL Done<br />
BOOL Busy<br />
BOOL CommandAborted<br />
BOOL Error<br />
Function blocks 49
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Notes<br />
• The deceleration ramp is set in the function block<br />
"2.10.2.2 SetDriveRamp_LXM".<br />
50 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.7.10 Position capture via signal input<br />
2.7.10.1 MC_TouchProbe_LXM<br />
Position capture via a signal input captures the current position at the<br />
point in time at which an edge is detected at one of the digital Capture<br />
inputs.<br />
Settings:<br />
• Position capture can be triggered by a rising edge or a falling edge<br />
at the signal input.<br />
• It is possible to use one-time or continuous position capture.<br />
Function description The function block configures and starts position capture.<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Unit UINT<br />
TriggerLevel BOOL<br />
SingleShot BOOL<br />
Compatible devices LXM05, SD3 and LXM32<br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
Unit UINT Value range: 1 ... 2<br />
Initial value: 1<br />
MC_TouchProbe_LXM<br />
BOOL Done<br />
BOOL Busy<br />
BOOL CommandAborted<br />
BOOL Error<br />
BOOL Valid<br />
DINT RecordedPosition<br />
1: Start position capture via Capture input 1.<br />
2: Start position capture via Capture input 2.<br />
TriggerLevel BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
FALSE: Start position capture at falling edge.<br />
TRUE: Start position capture at rising edge.<br />
SingleShot BOOL Value range: FALSE, TRUE<br />
Initial value: TRUE<br />
FALSE: Set continuous position capture. Continuous capture<br />
means that the motor position is captured anew at every edge.<br />
The previously captured value is lost.<br />
TRUE: Sets one-time position capture. One-time capture<br />
means that the position is captured at the first edge. The capture<br />
value is not overwritten by a new edge.<br />
The table below shows the outputs.<br />
Output Data type Description<br />
RecordedPosition DINT Value range: -2147483648 ... 2147483647<br />
Initial value: 0<br />
Captured motor position<br />
"2.6 Basic inputs and outputs"<br />
Function blocks 51
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
2.7.10.2 MC_AbortTrigger_LXM<br />
Function description The function block is used to terminate position capture.<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Unit UINT<br />
Compatible devices LXM05, SD3 and LXM32<br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
Unit UINT Value range: 1 ... 2<br />
Initial value: 1<br />
MC_AbortTrigger_LXM<br />
1: Cancel position capture via Capture input 1.<br />
2: Cancel position capture via Capture input 2.<br />
"2.6 Basic inputs and outputs"<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
52 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.8 Multi axis<br />
2.8.1 Operating mode Electronic Gear<br />
2.8.1.1 GearInSync_LXM<br />
In the operating mode Electronic Gear, movements are carried out<br />
according to externally supplied reference value signals. A new position<br />
reference value is calculated on the basis of these reference<br />
value signals plus an adjustable gear ratio.<br />
Function description The function block starts the operating mode Electronic Gear with the<br />
method Position Synchronization. In the operating mode Electronic<br />
Gear, movements are carried out according to externally supplied reference<br />
value signals. A new position value is calculated on the basis<br />
of these reference value signals plus an adjustable gear ratio.<br />
In the case of position synchronization without compensation movement,<br />
the movement is made synchronously (position synchronicity)<br />
with the supplied reference value signals. Reference value signals<br />
supplied during an interruption caused by Halt or by an error of error<br />
class 1 are not considered.<br />
In the case of position synchronization with compensation movement,<br />
the movement is made synchronously (position synchronicity) with the<br />
supplied reference value signals. Reference value signals supplied<br />
during an interruption caused by Halt or by an error of error class 1<br />
are considered and compensated for. See the product manual for<br />
additional information on compensation movements.<br />
Graphical representation<br />
Slave Axis_Ref_LXM<br />
Execute BOOL<br />
SyncMode BOOL<br />
RatioNumerator DINT<br />
RatioDenominator DINT<br />
Compatible devices LXM05, SD3 and LXM32<br />
GearInSync_LXM<br />
Inputs/outputs The table below shows the inputs/outputs.<br />
Input/output Data type Description<br />
Slave Axis_Ref_LXM Value range:<br />
Initial value:<br />
Name of the slave axis<br />
The table below shows the inputs.<br />
BOOL InGear<br />
BOOL Busy<br />
BOOL CommandAborted<br />
BOOL Error<br />
Function blocks 53
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Input Data type Description<br />
SyncMode BOOL Value range: FALSE, TRUE<br />
Initial value: TRUE<br />
FALSE: Position synchronization without compensation movement.<br />
TRUE: Position synchronization with compensation movement<br />
RatioNumerator DINT Value range: -2147483648 ... 2147483647<br />
Initial value: 1<br />
Numerator of gear ratio<br />
RatioDenominator DINT Value range: 1 ... 32767<br />
Initial value: 1<br />
Denominator of gear ratio<br />
The table below shows the outputs.<br />
Output Data type Description<br />
InGear BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
2.8.1.2 MC_GearIn_LXM<br />
Notes<br />
TRUE: The output is set to TRUE if the adjusted gear ratio is<br />
reached for the first time in the operating mode Electronic<br />
Gear.<br />
"2.6 Basic inputs and outputs"<br />
• This requires the parameter GEARratio to be 0 (see product manual).<br />
This way, RatioNumerator and RatioDenominator are<br />
used to calculate the gear ratio.<br />
• The velocity of the compensation movement (SyncMode = TRUE)<br />
is limited by:<br />
- the maximum current (parameter CTRL_I_max).<br />
- Maximum velocity of the motor.<br />
• The enabled direction of movement in the operating mode Electronic<br />
Gear is set via the parameter GEARdir_enabl.<br />
• The operating mode Electronic Gear with the method Velocity Synchronization<br />
is started with the function block<br />
"2.8.1.2 MC_GearIn_LXM".<br />
• Once the operating mode is active, the compensation movement<br />
must not exceed the maximum permissible position deviation. If the<br />
required compensation movement exceeds the maximum permissible<br />
position deviation, a following error is signaled.<br />
Function description The function block starts the operating mode Electronic Gear with the<br />
method Velocity Synchronization. In the operating mode Electronic<br />
Gear, movements are carried out according to externally supplied reference<br />
value signals. A new velocity value is calculated on the basis<br />
of these reference value signals plus an adjustable gear ratio. Reference<br />
value signals supplied during an interruption caused by Halt or<br />
by an error of error class 1 are not considered.<br />
54 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Graphical representation<br />
Compatible devices LXM32<br />
Slave Axis_Ref_LXM<br />
Execute BOOL<br />
RatioNumerator DINT<br />
RatioDenominator DINT<br />
MC_GearIn_LXM<br />
Inputs/outputs The table below shows the inputs/outputs.<br />
Input/output Data type Description<br />
Slave Axis_Ref_LXM Value range:<br />
Initial value:<br />
BOOL InGear<br />
BOOL Busy<br />
BOOL CommandAborted<br />
BOOL Error<br />
Name of the slave axis for which this function block is to be<br />
executed. This name must be declared in the PLC configuration.<br />
In the configuration, the name can be found next to the<br />
appropriate CANopen node.<br />
The table below shows the inputs.<br />
Input Data type Description<br />
RatioNumerator DINT Value range: -2147483648 ... 2147483647<br />
Initial value: 1<br />
Gear ratio: Numerator of gear ratio<br />
RatioDenominator DINT Value range: 1 ... 32767<br />
Initial value: 1<br />
Gear ratio: Denominator of gear ratio<br />
The table below shows the outputs.<br />
Output Data type Description<br />
InGear BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
Notes<br />
The output is set to TRUE if the adjusted gear ratio is reached<br />
for the first time.<br />
"2.6 Basic inputs and outputs"<br />
• This requires the parameter GEARratio to be 0 (see product manual).<br />
This way, RatioNumerator and RatioDenominator are<br />
used to calculate the gear ratio<br />
• The enabled direction of movement in the operating mode Electronic<br />
Gear is set via the parameter GEARdir_enabl.<br />
• The operating mode Electronic Gear with the method Position Synchronization<br />
is started with the function block<br />
"2.8.1.1 GearInSync_LXM".<br />
• In the operating mode Electronic Gear with the method Velocity<br />
Synchronization, a position overtravel does not trigger an error. A<br />
position overtravel results in a loss of the zero point.<br />
Function blocks 55
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
2.8.1.3 MC_GearOut_LXM<br />
Function description The function block terminates the operating mode Electronic Gear.<br />
Graphical representation<br />
Slave Axis_Ref_LXM<br />
Execute BOOL<br />
Compatible devices LXM05, SD3 and LXM32<br />
MC_GearOut_LXM<br />
Inputs/outputs The table below shows the inputs/outputs.<br />
Input/output Data type Description<br />
Slave Axis_Ref_LXM Value range:<br />
Initial value:<br />
Notes<br />
Name of the slave axis<br />
"2.6 Basic inputs and outputs"<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
• The function block terminates the operating mode Electronic Gear.<br />
• The motor decelerates with the deceleration ramp<br />
"2.10.2.2 SetDriveRamp_LXM".<br />
56 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.9 Motion Sequence<br />
2.9.1 Operating mode Motion Sequence<br />
2.9.1.1 ReadMotionSequenceStatus_LXM<br />
In the operating mode Motion Sequence, movements are performed<br />
via parameterizable data sets. These parameterizable data sets can<br />
be started individually or as a sequence. A parameterizable data set<br />
contains settings on the type of data set, the appropriate target values<br />
and the setting for the subsequent data set.<br />
Function description The function block returns the current status of the operating mode<br />
Motion Sequence.<br />
Graphical representation<br />
Compatible devices LXM32<br />
Axis Axis_Ref_LXM<br />
Enable BOOL<br />
ReadMotionSequenceStatus_LXM<br />
Inputs/outputs The table below shows the outputs.<br />
Output Data type Description<br />
BOOL Valid<br />
BOOL Busy<br />
BOOL Error<br />
INT ActualDataSet<br />
INT NextDataSet<br />
ActualDataSet INT The output indicates the data set number of the active data<br />
set.<br />
NextDataSet INT The output indicates the number of the next data set to be processed<br />
in the sequence.<br />
2.9.1.2 ReadDataSet_LXM<br />
"2.6 Basic inputs and outputs"<br />
Function description The function block reads the current data set in the operating mode<br />
Motion Sequence.<br />
Graphical representation<br />
Compatible devices LXM32<br />
Axis Axis_Ref_LXM<br />
DataSet DataSet_LXM<br />
Execute BOOL<br />
ReadDataSet_LXM<br />
Inputs/outputs The table below shows the inputs/outputs.<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
Function blocks 57
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Input/output Data type Description<br />
DataSet DataSet_LXM The data type has the following structure:<br />
2.9.1.3 WriteDataSet_LXM<br />
DataSetNumber, DataSetType, Value1, Value2, Value3,<br />
Value4, Transition, NextCondition, WaitTime and NextDataSet.<br />
"2.6 Basic inputs and outputs"<br />
Function description The function block configures a data set for the operating mode<br />
Motion Sequence.<br />
Graphical representation<br />
Compatible devices LXM32<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
DataSet DataSet_LXM<br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
WriteDataSet_LXM<br />
DataSet DataSet_LXM The data type has the following structure:<br />
2.9.1.4 WriteTransitionCondition_LXM<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
DataSetNumber, DataSetType, Value1, Value2, Value3,<br />
Value4, Transition, NextCondition, WaitTime and NextDataSet.<br />
"2.6 Basic inputs and outputs"<br />
Function description The function block meets the transition condition (NextCondition = 2)<br />
for the next data set in the operating mode Motion Sequence.<br />
Graphical representation<br />
Compatible devices LXM32<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Inputs/outputs "2.6 Basic inputs and outputs"<br />
2.9.1.5 StartMotionSequence_LXM<br />
WriteTransitionCondition_LXM<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
Function description The function block starts and monitors the operating mode Motion<br />
Sequence.<br />
58 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Graphical representation<br />
Compatible devices LXM32<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
DataSetNumber INT<br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
DataSetNumber INT Value range:<br />
Initial value: 0<br />
StartMotionSequence_LXM<br />
BOOL Done<br />
BOOL Busy<br />
BOOL CommandAborted<br />
BOOL Error<br />
BOOL WaitForCondition<br />
The input specifies the number of the data set to be used for<br />
starting a sequence.<br />
The table below shows the outputs.<br />
Output Data type Description<br />
WaitForCondition BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
2.9.1.6 AbortMotionSequence_LXM<br />
The output indicates that the data set has been completed and<br />
that the sequence is waiting for the transition condition to be<br />
met. Once the transition condition is met, the subsequent data<br />
set started.<br />
"2.6 Basic inputs and outputs"<br />
Function description The function block cancels a sequence in the operating mode Motion<br />
Sequence.<br />
Graphical representation<br />
Compatible devices LXM32<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Inputs/outputs "2.6 Basic inputs and outputs"<br />
AbortMotionSequence_LXM<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
Function blocks 59
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
2.10 Administrative<br />
2.10.1 Reading a parameter<br />
2.10.1.1 MC_ReadActualTorque_LXM<br />
The following functions blocks allow you to read drive parameters<br />
such as the actual position or the actual velocity.<br />
An additional function block provides read access to individual parameters<br />
of the device. See the product manual for a description of the<br />
parameters.<br />
Function description The function block is used to read the actual torque of the motor.<br />
Graphical representation<br />
Compatible devices LXM32<br />
Axis Axis_Ref_LXM<br />
Enable BOOL<br />
MC_ReadActualTorque_LXM<br />
Inputs/outputs The table below shows the outputs.<br />
Output Data type Description<br />
Torque INT Value range:<br />
Initial value:<br />
2.10.1.2 MC_ReadActualVelocity_LXM<br />
Actual torque value.<br />
BOOL Valid<br />
BOOL Busy<br />
BOOL Error<br />
INT Torque<br />
100.0 % correspond to the continuous stall torque _M_M_0.<br />
The read value is indicated in increments of 0.1 %.<br />
Example: The value Torque = 300 is read. This means that<br />
currently effective torque amounts to 30 % of the nominal torque<br />
of the motor.<br />
"2.6 Basic inputs and outputs"<br />
Notes The function block uses Service Data Objects (SDO) to read the<br />
parameter. Therefore, it is strongly recommended not to permanently<br />
set the input Enable to TRUE. This may cause overload on the fieldbus.<br />
It is recommended to deactivate the function block when the<br />
input Busy is set to FALSE.<br />
Function description The function block is used to read the actual velocity of the motor.<br />
60 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Enable BOOL<br />
VelocityType INT<br />
Compatible devices LXM05, SD3 and LXM32<br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
VelocityType INT Value range: 0 ... 3<br />
Initial value: 0<br />
MC_ReadActualVelocity_LXM<br />
Specification of the source of the velocity:<br />
BOOL Valid<br />
BOOL Busy<br />
BOOL Error<br />
DINT Velocity<br />
• 0: Actual velocity of the motor [min -1 ]<br />
• 1: Reference velocity (from profile generator) [min -1 ]<br />
• 2: Actual velocity (from profile generator) [min -1 ]<br />
• 3: Actual velocity at PTI interface [inc/s]<br />
NOTE: The PTI interface (Pulse Train In) is also referred to as<br />
RS422 interface in the case of some products. LXM05 and<br />
SD328: the PTI interface is CN5.<br />
The table below shows the outputs.<br />
Output Data type Description<br />
Velocity DINT Value range:<br />
Initial value:<br />
2.10.1.3 MC_ReadActualPosition_LXM<br />
Velocity value of the source selected for the input<br />
VelocityType.<br />
"2.6 Basic inputs and outputs"<br />
Notes The function block uses Service Data Objects (SDO) to read the<br />
parameter from the device. Therefore, it is strongly recommended not<br />
to permanently set the input Enable to TRUE. This may cause overload<br />
on the fieldbus. It is recommended to deactivate the function<br />
block when the output Busy is set to FALSE.<br />
Function description The function block is used to read the actual velocity of the motor.<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Enable BOOL<br />
PositionType INT<br />
Compatible devices LXM05, SD3 and LXM32<br />
Inputs/outputs The table below shows the inputs.<br />
MC_ReadActualPosition_LXM<br />
BOOL Valid<br />
BOOL Busy<br />
BOOL Error<br />
DINT Position<br />
Function blocks 61
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Input Data type Description<br />
PositionType INT Value range: 0 ... 7<br />
Initial value: 0<br />
Specification of the source of the position:<br />
• 0: Actual position of motor [usr]<br />
• 1: Actual position of motor [inc]<br />
• 2: Reference position (from profile generator) [usr]<br />
• 3: Reference position (from profile generator) [inc]<br />
• 4: Actual position of an external encoder [usr]<br />
• 5: Actual position of an external encoder [inc]<br />
• 6: Actual position (from profile generator) [usr]<br />
• 7: Actual position (from profile generator) [inc]<br />
The table below shows the outputs.<br />
Output Data type Description<br />
Position DINT Value range:<br />
Initial value:<br />
2.10.1.4 MC_ReadStatus_LXM<br />
Position value of the source selected for the input<br />
PositionType.<br />
"2.6 Basic inputs and outputs"<br />
Notes The function block uses Service Data Objects (SDO) to read the<br />
parameter from the device. Therefore, it is strongly recommended not<br />
to permanently set the input Enable to TRUE. This may cause overload<br />
on the fieldbus. It is recommended to deactivate the function<br />
block when the input Busy is set to FALSE.<br />
Function description The function block is used to read the current status of the device.<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Enable BOOL<br />
Compatible devices LXM05, SD3 and LXM32<br />
MC_ReadStatus_LXM<br />
BOOL Valid<br />
BOOL Busy<br />
BOOL Error<br />
BOOL Errorstop<br />
BOOL Disabled<br />
BOOL Stopping<br />
BOOL Referenced<br />
BOOL StandStill<br />
BOOL DiscreteMotion<br />
BOOL ContinuousMotion<br />
BOOL SynchronizedMotion<br />
BOOL Homing<br />
BOOL DataSetMotion<br />
BOOL ConstantVelocity<br />
BOOL Accelerating<br />
BOOL Decelerating<br />
62 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Inputs/outputs The table below shows the outputs.<br />
Output Data type Description<br />
Errorstop BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
Disabled BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
TRUE: The movement has been interrupted by an error.<br />
FALSE: Power stage is enabled.<br />
TRUE: Power stage is disabled<br />
Stopping BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
Referenced BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
TRUE: The function block "2.7.9.1 MC_Stop_LXM" is being<br />
executed or the movement is being stopped.<br />
TRUE: The zero point (reference point) is valid.<br />
StandStill BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
TRUE: The movement hast been stopped.<br />
DiscreteMotion BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
ContinuousMotion BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
SynchronizedMotio<br />
n<br />
BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
Homing BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
TRUE: The operating mode Profile Position has been started.<br />
TRUE: The operating mode Profile Velocity has been started.<br />
TRUE: A synchronized movement at a constant velocity is performed.<br />
(for example, in the operating mode Electronic Gear)<br />
TRUE: The operating mode Homing has been started.<br />
DataSetMotion BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
ConstantVelocity BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
TRUE: The operating mode Motion Sequence has been started.<br />
TRUE: A movement at a constant velocity is performed.<br />
Accelerating BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
TRUE: The motor accelerates.<br />
Decelerating BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
TRUE: The motor decelerates.<br />
"2.6 Basic inputs and outputs"<br />
Notes At any given point in time, the drive is in one of the states: StandStill,<br />
DiscreteMotion, ContinuousMotion, Stopping, Disabled or ErrorStop.<br />
The corresponding output is then TRUE.<br />
Function blocks 63
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
2.10.1.5 MC_ReadParameter_LXM<br />
Function description The function block reads an object from the device parameter list.<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Enable BOOL<br />
ParameterNumber UINT<br />
Index UINT<br />
Subindex UINT<br />
Compatible devices LXM05, SD3 and LXM32<br />
MC_ReadParameter_LXM<br />
BOOL Valid<br />
BOOL Busy<br />
BOOL Error<br />
DINT Value<br />
UINT Length<br />
64 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
ParameterNumber UINT Value range: 0 ... 65535<br />
Initial value: 1000<br />
Number of the parameter:<br />
1: Reference position (from profile generator).<br />
LXM32: _p_tarRAMPusr<br />
LXM05, SD328: _p_tarRAMPusr<br />
2: Positive position limit of software limit switch.<br />
LXM32: MON_swLimPusr<br />
LXM05, SD328: SPVswLimPusr<br />
3: Negative position limit of software limit switch.<br />
LXM32: MON_swLimNusr<br />
LXM05, SD328: SPVswLimNusr<br />
4: Monitoring of the positive software limit switch.<br />
(Activated: Bit 0 = 0. Deactivated: Bit 0 = 1)<br />
LXM32: MON_SW_Limits<br />
LXM05, SD328: SPV_SW_Limits<br />
5: Monitoring of the negative software limit switch.<br />
(Activated: Bit 0 = 0. Deactivated: Bit 0 = 1).<br />
LXM32: MON_SW_Limits<br />
LXM05, SD328: SPV_SW_Limits<br />
10: Actual velocity.<br />
LXM32: _n_act<br />
LXM05, SD328: _n_act<br />
11: Target velocity.<br />
LXM32: _v_targetRAMP<br />
LXM05, SD328: _n_targetRAMP<br />
1000: Selection via index and subindex.<br />
Index UINT Value range: 0 ... 65535<br />
Initial value: 0<br />
Subindex UINT Value range: 0 ... 255<br />
Initial value: 0<br />
Index of parameter to be read. Only valid if<br />
ParameterNumber = 1000.<br />
See the product manual for an overview of the parameters.<br />
Subindex of parameter to be read. Only valid if<br />
ParameterNumber = 1000.<br />
See the product manual for an overview of the parameters.<br />
The table below shows the outputs.<br />
Output Data type Description<br />
Value DINT Value range: -2147483648 ... 2147483647<br />
Initial value: 0<br />
Value of the parameter.<br />
Length INT Value range: 0 ... 65535<br />
Initial value: 0<br />
Length of the parameter in bytes.<br />
"2.6 Basic inputs and outputs"<br />
Function blocks 65
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
2.10.1.6 GetSupplierVersion<br />
Notes The function block uses Service Data Objects (SDO) to read the<br />
parameter. Therefore, it is strongly recommended not to permanently<br />
set the input Enable to TRUE. This may cause overload on the fieldbus.<br />
It is recommended to deactivate the function block when the<br />
input Busy is set to FALSE.<br />
Function description The function returns the version of the library of the device.<br />
Graphical representation<br />
Compatible devices LXM05, SD3 and LXM32<br />
GetSupplierVersion<br />
Inputs/outputs The table below shows the outputs.<br />
Output Data type Description<br />
GetSupplierVersio<br />
n<br />
WORD GetSupplierVersion<br />
WORD The output provides the version number of the library. Convert<br />
the decimal value to hex.<br />
Example: GetSupplierVersion = 12368 = 3050h = Version<br />
3.0.5.0<br />
66 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.10.2 Writing a parameter<br />
2.10.2.1 MC_WriteParameter_LXM<br />
The following function bocks allow you to write drive parameters, for<br />
example the values for the acceleration and deceleration ramps.<br />
An additional function block provides write access to individual parameters<br />
of the device. See the product manual for a description of the<br />
parameters.<br />
Function description The function block is used to write a value to a specific parameter.<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
ParameterNumber UINT<br />
Index UINT<br />
Subindex UINT<br />
Length UINT<br />
Value DINT<br />
Compatible devices LXM05, SD3 and LXM32<br />
MC_WriteParameter_LXM<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
Function blocks 67
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
ParameterNumber UINT Value range: 0 ... 65535<br />
Initial value: 1000<br />
Index UINT Value range: 0 ... 65535<br />
Initial value: 0<br />
Subindex UINT Value range: 0 ... 255<br />
Initial value: 0<br />
Length UINT Value range: 0 ... 65535<br />
Initial value: 0<br />
2: Position of the software limit switch in positive direction<br />
(Value in [usr])<br />
3: Position of the software limit switch in negative direction<br />
(Value in [usr])<br />
4: Activate (Value = 1) or deactivate (Value = 2) software<br />
limit switch in positive direction<br />
5: Activate (Value = 1) or deactivate (Value = 2) software<br />
limit switch in negative direction<br />
1000: The parameter to be written is set via the inputs Index<br />
and SubIndex.<br />
See the product manual for a list of the parameters with the<br />
corresponding CANopen address.<br />
Index of the parameter to be written. See the product manual<br />
for a list of the parameters with index and subindex. Can only<br />
be used if the input ParameterNumber = 1000.<br />
See the product manual for a list of the parameters with the<br />
corresponding CANopen address.<br />
Subindex of the parameter to be written. See the product manual<br />
for a list of the parameters with index and subindex. Can<br />
only be used if the input ParameterNumber = 1000.<br />
See the product manual for a list of the parameters with the<br />
corresponding CANopen address.<br />
Length of the parameter to be written in bytes.<br />
Value DINT Value range: -2147483648...2147483647<br />
Initial value: 0<br />
2.10.2.2 SetDriveRamp_LXM<br />
New value to be written to the parameter. The units of the values<br />
depend on the parameter.<br />
"2.6 Basic inputs and outputs"<br />
Notes If the inputs ParameterNumber, Index or Subindex are changed<br />
while Busy is TRUE, the function block uses the previous values. The<br />
next time the function block is executed, the new values will be used.<br />
Function description The function block configures the acceleration ramp and the deceleration<br />
ramp of the device.<br />
68 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Acceleration DINT<br />
Deceleration DINT<br />
Compatible devices LXM05, SD3 and LXM32<br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
SetDriveRamp_LXM<br />
Acceleration DINT LXM05:<br />
Value range: 30 ... 3000000<br />
Initial value: 600<br />
SD328:<br />
Value range: 1 ... 3000000<br />
Initial value: 600<br />
LXM32:<br />
Value range: 1 ... 2147483647<br />
Initial value: 600<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
LXM05 and SD328: Acceleration ramp in min -1 /s.<br />
LXM32: Acceleration ramp in user-defined units (usr_a).<br />
Deceleration DINT LXM05:<br />
Value range: 750 ... 3000000<br />
Initial value: 750<br />
SD328:<br />
Value range: 1 ... 3000000<br />
Initial value: 750<br />
LXM32:<br />
Value range: 1 ... 2147483647<br />
Initial value: 600<br />
2.10.2.3 SetStopRamp_LXM<br />
LXM05 and SD328: Deceleration ramp in min -1 /s.<br />
LXM32: Deceleration ramp in user-defined units (usr_a).<br />
"2.6 Basic inputs and outputs"<br />
Notes Note the following for drives with high external moments of inertia or<br />
for highly dynamic applications: The motors regenerate energy during<br />
deceleration. The DC bus can absorb a limited amount of energy in<br />
the capacitors. Connecting additional capacitors to the DC bus increases<br />
the amount of energy that can be absorbed. If the capacity of the<br />
capacitors is exceeded, the excess energy must be discharged via<br />
internal or external braking resistors. If the energy is not discharged,<br />
an overvoltage monitor will shut off the power stage. Overvoltages can<br />
be limited by adding a braking resistor with a corresponding braking<br />
resistor controller. This converts the regenerated energy to heat<br />
energy during deceleration.<br />
Function description This function block is used to set the deceleration ramp for the function<br />
block "2.7.9.1 MC_Stop_LXM".<br />
Function blocks 69
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Graphical representation<br />
Compatible devices LXM32<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
RampType BOOL<br />
Value DINT<br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
SetStopRamp_LXM<br />
RampType BOOL Value range: FALSE, TRUE<br />
Initial value:<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
FALSE: MC_Stop_LXM is decelerated with a deceleration<br />
ramp.<br />
TRUE: MC_Stop_LXM is decelerated with a torque ramp.<br />
Value DINT The value depends on the adjusted ramp (RampType).<br />
2.10.2.4 SetLimitSwitch_LXM<br />
RampType = FALSE:<br />
Value range: 200 ... 2147483647<br />
Initial value: 6000<br />
The value corresponds to the device parameter<br />
RAMPquickstop; it is specified in the unit [usr_a]. See the<br />
product manual for additional information on this parameter.<br />
RampType = TRUE:<br />
Value range: 1 ... 30000<br />
Initial value:<br />
The value corresponds to the device parameter<br />
LIM_I_maxQSTP; it is specified in the unit [Arms]. See the<br />
product manual for additional information on this parameter.<br />
"2.6 Basic inputs and outputs"<br />
Notes "2.10.2.3 SetStopRamp_LXM" also modifies the deceleration ramp for<br />
"Quick Stop".<br />
Function description This function block is used to parameterize the positive limit switch<br />
(LIMP) and the negative limit switch (LIMN).<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
LimitSwitch INT<br />
Mode INT<br />
Compatible devices LXM05, SD3 and LXM32<br />
Inputs/outputs The table below shows the inputs.<br />
SetLimitSwitch_LXM<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
70 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Input Data type Description<br />
LimitSwitch INT Value range: 1 ... 2<br />
Initial value: 1<br />
Mode INT Value range: 0 ... 2<br />
Initial value: 0<br />
2.10.2.5 ResetParameters_LXM<br />
1: Limit switch in positive direction of movement LIMP<br />
2: Limit switch in negative direction of movement LIMN<br />
0: Deactivate limit switch<br />
1: Activate limit switch as normally closed contact (NCC)<br />
2: Activate limit switch as normally open contact (NOC)<br />
"2.6 Basic inputs and outputs"<br />
Notes The function block can only be executed if the drive is in the operating<br />
state 3 Switch On Disabled (operating state of drive).<br />
Function description This function block restores all parameters to the factory settings.<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Compatible devices LXM05, SD3 and LXM32<br />
2.10.2.6 StoreParameters_LXM<br />
Inputs/outputs "2.6 Basic inputs and outputs"<br />
ResetParameters_LXM<br />
Notes Observe the information provided in chapter .<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
• The function block can only be executed if the drive is in the operating<br />
state 3 Switch On Disabled (operating state of drive). To transition<br />
to this state, disable the power stage with the function block<br />
"2.7.1.1 MC_Power_LXM".<br />
• All parameters are restored to the factory settings with the exception<br />
of:<br />
- Communication parameters<br />
- Inversion of direction<br />
- Signal type PTI interface<br />
- Start-up operating mode<br />
- Encoder simulation settings<br />
- Functions of the digital inputs and outputs<br />
• The new settings are not saved to the EEPROM. Use<br />
"2.10.2.6 StoreParameters_LXM" to save the new settings to the<br />
EEPROM.<br />
Function description The function block saves the parameter values to the EEPROM.<br />
Function blocks 71
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Compatible devices LXM05, SD3 and LXM32<br />
Inputs/outputs "2.6 Basic inputs and outputs"<br />
StoreParameters_LXM<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
72 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.10.3 Saving and restoring device configuration<br />
2.10.3.1 UploadDriveParameter_LXM<br />
Using a function block, you can upload the device configuration from<br />
the drive to the controller. A further function block lets you download a<br />
device configuration stored on the controller to a drive.<br />
Function description The function blocks reads the parameter values that can be modified<br />
from the device. See also "2.10.3.2 DownloadDriveParameter_LXM".<br />
Graphical representation<br />
UploadDriveParameter_LXM<br />
Axis Axis_Ref_LXM<br />
Parameters DriveParameters_LXM<br />
Execute BOOL<br />
Compatible devices LXM05, SD3 and LXM32<br />
Inputs/outputs The table below shows the inputs/outputs.<br />
Input/output Data type Description<br />
Parameters DriveParameters_LXM Value range:<br />
Initial value:<br />
Notes<br />
2.10.3.2 DownloadDriveParameter_LXM<br />
List of the device parameters.<br />
"2.6 Basic inputs and outputs"<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
• The function block can only be executed if the drive is in the operating<br />
state 3 Switch On Disabled (operating state of drive). To transition<br />
to this state, disable the power stage with the function block<br />
"2.7.1.1 MC_Power_LXM".<br />
• The two function blocks "2.10.3.2 DownloadDriveParameter_LXM"<br />
and "2.10.3.1 UploadDriveParameter_LXM" allow you to save the<br />
parameters stored in a device to an identical device without using<br />
the commissioning software.<br />
Function description The function blocks writes the parameter values that can be modified<br />
to the device. Before calling the function block, you must execute<br />
"2.10.3.1 UploadDriveParameter_LXM". If not, an error message will<br />
be generated.<br />
Graphical representation<br />
DownloadDriveParameter_LXM<br />
Axis Axis_Ref_LXM<br />
Parameters DriveParameters_LXM<br />
Execute BOOL<br />
Compatible devices LXM05, SD3 and LXM32<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
Function blocks 73
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Inputs/outputs The table below shows the inputs/outputs.<br />
Input/output Data type Description<br />
Parameters DriveParameters_LXM List of device parameters<br />
Notes<br />
"2.6 Basic inputs and outputs"<br />
• The function block can only be executed if the drive is in the operating<br />
state 3 Switch On Disabled (operating state of drive). To transition<br />
to this state, disable the power stage with the function block<br />
"2.7.1.1 MC_Power_LXM".<br />
• In order to permanently store the parameters, you must save them<br />
to the EEPROM using the function block<br />
"2.10.2.6 StoreParameters_LXM".<br />
• The two function blocks "2.10.3.2 DownloadDriveParameter_LXM"<br />
and "2.10.3.1 UploadDriveParameter_LXM" allow you to save the<br />
parameters stored in a device to an identical device without using<br />
the commissioning software.<br />
74 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.10.4 Inputs and outputs<br />
2.10.4.1 ReadAnalogInputs_LXM<br />
The following function blocks allow you to access the digital and analog<br />
inputs and outputs of all CAN nodes in the system..<br />
Function description The function block reads the current values of the analog inputs.<br />
Graphical representation<br />
Input Input_Ref_LXM<br />
Enable BOOL<br />
Compatible devices LXM05 and SD3<br />
ReadAnalogInputs_LXM<br />
Inputs/outputs The table below shows the outputs.<br />
Output Data type Description<br />
ValueANA1 INT Value range: -10000 ... 10000<br />
Initial value: 0<br />
ValueANA2 INT Value range:<br />
Initial value:<br />
Notes<br />
2.10.4.2 MC_ReadDigitalInput_LXM<br />
BOOL Valid<br />
BOOL Busy<br />
BOOL Error<br />
INT ValueANA1<br />
INT ValueANA2<br />
Corresponds to the input voltage in [mV] at the analog input<br />
ANA1.<br />
Corresponds to the input voltage in [mV] at the analog input<br />
ANA2.<br />
"2.6 Basic inputs and outputs"<br />
• The function block uses Service Data Objects (SDO) to read the<br />
parameter from the device. Therefore, it is strongly recommended<br />
not to permanently set the input Enable to TRUE. This may cause<br />
overload on the fieldbus. It is recommended to deactivate the function<br />
block when the input Busy is set to FALSE.<br />
• SD328: ANA2 is not available.<br />
Function description Reads the current state of the digital inputs of the drive.<br />
Graphical representation<br />
Input Input_Ref_LXM<br />
Enable BOOL<br />
InputNumber INT<br />
Compatible devices LXM05, SD3 and LXM32<br />
MC_ReadDigitalInput_LXM<br />
BOOL Valid<br />
BOOL Busy<br />
BOOL Error<br />
BOOL Value<br />
WORD Inputs<br />
Function blocks 75
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
InputNumber INT Value range: 0 ... 5<br />
Initial value: 0<br />
Number of the input to be read.<br />
Input IO: Bit number<br />
DI0: 0<br />
DI1: 1<br />
DI2: 2<br />
DI3: 3<br />
DI4: 4<br />
DI5: 5<br />
The table below shows the outputs.<br />
Output Data type Description<br />
Value BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
FALSE: Level at selected input is 0 V.<br />
TRUE: Level at selected input is 24 V.<br />
Inputs WORD Value range: 00h ... 3Fh<br />
Initial value: 00h<br />
2.10.4.3 MC_ReadDigitalOutput_LXM<br />
Image of the inputs as a bit pattern. Bit 0 = first input.<br />
Input IO: Bit number<br />
DI0: 0<br />
DI1: 1<br />
DI2: 2<br />
DI3: 3<br />
DI4: 4<br />
DI5: 5<br />
"2.6 Basic inputs and outputs"<br />
Notes See the product manual for a description of the digital inputs.<br />
Function description The function block is used to get the current state of the digital outputs.<br />
Graphical representation<br />
Output Output_Ref_LXM<br />
Enable BOOL<br />
OutputNumber INT<br />
Compatible devices LXM05, SD3 and LXM32<br />
MC_ReadDigitalOutput_LXM<br />
BOOL Valid<br />
BOOL Busy<br />
BOOL Error<br />
BOOL Value<br />
WORD Outputs<br />
76 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
OutputNumber INT Value range: 0 ... 2<br />
Initial value: 0<br />
Number of the output to be read.<br />
Output IO: Bit number<br />
DQ0: 0<br />
DQ1: 1<br />
DQ2: 2 (LXM05, SD328 and LXM32M only)<br />
The table below shows the outputs.<br />
Output Data type Description<br />
Value BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
FALSE: Level at selected output is 0 V.<br />
TRUE: Level at selected output is 24 V.<br />
Outputs WORD Value range: 00h ... 03h<br />
Initial value: 00h<br />
2.10.4.4 MC_WriteDigitalOutput_LXM<br />
Image of the outputs as a bit pattern. Bit 0 = first output.<br />
Output IO: Bit number<br />
DQ0: 0<br />
DQ1: 1<br />
DQ2: 2 (LXM05, SD328 and LXM32M only)<br />
"2.6 Basic inputs and outputs"<br />
Notes See the product manual for a description of the digital outputs.<br />
Function description The function blocks writes values to the digital outputs.<br />
Graphical representation<br />
Compatible devices LXM32<br />
Output Output_Ref_LXM<br />
Execute BOOL<br />
OutputNumber INT<br />
Value BOOL<br />
AllOutputs BOOL<br />
Outputs WORD<br />
MC_WriteDigitalOutput_LXM<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
Function blocks 77
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Inputs/outputs The table below shows the inputs.<br />
Input Data type Description<br />
OutputNumber INT Value range: 0 ... 2<br />
Initial value: 0<br />
Signal output to which to write.<br />
0 = DQ0<br />
1 = DQ1<br />
2 = DQ2<br />
Value BOOL Value range: FALSE, TRUE<br />
Initial value: FALSE<br />
FALSE: 0V is written to the selected signal output.<br />
TRUE: 24V is written to the selected signal output.<br />
AllOutputs BOOL Value range: FALSE, TRUE<br />
Initial value:<br />
FALSE: The signal output to be written to is set via input<br />
OutputNumber.<br />
Outputs WORD Value range: 0000h ... 0007h<br />
Initial value: 0<br />
TRUE: The signal outputs to be written to are set via input<br />
Output.<br />
0: 0 V is written to the selected signal output.<br />
1: 24V is written to the selected signal output.<br />
0000 0000 0000 00012 (0000h) = Signal output 0 (DQ0) 24V<br />
0000 0000 0000 00102 (0002h) = Signal output 1 (DQ1) 24V<br />
0000 0000 0000 01002 (0004h) = Signal output 2 (DQ2) 24V<br />
Example: writing 24 V to all signal outputs:<br />
0000 0000 0000 01112 (0007h)<br />
"2.6 Basic inputs and outputs"<br />
Notes Functions may already have been assigned to the outputs. This function<br />
block checks whether or not a function is already assigned to an<br />
output when the output is written to. An error is generated if a function<br />
is assigned to the output.<br />
78 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.10.5 Error handling<br />
2.10.5.1 ReadAxisWarning_LXM<br />
For error handling, each function block has an output Error which is<br />
set if a synchronous or asynchronous error occurs.<br />
The function block MC_ReadAxisError_xxx is called to analyze the<br />
cause of the error. The function block contains the stored error information.<br />
The function block MC_Reset_xxx deletes the error information<br />
entered. Future error information can now be stored.<br />
If an additional error occurs, the error information is only stored if no<br />
stored error information already exists. If there is still information pertaining<br />
to a previous error, the new error message is ignored.<br />
Function description The function block reads the most recent active warning.<br />
Graphical representation<br />
Compatible devices LXM32<br />
Axis Axis_Ref_LXM<br />
Enable BOOL<br />
ReadAxisWarning_LXM<br />
Inputs/outputs The table below shows the outputs.<br />
Output Data type Description<br />
WarningID WORD Value range:<br />
Initial value: 0<br />
Notes<br />
2.10.5.2 MC_ReadAxisError_LXM<br />
BOOL Valid<br />
BOOL Busy<br />
BOOL Error<br />
WORD WarningID<br />
Error number of the most recent warning. A warning is an error<br />
of error class 0. See the product manual for a description of<br />
the error numbers.<br />
"2.6 Basic inputs and outputs"<br />
• The function block uses Service Data Objects (SDO) to read the<br />
parameter. Therefore, it is strongly recommended not to permanently<br />
set the input Enable to TRUE. This may cause overload on<br />
the fieldbus. It is recommended to deactivate the function block<br />
when the input Busy is set to FALSE.<br />
Function description The function block reads the error information pertaining to the most<br />
recent error.<br />
Function blocks 79
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Enable BOOL<br />
Compatible devices LXM05, SD3 and LXM32<br />
MC_ReadAxisError_LXM<br />
Inputs/outputs The table below shows the outputs.<br />
Output Data type Description<br />
ErrorID WORD Value range: 0000h .... FFFFh<br />
Initial value: 0000h<br />
0: No error stored.<br />
>0: Stored error number.<br />
AxisErrorID WORD Value range:<br />
Initial value: 0<br />
BOOL Valid<br />
BOOL Busy<br />
BOOL Error<br />
WORD ErrorID<br />
WORD AxisErrorID<br />
See the product manual for an overview of the error numbers.<br />
LXM32 only:<br />
Bit 0 ... bit 7: Corresponds to the ID of the function block that<br />
has triggered the error.<br />
Bit 8 ... bit 15: Corresponds to the input that has triggered the<br />
error. The basic inputs such as Axis, Input, Execute,<br />
Enable, ... are not considered.<br />
"2.6 Basic inputs and outputs"<br />
Notes The function block uses Service Data Objects (SDO) to read the<br />
parameter from the device. Therefore, it is strongly recommended not<br />
to permanently set the input Enable to TRUE. This may cause overload<br />
on the fieldbus. It is recommended to deactivate the function<br />
block when the input Busy is set to FALSE.<br />
Table of error numbers The table below shows the error numbers of the library. See the product<br />
manual for the error numbers of the drive.<br />
80 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
ErrorID hexadecimal<br />
ErrorID decimal Error class Description<br />
1100h 4352 Parameter error<br />
6108h 24840 Function not available<br />
8130h 33072 Node Guarding error<br />
A309h 41737 Drive not in operating state6 Operation Enabled<br />
A31Bh 41755 "HALT" requested<br />
A338h 41784 The operating mode is not supported by this device.<br />
FF00h 65280 - Toggle bit unchanged<br />
FF01h 65281 - SDO timeout<br />
FF02h 65282 - Server / client command specifier invalid or unknown<br />
FF06h 65286 - No memory available<br />
FF07h 65287 - Access to object not possible<br />
FF08h 65288 - No read access, because write-only object (wo)<br />
FF09h 65289 - No write access, because read object (ro)<br />
FF0Ah 65290 - Object does not exist in object dictionary<br />
FF0Bh 65291 - Object does not support PDO mapping<br />
FF0Ch 65292 - Number or length of objects exceed the byte length of<br />
the PDO<br />
FF0Dh 65293 - Parameters are incompatible<br />
FF0Eh 65294 - Device detects internal incompatibility<br />
FF0Fh 65295 - Hardware error, access denied<br />
FF10h 65296 - Data type and parameter length do not match<br />
FF11h 65297 - Data type does not match, parameter too long<br />
FF12h 65298 - Data type does not match, parameter too short<br />
FF13h 65299 - Subindex not supported<br />
FF14h 65300 - Value range of parameter too large (relevant only for<br />
write access)<br />
FF15h 65301 - Parameter values too great<br />
FF16h 65302 - Parameter values too small<br />
FF17h 65303 - Upper value is less than lower value<br />
FF18h 65304 - General error<br />
FF19h 65305 - Data can neither be transmitted to the application nor<br />
saved.<br />
FF1Ah 65306 - Local access channel is used, data can neither be<br />
transmitted nor saved.<br />
FF1Bh 65307 - Device status keeps data from being transmitted and<br />
saved.<br />
FF1Ch 65308 - Object dictionary does not exist or cannot be generated<br />
(for example, if data error occurs during generation<br />
from file)<br />
FF20h 65312 - Unknown status<br />
FF21h 65313 - Input variable was changed before response was<br />
received ("2.10.1.5 MC_ReadParameter_LXM",<br />
"2.10.2.1 MC_WriteParameter_LXM")<br />
FF22h 65314 - Attempt to interrupt a non-interruptible function block<br />
("2.7.1.1 MC_Power_LXM", "2.7.9.1 MC_Stop_LXM")<br />
Function blocks 81
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
ErrorID hexadecimal<br />
ErrorID decimal Error class Description<br />
FF23h 65315 0 Trigger function is already active<br />
FF24h 65316 - PDO timeout<br />
FF25h 65317 - Operating mode Electronic Gear not active<br />
FF27h 65319 - Drive not in state "StandStill"<br />
FF2Ah 65322 - Trigger event lost<br />
FF34h 65332 - Power stage does not switch to operating state 6 Operation<br />
Enabled<br />
FF35h 65333 - Incorrect program number<br />
FF36h 65334 - Operating mode or function is not supported<br />
FF38h 65336 - Parameter list has not yet been read via<br />
"2.10.3.1 UploadDriveParameter_LXM".<br />
FF39h 65337 - Parameter list is not supported<br />
FF3Bh 65339 - Power stage is not in operating state<br />
4 Ready To Switch On<br />
FF3Dh 65341 - Operating mode Motion Sequence is not active<br />
FF3Eh 65342 - No transition condition requested<br />
FF3Fh 65343 - Size of parameter list is not supported<br />
FF50h 65360 - Initialization error of function block<br />
FF51h 65361 - The function block cannot be controlled via the application<br />
since i_iControlMode = 1.<br />
FF52h 65362 - The function block cannot be controlled via the visualization<br />
since i_iControlMode = 0.<br />
FF53h 65363 - The value at the input i_iControlMode is outside of<br />
the valid value range.<br />
FF54h 65364 - The value at the input iq_iCmd is outside of the valid<br />
value range.<br />
FF55h 65365 - The function block and the connected device are<br />
incompatible.<br />
2.10.5.3 MC_Reset_LXM<br />
Function description The function block is used to acknowledge an error. The error memory<br />
is cleared so that it is available for future error messages. If the power<br />
stage has been disabled by the automatic error response, it can be<br />
enabled again, provided that the cause of the error has been rectified<br />
when the error message is acknowledged.<br />
Graphical representation<br />
Axis Axis_Ref_LXM<br />
Execute BOOL<br />
Compatible devices LXM05, SD3 and LXM32<br />
Inputs/outputs "2.6 Basic inputs and outputs"<br />
MC_Reset_LXM<br />
BOOL Done<br />
BOOL Busy<br />
BOOL Error<br />
82 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.11 Device Function<br />
2.11.1 Startup<br />
2.11.1.1 Servo_Startup<br />
These function blocks "Startup" support you in commissioning a drive<br />
system at a controller. Before these function blocks can be used, you<br />
must set the communication parameters baud rate and node address<br />
in the drive and in the controller. Function blocks and the visualization<br />
cannot be used simultaneously.<br />
The function blocks "Startup" with visualization elements have the following<br />
functions:<br />
• Switching on the drive system.<br />
• Displaying the status of the drive system.<br />
• Fast access to frequently used parameters.<br />
• The parameters are accessed via their index and subindex.<br />
• Transmitting a device parameter list from the drive to the controller<br />
and from the controller to the drive (upload and download).<br />
• Using the operating mode Homing.<br />
• Using the operating mode Jog.<br />
• Using the operating mode Profile Velocity (movement at defined<br />
velocity).<br />
• Using the operating mode Profile Position (movement to defined<br />
position)<br />
• Displaying and acknowledging error messages.<br />
Function description This function block supports you in commissioning a <strong>Lexium</strong> servo<br />
drive system for the first time. The function block comprises two visualizations<br />
to facilitate usage of the function block. Function blocks and<br />
the visualization cannot be used simultaneously.<br />
Graphical representation<br />
iq_stAxis Axis_Ref_LXM<br />
iq_iCMD INT<br />
i_sUserDeviceName string<br />
i_xActivate BOOL<br />
i_iControlMode INT<br />
i_diPosition DINT<br />
i_diVelocity DINT<br />
i_iTorque INT<br />
i_udiAcceleration UDINT<br />
i_udiDeceleration UDINT<br />
i_uiHomeMethod UINT<br />
i_diHomePos DINT<br />
i_xConfUld BOOL<br />
i_xConfDld BOOL<br />
Compatible devices LXM05 and LXM32<br />
Servo_Startup<br />
Inputs/outputs The table below shows the inputs/outputs.<br />
BOOL q_xReady<br />
BOOL q_xBusy<br />
OpMode q_eDriveMode<br />
State q_eStatus<br />
OpState q_eDrvStatus<br />
DINT q_diActPosUsr<br />
DINT q_diActPosInc<br />
DINT q_diActVelUsr<br />
INT q_iActIdq<br />
DriveParams q_stDriveParams<br />
BOOL q_xError<br />
WORD q_wErrorID<br />
Function blocks 83
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Input/output Data type Description<br />
iq_stAxis Axis_Ref_LXM Value range:<br />
Initial value:<br />
Axis structure<br />
iq_iCMD INT Value range:<br />
Initial value:<br />
Commands:<br />
-1: command is active<br />
0: no ongoing command<br />
1: ENABLE (enable power stage)<br />
2: DISABLE (disable power stage)<br />
3: Reset<br />
4: Stop<br />
5: SetPos<br />
6: Inc +<br />
7: Inc –<br />
8: MoveAbs<br />
9: MoveVel<br />
10: Homing<br />
11: TorqueMode<br />
The function to be executed is written by the application as a<br />
command and overwritten by the function block when it is processed.<br />
Condition: The input is only effective if the value of Control-<br />
Mode is 1.<br />
To start the selected function, the value in the parameter CMD<br />
must be written once. As soon as the command is executed,<br />
the value is overwritten by -1. When the execution of the command<br />
is terminated, the value is overwritten by 0.<br />
The table below shows the inputs.<br />
84 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Input Data type Description<br />
i_sUserDeviceName string Value range:<br />
Initial value:<br />
i_xActivate BOOL Value range: FALSE, TRUE<br />
Initial value:<br />
i_iControlMode INT Value range:<br />
Initial value:<br />
i_diPosition DINT Value range:<br />
Initial value:<br />
Name of the axis. The name is defined by the user. If no name<br />
is entered, the node ID is displayed.<br />
The selected ControlMode is activated with a rising edge.<br />
If all requirements for the selected ControlMode are met, the<br />
selected ControlMode is started.<br />
If the requirements are not met, the selection is canceled with<br />
an error message.<br />
ControlMode = 0: The functions are controlled via the visualization.<br />
ControlMode = 1: The functions are controlled via the application.<br />
The visualization is deactivated.<br />
Target position in [usr]<br />
i_diVelocity DINT Value range:<br />
Initial value:<br />
Target velocity in [usr]<br />
i_iTorque INT Value range:<br />
Initial value:<br />
Target torque<br />
i_udiAcceleration UDINT Value range:<br />
Initial value: 600<br />
i_udiDeceleration UDINT Value range:<br />
Initial value: 600<br />
i_uiHomeMethod UINT Value range:<br />
Initial value: 1<br />
i_diHomePos DINT Value range:<br />
Initial value:<br />
The value corresponds to 0.1% of the nominal torque of the<br />
motor.<br />
Value for acceleration ramp in [usr].<br />
Value for deceleration ramp in [usr].<br />
Selected Homing method.<br />
i_xConfUld BOOL Value range: FALSE, TRUE<br />
Initial value:<br />
i_xConfDld BOOL Value range: FALSE, TRUE<br />
Initial value:<br />
Position of the reference point for position setting (Homing<br />
method).<br />
A rising edge triggers an upload (saving parameters from<br />
device to controller).<br />
A rising edge triggers a download (stored parameters from<br />
controller to device).<br />
The table below shows the outputs.<br />
Function blocks 85
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Output Data type Description<br />
q_xReady BOOL Value range: FALSE, TRUE<br />
Initial value:<br />
q_xBusy BOOL Value range: FALSE, TRUE<br />
Initial value:<br />
q_eDriveMode OpMode Value range:<br />
Initial value:<br />
q_eStatus State Value range:<br />
Initial value:<br />
Function block has been activated and is ready for operation.<br />
A function is being performed via the function block. If a new<br />
function is started, the currently active function is canceled.<br />
Active operating mode (also see the state machine in the product<br />
manual):<br />
0: No operating mode active<br />
1: Operating mode Jog<br />
2: Operating mode Homing<br />
3: Operating mode Profile Position<br />
4: Operating mode Profile Velocity<br />
5: Operating mode Electronic Gear<br />
6: Operating mode Current Control<br />
7: Operating mode Speed Control<br />
8: AutoTuning<br />
9: Operating mode Profile Torque<br />
State as per PLCopen state diagram:<br />
0: Undefined<br />
1: Errorstop<br />
2: Disabled<br />
3: Stopping<br />
4: StandStill<br />
5: DiscreteMotion<br />
6: ContinuousMotion<br />
7: SynchronizedMotion<br />
8: Homing<br />
q_eDrvStatus OpState Value range:<br />
Initial value:<br />
q_diActPosUsr DINT Value range:<br />
Initial value:<br />
Operating state of the drive:<br />
1: 1 Start<br />
2: 2 Not Ready To Switch On<br />
3: 3 Switch On Disabled<br />
4: 4 Ready To Switch On<br />
5: 5 Switched On<br />
6: 6 Operation Enabled<br />
7: 7 Quick Stop Active<br />
8: 8 Fault Reaction Active<br />
Actual position in [usr]<br />
q_diActPosInc DINT Value range:<br />
Initial value:<br />
Actual position in [inc]<br />
q_diActVelUsr DINT Value range:<br />
Initial value:<br />
Actual velocity in [usr]<br />
86 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Output Data type Description<br />
q_iActIdq INT Value range:<br />
Initial value:<br />
Actual current in [Arms]<br />
q_stDriveParams DriveParams Value range:<br />
Initial value:<br />
Data structure, consisting of<br />
STRING: Device identification<br />
REAL: Firmware version of the device<br />
q_xError BOOL Value range: FALSE, TRUE<br />
Initial value:<br />
q_wErrorID WORD Value range:<br />
Initial value:<br />
Notes<br />
FALSE: No error has been detected.<br />
TRUE: An error has been detected.<br />
Error number.<br />
WARNING<br />
UNINTENDED BEHAVIOR DUE TO INCONSISTENT COMMANDS<br />
If you have activated this function block, simultaneous use of other<br />
function blocks of the library leads to unintended behavior.<br />
• Only activate this function block when all other function blocks of<br />
the library are inactive.<br />
• Deactivate this function block before activating any other function<br />
block of the library.<br />
Failure to follow these instructions can result in death, serious<br />
injury or equipment damage.<br />
Function blocks 87
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Operating mode Current Control<br />
and operating mode Profile Torque<br />
Visualization<br />
Servo_Startup_ManVis<br />
The visualization Servo_Startup_TuneVis provides direct access<br />
to many of the parameters of the drive. The parameters are addressed<br />
by means of index and subindex. Parameter values can be read and<br />
written. An image of defined parameter values can be saved from the<br />
drive to the controller. The stored parameter values can also be transferred<br />
from the controller to the drive as a single unit.<br />
The visualization Servo_Startup_ManVis allows you to start the<br />
operating mode Current Control and the operating mode Profile Torque.<br />
Observe the following safety instruction for these operating<br />
mode:<br />
WARNING<br />
EXCESSIVELY HIGH VELOCITY DUE TO INCORRECT LIMIT VALUE<br />
Without a proper limit value, the motor can reach a very high velocity<br />
in this operating mode.<br />
• Check the parameterized velocity limitation.<br />
Failure to follow these instructions can result in death, serious<br />
injury or equipment damage.<br />
88 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
2.11.1.2 Stepper_Startup<br />
The visualization Servo_Startup_ManVis allows you to display the<br />
status of the drive. It is possible to start and stop movements.<br />
The following operating modes can be started:<br />
• Operating mode Jog<br />
• Operating mode Homing.<br />
• Operating mode Profile Position (movement to defined position).<br />
• Operating mode Profile Velocity (movement at defined velocity).<br />
• Operating mode Electronic Gear.<br />
• Operating mode Current Control.<br />
• Operating mode Speed Control.<br />
• Operating mode Profile Torque (LXM32 only).<br />
• Autotuning is also possible.<br />
Function description This function block supports you in commissioning a <strong>Lexium</strong> drive system<br />
for stepper motors for the first time. The function block comprises<br />
two visualizations to facilitate usage of the function block. Function<br />
blocks and the visualization cannot be used simultaneously.<br />
Function blocks 89
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Graphical representation<br />
Compatible devices SD3<br />
iq_stAxis Axis_Ref_LXM<br />
iq_iCMD INT<br />
i_sUserDeviceName string<br />
i_xActivate BOOL<br />
i_iControlMode INT<br />
i_diPosition DINT<br />
i_diVelocity DINT<br />
i_iTorque INT<br />
i_udiAcceleration UDINT<br />
i_udiDeceleration UDINT<br />
i_uiHomeMethod UINT<br />
i_diHomePos DINT<br />
i_xConfUld BOOL<br />
i_xConfDld BOOL<br />
Stepper_Startup<br />
Inputs/outputs The table below shows the inputs/outputs.<br />
Input/output Data type Description<br />
iq_stAxis Axis_Ref_LXM Value range:<br />
Initial value:<br />
Axis structure<br />
iq_iCMD INT Value range:<br />
Initial value:<br />
Commands:<br />
-1: command is active<br />
0: no ongoing command<br />
1: ENABLE (enable power stage)<br />
2: DISABLE (disable power stage)<br />
3: Reset<br />
4: Stop<br />
5: SetPos<br />
6: Inc +<br />
7: Inc –<br />
8: MoveAbs<br />
9: MoveVel<br />
10: Homing<br />
BOOL q_xReady<br />
BOOL q_xBusy<br />
OpMode q_eDriveMode<br />
State q_eStatus<br />
OpState q_eDrvStatus<br />
DINT q_diActPosUsr<br />
DINT q_diActPosInc<br />
DINT q_diActVelUsr<br />
INT q_iActIdq<br />
DriveParams q_stDriveParams<br />
BOOL q_xError<br />
WORD q_wErrorID<br />
The function to be executed is written by the application as a<br />
command and overwritten by the function block when it is processed.<br />
Condition: The input is only effective if the value of Control-<br />
Mode is 1.<br />
To start the selected function, the value in the parameter CMD<br />
must be written once. As soon as the command is executed,<br />
the value is overwritten by -1. When the execution of the command<br />
is terminated, the value is overwritten by 0.<br />
The table below shows the inputs.<br />
90 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Input Data type Description<br />
i_sUserDeviceName string Value range:<br />
Initial value:<br />
i_xActivate BOOL Value range: FALSE, TRUE<br />
Initial value:<br />
i_iControlMode INT Value range:<br />
Initial value:<br />
i_diPosition DINT Value range:<br />
Initial value:<br />
Name of the axis. The name is defined by the user. If no name<br />
is entered, the node ID is displayed.<br />
The selected ControlMode is activated with a rising edge.<br />
If all requirements for the selected ControlMode are met, the<br />
selected ControlMode is started.<br />
If the requirements are not met, the selection is canceled with<br />
an error message.<br />
ControlMode = 0: The functions are controlled via the visualization.<br />
ControlMode = 1: The functions are controlled via the application.<br />
The visualization is deactivated.<br />
Target position in [usr]<br />
i_diVelocity DINT Value range:<br />
Initial value:<br />
Target velocity in [usr]<br />
i_iTorque INT Value range:<br />
Initial value:<br />
Target torque<br />
i_udiAcceleration UDINT Value range:<br />
Initial value: 600<br />
i_udiDeceleration UDINT Value range:<br />
Initial value: 600<br />
i_uiHomeMethod UINT Value range:<br />
Initial value: 1<br />
i_diHomePos DINT Value range:<br />
Initial value:<br />
The value corresponds to 0.1% of the nominal torque of the<br />
motor.<br />
Value for acceleration ramp in [usr]<br />
Value for deceleration ramp in [usr]<br />
Selected Homing method.<br />
i_xConfUld BOOL Value range: FALSE, TRUE<br />
Initial value:<br />
i_xConfDld BOOL Value range: FALSE, TRUE<br />
Initial value:<br />
Position of the reference point for position setting (Homing<br />
method).<br />
A rising edge triggers an upload (saving parameters from<br />
device to controller).<br />
A rising edge triggers a download (stored parameters from<br />
controller to device).<br />
The table below shows the outputs.<br />
Function blocks 91
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
Output Data type Description<br />
q_xReady BOOL Value range: FALSE, TRUE<br />
Initial value:<br />
q_xBusy BOOL Value range: FALSE, TRUE<br />
Initial value:<br />
q_eDriveMode OpMode Value range:<br />
Initial value:<br />
q_eStatus State Value range:<br />
Initial value:<br />
Function block has been activated and is ready for operation.<br />
A function is being performed via the function block. If a new<br />
function is started, the currently active function is canceled.<br />
Active operating mode (also see the state machine in the product<br />
manual):<br />
0: No operating mode active<br />
1: Operating mode Jog<br />
2: Operating mode Homing<br />
3: Operating mode Profile Position<br />
4: Operating mode Profile Velocity<br />
5: Operating mode Electronic Gear<br />
6: Operating mode Current Control<br />
7: Operating mode Speed Control<br />
8: AutoTuning<br />
9: Operating mode Profile Torque<br />
State as per PLCopen state diagram:<br />
0: Undefined<br />
1: Errorstop<br />
2: Disabled<br />
3: Stopping<br />
4: StandStill<br />
5: DiscreteMotion<br />
6: ContinuousMotion<br />
7: SynchronizedMotion<br />
8: Homing<br />
q_eDrvStatus OpState Value range:<br />
Initial value:<br />
q_diActPosUsr DINT Value range:<br />
Initial value:<br />
Operating state of the drive:<br />
1: 1 Start<br />
2: 2 Not Ready To Switch On<br />
3: 3 Switch On Disabled<br />
4: 4 Ready To Switch On<br />
5: 5 Switched On<br />
6: 6 Operation Enabled<br />
7: 7 Quick Stop Active<br />
8: 8 Fault Reaction Active<br />
Actual position in [usr]<br />
q_diActPosInc DINT Value range:<br />
Initial value:<br />
Actual position in [inc]<br />
q_diActVelUsr DINT Value range:<br />
Initial value:<br />
Actual velocity in [usr]<br />
92 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
Output Data type Description<br />
q_iActIdq INT Value range:<br />
Initial value:<br />
Actual current in [Arms]<br />
q_stDriveParams DriveParams Value range:<br />
Initial value:<br />
Data structure, consisting of:<br />
STRING: Device identification<br />
REAL: Firmware version of the device<br />
q_xError BOOL Value range: FALSE, TRUE<br />
Initial value:<br />
q_wErrorID WORD Value range:<br />
Initial value:<br />
Notes<br />
FALSE: No error has been detected.<br />
TRUE: An error has been detected.<br />
Error number.<br />
WARNING<br />
UNINTENDED BEHAVIOR DUE TO INCONSISTENT COMMANDS<br />
If you have activated this function block, simultaneous use of other<br />
function blocks of the library leads to unintended behavior.<br />
• Only activate this function block when all other function blocks of<br />
the library are inactive.<br />
• Deactivate this function block before activating any other function<br />
block of the library.<br />
Failure to follow these instructions can result in death, serious<br />
injury or equipment damage.<br />
Function blocks 93
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
The visualization Stepper_Startup_TuneVis provides direct<br />
access to many of the parameters of the drive. The parameters are<br />
addressed by means of index and subindex. Parameter values can be<br />
read and written. An image of defined parameter values can be saved<br />
from the drive to the controller. The stored parameter values can also<br />
be transferred from the controller to the drive as a single unit.<br />
94 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 2 <strong>Lexium</strong> <strong>Library</strong> Guide<br />
The visualization Stepper_Startup_ManVis allows you to display<br />
the status of the drive. It is possible to start and stop movements.<br />
The following operating modes can be started:<br />
• Operating mode Jog<br />
• Operating mode Homing<br />
• Operating mode Profile Position (movement to defined position)<br />
• Operating mode Profile Velocity (movement at defined velocity)<br />
• Operating mode Electronic Gear<br />
• Operating mode Oscillator<br />
Function blocks 95
2 <strong>Lexium</strong> <strong>Library</strong> Guide <strong>Lexium</strong> <strong>Library</strong><br />
96 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 3 Glossary<br />
3 Glossary<br />
3.1 Units and conversion tables<br />
3.1.1 Length<br />
The value in the specified unit (left column) is calculated for the<br />
desired unit (top row) with the formula (in the field).<br />
Example: conversion of 5 meters [m] to yards [yd]<br />
5 m / 0.9144 = 5.468 yd<br />
in ft yd m cm mm<br />
in - / 12 / 36 * 0.0254 * 2.54 * 25.4<br />
ft * 12 - / 3 * 0.30479 * 30.479 * 304.79<br />
yd * 36 * 3 - * 0.9144 * 91.44 * 914.4<br />
m / 0.0254 / 0.30479 / 0.9144 - * 100 * 1000<br />
cm / 2.54 / 30.479 / 91.44 / 100 - * 10<br />
mm / 25.4 / 304.79 / 914.4 / 1000 / 10 -<br />
3.1.2 Mass<br />
lb oz slug kg g<br />
lb - * 16 * 0.03108095 * 0.4535924 * 453.5924<br />
oz / 16 - * 1.942559*10 -3 * 0.02834952 * 28.34952<br />
slug / 0.03108095 / 1.942559*10 -3 - * 14.5939 * 14593.9<br />
kg / 0.45359237 / 0.02834952 / 14.5939 - * 1000<br />
g / 453.59237 / 28.34952 / 14593.9 / 1000 -<br />
3.1.3 Force<br />
lb oz p N<br />
lb - * 16 * 453.55358 * 4.448222<br />
oz / 16 - * 28.349524 * 0.27801<br />
p / 453.55358 / 28.349524 - * 9.807*10 -3<br />
N / 4.448222 / 0.27801 / 9.807*10 -3 -<br />
3.1.4 Power<br />
HP W<br />
HP - * 746<br />
W / 746 -<br />
Function blocks 97<br />
3
3 Glossary <strong>Lexium</strong> <strong>Library</strong><br />
3.1.5 Rotation<br />
min -1 (RPM) rad/s deg./s<br />
min -1 (RPM) - * π / 30 * 6<br />
rad/s * 30 / π - * 57.295<br />
deg./s / 6 / 57.295 -<br />
3.1.6 Torque<br />
lb‧in lb‧ft oz‧in Nm kp‧m kp‧cm dyne‧cm<br />
lb‧in - / 12 * 16 * 0.112985 * 0.011521 * 1.1521 * 1.129*10 6<br />
lb‧ft * 12 - * 192 * 1.355822 * 0.138255 * 13.8255 * 13.558*10 6<br />
oz‧in / 16 / 192 - * 7.0616*10 -3 * 720.07*10 -6 * 72.007*10 -3 * 70615.5<br />
Nm / 0.112985 / 1.355822 / 7.0616*10 -3 - * 0.101972 * 10.1972 * 10*10 6<br />
kp‧m / 0.011521 / 0.138255 / 720.07*10 -6 / 0.101972 - * 100 * 98.066*10 6<br />
kp‧cm / 1.1521 / 13.8255 / 72.007*10 -3 / 10.1972 / 100 - * 0.9806*10 6<br />
dyne‧cm / 1.129*10 6 / 13.558*10 6 / 70615.5 / 10*10 6 / 98.066*10 6 / 0.9806*10 6 -<br />
3.1.7 Moment of inertia<br />
lb‧in 2 lb‧ft 2 kg‧m 2 kg‧cm 2 kp‧cm‧s 2 oz‧in 2<br />
lb‧in 2 - / 144 / 3417.16 / 0.341716 / 335.109 * 16<br />
lb‧ft 2 * 144 - * 0.04214 * 421.4 * 0.429711 * 2304<br />
kg‧m 2 * 3417.16 / 0.04214 - * 10*10 3 * 10.1972 * 54674<br />
kg‧cm 2 * 0.341716 / 421.4 / 10*10 3 - / 980.665 * 5.46<br />
kp‧cm‧s 2 * 335.109 / 0.429711 / 10.1972 * 980.665 - * 5361.74<br />
oz‧in 2 / 16 / 2304 / 54674 / 5.46 / 5361.74 -<br />
3.1.8 Temperature<br />
°F °C K<br />
°F - (°F - 32) * 5/9 (°F - 32) * 5/9 + 273.15<br />
°C °C * 9/5 + 32 - °C + 273.15<br />
K (K - 273.15) * 9/5 + 32 K - 273.15 -<br />
3.1.9 Conductor cross section<br />
AWG 1 2 3 4 5 6 7 8 9 10 11 12 13<br />
mm 2 42.4 33.6 26.7 21.2 16.8 13.3 10.5 8.4 6.6 5.3 4.2 3.3 2.6<br />
AWG 14 15 16 17 18 19 20 21 22 23 24 25 26<br />
mm 2 2.1 1.7 1.3 1.0 0.82 0.65 0.52 0.41 0.33 0.26 0.20 0.16 0.13<br />
98 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 3 Glossary<br />
3.2 Terms and Abbreviations<br />
See chapter "1.5 Standards and terminology" for information on the<br />
pertinent standards on which many terms are based. Some terms and<br />
abbreviations may have specific meanings with regard to the standards.<br />
Asynchronous error Asynchronous errors are signaled without a request. Example of an<br />
asynchronous error: Power stage overtemperature.<br />
Device data The term device data refers to the parameter values of a device. The<br />
data is stored in the EEPROM of the device (persistent memory).<br />
Error Discrepancy between a detected (computed, measured or signaled)<br />
value or condition and the specified or theoretically correct value or<br />
condition.<br />
Error class Classification of errors into groups. The different error classes allow<br />
for specific responses to errors, for example by severity.<br />
Factory setting Factory settings when the product is shipped<br />
Fatal error In the case of fatal error, the product is no longer able to control the<br />
motor so that the power stage must be immediately disabled.<br />
Fault Fault is a state that can be caused by an error. Further information<br />
can be found in the pertinent standards such as IEC 61800-7, ODVA<br />
Common Industrial Protocol (CIP).<br />
Fault reset A function used to restore the drive to an operational state after a<br />
detected error is cleared by removing the cause of the error so that<br />
the error is no longer active.<br />
LED Light Emitting Diode<br />
Limit switch Switches that signal overtravel of the permissible range of travel.<br />
Node guarding Monitoring of the connection to the slave at an interface for cyclic data<br />
traffic.<br />
Parameter Device data and values that can be read and set (to a certain extent)<br />
by the user.<br />
Power stage The power stage controls the motor. The power stage generates current<br />
for controlling the motor on the basis of the positioning signals<br />
from the controller.<br />
RS485 Fieldbus interface as per EIA-485 which enables serial data transmission<br />
with multiple devices.<br />
Synchronous error Error signaled by the controller if it is unable to execute a command<br />
received from the master.<br />
Warning If the term is used outside the context of safety instructions, a warning<br />
alerts to a potential problem that was detected by a monitoring function.<br />
A warning does not cause a transition of the operating state.<br />
Function blocks 99
3 Glossary <strong>Lexium</strong> <strong>Library</strong><br />
100 Function blocks<br />
0198441113892, V2.09, 04.2012
0198441113892, V2.09, 04.2012<br />
<strong>Lexium</strong> <strong>Library</strong> 4 Index<br />
4 Index<br />
A<br />
B<br />
C<br />
D<br />
E<br />
G<br />
H<br />
I<br />
Abbreviations 99<br />
AbortMotionSequence_LXM 59<br />
Before you begin<br />
Safety information 9<br />
CurrentControl_LXM 36<br />
Device data 99<br />
Disclaimer 8<br />
DownloadDriveParameter_LXM 73<br />
Error code 80<br />
GearInSync_LXM 53<br />
GetSupplierVersion 66<br />
Glossary 97<br />
Hazard categories 10<br />
Intended use 9<br />
M<br />
Manuals<br />
4<br />
Source 7<br />
MC_AbortTrigger_LXM 52<br />
MC_GearIn_LXM 54<br />
MC_GearOut_LXM 56<br />
MC_Halt_LXM 49<br />
MC_Home_LXM 46<br />
MC_Jog_LXM 34<br />
MC_MoveAbsolute_LXM 43<br />
MC_MoveAdditive_LXM 44<br />
MC_MoveRelative_LXM 44<br />
MC_MoveVelocity_LXM 42<br />
MC_Power_LXM 33<br />
MC_ReadActualPosition_LXM 61<br />
MC_ReadActualTorque_LXM 60<br />
MC_ReadActualVelocity_LXM 60<br />
MC_ReadAxisError_LXM 79<br />
MC_ReadDigitalInput_LXM 75<br />
MC_ReadDigitalOutput_LXM 76<br />
MC_ReadParameter_LXM 64<br />
MC_ReadStatus_LXM 62<br />
MC_Reset_LXM 82<br />
MC_SetPosition_LXM 48<br />
MC_Stop_LXM 49<br />
MC_TorqueControl_LXM 38<br />
MC_TouchProbe_LXM 51<br />
MC_WriteDigitalOutput_LXM 77<br />
MC_WriteParameter_LXM 67<br />
Function blocks 101
4 Index <strong>Lexium</strong> <strong>Library</strong><br />
P<br />
Q<br />
R<br />
S<br />
Purpose of this document 7<br />
Qualification of personnel 9<br />
ReadAnalogInputs_LXM 75<br />
ReadAxisWarning_LXM 79<br />
ReadDataSet_LXM 57<br />
ReadMotionSequenceStatus_LXM 57<br />
ResetParameters_LXM 71<br />
Servo_Startup 83<br />
SetDriveRamp_LXM 68<br />
SetLimitSwitch_LXM 70<br />
SetStopRamp_LXM 69<br />
Source<br />
Manuals 7<br />
T<br />
U<br />
V<br />
W<br />
StartMotionSequence_LXM 58<br />
Stepper_Startup 89<br />
StoreParameters_LXM 71<br />
Terms 99<br />
Units and conversion tables 97<br />
UploadDriveParameter_LXM 73<br />
Validity note 7<br />
VelocityControl_LXM 40<br />
WriteDataSet_LXM 58<br />
WriteTransitionCondition_LXM 58<br />
102 Function blocks<br />
0198441113892, V2.09, 04.2012