0% found this document useful (0 votes)
4 views

GeneralMotionControlLibrariesGuide EcoStruxure

The EcoStruxure Machine Expert General Motion Control Libraries Guide provides detailed instructions and safety information for using motion control libraries within the EcoStruxure Machine Expert software environment. It covers various function blocks for controlling different types of drives, compliance with IEC 61131-3 standards, and emphasizes the importance of safety and proper operation. The document is intended for qualified personnel and includes legal disclaimers regarding its use and the responsibility of users to ensure safety measures are in place.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

GeneralMotionControlLibrariesGuide EcoStruxure

The EcoStruxure Machine Expert General Motion Control Libraries Guide provides detailed instructions and safety information for using motion control libraries within the EcoStruxure Machine Expert software environment. It covers various function blocks for controlling different types of drives, compliance with IEC 61131-3 standards, and emphasizes the importance of safety and proper operation. The document is intended for qualified personnel and includes legal disclaimers regarding its use and the responsibility of users to ensure safety measures are in place.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 194

EcoStruxure Machine Expert

General Motion Control Libraries Guide


Original instructions

EIO0000003592.04
12/2023

www.se.com
Legal Information
The information provided in this document contains general descriptions, technical
characteristics and/or recommendations related to products/solutions.
This document is not intended as a substitute for a detailed study or operational and
site-specific development or schematic plan. It is not to be used for determining
suitability or reliability of the products/solutions for specific user applications. It is the
duty of any such user to perform or have any professional expert of its choice
(integrator, specifier or the like) perform the appropriate and comprehensive risk
analysis, evaluation and testing of the products/solutions with respect to the relevant
specific application or use thereof.
The Schneider Electric brand and any trademarks of Schneider Electric SE and its
subsidiaries referred to in this document are the property of Schneider Electric SE or
its subsidiaries. All other brands may be trademarks of their respective owner.
This document and its content are protected under applicable copyright laws and
provided for informative use only. No part of this document may be reproduced or
transmitted in any form or by any means (electronic, mechanical, photocopying,
recording, or otherwise), for any purpose, without the prior written permission of
Schneider Electric.
Schneider Electric does not grant any right or license for commercial use of the
document or its content, except for a non-exclusive and personal license to consult it
on an "as is" basis.
Schneider Electric reserves the right to make changes or updates with respect to or in
the content of this document or the format thereof, at any time without notice.
To the extent permitted by applicable law, no responsibility or liability is
assumed by Schneider Electric and its subsidiaries for any errors or omissions
in the informational content of this document, as well as any non-intended use
or misuse of the content thereof.

As part of a group of responsible, inclusive companies, we are updating our


communications that contain non-inclusive terminology. Until we complete this
process, however, our content may still contain standardized industry terms that may
be deemed inappropriate by our customers.

© 2023 Schneider Electric. All Rights Reserved.


Table of Contents
Safety Information.......................................................................................7
Before You Begin........................................................................................7
Start-up and Test ........................................................................................8
Operation and Adjustments .........................................................................9
About the Book ..........................................................................................10
General Description of Motion Control Libraries ..................................16
General Description ..................................................................................16
Libraries and Related Function Blocks..................................................16
PLCopen State Diagram......................................................................20
Transitions Between Function Blocks ...................................................21
I/O Mapping Used by the Library ..........................................................22
Library-Specific Data Types .................................................................24
Library Diagnostic Codes.....................................................................30
Common Inputs and Outputs .....................................................................36
Behavior of Function Blocks with the Input Enable .................................36
Behavior of Function Blocks with the Input Execute ...............................38
Function Blocks - Single Axis ..................................................................40
Initialization ..............................................................................................40
MC_Power .........................................................................................40
Operating Mode Jog .................................................................................43
MC_Jog .............................................................................................43
Jog_LXM32........................................................................................45
Jog_SD328A ......................................................................................48
Jog_ILX .............................................................................................50
Operating Mode Profile Torque ..................................................................53
MC_TorqueControl..............................................................................53
SetTorqueRamp_LXM32 .....................................................................54
TorqueControl_LXM32 ........................................................................56
Operating Mode Profile Velocity .................................................................59
MC_MoveVelocity ...............................................................................59
MoveVelocity_LXM32 .........................................................................61
MoveVelocity_SD328A........................................................................64
VelocityControlAnalogInput_ATV .........................................................66
VelocityControlSelectAI_ATV...............................................................68
Control_ATV.......................................................................................70
Operating Mode SpeedControl ..................................................................75
SpeedControl_ILX ..............................................................................75
Operating Mode Profile Position ................................................................77
MC_MoveAbsolute .............................................................................77
MC_MoveAdditive...............................................................................79
MC_MoveRelative ..............................................................................81
Operating Mode Homing ...........................................................................84
MC_Home..........................................................................................84
Home_LXM32 ....................................................................................86
Home_SD328A ..................................................................................89
Home_ILX ..........................................................................................91
MC_SetPosition..................................................................................95

EIO0000003592.04 3
Stopping ..................................................................................................97
MC_Stop............................................................................................97
SetStopRamp_LXM32 ........................................................................99
SetStopRamp_ILX ............................................................................ 101
Stop_LXM32 .................................................................................... 102
MC_Halt........................................................................................... 104
Halt_LXM32 ..................................................................................... 106
Position Capture via Signal Input ............................................................. 108
MC_TouchProbe............................................................................... 108
TouchProbe_LXM32 ......................................................................... 110
TouchProbe_SD328A ....................................................................... 112
TouchProbe_ILX ............................................................................... 114
MC_AbortTrigger .............................................................................. 116
Function Blocks - Multi Axis................................................................... 119
Operating Mode Electronic Gear.............................................................. 119
GearInPos_LXM32 ........................................................................... 119
GearInPos_SD328A ......................................................................... 121
GearInPos_ILX................................................................................. 123
GearIn_LXM32 ................................................................................. 126
Function Blocks - Administrative .......................................................... 129
Reading a Parameter.............................................................................. 129
MC_ReadActualTorque ..................................................................... 129
MC_ReadActualVelocity.................................................................... 130
MC_ReadActualPosition ................................................................... 132
MC_ReadAxisInfo............................................................................. 133
MC_ReadMotionState....................................................................... 135
MC_ReadStatus ............................................................................... 137
MC_ReadParameter ......................................................................... 140
Writing a Parameter ................................................................................ 143
MC_WriteParameter ......................................................................... 143
SetDriveRamp_ATV.......................................................................... 145
SetDriveRamp_LXM32...................................................................... 147
SetDriveRamp_SD328A.................................................................... 149
SetDriveRamp_ILX ........................................................................... 150
SetLimitSwitch_LXM32 ..................................................................... 152
SetLimitSwitch_SD328A ................................................................... 154
SetLimitSwitch_ILX ........................................................................... 156
SetFrequencyRange_ATV ................................................................. 158
ResetParameters_ATV...................................................................... 160
ResetParameters_LXM32 ................................................................. 161
ResetParameters_SD328A ............................................................... 162
ResetParameters_ILX....................................................................... 164
StoreParameters_ATV ...................................................................... 166
StoreParameters_LXM32 .................................................................. 167
StoreParameters_SD328A ................................................................ 168
StoreParameters_ILX........................................................................ 170
Inputs and Outputs ................................................................................. 172
ReadAnalogInput_ATV...................................................................... 172
MC_ReadDigitalInput ........................................................................ 174
MC_ReadDigitalOutput ..................................................................... 177
MC_WriteDigitalOutput...................................................................... 180
4 EIO0000003592.04
Error Handling ........................................................................................ 183
ReadAxisWarning_LXM32................................................................. 183
ReadAxisWarning_ILX ...................................................................... 184
MC_ReadAxisError ........................................................................... 186
MC_Reset ........................................................................................ 187
Glossary ................................................................................................... 191
Index ......................................................................................................... 192

EIO0000003592.04 5
Safety Information

Safety Information
Important Information
Read these instructions carefully, and look at the equipment to become familiar
with the device before trying to install, operate, service, or maintain it. The
following special messages may appear throughout this documentation or on the
equipment to warn of potential hazards or to call attention to information that
clarifies or simplifies a procedure.

The addition of this symbol to a “Danger” or “Warning” safety label indicates that an
electrical hazard exists which will result in personal injury if the instructions are not
followed.

This is the safety alert symbol. It is used to alert you to potential personal injury
hazards. Obey all safety messages that follow this symbol to avoid possible injury or
death.

! DANGER
DANGER indicates a hazardous situation which, if not avoided, will result in death or serious
injury.

! WARNING
WARNING indicates a hazardous situation which, if not avoided, could result in death or
serious injury.

! CAUTION
CAUTION indicates a hazardous situation which, if not avoided, could result in minor or
moderate injury.

NOTICE
NOTICE is used to address practices not related to physical injury.

Please Note
Electrical equipment should be installed, operated, serviced, and maintained only
by qualified personnel. No responsibility is assumed by Schneider Electric for any
consequences arising out of the use of this material.
A qualified person is one who has skills and knowledge related to the construction
and operation of electrical equipment and its installation, and has received safety
training to recognize and avoid the hazards involved.

Before You Begin


Do not use this product on machinery lacking effective point-of-operation
guarding. Lack of effective point-of-operation guarding on a machine can result in
serious injury to the operator of that machine.

EIO0000003592.04 7
Safety Information

WARNING
UNGUARDED EQUIPMENT
• Do not use this software and related automation equipment on equipment
which does not have point-of-operation protection.
• Do not reach into machinery during operation.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.

This automation equipment and related software is used to control a variety of


industrial processes. The type or model of automation equipment suitable for each
application will vary depending on factors such as the control function required,
degree of protection required, production methods, unusual conditions,
government regulations, etc. In some applications, more than one processor may
be required, as when backup redundancy is needed.
Only you, the user, machine builder or system integrator can be aware of all the
conditions and factors present during setup, operation, and maintenance of the
machine and, therefore, can determine the automation equipment and the related
safeties and interlocks which can be properly used. When selecting automation
and control equipment and related software for a particular application, you should
refer to the applicable local and national standards and regulations. The National
Safety Council's Accident Prevention Manual (nationally recognized in the United
States of America) also provides much useful information.
In some applications, such as packaging machinery, additional operator protection
such as point-of-operation guarding must be provided. This is necessary if the
operator's hands and other parts of the body are free to enter the pinch points or
other hazardous areas and serious injury can occur. Software products alone
cannot protect an operator from injury. For this reason the software cannot be
substituted for or take the place of point-of-operation protection.
Ensure that appropriate safeties and mechanical/electrical interlocks related to
point-of-operation protection have been installed and are operational before
placing the equipment into service. All interlocks and safeties related to point-of-
operation protection must be coordinated with the related automation equipment
and software programming.
NOTE: Coordination of safeties and mechanical/electrical interlocks for point-
of-operation protection is outside the scope of the Function Block Library,
System User Guide, or other implementation referenced in this
documentation.

Start-up and Test


Before using electrical control and automation equipment for regular operation
after installation, the system should be given a start-up test by qualified personnel
to verify correct operation of the equipment. It is important that arrangements for
such a check are made and that enough time is allowed to perform complete and
satisfactory testing.

WARNING
EQUIPMENT OPERATION HAZARD
• Verify that all installation and set up procedures have been completed.
• Before operational tests are performed, remove all blocks or other temporary
holding means used for shipment from all component devices.
• Remove tools, meters, and debris from equipment.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.

8 EIO0000003592.04
Safety Information

Follow all start-up tests recommended in the equipment documentation. Store all
equipment documentation for future references.
Software testing must be done in both simulated and real environments.
Verify that the completed system is free from all short circuits and temporary
grounds that are not installed according to local regulations (according to the
National Electrical Code in the U.S.A, for instance). If high-potential voltage
testing is necessary, follow recommendations in equipment documentation to
prevent accidental equipment damage.
Before energizing equipment:
• Remove tools, meters, and debris from equipment.
• Close the equipment enclosure door.
• Remove all temporary grounds from incoming power lines.
• Perform all start-up tests recommended by the manufacturer.

Operation and Adjustments


The following precautions are from the NEMA Standards Publication ICS 7.1-
1995:
(In case of divergence or contradiction between any translation and the English
original, the original text in the English language will prevail.)
• Regardless of the care exercised in the design and manufacture of equipment
or in the selection and ratings of components, there are hazards that can be
encountered if such equipment is improperly operated.
• It is sometimes possible to misadjust the equipment and thus produce
unsatisfactory or unsafe operation. Always use the manufacturer’s
instructions as a guide for functional adjustments. Personnel who have
access to these adjustments should be familiar with the equipment
manufacturer’s instructions and the machinery used with the electrical
equipment.
• Only those operational adjustments required by the operator should be
accessible to the operator. Access to other controls should be restricted to
prevent unauthorized changes in operating characteristics.

EIO0000003592.04 9
About the Book

About the Book


Document Scope
The function blocks of the three libraries described here are used under the
EcoStruxure Machine Expert software environment to control:
• ATV320, ATV340, ATV6••, ATV9•• and LXM32M drives and Lexium ILA, ILE
and ILS integrated drives over CANopen, EtherNet/IP and Modbus TCP
• LXM32A drives, LXM32ICAN integrated drives, and SD328A drives over
CANopen
The function blocks are compliant with the IEC 61131-3 standard.

Validity Note
This document has been updated for the release of EcoStruxure™ Machine Expert
V2.2.
The characteristics that are described in the present document, as well as those
described in the documents included in the Related Documents section below,
can be found online. To access the information online, go to the Schneider Electric
home page www.se.com/ww/en/download/.
The characteristics that are described in the present document should be the
same as those characteristics that appear online. In line with our policy of constant
improvement, we may revise content over time to improve clarity and accuracy. If
you see a difference between the document and online information, use the online
information as your reference.

Related Documents
Title of documentation Reference number
EcoStruxure Machine Expert - Programming Guide EIO0000002854 (eng)

EIO0000002855 (fre)

EIO0000002856 (ger)

EIO0000002858 (spa)

EIO0000002857 (ita)

EIO0000002859 (chi)

EcoStruxure Machine Expert - Functions and Libraries User Guide EIO0000002829 (eng)

EIO0000002830 (fre)

EIO0000002831 (ger)

EIO0000002833 (spa)

EIO0000002832 (ita)

EIO0000002834 (chi)

EcoStruxure Machine Expert - Industrial Ethernet - User Guide EIO0000003053 (eng)

EIO0000003054 (fre)

EIO0000003055 (ger)

EIO0000003057 (spa)

EIO0000003056 (ita)

EIO0000003058 (chi)

10 EIO0000003592.04
About the Book

Title of documentation Reference number


EcoStruxure Machine Expert - Device Type Manager (DTM) - User EIO0000003047 (eng)
Guide
EIO0000003048 (fre)

EIO0000003049 (ger)

EIO0000003051 (spa)

EIO0000003050 (ita)

EIO0000003052 (chi)

Altivar Machine ATV320 Variable Speed Drives for Asynchronous and NVE41295 (eng)
Synchronous Motors - Programming Manual
NVE41296 (fre)

NVE41297 (ger)

NVE41298 (spa)

NVE41299 (ita)

NVE41300 (chi)

ATV320 - Communication Parameters NVE41316 (eng)

Altivar Machine 320 Variable Speed Drives for Asynchronous and NVE41309 (eng)
Synchronous Motors - CANopen Manual - VW3A3608, 618, 628

Altivar Machine ATV320 Variable Speed Drives For Asynchronous NVE41313 (eng)
and Synchronous Motors - Modbus TCP - EtherNet/IP Manual -
VW3A3616
Altivar Machine ATV340 Variable Speed Drives for Asynchronous and NVE61643 (eng)
Synchronous Motors - Programming Manual
NVE61644 (fre)

NVE61645 (ger)

NVE61647 (spa)

NVE61648 (ita)

NVE61649 (chi)

ATV340 - Communication Parameters NVE61728 (eng)

Altivar Machine ATV340 Variable Speed Drives for Asynchronous and NVE61655 (eng)
Synchronous Motors - CANopen Manual - VW3A3608, 618, 628

Altivar Machine ATV340 Variable Speed Drives for Asynchronous and NVE61653 (eng)
Synchronous Motors - Ethernet Embedded Manual

Altivar Process - Variable Speed Drives ATV630, ATV650, ATV660, EAV64318 (eng)
ATV680 - Programming Manual
EAV64320 (fre)

EAV64321 (ger)

EAV64322 (spa)

EAV64323 (ita)

EAV64324 (chi)

EAV64318RU (rus)

ATV600 - Communication parameters EAV64332 (eng)

Altivar Process ATV600 Variable Speed Drive for Asynchronous and EVA64333 (eng)
Synchronous Motors - CANopen Manual - VW3A3608, 618, 628

Altivar Process ATV600 - Variable Speed Drives for Asynchronous EAV64327 (eng)
and Synchronous Motors - Embedded Ethernet Manual

Altivar Process ATV600 - Variable Speed Drives for Asynchronous EAV64328 (eng)
and Synchronous Motors - EthernetIP Modbus TCP Manual:
VW3A3720, VW3A3721

EIO0000003592.04 11
About the Book

Title of documentation Reference number


Altivar Process - Variable Speed Drives ATV930, ATV950, ATV960, NHA80757 (eng)
ATV980, ATV993 - Programming Manual
NHA80758 (fre)

NHA80759 (ger)

NHA80760 (spa)

NHA80761 (ita)

NHA80762 (chi)

Altivar Process 900 - CANopen Manual - VW3A3608, 618, 628 NHA80945 (eng)

Altivar Process 900 - Ethernet manual - Embedded NHA80940 (eng)

Lexium 32A - Servo drive - User Guide 0198441113755 (eng)

0198441113756 (fre)

0198441113754 (ger)

0198441113758 (spa)

0198441113757 (ita)

0198441113759 (chi)

LXM32A CANopen interface - Fieldbus manual 0198441113779 (eng)

0198441113780 (fre)

0198441113778 (ger)

Lexium 32i CAN and BMi - Integrated Servo Drive System - User 0198441113950 (eng)
Guide
0198441113951 (fre)

0198441113949 (ger)

0198441113953 (spa)

0198441113952 (ita)

0198441113954 (chi)

Lexium 32M - Servo Drive - User Guide 0198441113767 (eng)

0198441113768 (fre)

0198441113766 (ger)

0198441113770 (spa)

0198441113769 (ita)

0198441113771 (chi)

LXM32M - CANopen Module - Fieldbus manual 0198441113790 (eng)

0198441113791 (fre)

0198441113789 (ger)

LXM32M - EtherNet/IP Module - Fieldbus manual 0198441113802 (eng)

0198441113803 (fre)

0198441113801 (ger)

LXM32M - Modbus TCP Module - Fieldbus manual 0198441113843 (eng)

0198441113844 (fre)

0198441113842 (ger)

SD328A Product manual 0198441113700 (eng)

0198441113699 (ger)

SD328A CANopen Fieldbus manual 0198441113718 (eng)

0198441113717 (ger)

12 EIO0000003592.04
About the Book

Title of documentation Reference number


ILA1B, ILA1F, ILA1R - Lexium Integrated Drive - Product manual 0198441113562 (eng)

0198441113561 (ger)

ILE1B, ILE1F, ILE1R - Lexium Integrated Drive - Product manual 0198441113568 (eng)

0198441113567 (ger)

ILS1B, ILS1F, ILS1R - Lexium Integrated Drive - Product manual 0198441113574 (eng)

0198441113573 (ger)

IL•1F CANopen DS301 - Fieldbus interface - Fieldbus manual 0198441113586 (eng)

0198441113585 (ger)

ILA2K EtherNet/IP Lexium Integrated Drive - Product manual 0198441113670 (eng)

0198441113669 (ger)

ILE2K EtherNet/IP Lexium Integrated Drive - Product manual 0198441113676 (eng)

0198441113675 (ger)

ILS2K EtherNet/IP Lexium Integrated Drive - Product manual 0198441113682 (eng)

0198441113681 (ger)

ILA2T Modbus TCP Lexium Integrated Drive - Product manual 0198441113652 (eng)

0198441113651 (ger)

ILE2T Modbus TCP Lexium Integrated Drive - Product manual 0198441113658 (eng)

0198441113657 (ger)

ILS2T Modbus TCP Lexium Integrated Drive - Product manual 0198441113664 (eng)

0198441113663 (ger)

EIO0000003592.04 13
About the Book

Product Related Information

WARNING
LOSS OF CONTROL
• Perform a Failure Mode and Effects Analysis (FMEA), or equivalent risk
analysis, of your application, and apply preventive and detective controls
before implementation.
• Provide a fallback state for undesired control events or sequences.
• Provide separate or redundant control paths wherever required.
• Supply appropriate parameters, particularly for limits.
• Review the implications of transmission delays and take actions to mitigate
them.
• Review the implications of communication link interruptions and take actions
to mitigate them.
• Provide independent paths for control functions (for example, emergency
stop, over-limit conditions, and error conditions) according to your risk
assessment, and applicable codes and regulations.
• Apply local accident prevention and safety regulations and guidelines.1
• Test each implementation of a system for proper operation before placing it
into service.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.

1For additional information, refer to NEMA ICS 1.1 (latest edition), Safety
Guidelines for the Application, Installation, and Maintenance of Solid State Control
and to NEMA ICS 7.1 (latest edition), Safety Standards for Construction and
Guide for Selection, Installation and Operation of Adjustable-Speed Drive
Systems or their equivalent governing your particular location.

WARNING
UNINTENDED EQUIPMENT OPERATION
• Only use software approved by Schneider Electric for use with this
equipment.
• Update your application program every time you change the physical
hardware configuration.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.

Terminology Derived from Standards


The technical terms, terminology, symbols and the corresponding descriptions in
this manual, or that appear in or on the products themselves, are generally
derived from the terms or definitions of international standards.
In the area of functional safety systems, drives and general automation, this may
include, but is not limited to, terms such as safety, safety function, safe state, fault,
fault reset, malfunction, failure, error, error message, dangerous, etc.

14 EIO0000003592.04
About the Book

Among others, these standards include:

Standard Description

IEC 61131-2:2007 Programmable controllers, part 2: Equipment requirements and tests.

ISO 13849-1:2023 Safety of machinery: Safety related parts of control systems.

General principles for design.

EN 61496-1:2013 Safety of machinery: Electro-sensitive protective equipment.

Part 1: General requirements and tests.

ISO 12100:2010 Safety of machinery - General principles for design - Risk assessment
and risk reduction
EN 60204-1:2006 Safety of machinery - Electrical equipment of machines - Part 1: General
requirements

ISO 14119:2013 Safety of machinery - Interlocking devices associated with guards -


Principles for design and selection

ISO 13850:2015 Safety of machinery - Emergency stop - Principles for design

IEC 62061:2021 Safety of machinery - Functional safety of safety-related electrical,


electronic, and electronic programmable control systems

IEC 61508-1:2010 Functional safety of electrical/electronic/programmable electronic safety-


related systems: General requirements.

IEC 61508-2:2010 Functional safety of electrical/electronic/programmable electronic safety-


related systems: Requirements for electrical/electronic/programmable
electronic safety-related systems.

IEC 61508-3:2010 Functional safety of electrical/electronic/programmable electronic safety-


related systems: Software requirements.

IEC 61784-3:2021 Industrial communication networks - Profiles - Part 3: Functional safety


fieldbuses - General rules and profile definitions.

2006/42/EC Machinery Directive

2014/30/EU Electromagnetic Compatibility Directive

2014/35/EU Low Voltage Directive

In addition, terms used in the present document may tangentially be used as they
are derived from other standards such as:

Standard Description

IEC 60034 series Rotating electrical machines

IEC 61800 series Adjustable speed electrical power drive systems

IEC 61158 series Digital data communications for measurement and control – Fieldbus for
use in industrial control systems

Finally, the term zone of operation may be used in conjunction with the description
of specific hazards, and is defined as it is for a hazard zone or danger zone in the
Machinery Directive (2006/42/EC) and ISO 12100:2010.
NOTE: The aforementioned standards may or may not apply to the specific
products cited in the present documentation. For more information concerning
the individual standards applicable to the products described herein, see the
characteristics tables for those product references.

EIO0000003592.04 15
General Description of Motion Control Libraries

General Description of Motion Control Libraries


General Description
Libraries and Related Function Blocks
Library Overview
Libraries:
• The GMC Independent PLCopen MC library
Library name: GMC Independent PLCopen MC, page 17
Namespace: GIPLC
• The GMC Independent Altivar library
Library name: GMC Independent Altivar, page 18
Namespace: GIATV
• The GMC Independent Lexium library
Library name: GMC Independent Lexium, page 18
Namespace: GILXM
Naming conventions:
• Function blocks with the prefix MC_ (Motion Control) are compliant with the
PLCopen specification V2.00. They conform to a global standard for
programming motion control applications.
• Function blocks without a prefix MC_ are vendor-specific (Schneider Electric);
however, they comply with the general PLCopen rules.

Supported Drives and Fieldbuses


Drive CANopen EtherNet/IP Modbus TCP

ATV320, ATV340, ATV6••, ATV9••, LXM32M, ✓ ✓ ✓


Lexium ILA, ILE and ILS

LXM32A, LXM32ICAN, SD328A ✓ - -

✓ Supported

- Not supported

16 EIO0000003592.04
General Description of Motion Control Libraries

Function Blocks of GMC Independent PLCopen MC (GIPLC)


The GMC Independent PLCopen MC library contains these function blocks that
can be used with Altivar, Lexium 32, Lexium SD328A and Lexium ILA, ILE and ILS
integrated drives:

Category Function block Description

Single axis MC_Power, page 40 Initialization

MC_Jog, page 43 Operating mode: Jog

MC_TorqueControl, page 53 Operating mode: Profile Torque

MC_MoveVelocity, page 59 Operating mode: Profile Velocity

MC_MoveAbsolute, page 77 Operating mode: Profile Position

MC_MoveAdditive, page 79

MC_MoveRelative, page 81

MC_Home, page 84 Operating mode: Homing

MC_SetPosition, page 95

MC_Stop, page 97 Stopping

MC_Halt, page 104

MC_TouchProbe, page 108 Position capture via signal input

MC_AbortTrigger, page 116

Administrative MC_ReadActualTorque, page 129 Reading a parameter

MC_ReadActualVelocity, page 130

MC_ReadActualPosition, page 132

MC_ReadAxisInfo, page 133

MC_ReadMotionState, page 135

MC_ReadStatus, page 137

MC_ReadParameter, page 140

MC_WriteParameter, page 143 Writing a parameter

MC_ReadDigitalInput, page 174 Inputs and outputs

MC_ReadDigitalOutput, page 177

MC_WriteDigitalOutput, page 180

MC_ReadAxisError, page 186 Error handling

MC_Reset, page 187

NOTE: Whether or not a function block is supported depends on the


corresponding drive. The drive responds with the diagnostic code 139 if a
function block is not supported by that drive.

EIO0000003592.04 17
General Description of Motion Control Libraries

Function Blocks of GMC Independent Altivar (GIATV)


The GMC Independent Altivar library contains these function blocks that can be
used with Altivar drives:

Category Function block Description

Single axis VelocityControlAnalogInput_ATV, page 66 Operating mode: Profile Velocity

VelocityControlSelectAI_ATV, page 68

Control_ATV, page 70

Administrative SetDriveRamp_ATV, page 145 Writing a parameter

SetFrequencyRange_ATV, page 158

ResetParameters_ATV, page 160

StoreParameters_ATV, page 166

ReadAnalogInput_ATV, page 172 Inputs and outputs

Function Blocks of GMC Independent Lexium (GILXM)


The GMC Independent Lexium library contains function blocks that can be used
with Lexium drives.
These function blocks can be used with Lexium 32 drives:

Category Function block Description

Single axis Jog_LXM32, page 45 Operating mode: Jog

SetTorqueRamp_LXM32, page 54 Operating mode: Profile Torque

TorqueControl_LXM32, page 56

MoveVelocity_LXM32, page 61 Operating mode: Profile Velocity

Home_LXM32, page 86 Operating mode: Homing

SetStopRamp_LXM32, page 99 Stopping

Stop_LXM32, page 102

Halt_LXM32, page 106

TouchProbe_LXM32, page 110 Position capture via signal input

Multi axis GearlnPos_LXM32, page 119 Operating mode: Electronic Gear

Gearln_LXM32, page 126

Administrative SetDriveRamp_LXM32, page 147 Writing a parameter

SetLimitSwitch_LXM32, page 152

ResetParameters_LXM32, page 161

StoreParameters_LXM32, page 167

ReadAxisWarning_LXM32, page 183 Error handling

18 EIO0000003592.04
General Description of Motion Control Libraries

These function blocks can be used with Lexium SD328A drives:

Category Function block Description

Single axis Jog_SD328A, page 48 Operating mode: Jog

MoveVelocity_SD328A, page 64 Operating mode: Profile Velocity

Home_SD328A, page 89 Operating mode: Homing

TouchProbe_SD328A, page 112 Position capture via signal input

Multi axis GearlnPos_SD328A, page 121 Operating mode: Electronic Gear

Administrative SetDriveRamp_SD328A, page 149 Writing a parameter

SetLimitSwitch_SD328A, page 154

ResetParameters_SD328A, page 162

StoreParameters_SD328A, page 168

These function blocks can be used with Lexium ILA, ILE and ILS integrated drives:

Category Function block Description

Single axis Jog_ILX, page 50 Operating mode: Jog

Home_ILX, page 91 Operating mode: Homing

SetStopRamp_ILX, page 101 Stopping

TouchProbe_ILX, page 114 Position capture via signal input

SpeedControl_ILX, page 75 Operating mode: Speed Control

Multi axis GearlnPos_ILX, page 123 Operating mode: Electronic Gear

Administrative SetDriveRamp_ILX, page 150 Writing a parameter

SetLimitSwitch_ILX, page 156

ResetParameters_ILX, page 164

StoreParameters_ILX, page 170

ReadAxisWarning_ILX, page 184 Error handling

EIO0000003592.04 19
General Description of Motion Control Libraries

PLCopen State Diagram


The state diagram represents the axis in terms of PLCopen. At any given point in
time, the axis is in exactly one state. If a function block is executed or an error is
detected, this may cause a state transition. The function block MC_ReadStatus
delivers the current status of the axis.
MC_GearIn (Slave)
MC_GearInPos (Slave)
MC_CamIn (Slave)
MC_CombineAxes (Slave)
MC_MoveAbsolute MC_MoveVelocity
MC_MoveRelative Synchronized MC_VelocityProfile
MC_MoveAdditive Motion MC_AccelerationProfile
MC_PositionProfile MC_TorqueControl
MC_Halt MC_MoveContinousAbsolute
(MC_MoveSuperImposed) MC_MoveContinousRelative

Discrete Motion Continuous


Motion

MC_Stop

Done
Stopping
Note 1
Errorstop
Note 6

Note 4 Note 3
MC_Home
Done
Note 5 Note 2
Homing StandStill Disabled

Note 1 An error has been detected. (Transition from any state).


Note 2 The input Enable of the function block MC_Power is set to FALSE and no
error has been detected (transition from any state).
Note 3 MC_Reset and MC_Power.Status = FALSE.
Note 4 MC_Reset and MC_Power.Status = TRUE and MC_Power.Enable =
TRUE.
Note 5 MC_Power.Enable = TRUE and MC_Power.Status = TRUE.
Note 6 MC_Stop.Done = TRUE and MC_Stop.Execute = FALSE.

20 EIO0000003592.04
General Description of Motion Control Libraries

Transitions Between Function Blocks


This table presents how the execution of a function block (function block 1) can be
terminated by another function block (function block 2).

Function block 2

Function block 1 MC_Jog MC_Home MC_MoveAbsolute MC_MoveAdditive MC_MoveRelative

MC_Jog Immediately Not permitted Immediately Immediately Immediately

MC_Home Not permitted Not permitted Not permitted Not permitted Not permitted

MC_MoveAbsolute Motor standstill Not permitted Immediately Immediately Immediately

MC_MoveAdditive Motor standstill Not permitted Immediately Immediately Immediately

MC_MoveRelative Motor standstill Not permitted Immediately Immediately Immediately

MC_MoveVelocity Motor standstill Not permitted Immediately Immediately Immediately

MC_TorqueControl Motor standstill Not permitted Immediately Immediately Immediately

MC_Stop Not permitted Not permitted Not permitted Not permitted Not permitted

MC_Halt Motor standstill Not permitted Not permitted Not permitted Not permitted

Function block 2

Function block 1 MC_MoveVelocity MC_TorqueControl MC_Stop MC_Halt

MC_Jog Immediately Immediately Immediately Immediately

MC_Home Not permitted Not permitted Immediately Not permitted

MC_MoveAbsolute Immediately Immediately Immediately Immediately

MC_MoveAdditive Immediately Immediately Immediately Immediately

MC_MoveRelative Immediately Immediately Immediately Immediately

MC_MoveVelocity Immediately Immediately Immediately Immediately

MC_TorqueControl Immediately Immediately Immediately Immediately

MC_Stop Not permitted Not permitted Immediately Not permitted

MC_Halt Not permitted Not permitted Immediately Immediately

Immediately
The execution of function block 2 is started on the fly, that is, without delay. The
execution of function block 1 is aborted.

Function block 1 (MC_MoveAbsolute) starts at • Position = 100


position 0 • Velocity = 1000

Function block 2 (MC_MoveVelocity) starts at Velocity = 2000


position 60

EIO0000003592.04 21
General Description of Motion Control Libraries

Motor Standstill
The execution of function block 2 first decelerates the motor to a standstill with the
adjusted deceleration ramp. The execution of function block 1 is aborted
thereafter. The movement as per function block 2 starts as soon as the motor has
come to a standstill.

Function block 1 (MC_MoveVelocity) starts at Velocity = 1000


position 0

Function block 2 (MC_MoveAbsolute) starts at • Position = 400


position 100 • Velocity = 2000

Not Permitted
Function block 1 cannot be aborted by the new function block. Function block 2 is
not executed.

I/O Mapping Used by the Library


The function blocks of this library read from/write to the direct addresses
configured in the I/O Mapping of your device.

WARNING
UNINTENDED EQUIPMENT OPERATION
Do not map other user variables to the addresses in the I/O Mapping tab of your
device.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.

22 EIO0000003592.04
General Description of Motion Control Libraries

I/O Mapping Used for CANopen


For Altivar drives, the library is using the following mapping:

PDO Parameter Mapped parameter Address

RPDO2 Parameter 1 CMD (control word) 6040:0 hex

Parameter 2 LFRD (speed setpoint) [rpm] 6042:0 hex

Parameter 3 Reserved -

Parameter 4 Reserved -

TPDO1 Parameter 1 OL1R (logic output map) 2016:D hex

Parameter 2 LCR (motor current) [0.1 A] 2002:5 hex

Parameter 3 Reserved -

Parameter 4 Reserved -

TPDO2 Parameter 1 ETA (status word) 6041:0 hex

Parameter 2 ETI (extended status word) 2002:7 hex

Parameter 3 RFRD (output velocity) [rpm] 6044:0 hex

Parameter 4 IL1R (logic input map) 2016:3 hex

For LXM32A, LXM32ICAN and LXM32M drives, the library is using the following
mapping:

PDO Parameter Mapped parameter Address

RPDO1 Parameter 1 driveModeCtrl 301B:1F hex


Parameter 2 RefA16 301B:22 hex
Parameter 3 RefB32 301B:21 hex
TPDO1 Parameter 1 driveStat 301B:25 hex
Parameter 2 mfStat 301B:26 hex
Parameter 3 motionStat 301B:27 hex
Parameter 4 driveInput 301B:28 hex

TPDO2 Parameter 1 actualPosition 301E:0D hex


Parameter 2 actualVelocity 301E:20 hex

For SD328A drives, the library is using the following mapping:

PDO Parameter Mapped parameter Address

RPDO1 Parameter 1 PLCopenRx1 301B:05 hex

Parameter 2 PLCopenRx2 301B:06 hex

TPDO1 Parameter 1 PLCopenTx1 301B:07 hex

Parameter 2 PLCopenTx2 301B:08 hex

For Lexium ILA, ILE and ILS integrated drives, the library is using the default
RPDO4 and the default TPDO4 (see documentation of the drive, page 10).

EIO0000003592.04 23
General Description of Motion Control Libraries

I/O Mapping Used for EtherNet/IP


For Altivar drives, the library is using the assembly 100/101 with the following
mapping:

Assembly Parameter Mapped parameter Address

100 Parameter 1 CMD (control word) 8B/01/66 hex

Parameter 2 LFRD (speed setpoint) [rpm] 8C/01/03 hex

Parameter 3 Reserved -

Parameter x Reserved -

101 Parameter 1 ETA (status word) 71/01/02 hex

Parameter 2 RFRD (output velocity) [rpm] 8C/01/05 hex

Parameter 3 LCR (motor current) 71/01/05 hex

Parameter x Reserved -

NOTE: For ATV340 the I/O mapping of the drive has to be adjusted with the DTM
commissioning software. See EcoStruxure Machine Expert - Device Type Manager (DTM) -
User Guide for additional information on the DTM.

For LXM32M and Lexium ILA, ILE, ILS drives, the library is using the default
assembly (see documentation of the drive, page 10).

I/O Mapping Used for Modbus TCP


The library is using the default connection (see documentation of the drive, page
10).

Library-Specific Data Types


Vendor-Specific Data Type Axis_Ref
The function block User_FB has to provide an axis reference for the function block
MC_Power (Axis) and this axis reference has to be the type Axis_Ref_Base.
When calling an instance of the function block User_FB, the Axis_Ref (Altivar_
340) is passed to the instance of the function block MC_Power.
The Axis_Ref provides the timeout properties to modify timeout values.
These properties are accessible using the name of the Axis_Ref followed by a “.”:

Property name Default timeout values (ms) Description

ATV ILX LXM


timConnectionTimeOut(1) 10000 10000 10000 Timeout while waiting for the connection to the drive to be
established
timDiagQuitTimeOut 2000 500 500 Timeout while waiting for the status to be able to execute a “Fault
Reset” command
timParameterTimeOut 100 100 100 Timeout while waiting for a response after the execution of a read
or write command
timPowerTimeOut 3000 1000 3000 Timeout while waiting for power stage status enabled/disabled
after an enable/disable command
timQuickStopTimeOut 100 1000 1000 Timeout while waiting for drive status Quick-Stop after the
execution of a Quick-Stop command

timResetFaultTimeOut 2000 500 500 Timeout while waiting for error free status of the drive after the
execution of a “Fault Reset” command
(1) Only available for EtherNet/IP devices.

24 EIO0000003592.04
General Description of Motion Control Libraries

For compatibility reasons to the obsolete CANopen libraries, the axis reference
function blocks for CANopen have two additional properties uiNetworkNo and
uiNodeId. These properties are providing the network number and the node
number of the referenced CANopen device and can be used in the application.

Vendor-Specific Data Type Axis_Ref_Base


The data type Axis_Ref_Base is a vendor-specific data type and represents a
common independent axis. This data type has to be used to pass the Axis_Ref to
user-specific function blocks.
Example:

EIO0000003592.04 25
General Description of Motion Control Libraries

Vendor-Specific Data Type ET_DeviceType


Data type: USINT

Name Value Description

Altivar320_EthernetIP 2 Altivar drive ATV320 with EtherNet/IP

Altivar340_EthernetIP 3 Altivar drive ATV340 with EtherNet/IP

Altivar6xx_EthernetIP 4 Altivar drive ATV6•• with EtherNet/IP

Altivar9xx_EthernetIP 5 Altivar drive ATV9•• with EtherNet/IP

Lexiun32M_EthernetIP 6 Lexium drive LXM32M with EtherNet/IP

ILA_EthernetIP 7 Integrated Lexium drive ILA2K with EtherNet/IP

ILE_EthernetIP 8 Integrated Lexium drive ILE2K with EtherNet/IP

ILS_EthernetIP 9 Integrated Lexium drive ILS2K with EtherNet/IP

Altivar320_ModbusTCP 22 Altivar drive ATV320 with Modbus TCP

Altivar340_ModbusTCP 23 Altivar drive ATV340 with Modbus TCP

Altivar6xx_ModbusTCP 24 Altivar drive ATV6•• with Modbus TCP

Altivar9xx_ModbusTCP 25 Altivar drive ATV9•• with Modbus TCP

Lexiun32M_ModbusTCP 26 Lexium drive LXM32M with Modbus TCP

ILA_ModbusTCP 27 Integrated Lexium drive ILA2T with Modbus TCP

ILE_ModbusTCP 28 Integrated Lexium drive ILE2T with Modbus TCP

ILS_ModbusTCP 29 Integrated Lexium drive ILS2T with Modbus TCP

Altivar320_CANopen 40 Altivar drive ATV320 with CANopen

Altivar340_CANopen 41 Altivar drive ATV340 with CANopen

Altivar6xx_CANopen 42 Altivar drive ATV6•• with CANopen

Altivar9xx_CANopen 43 Altivar drive ATV9•• with CANopen

Lexium32M_CANopen 44 Lexium drive LXM32M with CANopen

Lexium32A_CANopen 45 Lexium drive LXM32A with CANopen

Lexium32i_CANopen 46 Lexium drive LXM32ICAN with CANopen

ILA_CANopen 47 Integrated Lexium drive ILA1F with CANopen

ILE_CANopen 48 Integrated Lexium drive ILE1F with CANopen

ILS_CANopen 49 Integrated Lexium drive ILS1F with CANopen

SD328A_CANopen 50 Lexium stepper drive SD328A with CANopen

26 EIO0000003592.04
General Description of Motion Control Libraries

Vendor-Specific Data Type ET_LexiumHomingMode


Data type: UINT
Specifies the homing method for LXM32A (CANopen), LXM32ICAN (CANopen),
LXM32M (CANopen, EtherNet/IP and Modbus TCP), SD328A (CANopen), and
Lexium ILA, ILE and ILS integrated drives (EtherNet/IP and Modbus TCP):

Name Value Description

LIMN_Indexpuls 1 LIMN with index pulse

LIMP_Indexpuls 2 LIMP with index pulse

REF_pos_Indexpuls_inv_ 7 REF+ with index pulse, inverted, outside


outside
REF_pos_Indexpuls_inv_ 8 REF+ with index pulse, inverted, inside
inside
REF_pos_Indexpuls_ninv_ 9 REF+ with index pulse, not inverted, inside
inside
REF_pos_Indexpuls_ninv_ 10 REF+ with index pulse, not inverted, outside
outside
REF_neg_Indexpuls_inv_ 11 REF- with index pulse, inverted, outside
outside
REF_neg_Indexpuls_inv_ 12 REF- with index pulse, inverted, inside
inside
REF_neg_Indexpuls_ninv_ 13 REF- with index pulse, not inverted, inside
inside
REF_neg_Indexpuls_ninv_ 14 REF- with index pulse, not inverted, outside
outside
LIMN 17 LIMN
LIMP 18 LIMP
REF_pos_inv_outside 23 REF+, inverted, outside

REF_pos_inv_inside 24 REF+, inverted, inside

REF_pos_ninv_inside 25 REF+, not inverted, inside

REF_pos_ninv_outside 26 REF+, not inverted, outside

REF_neg_inv_outside 27 REF-, inverted, outside

REF_neg_inv_inside 28 REF-, inverted, inside

REF_neg_ninv_inside 29 REF-, not inverted, inside

REF_neg_ninv_outside 30 REF-, not inverted, outside

Indexpuls_neg 33 Index pulse in negative direction

Indexpuls_pos 34 Index pulse in positive direction

Setposition 35 Position setting

EIO0000003592.04 27
General Description of Motion Control Libraries

Vendor-Specific Data Type ET_LexiumHomingMode_ILX1


Data type: UINT
Specifies the homing method for Lexium ILA, ILE and ILS integrated drives for
CANopen:

Name Value Description

LIMP 1 LIMN
LIMN 2 LIMP
REFZ_neg 3 REF in negative direction

REFZ_pos 4 REF in positive direction

Indexpuls_neg 5 Index pulse in negative direction (only ILA1F and ILS1F)

Indexpuls_pos 6 Index pulse in positive direction (only ILA1F and ILS1F)

Block_neg 7 Movement to block in negative direction (only ILE1F)

Block_pos 8 Movement to block in positive direction (only ILE1F)

REF_pos_inv_outside 23 REF+, inverted, outside

REF_pos_inv_inside 24 REF+, inverted, inside

REF_pos_ninv_inside 25 REF+, not inverted, inside

REF_pos_ninv_outside 26 REF+, not inverted, outside

REF_neg_inv_outside 27 REF-, inverted, outside

REF_neg_inv_inside 28 REF-, inverted, inside

REF_neg_ninv_inside 29 REF-, not inverted, inside

REF_neg_ninv_outside 30 REF-, not inverted, outside

Setposition 35 Position setting

Vendor-Specific Data Type ET_SetpointSource_LXM32


The enumeration describes the source of the target value.
Data type: USINT
Values for function block TorqueControl_LXM32:

Name Value Description

Value 0 Target torque via input Torque

AnalogInput 1 Target torque via analog input (I/O module)

PTIInput 2 Target torque via PTI interface

Values for function block MoveVelocity_LXM32:

Name Value Description

Value 0 Target velocity via input Velocity

AnalogInput 1 Target velocity via analog input (I/O module)

Vendor-Specific Data Type ET_SetpointSource_SD328A


The enumeration describes the source of the target value.
Data type: USINT

28 EIO0000003592.04
General Description of Motion Control Libraries

Values for function block MoveVelocity_SD328A:

Name Value Description

Value 0 Target velocity via input Velocity

AnalogInput 1 Target velocity via analog input

Vendor-Specific Data Type ET_TriggerEdge


The enumeration describes the edge to trigger position capture.
Data type: INT

Name Value Description

RisingEdge 1 Rising edge

FallingEdge 2 Falling edge

BothEdges 3 Both rising edge and falling edge(1)(2)

(1) For SD328A: Not available.

(2) For Lexium ILA, ILE and ILS integrated drives: Only with EtherNet/IP and Modbus TCP.

EIO0000003592.04 29
General Description of Motion Control Libraries

Library Diagnostic Codes


Library-Specific Diagnostic Codes
This table presents the diagnostic codes of the library:
NOTE: Refer to the drive documentation for an overview of the drive-specific
error codes (see documentation of the drive, page 10).

Value (hex) Description

0 No error detected.
1 Interface not implemented.

The function block is not supported by the device.

2 Axis blocked.

The axis is blocked by a different function block which cannot be interrupted.

3 Power disabled.

The power stage must be enabled before the function block can be executed.

4 No re-execution.

The function block cannot be repeated as long as the output Busy = TRUE.

A Length value out of range.

The value specified for the input Length is outside of the permissible value range. Range: 1 to 4.

B Parameter address invalid.

The specified parameter address is not supported by the device.

C Input number out of range.

The number specified for the signal input is outside of the permissible value range1.

D Output number out of range.

The number specified for the signal output is outside of the permissible value range1.

E An internal error has been detected. Contact your Schneider Electric service representative.

65 Done.

Execution of the command terminated successfully.

66 Working.

The command is still being executed.

67 Initialization unsuccessful.

Initialization of the library not successful.

68 Configuring.

The command was not executed, the device is not ready.

69 Indeterminable device state.

Internal error detected. Contact your Schneider Electric service representative.

6A ID out of range.

Internal error detected. Contact your Schneider Electric service representative.

6B Order not present.

Internal error detected. Contact your Schneider Electric service representative.

6C Communication error detected. The connection to the device has been interrupted.

6D Device state invalid.

The function block cannot be executed in the current operating state of the device.

6E Time-out.

The command was not executed within the time window.

30 EIO0000003592.04
General Description of Motion Control Libraries

Value (hex) Description

6F Value out of range.

The value is outside the permissible value range1.

70 Parameter error detected.

Error detected while reading or writing a parameter.

71 Indeterminable response.

Indeterminable response while reading or writing a parameter.

72 Command error detected.

Internal error detected. Contact your Schneider Electric service representative.

73 Buffer full.

Internal error detected. Contact your Schneider Electric service representative.

74 The command was aborted.


75 Parameter not supported by device.

76 Touch probe number invalid.

The specified value for the number of the Touchprobe input is invalid.

77 The specified edge of the Touchprobe input is invalid.

78 Touch probe limit error detected.

The specified value for the number of the Touchprobe inputs is not supported by the library. Up to three
Touchprobe inputs are supported.

79 Touch probe inactive.

An attempt has been made to cancel an inactive Touchprobe.

7A Touch probe active.

An attempt has been made to execute an active Touchprobe.

7B Attempt to reset an unrecoverable error.

The detected error cannot be reset with MC_Reset.

Restart the device after having remedied the cause of the detected error.

7C Acceleration out of range.

The value for the acceleration is outside of the permissible value range 1.

7D Deceleration out of range.

The value for the deceleration is outside of the permissible value range 1.

7E Position out of range.

The value for the target position is outside of the permissible value range 1.

7F Velocity out of range.

The value for the target velocity is outside of the permissible value range 1.

80 Torque out of range.

The value for the target torque is outside of the permissible value range 1.

81 Numerator out of range.

The value for the numerator is outside of the permissible value range 1.

82 Denominator out of range.

The value for the denominator is outside of the permissible value range 1.

83 External transition to NST.

The command is not executed due to an external blocking event.

84 Halt active.

The Halt function is active and the command is not executed.

EIO0000003592.04 31
General Description of Motion Control Libraries

Value (hex) Description

85 Function block Control_ATV, page 70 active.

The function block cannot be executed as long as the function block Control_ATV, page 70 is enabled.

86 Not ready for power-on.

The power stage cannot be enabled in the current operating state of the drive.

87 Incorrect drive type.

The function block does not support the linked Axis_Ref type.

88 Setpoint source invalid.

Invalid value at the input SetpointSource of the function block TorqueControl_LXM32, page 56 or MoveVelocity_
LXM32, page 61.

89 The selected homing method is not supported.

8A The digital output is set to an incorrect signal output function. Set the signal output function to Freely Available.

8B The operating mode is not supported.

8F Time-out occurred while enabling/disabling the power stage.

(1) See the respective function blocks documentation for permissible value range.

32 EIO0000003592.04
General Description of Motion Control Libraries

Fieldbus-Specific Diagnostic Codes for EtherNet/IP and Modbus TCP


This table presents the communication error and diagnostic codes for EtherNet/IP
and Modbus TCP:

Value (hex) Description

100 The exchange is valid.

101 The exchange stopped when the time-out expired.

102 The exchange was stopped by a user request (the Abort command).

103 The address format is incorrect.


104 The address of the remote device is incorrect.
105 The management table format is incorrect.

106 Specific parameters are incorrect.

107 An error occurred while sending the request to the destination.

109 The reception buffer size is insufficient.

10A The transmission buffer size is insufficient.


10B A system resource is unavailable.

10C The transaction number is incorrect.


10E The length is incorrect.

1FE The operation error code contains a protocol-specific code.

1FF The message was refused.

201 The target system resource is incommunicative.

205 The length is incorrect.

206 The communication channel is associated with an error detected.


207 The address is incorrect.
20B A system resource is unavailable.

20C A target communication function is not active.

20D The target is incommunicative.

20F The channel is not configured.

300 The exchange is valid.

301 The request has not been processed.

302 The received response is incorrect.

400 Service was successfully performed by the object specified.

401 A connection-related service is unsuccessful along the connection path.

402 Resources needed for the object to perform the requested service are unavailable.

403 Internal error code. Contact your local Schneider Electric service representative.

404 The path segment identifier or the segment syntax was incorrect. Path processing stops when this error is
encountered.
405 The path is referencing an object class, instance, or structure element that is incorrect or is not contained in the
processing node. Path processing stops when this error is encountered.

406 Only part of the expected data was transferred.

407 The messaging connection was lost.

408 The requested service was not implemented or was not defined for this Object Class/Instance.

409 Invalid attribute data.


40A An attribute in the Get_Attribute_List or Set_Attribute_List response has a non-zero status.

40B The object is already in the mode/state being requested by the service.

EIO0000003592.04 33
General Description of Motion Control Libraries

Value (hex) Description

40C The object cannot perform the requested service in its present mode/state.

40D The requested instance of object to be created already exists.

40E A request to modify a non-modifiable attribute was received.

40F A permission/privilege check is unsuccessful.

410 The mode/state of the device does not allow the execution of the requested service.

411 The data to be transmitted in the response buffer is larger than the allocated response buffer.

412 The service specified an operation that is going to fragment a primitive data value, that is, half a REAL data type.

413 The service did not supply enough data to perform the specified operation.

414 The attribute specified in the request is not supported.

415 The service supplied more data than expected.

416 The object specified does not exist in the device.

417 The fragmentation sequence for this service is not active for this data.

418 The attribute data of this object was not saved prior to the requested service.

419 The attribute data of this object was not saved.

41A The service request packet was too large for transmission on a network in the path to the destination. The routing
device was forced to abort the service.
41B The service response packet was too large for transmission on a network in the path from the destination. The
routing device was forced to abort the service.

41C The service did not supply an attribute in a list of attributes that was needed by the service to perform the
requested behavior.

41D The service is returning the list of attributes supplied with status information for those attributes that were invalid.

41E An embedded service resulted in an error.


41F A vendor-specific error has been encountered. The Additional Code field of the error response defines the
particular error encountered. Use of this general diagnostic code should only be performed when none of the
diagnostic codes presented in this table or within an Object Class definition accurately reflect the error.

420 A parameter associated with the request was invalid. This code is used when a parameter does not meet the
requirements of this specification and/or the requirements defined in an Application Object specification.

421 An attempt was made to write to a write-once medium (for example, WORM drive, PROM) that has already been
written, or to modify a value that cannot be changed once established.

422 An invalid reply is received (for example, reply service code does not match the request service code, or reply
message is shorter than the minimum expected reply size). This status code can serve for other causes of invalid
replies.

423 The message received is larger than the receiving buffer can handle. The entire message is discarded.

424 The format of the received message is not supported by the server.

425 The key segment that is included as the first segment in the path does not match the destination module. The
object-specific status indicates in which segment of the key.

426 The size of the path which was sent with the Service Request is either not large enough to allow the Request to be
routed to an object or too much routing data was included.

427 An attempt was made to set an attribute that is not able to be set at this time.

428 The member ID specified in the request does not exist in the specified Class/Instance/Attribute.

429 A request to modify a non-modifiable member was received.

42A This diagnostic code may only be reported by Group 2. Only servers with 4 K or less code space and only in place
of service not supported, attribute not supported and attribute not settable.

42B A CIP to Modbus translator received an invalid Modbus exception code.

42C A request to read a non-readable attribute was received.

42D The requested object instance cannot be deleted.

42E The object supports the service, but not for the designated application path (for example, attribute).

34 EIO0000003592.04
General Description of Motion Control Libraries

Value (hex) Description

4FE The operation error code contains protocol specific code.

The explicit message has been sent but the target has not responded it or has replied with an error code.

4FF No response from the target.

Fieldbus-Specific Diagnostic Codes for CANopen


This table presents the communication error and diagnostic codes for CANopen:

Value (hex) Description

FF00 General SDO protocol error detected.

FF01 Toggle bit not alternated.

FF02 SDO protocol timed out.

FF03 Client/server command specifier is not valid or unknown.

FF04 Invalid block size (block mode only).

FF05 Invalid sequence number (block mode only).

FF06 CRC error (block mode only).

FF07 Out of memory.

FF08 Unsupported access to an object.

FF09 Attempt to read a write-only object.

FF0A Attempt to write a read-only object.

FF0B Object does not exist.

FF0C Object cannot be mapped to the PDO.

FF0D The number and length of the objects to be mapped exceed the maximum PDO length.

FF0E Parameter is incompatible (general).

FF0F Internal incompatibility (general).

FF10 Access not possible due to a hardware error.

FF11 Data type does not match, length of service parameter does not match.

FF12 Data type does not match, excessive length of service parameter.

FF13 Data type does not match, insufficient length of service parameter.

FF14 Subindex does not exist.


FF15 Invalid value for parameter (download only).

FF16 Excessive value of parameter written (download only).

FF17 Insufficient value of parameter written (download only).

FF18 Maximum value is less than minimum value.


FF19 Resource not available: SDO connection
FF1A General error
FF1B Data cannot be transferred or stored to the application.

FF1C Data cannot be transferred or stored to the application because of local control.

FF1D Data cannot be transferred or stored to the application because of the present device state.

FF1E Object dictionary dynamic generation not possible or no object dictionary is present (for example object dictionary
is generated from file and generation not possible due to a file error).

FF1F No data available.

EIO0000003592.04 35
General Description of Motion Control Libraries

Common Inputs and Outputs


Behavior of Function Blocks with the Input Enable
Example 1
Single execution without an error detected (execution requires more than one
call).

Example 2
Single execution with an error detected (execution requires more than one call).

Example 3
Single execution without an error detected (execution requires only one call).

Example 4
Single execution with an error detected (execution requires only one call).

36 EIO0000003592.04
General Description of Motion Control Libraries

Example 5
Repeated execution without an error detected (execution requires more than one
call).

Example 6
Repeated execution with an error detected (execution requires more than one
call).

Example 7
Repeated execution without an error detected (execution requires only one cycle).

Example 8
Repeated execution with an error detected (execution requires only one call).

EIO0000003592.04 37
General Description of Motion Control Libraries

Behavior of Function Blocks with the Input Execute


Example 1
Execution terminated without an error detected.

Example 2
Execution terminated with an error detected.

Example 3
Execution aborted because another motion function block has been started.

38 EIO0000003592.04
General Description of Motion Control Libraries

Example 4
If the input Execute is set to FALSE during a cycle, the function block execution is
not terminated; the output Done is set to TRUE only for one cycle.

EIO0000003592.04 39
Function Blocks - Single Axis

Function Blocks - Single Axis


Initialization
MC_Power
Functional Description
This function block enables or disables the drive power stage.
TRUE at the input Enable enables the power stage. Once the power stage is
enabled, the output Status is set.
FALSE at the input Enable disables the power stage. Once the power stage is
disabled, the output Status is reset.
If errors are detected during execution, the output Error is set.
The function block must not be used like a general Enable function block. Every
time the function block is called the input Enable is compared with the output
status. If these values are different a new command is executed, either to switch
on the power stage (Enable = TRUE and Status = FALSE) or to switch off the
power stage (Enable = FALSE and Status = TRUE). The function has to be called
as long as the commanded state of the power stage is achieved or until an error
occurs. If a function block error (for example, timeout) occurred, the Error output is
set and will be reset again with the next call of the function block.
The function block should not be called cyclically. Call this function block only if it
is required to switch off or switch on the power stage.
NOTE: If a timeout error occurred, the diagnostic information PowerTimeout is
provided by the MC_ReadAxisError function block and not by the output
ErrorID of the MC_Power function block.

Library Name and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

40 EIO0000003592.04
Function Blocks - Single Axis

Inputs
Input Data type Description

Enable BOOL Value range: FALSE, TRUE.

Default value: FALSE.

The input Enable starts or terminates execution of a function block.


• FALSE: Execution of the function block is terminated. The outputs Valid,
Busy, and Error are set to FALSE.
• TRUE: The function block is being executed. The function block continues
executing as long as the input Enable is set to TRUE.

Outputs
Output Data type Description

Status BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Power stage is disabled.
• TRUE: Power stage is enabled.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
If you have activated this function block, simultaneous use of the Control_ATV
function block may lead to unintended behavior.

WARNING
UNINTENDED EQUIPMENT OPERATION
• Do not activate the Control_ATV function block when this function block is
active.
• Deactivate this function block or allow the function block to terminate before
activating the Control_ATV function block.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.

If a Node Guarding or Heartbeat error is detected, the error memory must be reset
by using the function block MC_Reset before the power stage can be enabled
again.

EIO0000003592.04 41
Function Blocks - Single Axis

Additional Information
PLCopen State Diagram, page 20
Initialization, page 40

42 EIO0000003592.04
Function Blocks - Single Axis

Operating Mode Jog


MC_Jog
Functional Description
This function block starts the operating mode Jog.
In the operating mode Jog, a movement is started via the inputs Forward and
Backward.
If the inputs Forward and Backward are set to FALSE, the operating mode is
terminated and the output Done is set to TRUE.
If the inputs Forward and Backward are set to TRUE, the operating mode remains
active, the jog movement is stopped and the output Busy remains set to TRUE.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

EIO0000003592.04 43
Function Blocks - Single Axis

Inputs
Input Data type Description

Forward BOOL Value range: FALSE, TRUE.


Backward BOOL Default value: FALSE.
• Forward = FALSE and Backward = FALSE: Movement is terminated.
• Forward = TRUE and Backward = FALSE: Movement in positive direction is
started.
• Forward = FALSE and Backward = TRUE: Movement in negative direction is
started.
• Forward = TRUE and Backward = TRUE: The operating mode remains
active, the jog movement is stopped, and the output Busy remains set to
TRUE.
Velocity DINT Value range: 1...2147483647

Default value: 0.

Velocity in user-defined units.


NOTE: For Altivar, the values for LowFrequency and HighFrequency are set
in the function block SetFrequencyRange_ATV.

If the value for the target velocity Velocity is less than the value for
LowFrequency, the movement is made with the velocity value for
LowFrequency. No error is detected.

If the value for the target velocity Velocity is greater than the value for
HighFrequency, the movement is made with the velocity value for
HighFrequency. No error is detected.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

44 EIO0000003592.04
Function Blocks - Single Axis

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
If you have activated this function block, simultaneous use of the Control_ATV
function block may lead to unintended behavior.

WARNING
UNINTENDED EQUIPMENT OPERATION
• Do not activate the Control_ATV function block when this function block is
active.
• Deactivate this function block or allow the function block to terminate before
activating the Control_ATV function block.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.

This function block uses library-specific acceleration and deceleration values for
LXM32M (EtherNet/IP and Modbus TCP) and for Lexium ILA, ILE and ILS
integrated drives (EtherNet/IP only). This means that pre-configured values for
these parameters (for example, via the commissioning tool) are overwritten when
this function block is executed.
The default acceleration and deceleration values written by this function block are
as follows:
• The default values for acceleration are:
◦ 600 user-defined units for LXM32M
◦ 600 user-defined units for Lexium ILA, ILE and ILS integrated drives
• The default values for deceleration are:
◦ 600 user-defined units for LXM32M
◦ 750 user-defined units for Lexium ILA, ILE and ILS integrated drives
If you require other acceleration and/or deceleration values, you must use the
vendor-specific function blocks to do so. Use the function blocks SetDriveRamp_
LXM32 or SetDriveRamp_ILX to define the acceleration and deceleration. The
function block has to be executed only once if a change of the ramp values is
required.

Additional Information
Transitions Between Function Blocks, page 21
Operating Mode Jog, page 43

Jog_LXM32
Functional Description
This function block starts the operating mode Jog.
In the operating mode Jog, a movement is started via the inputs Forward and
Backward.

EIO0000003592.04 45
Function Blocks - Single Axis

If the inputs Forward and Backward are set to FALSE, the operating mode is
terminated and the output Done is set to TRUE.
If the inputs Forward and Backward are set to TRUE, the operating mode remains
active, the jog movement is stopped, and the output Busy remains set to TRUE.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

Inputs
Input Data type Description

Forward BOOL Value range: FALSE, TRUE.


Backward BOOL Default value: FALSE.
• Forward = FALSE and Backward = FALSE: Movement is terminated.
• Forward = TRUE and Backward = FALSE: Movement in positive direction is
started.
• Forward = FALSE and Backward = TRUE: Movement in negative direction is
started.
• Forward = TRUE and Backward = TRUE: The operating mode remains
active, the jog movement is stopped, and the output Busy remains set to
TRUE.
Fast BOOL Value range: FALSE, TRUE.

Default value: FALSE.

The velocity can be modified during the movement.


• FALSE: Movement at the velocity set in VeloSlow.
• TRUE: Movement at the velocity set in VeloFast.

TipPos DINT Value range: 0...2147483647

Default value: 20
• 0: Continuous movement is started immediately.
• >0: Value is used for distance to be moved in user-defined units. The
movement is stopped, the waiting time WaitTime starts. After the waiting
time WaitTime has elapsed, a continuous movement is started.

46 EIO0000003592.04
Function Blocks - Single Axis

Input Data type Description

WaitTime UINT Value range: 0...65535

Default value: 500

Waiting time in ms. If TipPos is >0, the waiting time WaitTime starts as soon as
the adjusted distance has been covered. After the waiting time WaitTime has
elapsed, a continuous movement is started.

VeloSlow DINT Value range: 1...2147483647

Default value: 60

Velocity in user-defined units. If Fast = FALSE, the movement is made at this


velocity.

VeloFast DINT Value range: 1...2147483647

Default value: 180

Velocity in user-defined units. If Fast = TRUE, the movement is made at this


velocity.

Acceleration DINT Value range: 1...2147483647

Default value: 600

Acceleration ramp in user-defined units.

Deceleration DINT Value range: 1...2147483647

Default value: 600

Deceleration ramp in user-defined units.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

EIO0000003592.04 47
Function Blocks - Single Axis

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
The inputs Acceleration and Deceleration are only taken into account if you use
the fieldbuses EtherNet/IP or Modbus TCP.

Additional Information
Operating Mode Jog, page 43

Jog_SD328A
Functional Description
This function block starts the operating mode Jog.
In the operating mode Jog, a movement is started via the inputs Forward and
Backward.
If the inputs Forward and Backward are set to FALSE, the operating mode is
terminated and the output Done is set to TRUE.
If the inputs Forward and Backward are set to TRUE, the operating mode remains
active, the jog movement is stopped and the output Busy remains set to TRUE.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

48 EIO0000003592.04
Function Blocks - Single Axis

Inputs
Input Data type Description

Forward BOOL Value range: FALSE, TRUE.


Backward BOOL Default value: FALSE.
• Forward = FALSE and Backward = FALSE: Movement is terminated.
• Forward = TRUE and Backward = FALSE: Movement in positive direction is
started.
• Forward = FALSE and Backward = TRUE: Movement in negative direction is
started.
• Forward = TRUE and Backward = TRUE: The operating mode remains
active, the jog movement is stopped, and the output Busy remains set to
TRUE.
Fast BOOL Value range: FALSE, TRUE.

Default value: FALSE.

The velocity can be modified during the movement.


• FALSE: Movement at the velocity set in VeloSlow.
• TRUE: Movement at the velocity set in VeloFast.

TipPos DINT Value range: 0...2147483647

Default value: 20
• 0: Continuous movement is started immediately.
• >0: Value is used for distance to be moved in user-defined units. The
movement is stopped, the waiting time WaitTime starts. After the waiting
time WaitTime has elapsed, a continuous movement is started.

WaitTime UINT Value range: 1...32767

Default value: 500

Waiting time in ms. If TipPos is >0, the waiting time WaitTime starts as soon as
the adjusted distance has been covered. After the waiting time WaitTime has
elapsed, a continuous movement is started.

VeloSlow DINT Value range: 1...3000

Default value: 60

Velocity in rpm. If Fast = FALSE, the movement is made at this velocity.

VeloFast DINT Value range: 1...3000

Default value: 180

Velocity in rpm. If Fast = TRUE, the movement is made at this velocity.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

EIO0000003592.04 49
Function Blocks - Single Axis

Output Data type Description

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Operating Mode Jog, page 43

Jog_ILX
Functional Description
This function block starts the operating mode Jog.
In the operating mode Jog, a movement is started via the inputs Forward and
Backward.
If the inputs Forward and Backward are set to FALSE, the operating mode is
terminated and the output Done is set to TRUE.
If the inputs Forward and Backward are set to TRUE, the operating mode remains
active, the jog movement is stopped and the output Busy remains set to TRUE.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

50 EIO0000003592.04
Function Blocks - Single Axis

Graphical Representation

Inputs
Input Data type Description

Forward BOOL Value range: FALSE, TRUE.


Backward BOOL Default value: FALSE.
• Forward = FALSE and Backward = FALSE: Movement is terminated.
• Forward = TRUE and Backward = FALSE: Movement in positive direction is
started.
• Forward = FALSE and Backward = TRUE: Movement in negative direction is
started.
• Forward = TRUE and Backward = TRUE: The operating mode remains
active, the jog movement is stopped, and the output Busy remains set to
TRUE.
Fast BOOL Value range: FALSE, TRUE.

Default value: FALSE.

The velocity can be modified during the movement.


• FALSE: Movement at the velocity set in VeloSlow.
• TRUE: Movement at the velocity set in VeloFast.

TipPos DINT Value range: 0...2147483647

Default value: 20
• 0: Continuous movement is started immediately.
• >0: Value is used for distance to be moved in user-defined units. The
movement is stopped, the waiting time WaitTime starts. After the waiting
time WaitTime has elapsed, a continuous movement is started.

WaitTime UINT Value range: 0...65535

Default value: 500

Waiting time in the unit ms. If TipPos is >0, the waiting time WaitTime starts as
soon as the adjusted distance has been covered. After the waiting time WaitTime
has elapsed, a continuous movement is started.

VelSlow DINT Value range: 1...13200

Default value: 60

Velocity in rpm. If Fast = FALSE, the movement is made at this velocity.

VelFast DINT Value range: 1...13200

Default value: 180

Velocity in rpm. If Fast = TRUE, the movement is made at this velocity.

EIO0000003592.04 51
Function Blocks - Single Axis

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
This function block uses library-specific acceleration and deceleration values for
Lexium ILA, ILE and ILS integrated drives (EtherNet/IP only). This means that pre-
configured values for these parameters (for example, via the commissioning tool)
are overwritten when this function block is executed.
The default acceleration and deceleration values written by this function block are
as follows:
• The default value for acceleration is 600 rpm/s.
• The default value for deceleration is 750 rpm/s.
If you require other acceleration and/or deceleration values, you must use the
vendor-specific function blocks to do so. Use the function block SetDriveRamp_
ILX to define the acceleration and deceleration. The function block has to be
executed only once if a change of the ramp values is required.

Additional Information
Operating Mode Jog, page 43

52 EIO0000003592.04
Function Blocks - Single Axis

Operating Mode Profile Torque


MC_TorqueControl
Functional Description
This function block starts the operating mode Profile Torque. In the operating
mode Profile Torque, a movement is made with a target torque. The reference
value for the target torque is supplied via the input Torque. When the target torque
is reached, the output InTorque is set to TRUE.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

Torque INT Value range: -30000...30000

Default value: 0

Target torque in user-defined units.

The value corresponds to 0.1% of the nominal torque of the motor. Example:
Torque = 300 corresponds to 30% of the nominal torque of the motor.

Refer to the drive documentation for an overview of the parameters.

EIO0000003592.04 53
Function Blocks - Single Axis

Outputs
Output Data type Description

InTorque BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Target torque not reached.
• TRUE: Target torque reached.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
NOTE: The output Busy remains TRUE even when the target velocity has
been reached or Execute becomes FALSE. The output Busy is set to FALSE
as soon as another function block such as MC_Stop is executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
PLCopen State Diagram, page 20
Transition Between Function Blocks, page 21
Operating Mode Profile Torque, page 53

SetTorqueRamp_LXM32
Functional Description
This function block sets the torque ramp for MC_TorqueControl.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

54 EIO0000003592.04
Function Blocks - Single Axis

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.
Ramp DINT Value range: 1...30000000

Default value: 100000

The input Ramp is used in the operating mode Profile Torque. The value
corresponds to 0.1% per second of the nominal torque of the motor. Example: If
Ramp = 1000, then 100% of the nominal torque of the motor is reached in one
second.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

EIO0000003592.04 55
Function Blocks - Single Axis

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Operating Mode Profile Torque, page 53

TorqueControl_LXM32
Functional Description
This function block starts the operating mode Profile Torque. In the operating
mode Profile Torque, a movement is made with a target torque. The source for the
target torque is set via the input SetpointSource. When the target torque is
reached, the output InTorque is set to TRUE.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

56 EIO0000003592.04
Function Blocks - Single Axis

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

SetpointSource ET_SetpointSource_ Value range: 0...2


LXM32
Default value: 0

Source of the target torque.


• 0 / Value: Target torque via input Torque
• 1 / AnalogInput: Target torque via analog input (I/O module)
• 2 / PTIInput: Target torque via PTI interface
See also Vendor-Specific Data Type ET_SetpointSource_LXM32, page 28.

Torque INT Value range: -30000...30000

Default value: 0

Target torque in user-defined units.

The value corresponds to 0.1% of the nominal torque of the motor. Example:
Torque = 300 corresponds to 30% of the nominal torque of the motor.

Refer to the drive documentation for an overview of the parameters.

TorqueRamp DINT Value range: 1...30000000

Default value: 100000

The value corresponds to 0.1% per second of the nominal torque of the motor.
Example: If Ramp = 1000, then 100% of the nominal torque of the motor is
reached in one second.

Outputs
Output Data type Description

InTorque BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Target torque not reached.
• TRUE: Target torque reached.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
NOTE: The output Busy remains TRUE even when the target velocity has
been reached or Execute becomes FALSE. The output Busy is set to FALSE
as soon as another function block such as MC_Stop is executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

EIO0000003592.04 57
Function Blocks - Single Axis

Output Data type Description

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Operating Mode Profile Torque, page 53

58 EIO0000003592.04
Function Blocks - Single Axis

Operating Mode Profile Velocity


MC_MoveVelocity
Functional Description
This function block starts the operating mode Profile Velocity. In the operating
mode Profile Velocity, a movement is made with a target velocity. The reference
value for the target velocity is supplied via the input Velocity. When the target
velocity is reached, the output InVelocity is set to TRUE.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

Velocity DINT Value range: -2147483648...2147483647

Default value: 0

Target velocity in user-defined units.


NOTE: For Altivar, the values for LowFrequency and HighFrequency are set
in the function block SetFrequencyRange_ATV.

If the value for the target velocity Velocity is less than the value for
LowFrequency, the movement is made with the velocity value for
LowFrequency. No error is detected.

If the value for the target velocity Velocity is greater than the value for
HighFrequency, the movement is made with the velocity value for
HighFrequency. No error is detected.

EIO0000003592.04 59
Function Blocks - Single Axis

Outputs
Output Data type Description

InVelocity BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Target value not reached.
• TRUE: Target value reached.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
NOTE: The output Busy remains TRUE even when the target velocity has
been reached or Execute becomes FALSE. The output Busy is set to FALSE
as soon as another function block such as MC_Stop is executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
If you have activated this function block, simultaneous use of the Control_ATV
function block may lead to unintended behavior.

WARNING
UNINTENDED EQUIPMENT OPERATION
• Do not activate the Control_ATV function block when this function block is
active.
• Deactivate this function block or allow the function block to terminate before
activating the Control_ATV function block.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.

The output Busy remains TRUE even if the target velocity has been reached or
the input Execute is set to FALSE. The output Busy is set to FALSE as soon as
another function block such as MC_Stop is executed.

60 EIO0000003592.04
Function Blocks - Single Axis

In the operating mode Profile Velocity, a movement beyond the movement range
is possible. In the case of a movement beyond the movement range, the reference
point established by homing becomes invalid.
This function block uses library-specific acceleration and deceleration values for
LXM32M (EtherNet/IP and Modbus TCP) and for Lexium ILA, ILE and ILS
integrated drives (EtherNet/IP only). This means that pre-configured values for
these parameters (for example, via the commissioning tool) are overwritten when
this function block is executed.
The default acceleration and deceleration values written by this function block are
as follows:
• The default values for acceleration are:
◦ 600 user-defined units for LXM32M
◦ 600 user-defined units for Lexium ILA, ILE and ILS integrated drives
• The default values for deceleration are:
◦ 600 user-defined units for LXM32M
◦ 750 user-defined units for Lexium ILA, ILE and ILS integrated drives
If you require other acceleration and/or deceleration values, you must use the
vendor-specific function blocks to do so. Use the function blocks SetDriveRamp_
LXM32 or SetDriveRamp_ILX to define the acceleration and deceleration. The
function block has to be executed only once if a change of the ramp values is
required.

Additional Information
PLCopen State Diagram, page 20
Transition Between Function Blocks, page 21
Operating Mode Profile Velocity, page 59

MoveVelocity_LXM32
Functional Description
This function block starts the operating mode Profile Velocity. In the operating
mode Profile Velocity, a movement is made with a target velocity. The source for
the target velocity is set via the input SetpointSource. When the target velocity is
reached, the output InVelocity is set to TRUE.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

EIO0000003592.04 61
Function Blocks - Single Axis

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

SetpointSource ET_SetpointSource_ Value range: 0...1


LXM32
Default value: 0

Source of the target velocity.


• 0 / Value: Target velocity via input Velocity
• 1 / AnalogInput: Target velocity via analog input (I/O module)
See also Vendor-Specific Data Type ET_SetpointSource_LXM32, page 28.

Velocity DINT Value range: -2147483648...2147483647

Default value: 0

Target velocity in user-defined units.

Acceleration DINT Value range: 1...2147483647

Default value: 600

Acceleration ramp in user-defined units.

Deceleration DINT Value range: 1...2147483647

Default value: 600

Deceleration ramp in user-defined units.

62 EIO0000003592.04
Function Blocks - Single Axis

Outputs
Output Data type Description

InVelocity BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Target value not reached.
• TRUE: Target value reached.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
NOTE: The output Busy remains TRUE even when the target velocity has
been reached or Execute becomes FALSE. The output Busy is set to FALSE
as soon as another function block such as MC_Stop is executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
The output Busy remains TRUE even if the target velocity has been reached or
the input Execute is set to FALSE. The output Busy is set to FALSE as soon as
another function block such as MC_Stop is executed.
The inputs Acceleration and Deceleration are only taken into account if you use
the fieldbuses EtherNet/IP or Modbus TCP.

Additional Information
Operating Mode Profile Velocity, page 59

EIO0000003592.04 63
Function Blocks - Single Axis

MoveVelocity_SD328A
Functional Description
This function block starts the operating mode Profile Velocity. In the operating
mode Profile Velocity, a movement is made with a target velocity. The source for
the target velocity is set via the input SetpointSource.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

SetpointSource ET_SetpointSource_ Value range: 0...1


SD328A
Default value: 0

Source of the target velocity.


• 0 / Value: Target velocity via input Velocity
• 1 / AnalogInput: Target velocity via analog input
See also Vendor-Specific Data Type ET_SetpointSource_SD328A, page 28.

Velocity DINT Value range: -3000...3000

Default value: 0

Target velocity in rpm.

64 EIO0000003592.04
Function Blocks - Single Axis

Input Data type Description

ZeroWindow UINT Value range: 0...1000

Default value: 0

Zero voltage window at analog input in mV. Example: If the value is 20, the range
-20 ... 20 mV is interpreted as 0.

MaxVelocity INT Value range: -30000...30000

Default value: 3000

The value specifies the maximum speed of rotation (ANA1 = 10 V) in rpm. Adapt
the value to your motor and the mechanical situation.

The value is only considered if the input SetpointSource is set to 1 / AnalogInput.

Outputs
Output Data type Description

VelocityZero BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: The motor is not at a standstill.
• TRUE: The motor is at a standstill.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
NOTE: The output Busy remains TRUE even when the target velocity has
been reached or Execute becomes FALSE. The output Busy is set to FALSE
as soon as another function block such as MC_Stop is executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
The output Busy remains TRUE even if the target velocity has been reached or
the input Execute is set to FALSE. The output Busy is set to FALSE as soon as
another function block such as MC_Stop is executed.

EIO0000003592.04 65
Function Blocks - Single Axis

Additional Information
Operating Mode Profile Velocity, page 59

VelocityControlAnalogInput_ATV
Functional Description
This function block uses the reference values supplied by the analog input
selected with the function block VelocityControlSelectAI_ATV.

Library and Namespace


Library name: GMC Independent Altivar
Namespace: GIATV

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

NegativeDir BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Clockwise rotation.
• TRUE: Counter-clockwise rotation.

66 EIO0000003592.04
Function Blocks - Single Axis

Outputs
Output Data type Description

InVelocity BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: The velocity does not correspond to the reference value.
• TRUE: The velocity corresponds to the reference value.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
If you have activated this function block, simultaneous use of the Control_ATV
function block may lead to unintended behavior.

WARNING
UNINTENDED EQUIPMENT OPERATION
• Do not activate the Control_ATV function block when this function block is
active.
• Deactivate this function block or allow the function block to terminate before
activating the Control_ATV function block.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.

More information is provided in the following function blocks description:


SetFrequencyRange_ATV and VelocityControlSelectAI_ATV. If analog voltage
levels –10 V...+10 V are used, the direction of movement (rotation) is inversed
when the sign changes. If the voltage is 0 V, this may result in jumps in the
direction of movement, in the minimum frequency and in jumps at standstill.

EIO0000003592.04 67
Function Blocks - Single Axis

Additional Information
Operating Mode Profile Velocity, page 59

VelocityControlSelectAI_ATV
Functional Description
This function block selects the analog input for supplying the reference value. See
also VelocityControlAnalogInput_ATV.

Library and Namespace


Library name: GMC Independent Altivar
Namespace: GIATV

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.
InputNumber UINT Value range: 1...4

Default value: 1

ATV320:
• 1: AI1
• 2: AI2
• 3: AI3
ATV340:
• 1: AI1
• 2: AI2

68 EIO0000003592.04
Function Blocks - Single Axis

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
If you have activated this function block, simultaneous use of the Control_ATV
function block may lead to unintended behavior.

WARNING
UNINTENDED EQUIPMENT OPERATION
• Do not activate the Control_ATV function block when this function block is
active.
• Deactivate this function block or allow the function block to terminate before
activating the Control_ATV function block.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.

This function block can only be executed if the drive is in the operating state 3
Switch On Disabled. To transition to this state, disable the power stage with the
function block MC_Power.

Additional Information
Operating Mode Profile Velocity, page 59

EIO0000003592.04 69
Function Blocks - Single Axis

Control_ATV
Functional Description
This function block manages the Controlword, Statusword, reference velocity and
the direction of movement for the drive.
This function block requires an Adaptation of the I/O Mapping, page 72.

Library and Namespace


Library name: GMC Independent Altivar
Namespace: GIATV

Graphical Representation

Control_ATV
Axis Axis_Ref BOOL q_xEn
i_xEn BOOL BOOL q_xAlrm
i_xKeepOpEn BOOL WORD q_wStatusword
i_xFwd BOOL
i_xRev BOOL
i_xQckStop BOOL
i_xFreeWhl BOOL
i_xFltRst BOOL
i_wSpdRef WORD

Inputs
Input Data Type Description

i_xEn BOOL Value range: FALSE, TRUE.

Default value: FALSE.

Command for activating or deactivating the function block.


• FALSE: Deactivate the function block
• TRUE: Activate the function block
i_xKeepOpEn BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Power stage is disabled if no command is active.
• TRUE: Power stage remains enabled if no command is active.

i_xFwd BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Stops a movement in positive direction.
• TRUE: If the drive is in the operating state "Switched On" and if there is no
local forcing active, a movement is started in negative direction (Reverse)
with the velocity reference value i_wSpdRef.
The command "Reverse" is triggered with a rising edge. The movement
stops when the level is FALSE.

i_xRev BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Stops a movement in negative direction.
• TRUE: If the drive is in the operating state "Switched On" and if there is no
local forcing active, a movement is started in positive direction (Forward)
with the velocity reference value i_wSpdRef.
The command "Forward" is triggered with a rising edge. The movement
stops when the level is FALSE.

70 EIO0000003592.04
Function Blocks - Single Axis

Input Data Type Description

i_xQckStop BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: If there is a motor movement, the drive triggers a "Quick Stop".
• TRUE: No triggering of a "Quick Stop".
After a Quick Stop, the drive automatically switches to the operating state
"Switched On" when the actual velocity and the actual current values have
reached a value of zero and if the commands Forward and Reverse are both
FALSE.
The Quick Stop must be deactivated (set i_xQckStop to TRUE) to restart the
movement.
i_xFreeWhl BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: If there is a motor movement, the drive triggers a "Free Wheel
Stop".
• TRUE: No triggering of a "Free Wheel Stop".

i_xFltRst BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: No triggering of a "Fault Reset".
• TRUE: The drive triggers a "Fault Reset".
As long as the input i_xFltRst is set to TRUE, the inputs i_xFwd and i_xRev are
not taken into account.
i_wSpdRef WORD Value range:

Default value: 0

Reference velocity for the drive.

Outputs
Output Data Type Description

q_xEn BOOL Value range: FALSE, TRUE.

Default value: FALSE.

Function block activated/deactivated. Direct copy from i_xEn.

q_xAlrm BOOL Value range: FALSE, TRUE.

Default value: FALSE.

Is set to FALSE when the function block is deactivated and when the drive
transitions to operating state "Switch On Disabled".

Is set to TRUE when the drive detects an error (bit 3 of the status word).

q_wStatusword WORD Statusword of the drive.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
If you have activated this function block, simultaneous use of other function blocks
of the GMC Independent PLCopen MC and GMC Independent ATV libraries may
lead to unintended behavior.

EIO0000003592.04 71
Function Blocks - Single Axis

WARNING
UNINTENDED EQUIPMENT OPERATION
• Do not activate the Control_ATV function block unless all function blocks of
the GMC Independent PLCopen MC and GMC Independent ATV libraries
are inactive.
• Deactivate the Control_ATV function block before activating any of the
function blocks of the GMC Independent PLCopen MC and GMC
Independent ATV libraries.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.

Note the following:


After a "Quick Stop", the operating state "Quick Stop Active" is automatically left
when the actual velocity and the actual current values have reached a value of
zero and if the commands “Forward” and “Reverse” are both FALSE. To restart the
movement, deactivate the Quick Stop (set i_xQckStop to TRUE).
A "Quick Stop" has a higher priority than a regular stop ("Forward" and "Reverse"
set to FALSE).
A "Free Wheel Stop" has a higher priority than a "Quick Stop".
If the drive displays the flashing message C O F on the 7-segment display after a
download of an application to the drive, a rising edge and then a falling edge are
required at the “Fault Reset” input (i_xFltRst) to restart communication with the
drive.

Adaptation of the I/O Mapping (EtherNet/IP and Modbus TCP)


If you are using EtherNet/IP or Modbus TCP, you need to adjust the I/O mapping
of the drive in order to use this function block.
The I/O mapping of the drive can only be adjusted with the DTM commissioning
software. See EcoStruxure Machine Expert - Device Type Manager (DTM) - User
Guide for additional information on the DTM.
For EtherNet/IP, the library uses the assemblies 100 and 101 and requires the
following mapping:
• Assembly 100 (controller to drive):
◦ First word: CMD, logic address 8501 (factory setting)
◦ Second word: LFRD, logic address 8602 (factory setting)
• Assembly 101 (drive to controller):
◦ First word: ETA, logic address 3201 (factory setting)
◦ Second word: RFRD, logic address 8604 (factory setting)
◦ Third word: LCR, logic address 3204 (needs to be added to the mapping)
For Modbus TCP, the library uses the I/O scanning service and requires the
following mapping:
• I/O scanner output setting (controller to drive):
◦ Output 1: CMD, logic address 8501 (factory setting)
◦ Output 2: LFRD, logic address 8602 (factory setting)
• I/O scanner input setting (drive to controller):
◦ Input 1: ETA, logic address 3201 (factory setting)
◦ Input 2: RFRD, logic address 8604 (factory setting)
◦ Input 3: LCR, logic address 3204 (needs to be added to the mapping)

72 EIO0000003592.04
Function Blocks - Single Axis

Using the Function Block


Starting the function block with the default settings:

Step Action

1 Deactivate "Free Wheel": Set i_xFreeWhl to TRUE.

2 Deactivate "Quick Stop": Set i_xQckStop to TRUE.

3 Activate the function block: Set i_xEn to TRUE.

4 Set a reference velocity: Set i_wSpdRef to a value not equal to zero.

5 Start a movement in positive ("Forward") or negative ("Reverse") direction: Set i_xFwd


or i_xRev to TRUE.

Visualization
Visualization of function block Control_ATV:

See Programming with EcoStruxure Machine Expert > Visualization for


additional information on the visualization of a function block.
With the above minimum configuration, the visualization of this function block can
be used to control the drive. After the I/O mapping of the 5 data specified above,
the drive can be started with the following sequence of steps:

Step Action

1 Click the button Enable to activate the function block.


2 Click the button Quick Stop to deactivate "Quick Stop".

3 Click the button Free Wheel to deactivate "Free Wheel".


4 Enter a velocity value not equal to zero in revolutions per minute (in the field next to the
Force Speed button).

5 Click the button Force Speed.

6 Verify that the button Fault Reset is not activated.

7 Click the button Forward or Reverse: The motor performs a movement in positive or
negative direction.

EIO0000003592.04 73
Function Blocks - Single Axis

Additional Information
Operating Mode Profile Velocity, page 59

74 EIO0000003592.04
Function Blocks - Single Axis

Operating Mode SpeedControl


SpeedControl_ILX
Functional Description
This function block starts a continuous controlled motion at a specified velocity
with inactive motion profile generator.
This function block is available for:
• Integrated Lexium drive ILA2T with Modbus TCP
• Integrated Lexium drive ILE2T with Modbus TCP
• Integrated Lexium drive ILA2K with EtherNet/IP
• Integrated Lexium drive ILE2K with EtherNet/IP
Refer to the documentation of the drive, page 10 for additional information on
operating mode Speed Control.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

Velocity DINT Value range: -30000...30000

Default value: 0

Target velocity in rpm.

EIO0000003592.04 75
Function Blocks - Single Axis

Outputs
Output Data type Description

InVelocity BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.
NOTE: The output Busy remains TRUE even when the target velocity has
been reached or Execute becomes FALSE. The output Busy is set to FALSE
as soon as another function block such as MC_Stop is executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
There is no feedback for reaching the target velocity from the drive. As soon as
the function block is being executed, the output InVelocity is set to TRUE. Use the
function block MC_ReadActualVelocity, page 130 to read the velocity of the motor.

76 EIO0000003592.04
Function Blocks - Single Axis

Operating Mode Profile Position


MC_MoveAbsolute
Functional Description
This function block starts a movement to the absolute target position Position.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

Position DINT Value range: -2147483648...2147483647

Default value: 0.

Target position absolute in user-defined units.

Velocity DINT Value range: -2147483648...2147483647

Default value: 0

Target velocity in user-defined units.

EIO0000003592.04 77
Function Blocks - Single Axis

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
Absolute positioning requires a valid zero point. You can use the function block
MC_ReadMotionState to check for a valid zero point.
This function block uses library-specific acceleration and deceleration values for
LXM32M (EtherNet/IP and Modbus TCP) and for Lexium ILA, ILE and ILS
integrated drives (EtherNet/IP only). This means that pre-configured values for
these parameters (for example, via the commissioning tool) are overwritten when
this function block is executed.
The default acceleration and deceleration values written by this function block are
as follows:
• The default values for acceleration are:
◦ 600 user-defined units for LXM32M
◦ 600 user-defined units for Lexium ILA, ILE and ILS integrated drives
• The default values for deceleration are:
◦ 600 user-defined units for LXM32M
◦ 750 user-defined units for Lexium ILA, ILE and ILS integrated drives
If you require other acceleration and/or deceleration values, you must use the
vendor-specific function blocks to do so. Use the function blocks SetDriveRamp_
LXM32 or SetDriveRamp_ILX to define the acceleration and deceleration. The

78 EIO0000003592.04
Function Blocks - Single Axis

function block has to be executed only once if a change of the ramp values is
required.

Additional Information
PLCopen State Diagram, page 20
Transition Between Function Blocks, page 21
Operating Mode Profile Position, page 77

MC_MoveAdditive
Functional Description
This function block starts a movement to the original target position including
distance Distance.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

Distance DINT Value range: -2147483648...2147483647

Default value: 0

Target position relative to the previous target position in user-defined units.

Velocity DINT Value range: -2147483648...2147483647

Default value: 0

Target velocity in user-defined units.

EIO0000003592.04 79
Function Blocks - Single Axis

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
This function block uses library-specific acceleration and deceleration values for
LXM32M (EtherNet/IP and Modbus TCP) and for Lexium ILA, ILE and ILS
integrated drives (EtherNet/IP only). This means that pre-configured values for
these parameters (for example, via the commissioning tool) are overwritten when
this function block is executed.
The default acceleration and deceleration values written by this function block are
as follows:
• The default values for acceleration are:
◦ 600 user-defined units for LXM32M
◦ 600 user-defined units for Lexium ILA, ILE and ILS integrated drives
• The default values for deceleration are:
◦ 600 user-defined units for LXM32M
◦ 750 user-defined units for Lexium ILA, ILE and ILS integrated drives
If you require other acceleration and/or deceleration values, you must use the
vendor-specific function blocks to do so. Use the function blocks SetDriveRamp_
LXM32 and SetDriveRamp_ILX to define the acceleration and deceleration. The
function block has to be executed only once if a change of the ramp values is
required.

80 EIO0000003592.04
Function Blocks - Single Axis

Additional Information
PLCopen State Diagram, page 20
Transition Between Function Blocks, page 21
Operating Mode Profile Position, page 77

MC_MoveRelative
Functional Description
This function block starts a movement by distance Distance to the actual position.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

Distance DINT Value range: -2147483648...2147483647

Default value: 0

Target position relative with reference to actual position.

Velocity DINT Value range: -2147483648...2147483647

Default value: 0

Target velocity in user-defined units.

EIO0000003592.04 81
Function Blocks - Single Axis

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
This function block uses library-specific acceleration and deceleration values for
LXM32M (EtherNet/IP and Modbus TCP) and for Lexium ILA, ILE and ILS
integrated drives (EtherNet/IP only). This means that pre-configured values for
these parameters (for example, via the commissioning tool) are overwritten when
this function block is executed.
The default acceleration and deceleration values written by this function block are
as follows:
• The default values for acceleration are:
◦ 600 user-defined units for LXM32M
◦ 600 user-defined units for Lexium ILA, ILE and ILS integrated drives
• The default values for deceleration are:
◦ 600 user-defined units for LXM32M
◦ 750 user-defined units for Lexium ILA, ILE and ILS integrated drives
If you require other acceleration and/or deceleration values, you must use the
vendor-specific function blocks to do so. Use the function blocks SetDriveRamp_
LXM32 or SetDriveRamp_ILX to define the acceleration and deceleration. The
function block has to be executed only once if a change of the ramp values is
required.

82 EIO0000003592.04
Function Blocks - Single Axis

Additional Information
PLCopen State Diagram, page 20
Transition Between Function Blocks, page 21
Operating Mode Profile Position, page 77

EIO0000003592.04 83
Function Blocks - Single Axis

Operating Mode Homing


MC_Home
Functional Description
This function block configures and starts a reference movement.
The MC_Home function block commands the homing procedure. Drive-specific
homing parameters like homing mode are provided by the device implementation.
Re-executing this function block commands a Quick-Stop in the drive and leads to
a the function block error NoReExecution. The homing procedure can be aborted
only by executing MC_Stop or disabling the power stage via MC_Power.
Executing another motion function block while MC_Home is busy does not
influence the homing procedure. This means that the function block MC_Home
stays busy and the executed function block ends in a function block error.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is not permitted while the function block is being
executed.
Position DINT Value range: -2147483648...2147483647

Default value: 0

Position at reference point in user-defined units.

84 EIO0000003592.04
Function Blocks - Single Axis

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
This function block uses library-specific acceleration and deceleration values for
LXM32M (EtherNet/IP and Modbus TCP) and for Lexium ILA, ILE and ILS
integrated drives (EtherNet/IP only). This means that pre-configured values for
these parameters (for example, via the commissioning tool) are overwritten when
this function block is executed.
The default acceleration and deceleration values written by this function block are
as follows:
• The default values for acceleration are:
◦ 600 user-defined units for LXM32M
◦ 600 user-defined units for Lexium ILA, ILE and ILS integrated drives
• The default values for deceleration are:
◦ 600 user-defined units for LXM32M
◦ 750 user-defined units for Lexium ILA, ILE and ILS integrated drives
If you require other acceleration and/or deceleration values, you must use the
vendor-specific function blocks to do so. Use the function blocks SetDriveRamp_
LXM32 and SetDriveRamp_ILX to define the acceleration and deceleration. The
function block has to be executed only once if a change of the ramp values is
required.

EIO0000003592.04 85
Function Blocks - Single Axis

Additional Information
PLCopen State Diagram, page 20
Transitions Between Function Blocks, page 21
Operating Mode Homing, page 84

Home_LXM32
Functional Description
This function block configures and starts a reference movement.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is not permitted while the function block is being
executed.
Position DINT Value range: -2147483648...2147483647

Default value: 0

Position in user-defined units.

HomingMode 1...34: Position at reference point

HomingMode 35: Position for position setting

86 EIO0000003592.04
Function Blocks - Single Axis

Input Data type Description

HomingMode UINT Value range: 1...35

Default value: 17

Specifies the homing method


• 1: LIMN with index pulse
• 2: LIMP with index pulse
• 7: REF+ with index pulse, inverted, outside
• 8: REF+ with index pulse, inverted, inside
• 9: REF+ with index pulse, not inverted, inside
• 10: REF+ with index pulse, not inverted, outside
• 11: REF- with index pulse, inverted, outside
• 12: REF- with index pulse, inverted, inside
• 13: REF- with index pulse, not inverted, inside
• 14: REF- with index pulse, not inverted, outside
• 17: LIMN
• 18: LIMP
• 23: REF+, inverted, outside
• 24: REF+, inverted, inside
• 25: REF+, not inverted, inside
• 26: REF+, not inverted, outside
• 27: REF-, inverted, outside
• 28: REF-, inverted, inside
• 29: REF-, not inverted, inside
• 30: REF-, not inverted, outside
• 33: Index pulse in negative direction
• 34: Index pulse in positive direction
• 35: Position setting
Refer to documentation of the drive, page 10 for a description of the homing
method.
VHome DINT Value range: 1...2147483647

Default value: 60

Target velocity for searching the switch in user-defined units.

VOutHome DINT Value range: 1...2147483647

Default value: 6

Target velocity for moving away from switch in user-defined units.

POutHome DINT Value range: 0...2147483647

Default value: 0

Maximum distance for searching the switching point in user-defined units.


• 0: Search distance monitoring disabled
• >0: Maximum distance
After detection of the switch, the drive starts to search for the defined switching
point. If the defined switching point is not found within the distance defined here,
an error is detected and the reference movement is canceled.
PDisHome DINT Value range: 1...2147483647

Default value: 200

Distance from switching point in user-defined units.

The distance from the switching point is defined as the reference point.

The parameter is only effective during a reference movement without index pulse.

EIO0000003592.04 87
Function Blocks - Single Axis

Input Data type Description

Acceleration DINT Value range: 1...2147483647

Default value: 600

Acceleration ramp in user-defined units.

Deceleration DINT Value range: 1...2147483647

Default value: 600

Deceleration ramp in user-defined units.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
The inputs Acceleration and Deceleration are only taken into account if you use
the fieldbuses EtherNet/IP or Modbus TCP.

Additional Information
Operating Mode Homing, page 84

88 EIO0000003592.04
Function Blocks - Single Axis

Home_SD328A
Functional Description
This function block configures and starts a reference movement.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is not permitted while the function block is being
executed.
Position DINT Value range: -2147483648...2147483647

Default value: 0

Position in user-defined units.

HomingMode 1...34: Position at reference point

HomingMode 35: Position for position setting

EIO0000003592.04 89
Function Blocks - Single Axis

Input Data type Description

HomingMode UINT Value range: 1...35

Default value: 17

Specifies the homing method


• 1: LIMN with index pulse
• 2: LIMP with index pulse
• 7: REF+ with index pulse, inverted, outside
• 8: REF+ with index pulse, inverted, inside
• 9: REF+ with index pulse, not inverted, inside
• 10: REF+ with index pulse, not inverted, outside
• 11: REF- with index pulse, inverted, outside
• 12: REF- with index pulse, inverted, inside
• 13: REF- with index pulse, not inverted, inside
• 14: REF- with index pulse, not inverted, outside
• 17: LIMN
• 18: LIMP
• 23: REF+, inverted, outside
• 24: REF+, inverted, inside
• 25: REF+, not inverted, inside
• 26: REF+, not inverted, outside
• 27: REF-, inverted, outside
• 28: REF-, inverted, inside
• 29: REF-, not inverted, inside
• 30: REF-, not inverted, outside
• 33: Index pulse in negative direction
• 34: Index pulse in positive direction
• 35: Position setting
Refer to documentation of the drive, page 10 for a description of the homing
method.
VHome DINT Value range: 1...3000

Default value: 60

Target velocity for searching the switch in rpm.

VOutHome DINT Value range: 1...3000

Default value: 6

Target velocity for moving away from switch in rpm.

POutHome DINT Value range: 0...2147483647

Default value: 0

Maximum distance for searching the switching point in user-defined units.


• 0: Search distance monitoring disabled
• >0: Maximum distance
After detection of the switch, the drive starts to search for the defined switching
point. If the defined switching point is not found within the distance defined here,
an error is detected and the reference movement is canceled.
PDisHome DINT Value range: 1...2147483647

Default value: 200

Distance from switching point in user-defined units.

The distance from the switching point is defined as the reference point.

The parameter is only effective during a reference movement without index pulse.

90 EIO0000003592.04
Function Blocks - Single Axis

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Operating Mode Homing, page 84

Home_ILX
Functional Description
This function block commands the homing procedure using the Lexium ILA, ILE
and ILS integrated drives specific homing method set via the input HomingMode.
Drive-specific homing parameters such as homing mode are provided by the
device implementation. Re-executing this function block commands a Quick-Stop
in the drive and leads to a function block error NoReExecution.
The homing procedure can be aborted only by executing MC_Stop or disabling
the power stage through MC_Power.
Executing another motion function block while MC_Home is busy does not
influence the homing procedure. This means that the function block MC_Home
stays busy and the executed function block ends in a function block error.

EIO0000003592.04 91
Function Blocks - Single Axis

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is not permitted while the function block is being
executed.
Position DINT Value range: -2147483648...2147483647

Default value: 0

Position in user-defined units:


• 1...34: Position at reference point
• 35: Position for position setting

HomingMode UINT Value range: 1...35

Default value: 18 (only for EtherNet/IP and Modbus TCP)

See Homing Methods, page 94 for a list of the supported methods.

Alternatively you can use the enumeration ET_LexiumHomingMode, page 27 for


EtherNet/IP and Modbus TCP drives or the enumeration ET_
LexiumHomingMode_ILX1, page 28 for CANopen drives.

Refer to documentation of the drive, page 10 for a description of the homing


method.
VHome DINT Value range: 1...13200

Default value: 60

Target velocity for searching the switch in rpm.

VOutHome DINT Value range: 1...13200

Default value: 6

Target velocity for searching the switch in rpm.

92 EIO0000003592.04
Function Blocks - Single Axis

Input Data type Description

POutHome DINT Value range: 0...2147483647

Default value: 0

Maximum distance for search for switching point in user-defined units.


• 0: Search distance monitoring disabled
• >0: Maximum distance
After detection of the switch, the drive starts to search for the defined switching
point. If the defined switching point is not found within the distance defined here,
an error is detected and the reference movement is canceled.
PDisHome DINT Value range: 1...2147483647

Default value: 200

Distance from switching point in user-defined units.

The distance from the switching point is defined as the reference point.

The parameter is only effective during a reference movement without index pulse.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

EIO0000003592.04 93
Function Blocks - Single Axis

Homing Methods
Specifies the homing method for EtherNet/IP and Modbus TCP:
• 1: LIMN with index pulse
• 2: LIMP with index pulse
• 7: REF+ with index pulse, inverted, outside
• 8: REF+ with index pulse, inverted, inside
• 9: REF+ with index pulse, not inverted, inside
• 10: REF+ with index pulse, not inverted, outside
• 11: REF- with index pulse, inverted, outside
• 12: REF- with index pulse, inverted, inside
• 13: REF- with index pulse, not inverted, inside
• 14: REF- with index pulse, not inverted, outside
• 17: LIMN
• 18: LIMP
• 23: REF+, inverted, outside
• 24: REF+, inverted, inside
• 25: REF+, not inverted, inside
• 26: REF+, not inverted, outside
• 27: REF-, inverted, outside
• 28: REF-, inverted, inside
• 29: REF-, not inverted, inside
• 30: REF-, not inverted, outside
• 33: Index pulse in negative direction
• 34: Index pulse in positive direction
• 35: Position setting
Specifies the homing method for CANopen:
• 1: LIMN
• 2: LIMP
• 3: REF in negative direction
• 4: REF in positive direction
• 5: Index pulse in negative direction (only ILA and ILS)
• 6: Index pulse in positive direction (only ILA and ILS)
• 7: Movement to block in negative direction (only ILE)
• 8: Movement to block in positive direction (only ILE)
• 23: REF+, inverted, outside
• 24: REF+, inverted, inside
• 25: REF+, not inverted, inside
• 26: REF+, not inverted, outside
• 27: REF-, inverted, outside
• 28: REF-, inverted, inside
• 29: REF-, not inverted, inside
• 30: REF-, not inverted, outside
• 35: Position setting

94 EIO0000003592.04
Function Blocks - Single Axis

Notes
This function block uses library-specific acceleration and deceleration values for
Lexium ILA, ILE and ILS integrated drives (EtherNet/IP only). This means that pre-
configured values for these parameters (for example, via the commissioning tool)
are overwritten when this function block is executed.
The default acceleration and deceleration values written by this function block are
as follows:
• The default value for acceleration is 600 rpm/s.
• The default value for deceleration is 750 rpm/s.
If you require other acceleration and/or deceleration values, you must use the
vendor-specific function blocks to do so. Use the function block SetDriveRamp_
ILX to define the acceleration and deceleration. The function block has to be
executed only once if a change of the ramp values is required.

Additional Information
Operating Mode Homing, page 84

MC_SetPosition
Functional Description
This function block sets a position value at the actual position of the motor. The
zero point is defined by the position value. The function block can only be used
when the motor is at a standstill.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

EIO0000003592.04 95
Function Blocks - Single Axis

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.
Position DINT Value range: -2147483648...2147483647

Default value: 0

Position in user-defined units.

Value for position setting.

Relative BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: The actual position is set to the value of the input Position.
• TRUE: The value of the Position is added to the actual position.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Operating Mode Homing, page 84

96 EIO0000003592.04
Function Blocks - Single Axis

Stopping
MC_Stop
Functional Description
This function block stops the ongoing movement. The operating mode is aborted
by this function block.
The function block MC_Stop commands a motion stop to the drive. The drive-
specific stop parameters like deceleration are provided by the device
implementation. Re-executing this function block does not influence the ongoing
deceleration.
The stop procedure can be aborted only by disabling the power stage via MC_
Power.
Executing another motion function block while MC_Stop is busy does not
influence the stop procedure. This means that the function block MC_Stop stays
busy and the executed function block ends in a function block error.
As long as the input Execute is TRUE the execution of a motion command is not
possible. In this case, executed motion function blocks end in a function block
error.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

EIO0000003592.04 97
Function Blocks - Single Axis

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
If you have activated this function block, simultaneous use of the Control_ATV
function block may lead to unintended behavior.

WARNING
UNINTENDED EQUIPMENT OPERATION
• Do not activate the Control_ATV function block when this function block is
active.
• Deactivate this function block or allow the function block to terminate before
activating the Control_ATV function block.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.

The function block can only be interrupted by disabling the power stage via the
function block MC_Power.
As long as the input Execute is TRUE, no other function block except for MC_
Power can be started.
If the operating state Stopping is transitioned to the state ErrorStop because MC_
Stop has detected an error in its execution or the power of the axis was disabled,
the axis does not re-enter in the operating state Stopping automatically although

98 EIO0000003592.04
Function Blocks - Single Axis

the input Execute is TRUE. A new rising edge at the input Execute is required to
transfer the axis into the operating state Stopping.
For ATV, the stop method corresponds to the stop configuration (see product
manual).
For LXM32 drives, you must use the vendor-specific function block
SetStopRamp_LXM32 to set the deceleration. If you want to modify the
deceleration ramp, execute the function block once.
For SD328A drives, there is no specific stop ramp available. Use the function
block SetDriveRamp_SD328A to define the ramp.
For Lexium ILA, ILE and ILS integrated drives, you must use the vendor-specific
function block SetStopRamp_ILX to set the deceleration. If you want to modify the
deceleration ramp, execute the function block once.

Additional Information
PLCopen State Diagram, page 20
Transition Between Function Blocks , page 21
Stopping, page 97

SetStopRamp_LXM32
Functional Description
This function block sets the deceleration ramp for the function block MC_Stop.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

EIO0000003592.04 99
Function Blocks - Single Axis

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.
Deceleration DINT Value range: 1...2147483647

Default value: 6000

Value for the deceleration ramp in user-defined units.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Stopping, page 97

100 EIO0000003592.04
Function Blocks - Single Axis

SetStopRamp_ILX
Functional Description
This function block writes the value for the quick stop deceleration of the drive.
This value is used if the function block MC_Stop is executed.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.
Deceleration DINT Value range: 200...3000000

Default value: 6000

Value for the deceleration ramp in rpm/s.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

EIO0000003592.04 101
Function Blocks - Single Axis

Output Data type Description

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Stopping, page 97

Stop_LXM32
Functional Description
This function block stops the ongoing movement. The operating mode is aborted
by this function block.
The execution of the function block cannot be aborted by another function block
call.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

102 EIO0000003592.04
Function Blocks - Single Axis

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

Deceleration DINT Value range: 1...2147483647

Default value: 6000

Value for the deceleration ramp in user-defined units.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
The function block can only be interrupted by disabling the power stage through
the function block MC_Power.
As long as the input Execute is TRUE, no other function block except for MC_
Power can be started.

EIO0000003592.04 103
Function Blocks - Single Axis

Additional Information
Stopping, page 97

MC_Halt
Functional Description
This function block stops the ongoing movement. The operating mode is aborted
by this function block.
The execution of the function block can be aborted by another function block. If a
Halt is triggered, there is a transition of the PLCopen state to Discrete Motion until
the motor has reached a standstill. Once the motor has reached a standstill, the
output Done is set and the state transitions to StandStill.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

104 EIO0000003592.04
Function Blocks - Single Axis

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
This function block uses library-specific deceleration values for LXM32M
(EtherNet/IP and Modbus TCP) and for Lexium ILA, ILE and ILS integrated drives
(EtherNet/IP only). This means that pre-configured values for these parameters
(for example, via the commissioning tool) are overwritten when this function block
is executed.
The default deceleration values written by this function block are as follows:
• The default values for deceleration are:
◦ 600 user-defined units for LXM32M
◦ 750 user-defined units for Lexium ILA, ILE and ILS integrated drives
If you require other deceleration values, you must use the vendor-specific function
blocks to do so. Use the function blocks SetDriveRamp_LXM32 and
SetDriveRamp_ILX to define the deceleration. The function block has to be
executed only once if a change of the ramp values is required.

EIO0000003592.04 105
Function Blocks - Single Axis

Additional Information
PLCopen State Diagram, page 20
Transition Between Function Blocks, page 21
Stopping, page 97

Halt_LXM32
Functional Description
This function block stops the ongoing movement. The operating mode is aborted
by this function block.
The execution of the function block can be aborted by another function block. If a
Halt is triggered, there is a transition of the PLCopen state to Discrete Motion until
the motor has reached a standstill. Once the motor has reached a standstill, the
output Done is set and the state transitions to StandStill.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

Deceleration DINT Value range: 1...2147483647

Default value: 600

Value for the deceleration ramp in user-defined units.

106 EIO0000003592.04
Function Blocks - Single Axis

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Stopping, page 97

EIO0000003592.04 107
Function Blocks - Single Axis

Position Capture via Signal Input


MC_TouchProbe
Functional Description
This function block configures and starts position capture.
The function block returns the axis position at the occurrence of a trigger event.
The drive trigger parameters are provided by the device implementation.
Executing the function block MC_AbortTrigger while MC_TouchProbe is busy
aborts the function for the referenced trigger input.
A new rising edge at the input Execute overwrites and restarts the active trigger
function.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

108 EIO0000003592.04
Function Blocks - Single Axis

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

RecordedPosition DINT Returns the value of the axis position at the occurrence of a trigger event in user-
defined units.

Value range: -2147483648...2147483647

Default value: 0

Captured motor position.

Inputs/Outputs
Input/Output Data type Elements Data type Description

Axis Axis_Ref – Reference to the axis (instance) for which the function
block is to be executed (corresponds to the name of
the axis). The name of the axis must be defined in the
EcoStruxure Machine Expert Devices tree.

TriggerInput MC_Trigger_Ref TouchProbeNumber UINT Selects the capture unit of the drive.

TriggerEdge ET_TriggerEdge Edge to trigger position capture.


• 1 / RisingEdge: Rising edge.
• 2 / FallingEdge: Falling edge.
• 3 / BothEdges: Both rising edge and falling
edge.
See also Vendor-Specific Data Type ET_
TriggerEdge, page 29.

Notes
Use MC_AbortTrigger function block to abort MC_TouchProbe function block
execution.

EIO0000003592.04 109
Function Blocks - Single Axis

Additional Information
Position Capture via Signal Input, page 108

TouchProbe_LXM32
Functional Description
This function block configures and starts position capture.
The function block returns the axis position at the occurrence of a trigger event.
The drive trigger parameters are provided by the device implementation.
Executing the function block MC_AbortTrigger while MC_TouchProbe is busy
aborts the function for the referenced trigger input.
A new rising edge at the input Execute overwrites and restarts the active trigger
function.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

SingleShot BOOL Value range: FALSE, TRUE.

Default value: TRUE.


• FALSE: Captures continuously.
• TRUE: Captures once.

110 EIO0000003592.04
Function Blocks - Single Axis

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
Valid BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started or an error has been detected. The
values at the outputs are not valid.
• TRUE: Execution has been completed without an error detected. The values
at the outputs are valid and can be further processed.

ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

RecordedPosition DINT Returns the value the axis position at the occurrence of a trigger event.

Value range: -2147483648...2147483647

Default value: 0

Captured motor position in user-defined units.

Inputs/Outputs
Input/Output Data type Elements Data type Description

Axis Axis_Ref – Reference to the axis (instance) for which the function
block is to be executed (corresponds to the name of
the axis). The name of the axis must be defined in the
EcoStruxure Machine Expert Devices tree.

TriggerInput MC_Trigger_Ref TouchProbeNumber UINT Selects the capture unit of the drive.

TriggerEdge ET_TriggerEdge Edge to trigger position capture.


• 1 / RisingEdge: Rising edge.
• 2 / FallingEdge: Falling edge.
• 3 / BothEdges: Both rising edge and falling
edge.
See also Vendor-Specific Data Type ET_
TriggerEdge, page 29.

EIO0000003592.04 111
Function Blocks - Single Axis

Notes
Use MC_AbortTrigger function block to abort TouchProbe_LXM32 function block
execution.

Additional Information
Position Capture via Signal Input, page 108

TouchProbe_SD328A
Functional Description
This function block configures and starts position capture.
The function block returns the axis position at the occurrence of a trigger event.
The drive trigger parameters are provided by the device implementation.
Executing the function block MC_AbortTrigger while MC_TouchProbe is busy
aborts the function for the referenced trigger input.
A new rising edge at the input Execute overwrites and restarts the active trigger
function.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

112 EIO0000003592.04
Function Blocks - Single Axis

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

SingleShot BOOL Value range: FALSE, TRUE.

Default value: TRUE.


• FALSE: Captures continuously.
• TRUE: Captures once.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
Valid BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started or an error has been detected. The
values at the outputs are not valid.
• TRUE: Execution has been completed without an error detected. The values
at the outputs are valid and can be further processed.

ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

RecordedPosition DINT Returns the value the axis position at the occurrence of a trigger event.

Value range: -2147483648...2147483647

Default value: 0

Captured motor position in user-defined units.

EIO0000003592.04 113
Function Blocks - Single Axis

Inputs/Outputs
Input/Output Data type Elements Data type Description

Axis Axis_Ref – Reference to the axis (instance) for which the function
block is to be executed (corresponds to the name of
the axis). The name of the axis must be defined in the
EcoStruxure Machine Expert Devices tree.

TriggerInput MC_Trigger_Ref TouchProbeNumber UINT Selects the capture unit of the drive.

TriggerEdge ET_TriggerEdge Edge to trigger position capture.


• 1 / RisingEdge: Rising edge.
• 2 / FallingEdge: Falling edge.
See also Vendor-Specific Data Type ET_
TriggerEdge, page 29.

Notes
Use MC_AbortTrigger function block to abort TouchProbe_SD328A function block
execution.

Additional Information
Position Capture via Signal Input, page 108

TouchProbe_ILX
Functional Description
This function block configures and starts position capture.
The function block returns the axis position at the occurrence of a trigger event.
The drive trigger parameters are provided by the device implementation.
Executing the function block MC_AbortTrigger while MC_TouchProbe is busy
aborts the function for the referenced trigger input.
A new rising edge at the input Execute overwrites and restarts the active trigger
function.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

114 EIO0000003592.04
Function Blocks - Single Axis

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

SingleShot BOOL Value range: FALSE, TRUE.

Default value: TRUE.

Selects the trigger occurrence.


• FALSE = Captures continuously
• TRUE = Captures once

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.

EIO0000003592.04 115
Function Blocks - Single Axis

Output Data type Description

Valid BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started or an error has been detected. The
values at the outputs are not valid.
• TRUE: Execution has been completed without an error detected. The values
at the outputs are valid and can be further processed.

ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

RecordedPosition DINT Returns the value the axis position at the occurrence of a trigger event.

Value range: -2147483648...2147483647

Default value: 0

Captured motor position in user-defined units.

Inputs/Outputs
Input/Output Data type Elements Data type Description

Axis Axis_Ref – Reference to the axis (instance) for which the function
block is to be executed (corresponds to the name of
the axis). The name of the axis must be defined in the
EcoStruxure Machine Expert Devices tree.

TriggerInput MC_Trigger_Ref TouchProbeNumber UINT Selects the capture unit of the drive.

TriggerEdge ET_TriggerEdge Edge to trigger position capture.


• 1 / RisingEdge: Rising edge.
• 2 / FallingEdge: Falling edge.
• 3 / BothEdges: Both rising edge and falling
edge(1).
See also Vendor-Specific Data Type ET_
TriggerEdge, page 29.

(1) Only with EtherNet/IP and Modbus TCP.

Notes
Use MC_AbortTrigger function block to abort TouchProbe_ILX function block
execution.

Additional Information
Position Capture via Signal Input, page 108

MC_AbortTrigger
Functional Description
This function block terminates a position capture.

116 EIO0000003592.04
Function Blocks - Single Axis

Library and Namespace


Library name:GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

EIO0000003592.04 117
Function Blocks - Single Axis

Inputs/Outputs
Input/Output Data type Elements Data type Description

Axis Axis_Ref – Reference to the axis (instance) for which the function
block is to be executed (corresponds to the name of
the axis). The name of the axis must be defined in the
EcoStruxure Machine Expert Devices tree.

TriggerInput MC_Trigger_Ref TouchProbeNumber UINT Selects the capture unit of the drive.

TriggerEdge ET_TriggerEdge N/A

Additional Information
Position Capture via Signal Input, page 108

118 EIO0000003592.04
Function Blocks - Multi Axis

Function Blocks - Multi Axis


Operating Mode Electronic Gear
GearInPos_LXM32
Functional Description
This function block starts the operating mode Electronic Gear with the method
position synchronization.
In the operating mode Electronic Gear, movements are carried out synchronously
according to externally supplied reference value signals. A position reference
value is calculated on the basis of these external reference values plus an
adjustable gear ratio. The reference value signals can be A/B signals, P/D signals
or CW/CCW signals.
A movement can be made using one of two methods:
• Position synchronization without compensation movement
Reference value signals supplied during an interruption caused by a halt
command or by a detected error of error class 1 are not taken into account.
• Position synchronization with compensation movement
Reference value signals supplied during an interruption caused by a halt
command or by a detected error of error class 1 are taken into account and
compensated for.
Refer to the documentation of the drive, page 10 for additional information on
compensation movements and error classes.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

EIO0000003592.04 119
Function Blocks - Multi Axis

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

SyncMode BOOL Value range: FALSE, TRUE.

Default value: FALSE.

Compensation movement:
• FALSE: With compensation movement
• TRUE: Without compensation movement

RatioNumerator DINT Value range: 1...2147483647

Default value: 1

Gear ratio: Numerator of gear ratio.

RatioDenominator DINT Value range: 1...2147483647

Default value: 1

Gear ratio: Denominator of gear ratio.

Outputs
Output Data type Description

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

InGear BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• TRUE: If the adjusted gear ratio is reached for the first time in the operating
mode Electronic Gear.

120 EIO0000003592.04
Function Blocks - Multi Axis

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
This function block requires the drive parameter GEARratio to be 0. This way,
RatioNumerator and RatioDenominator are used to calculate the gear ratio.
The velocity of the compensation movement can be limited via parameter settings.
The enabled direction of movement in the operating mode Electronic Gear is set
via the drive parameter GEARdir_enabl.
Once the operating mode is active, the compensation movement must not exceed
the maximum position deviation. If the required compensation movement exceeds
the maximum position deviation, an error is detected.
Refer to the documentation of the drive, page 10 for more details.
The operating mode Electronic Gear with the method velocity synchronization is
started with the function block GearIn_LXM32, page 126.

Additional Information
Operating Mode Electronic Gear, page 119

GearInPos_SD328A
Functional Description
This function block starts the operating mode Electronic Gear with the method
position synchronization.
In the operating mode Electronic Gear, movements are carried out synchronously
according to externally supplied reference value signals. A position reference
value is calculated on the basis of these external reference values plus an
adjustable gear ratio. The reference value signals can be A/B signals and P/D
signals.
A movement can be made using one of two methods:
• Position synchronization without compensation movement
Reference value signals supplied during an interruption caused by a halt
command or by a detected error of error class 1 are not taken into account.
• Position synchronization with compensation movement
Reference value signals supplied during an interruption caused by a halt
command or by a detected error of error class 1 are taken into account and
compensated for.
Refer to the documentation of the drive, page 10 for additional information on
compensation movements and error classes.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

EIO0000003592.04 121
Function Blocks - Multi Axis

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

SyncMode BOOL Value range: FALSE, TRUE.

Default value: FALSE.

Compensation movement:
• FALSE: With compensation movement
• TRUE: Without compensation movement

RatioNumerator DINT Value range: -2147483648...2147483647

Default value: 1

Gear ratio: Numerator of gear ratio.

RatioDenominator DINT Value range: 1...2147483647

Default value: 1

Gear ratio: Denominator of gear ratio.

Outputs
Output Data type Description

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.

122 EIO0000003592.04
Function Blocks - Multi Axis

Output Data type Description

ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

InGear BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• TRUE: If the adjusted gear ratio is reached for the first time in the operating
mode Electronic Gear.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
This function block requires the drive parameter GEARratio to be 0. This way,
RatioNumerator and RatioDenominator are used to calculate the gear ratio.
The velocity of the compensation movement can be limited via parameter settings.
The enabled direction of movement in the operating mode Electronic Gear is set
via the drive parameter GEARdir_enabl.
Once the operating mode is active, the compensation movement must not exceed
the maximum position deviation. If the required compensation movement exceeds
the maximum position deviation, an error is detected.
Refer to the documentation of the drive, page 10 for more details.

Additional Information
Operating Mode Electronic Gear, page 119

GearInPos_ILX
Functional Description
This function block starts the operating mode Electronic Gear with the method
position synchronization.
In the operating mode Electronic Gear, movements are carried out synchronously
according to externally supplied reference value signals. A position reference
value is calculated on the basis of these external reference values plus an
adjustable gear ratio. The reference value signals can be A/B signals or P/D
signals.

EIO0000003592.04 123
Function Blocks - Multi Axis

A movement can be made using one of two methods:


• Position synchronization without compensation movement
Reference value signals supplied during an interruption caused by a halt
command or by a detected error of error class 1 are not taken into account.
• Position synchronization with compensation movement
Reference value signals supplied during an interruption caused by a halt
command or by a detected error of error class 1 are taken into account and
compensated for.
Refer to the documentation of the drive, page 10 for additional information on
compensation movements and error classes.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

SyncMode BOOL Value range: FALSE, TRUE.

Default value: FALSE.

Compensation movement:
• FALSE: With compensation movement
• TRUE: Without compensation movement

RatioNumerator DINT Value range: 1...2147483647

Default value: 1

Gear ratio: Numerator of gear ratio.

RatioDenominator DINT Value range: 1...2147483647

Default value: 1

Gear ratio: Denominator of gear ratio.

124 EIO0000003592.04
Function Blocks - Multi Axis

Outputs
Output Data type Description

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

InGear BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• TRUE: If the adjusted gear ratio is reached for the first time in the operating
mode Electronic Gear.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
The velocity of the compensation movement can be limited via parameter settings.
The enabled direction of movement in the operating mode Electronic Gear is set
via the drive parameter Gear.dirEnGear, 38:13.
Once the operating mode is active, the compensation movement must not exceed
the maximum position deviation. If the required compensation movement exceeds
the maximum position deviation, an error is detected.
Refer to the documentation of the drive, page 10 for more details.

Additional Information
Operating Mode Electronic Gear, page 119

EIO0000003592.04 125
Function Blocks - Multi Axis

GearIn_LXM32
Functional Description
This function block starts the operating mode Electronic Gear with the method
velocity synchronization.
In the operating mode Electronic Gear, movements are carried out according to
externally supplied reference value signals. A velocity reference value is
calculated on the basis of these external reference values plus an adjustable gear
ratio. The reference value signals can be A/B signals, P/D signals or CW/CCW
signals.
The movement is made synchronously (velocity synchronicity) with the supplied
reference value signals.
Refer to the documentation of the drive, page 10 for additional information on error
classes.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

This function block can be restarted while it is executed. The target values are
overwritten by the new values at the point in time the rising edge occurs.

RatioNumerator DINT Value range: 1...2147483647

Default value: 1

Gear ratio: Numerator of gear ratio.

RatioDenominator DINT Value range: 1...2147483647

Default value: 1

Gear ratio: Denominator of gear ratio.

126 EIO0000003592.04
Function Blocks - Multi Axis

Input Data type Description

Acceleration DINT Value range: 1...2147483647

Default value: 600

Acceleration ramp in user-defined units.

Deceleration DINT Value range: 1...2147483647

Default value: 600

Deceleration ramp in user-defined units.

Outputs
Output Data type Description

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

CommandAborted BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been aborted.
• TRUE: Execution has been aborted by another function block.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

InGear BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• TRUE: If the adjusted gear ratio is reached for the first time.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
This function block requires the parameter GEARratio to be 0. This way,
RatioNumerator and RatioDenominator are used to calculate the gear ratio.
The enabled direction of movement in the operating mode Electronic Gear is set
via the drive parameter GEARdir_enabl.
Refer to the documentation of the drive, page 10 for more details.
The operating mode Electronic Gear with the method Position Synchronization is
started with the function block GearInPos_LXM32.

EIO0000003592.04 127
Function Blocks - Multi Axis

In the operating mode Electronic Gear with the method Velocity Synchronization,
a position overtravel does not trigger a detected error. A position overtravel results
in a loss of the zero point.

Additional Information
Operating Mode Electronic Gear, page 119

128 EIO0000003592.04
Function Blocks - Administrative

Function Blocks - Administrative


Reading a Parameter
MC_ReadActualTorque
Functional Description
This function block reads the actual torque of the motor.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

Inputs
Input Data type Description

Enable BOOL Value range: FALSE, TRUE.

Default value: FALSE.

The input Enable starts or terminates execution of a function block.


• FALSE: Execution of the function block is terminated. The outputs Valid,
Busy, and Error are set to FALSE.
• TRUE: The function block is being executed. The function block continues
executing as long as the input Enable is set to TRUE.

EIO0000003592.04 129
Function Blocks - Administrative

Outputs
Output Data type Description

Valid BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started or an error has been detected. The
values at the outputs are not valid.
• TRUE: Execution has been completed without an error detected. The values
at the outputs are valid and can be further processed.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Torque INT Value range: -32768...32767

Actual torque in user-defined units.

100.0 % corresponds to the continuous stall torque. The read value is indicated in
increments of 0.1 %.

Example: The value Torque = 300 is read. This means that the effective torque
amounts to 30 % of the nominal torque of the motor.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Reading a Parameter, page 129

MC_ReadActualVelocity
Functional Description
This function block reads the velocity of the motor.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

130 EIO0000003592.04
Function Blocks - Administrative

Graphical Representation

Inputs
Input Data type Description

Enable BOOL Value range: FALSE, TRUE.

Default value: FALSE.

The input Enable starts or terminates execution of a function block.


• FALSE: Execution of the function block is terminated. The outputs Valid,
Busy, and Error are set to FALSE.
• TRUE: The function block is being executed. The function block continues
executing as long as the input Enable is set to TRUE.

Outputs
Output Data type Description

Valid BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started or an error has been detected. The
values at the outputs are not valid.
• TRUE: Execution has been completed without an error detected. The values
at the outputs are valid and can be further processed.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Velocity DINT Value range: -2147483648...2147483647

Actual velocity in user-defined units.

EIO0000003592.04 131
Function Blocks - Administrative

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Reading a Parameter, page 129

MC_ReadActualPosition
Functional Description
This function block reads the position of the motor.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

Inputs
Input Data type Description

Enable BOOL Value range: FALSE, TRUE.

Default value: FALSE.

The input Enable starts or terminates execution of a function block.


• FALSE: Execution of the function block is terminated. The outputs Valid,
Busy, and Error are set to FALSE.
• TRUE: The function block is being executed. The function block continues
executing as long as the input Enable is set to TRUE.

132 EIO0000003592.04
Function Blocks - Administrative

Outputs
Output Data type Description

Valid BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started or an error has been detected. The
values at the outputs are not valid.
• TRUE: Execution has been completed without an error detected. The values
at the outputs are valid and can be further processed.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Position DINT Value range: -2147483648...2147483647

Default value: 0

Actual position in user-defined units.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Reading a Parameter, page 129

MC_ReadAxisInfo
Functional Description
This function block gets status information on the axis.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

EIO0000003592.04 133
Function Blocks - Administrative

Graphical Representation

Inputs
Input Data type Description

Enable BOOL Value range: FALSE, TRUE.

Default value: FALSE.

The input Enable starts or terminates execution of a function block.


• FALSE: Execution of the function block is terminated. The outputs Valid,
Busy, and Error are set to FALSE.
• TRUE: The function block is being executed. The function block continues
executing as long as the input Enable is set to TRUE.

Outputs
Output Data type Description

Valid BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started or an error has been detected. The
values at the outputs are not valid.
• TRUE: Execution has been completed without an error detected. The values
at the outputs are valid and can be further processed.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

LimitSwitchPos BOOL Value range: FALSE, TRUE.


• TRUE: Positive limit switch is triggered.

LimitSwitchNeg BOOL Value range: FALSE, TRUE.


• TRUE: Negative limit switch is triggered.

134 EIO0000003592.04
Function Blocks - Administrative

Output Data type Description

CommunicationReady BOOL Value range: FALSE, TRUE.


• TRUE: Network has been initialized and is ready for communication.

ReadyForPowerOn BOOL Value range: FALSE, TRUE.


• TRUE: Drive is ready to enable the power stage.

PowerOn BOOL Value range: FALSE, TRUE.


• TRUE: Power stage is enabled.

IsHomed BOOL Value range: FALSE, TRUE.


• TRUE: Reference point is valid (axis homed).

AxisWarning BOOL Value range: FALSE, TRUE.


• TRUE: An alert is active.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Note
The values for the outputs LimitSwitchPos and LimitSwitchNeg are valid
depending whether the limit switches are defined in the I/O configuration of the
ILX2 and SD328A drives. This I/O configuration is read once when the application
is started and every time the power stage is enabled.
Do not modify the I/O configuration between the start of the application and
enabling the power stage or it will lead to invalid values of the outputs
LimitSwitchPos and LimitSwitchNeg.
Set the I/O configuration before the application is started.

WARNING
UNINTENDED EQUIPMENT OPERATION
Only modify the I/O configuration while the power stage is disabled.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.

Additional Information
Reading a Parameter, page 129

MC_ReadMotionState
Functional Description
This function block provides the status information on the ongoing movement.

EIO0000003592.04 135
Function Blocks - Administrative

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

Inputs
Input Data type Description

Enable BOOL Value range: FALSE, TRUE.

Default value: FALSE.

The input Enable starts or terminates execution of a function block.


• FALSE: Execution of the function block is terminated. The outputs Valid,
Busy, and Error are set to FALSE.
• TRUE: The function block is being executed. The function block continues
executing as long as the input Enable is set to TRUE.

Outputs
Output Data type Description

Valid BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started or an error has been detected. The
values at the outputs are not valid.
• TRUE: Execution has been completed without an error detected. The values
at the outputs are valid and can be further processed.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

136 EIO0000003592.04
Function Blocks - Administrative

Output Data type Description

ConstantVelocity BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• TRUE: A movement at a constant velocity is performed.

Accelerating BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• TRUE: The motor accelerates.
Decelerating BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• TRUE: The motor decelerates.
DirectionPositive BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• TRUE: The motor shaft rotates in positive direction.

DirectionNegative BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• TRUE: The motor shaft rotates in negative direction.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Reading a Parameter, page 129

MC_ReadStatus
Functional Description
This function block reads the current status of the drive.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

EIO0000003592.04 137
Function Blocks - Administrative

Graphical Representation

Inputs
Input Data type Description

Enable BOOL Value range: FALSE, TRUE.

Default value: FALSE.

The input Enable starts or terminates execution of a function block.


• FALSE: Execution of the function block is terminated. The outputs Valid,
Busy, and Error are set to FALSE.
• TRUE: The function block is being executed. The function block continues
executing as long as the input Enable is set to TRUE.

Outputs
Output Data type Description

Valid BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started or an error has been detected. The
values at the outputs are not valid.
• TRUE: Execution has been completed without an error detected. The values
at the outputs are valid and can be further processed.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Errorstop DINT Value range: FALSE, TRUE.

Default value: FALSE.


• TRUE: Drive in operating state Errorstop.

138 EIO0000003592.04
Function Blocks - Administrative

Output Data type Description

Disabled BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• TRUE: Power stage is disabled.

Stopping BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• TRUE: Drive in operating state Stopping.

Homing BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• TRUE: Drive in operating state Homing.

StandStill BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• TRUE: Drive in operating state StandStill.

DiscreteMotion BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• TRUE: Drive in operating state Discrete Motion.

ContinuousMotion BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• TRUE: Drive in operating state Continuous Motion.

SynchronizedMotion BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• TRUE: Drive in operating state Synchronized Motion.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Reading a Parameter, page 129

EIO0000003592.04 139
Function Blocks - Administrative

MC_ReadParameter
Functional Description
This function block reads a value from a specific parameter.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

140 EIO0000003592.04
Function Blocks - Administrative

Inputs
Input Data type Description

Enable BOOL Value range: FALSE, TRUE.

Default value: FALSE.

The input Enable starts or terminates execution of a function block.


• FALSE: Execution of the function block is terminated. The outputs Valid,
Busy, and Error are set to FALSE.
• TRUE: The function block is being executed. The function block continues
executing as long as the input Enable is set to TRUE.

ParameterNumber UINT Value range: 0...65535

Default value: 1000

ATV:
• 10: Actual velocity RFRD.
• 11: Target velocity LFRD.
• 1000: Selection via input Address.
LXM32:
• 1: Reference position (from profile generator). _RAMP_p_target
• 2: Positive position limit of software limit switch. MON_swLimP
• 3: Negative position limit of software limit switch. MON_swLimN
• 4: Monitoring of the positive software limit switch. (Activated: Bit 0 = 0.
Deactivated: Bit 0 = 1). MON_SW_Limits
• 5: Monitoring of the negative software limit switch. (Activated: Bit 0 = 0.
Deactivated: Bit 0 = 1). MON_SW_Limits
• 8: Maximum user-defined value for velocities in user-defined units
_ScaleVELmax
• 10: Actual velocity in user-defined units. _v_act
• 11: Target velocity in user-defined units. _RAMP_v_target
• 12/14: Maximum user-defined value for acceleration and deceleration in
user-defined units. _ScaleRAMPmax
• 1000: Selection via input Address.
Lexium ILA, ILE and ILS integrated drives (EtherNet/IP and Modbus TCP):
• 1: Reference position (from profile generator). _p_tarRAMPusr
• 2: Positive position limit of software limit switch. SPVswLimPusr
• 3: Negative position limit of software limit switch. SPVswLimNusr
• 4: Monitoring of the positive software limit switch. (Activated: Bit 0= 0.
Deactivated: Bit 0 = 1). SPV_SW_Limits
• 5: Monitoring of the negative software limit switch. (Activated: Bit 0 = 0.
Deactivated: Bit 0 = 1). SPV_SW_Limits
• 8: Maximum user-defined value for velocities in user-defined units. RAMPn_
max
• 10: Actual velocity in user-defined units. _n_act
• 11: Target velocity in user-defined units. _n_targetRAMP
• 1000: Selection via input Address.
Lexium ILA, ILE and ILS integrated drives (CANopen):
• 1: Reference position (from profile generator). p_ref
• 8: Maximum user-defined value for velocities in user-defined units. n_
maxDrv
• 10: Actual velocity in user-defined units. n_profile
• 11: Target velocity in user-defined units. n_target
• 1000: Selection via input Address.

EIO0000003592.04 141
Function Blocks - Administrative

Input Data type Description

Address DWORD Address of the parameter to be read. Can only be used if the input
ParameterNumber = 1000.

Refer to the documentation of the drive, page 10 for a list of the parameters with
the corresponding address of the parameters.

Example of the address for CANopen:

Index: 2038h, Subindex: 05h -> 00203805h

Example of the address for EtherNet/IP:

Class: 8Ch, Instance: 01h, Attribute: 05h -> 008C0105h

Example of the address for Modbus TCP:

Logic/Modbus address: 219Ch -> 0000219Ch

Outputs
Output Data type Description

Valid BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started or an error has been detected. The
values at the outputs are not valid.
• TRUE: Execution has been completed without an error detected. The values
at the outputs are valid and can be further processed.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Value DINT Value range: -2147483648...2147483647

Default value: 0

Value of the parameter.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Reading a Parameter, page 129

142 EIO0000003592.04
Function Blocks - Administrative

Writing a Parameter
MC_WriteParameter
Functional Description
This function block writes a value to a specific parameter.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

EIO0000003592.04 143
Function Blocks - Administrative

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.
ParameterNumber INT Value range: 0...65535

ATV:
• 1000: Selection via input Address.
LXM32:
• 2: Positive position limit of software limit switch. MON_swLimP
• 3: Negative position limit of software limit switch. MON_swLimN
• 4: Monitoring of the positive software limit switch. (Activated: Bit 0 = 0.
Deactivated: Bit 0 = 1). MON_SW_Limits
• 5: Monitoring of the negative software limit switch. (Activated: Bit 0 = 0.
Deactivated: Bit 0 = 1). MON_SW_Limits
• 1000: Selection via input Address.
Lexium ILA, ILE and ILS integrated drives (EtherNet/IP and Modbus TCP):
• 2: Positive position limit of software limit switch. SPVswLimPusr
• 3: Negative position limit of software limit switch. SPVswLimNusr
• 4: Monitoring of the positive software limit switch. (Activated: Bit 0 = 0.
Deactivated: Bit 0 = 1). SPV_SW_Limits
• 5: Monitoring of the negative software limit switch. (Activated: Bit 0 = 0.
Deactivated: Bit 0 = 1). SPV_SW_Limits
• 1000: Selection via input Address.
Lexium ILA, ILE and ILS integrated drives (CANopen):
• 1000: Selection via input Address.

Address DWORD Address of the parameter to be written.

Fieldbus address (examples):

CANopen: Index: 2038h, Subindex: 05h -> 00203805h

Ethernet/IP: Class: 8Ch, Instance: 01h, Attribute: 05h -> 008C0105h

Modbus TCP: Logic/Modbus address: 219Ch -> 0000219Ch

Refer to the documentation of the drive, page 10 for a list of the parameters with
the corresponding address of the parameters.

Can only be used if the input ParameterNumber = 1000.

Length UINT Value range: 1...4

Length of the parameter to be written in bytes.

Refer to the documentation of the drive, page 10 for a list of the parameters with
the corresponding length of the parameters.

Value DINT Value range: -2147483648...2147483647

Default value: 0

Value to be written to the parameter.

The units of the values depend on the parameter.

144 EIO0000003592.04
Function Blocks - Administrative

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
If the inputs ParameterNumber, Address, Length or Value are modified while Busy
is TRUE, the new values are not used until the function block is executed again.

Additional Information
Writing a Parameter , page 143

SetDriveRamp_ATV
Functional Description
This function block configures the acceleration ramp and the deceleration ramp of
the axis.

Library and Namespace


Library name: GMC Independent Altivar
Namespace: GIATV

EIO0000003592.04 145
Function Blocks - Administrative

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.
Acceleration DINT Value range: 0...9999

Default value: 30

Unit: 0.1 s.

Example:

With a value of 30, 3 seconds are required to accelerate from 0 to the nominal
frequency of the motor. It must be possible to reach the value with the available
torque of the motor.

Deceleration DINT Value range: 0...9999

Default value: 30

Unit: 0.1 s.

Example:

With a value of 30, 3 seconds are required to decelerate from the nominal
frequency of the motor to 0. It must be possible to reach the value with the
available torque of the motor.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

146 EIO0000003592.04
Function Blocks - Administrative

Output Data type Description

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Writing a Parameter , page 143

SetDriveRamp_LXM32
Functional Description
This function block configures the acceleration ramp and the deceleration ramp of
the axis.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

EIO0000003592.04 147
Function Blocks - Administrative

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.
Acceleration DINT Value range: 1...2147483647

Default value: 600

Acceleration ramp in user-defined units.

Deceleration DINT Value range: 1...2147483647

Default value: 600

Deceleration ramp in user-defined units.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Writing a Parameter , page 143

148 EIO0000003592.04
Function Blocks - Administrative

SetDriveRamp_SD328A
Functional Description
This function block configures the acceleration ramp and the deceleration ramp of
the axis.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.
Acceleration DINT Value range: 1...3000000

Default value: 600

Acceleration ramp in rpm/s.

Deceleration DINT Value range: 200...3000000

Default value: 750

Deceleration ramp in rpm/s.

EIO0000003592.04 149
Function Blocks - Administrative

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Writing a Parameter , page 143

SetDriveRamp_ILX
Functional Description
This function block configures the acceleration ramp and the deceleration ramp of
the axis.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

150 EIO0000003592.04
Function Blocks - Administrative

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.
Acceleration DINT Value range: 30...3000000

Default value: 600

Acceleration ramp in rpm/s.

Deceleration DINT Value range: 30...3000000

Default value: 750

Acceleration ramp in rpm/s.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

EIO0000003592.04 151
Function Blocks - Administrative

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Writing a Parameter , page 143

SetLimitSwitch_LXM32
Functional Description
This function block configures the positive limit switch (LIMP) and the negative
limit switch (LIMN).

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

152 EIO0000003592.04
Function Blocks - Administrative

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.
LimitSwitch UINT Value range: 1...2

Default value: 1

Selects the address of limit switch.


• 1: Limit switch in positive direction of movement LIMP
• 2: Limit switch in negative direction of movement LIMN

Mode UINT Value range: 0...2

Default value: 0
• 0: Deactivate limit switch
• 1: Activate limit switch as normally closed contact
• 2: Activate limit switch as normally open contact

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

EIO0000003592.04 153
Function Blocks - Administrative

Notes
The function block can only be executed in the PLCopen state Disabled (operating
state 4 Ready To Switch On of drive). To transition to this state, disable the power
stage with the function block MC_Power.

Additional Information
Writing a Parameter , page 143

SetLimitSwitch_SD328A
Functional Description
This function block configures the positive limit switch (LIMP) and the negative
limit switch (LIMN).

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

154 EIO0000003592.04
Function Blocks - Administrative

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.
LimitSwitch UINT Value range: 1...2

Default value: 1

Selects the address of limit switch.


• 1: Limit switch in positive direction of movement LIMP
• 2: Limit switch in negative direction of movement LIMN

Mode UINT Value range: 0...2

Default value: 0
• 0: Deactivate limit switch
• 1: Activate limit switch as normally closed contact
• 2: Activate limit switch as normally open contact

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

EIO0000003592.04 155
Function Blocks - Administrative

Notes
The function block can only be executed in the PLCopen state Disabled (operating
state 4 Ready To Switch On of drive). To transition to this state, disable the power
stage with the function block MC_Power.

Additional Information
Writing a Parameter , page 143

SetLimitSwitch_ILX
Functional Description
This function block enables and disables the limit switches and sets the activation
edge.
The input LimitSwitch selects the address for the limit switch and the input Mode
sets the value for the activation edge.
NOTE: The function block can be executed only in state Disabled.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

156 EIO0000003592.04
Function Blocks - Administrative

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.
LimitSwitch UINT Value range: 1...2

Default value: 1.

Selects the address of limit switch.


• 1 = Limit switch in positive direction of movement. IOsigLIMP
• 2 = Limit switch in negative direction of movement. IOsigLIMN

Mode UINT Value range: 1...2

Default value: 0.

Value for the activation edge.


• 0 = Deactivate limit switch
• 1 = Activate limit switch as normally closed contact
• 2 = Activate limit switch as normally open contact

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

EIO0000003592.04 157
Function Blocks - Administrative

Additional Information
Writing a Parameter, page 143

SetFrequencyRange_ATV
Functional Description
This function block configures the frequency ranges of the drive for the function
blocks MC_MoveVelocity and MC_Jog. If the frequency (speed of rotation)
becomes inferior to the value in LowFrequency, the drive uses the frequency
specified in LowFrequency without triggering an error message. If the frequency
(speed of rotation) exceeds the value in HighFrequency, the drive uses the
frequency specified in HighFrequency without triggering an error message.

Library and Namespace


Library name: GMC Independent Altivar
Namespace: GIATV

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.
LowFrequency DINT Value range: 0...HighFrequency

Default value: 0

Unit: 0.1 Hz

Motor frequency at minimum reference value.


NOTE: If the value of LowFrequency exceeds the value of HighFrequency,
the value of HighFrequency is used.

158 EIO0000003592.04
Function Blocks - Administrative

Input Data type Description

HighFrequency DINT Value range: LowFrequency...MaxFrequency

Default value: 500

Unit: 0.1 Hz

Motor frequency at maximum reference value.


NOTE: If the value of HighFrequency exceeds the value of MaxFrequency,
the value of MaxFrequency is used.

MaxFrequency DINT Value range: 100...5000/10000 (refer to the product manual)

Default value: 600

Unit: 0.1 Hz

Maximum permissible motor frequency.

Adapt the value to the motor and the mechanical situation.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
The function block can only be executed in the PLCopen state Disabled (operating
state 3 Switch On Disabled of drive). To transition to this state, disable the power
stage with the function block MC_Power.

Additional Information
Writing a Parameter, page 143

EIO0000003592.04 159
Function Blocks - Administrative

ResetParameters_ATV
Functional Description
This function block restores parameters to the factory settings.

Library and Namespace


Library name: GMC Independent Altivar
Namespace: GIATV

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

160 EIO0000003592.04
Function Blocks - Administrative

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
The function block can only be executed in the PLCopen state Disabled (operating
state 4 Ready To Switch On of drive). To transition to this state, disable the power
stage with the function block MC_Power.

Additional Information
Writing a Parameter, page 143

ResetParameters_LXM32
Functional Description
This function block restores parameters to the factory settings.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.

EIO0000003592.04 161
Function Blocks - Administrative

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
The function block can only be executed in the PLCopen state Disabled (operating
state 4 Ready To Switch On of drive). To transition to this state, disable the power
stage with the function block MC_Power.
Parameters are restored to the factory settings with the exception of:
• Communication parameters
• Inversion of direction of movement
• Type of reference value signal for PTI interface
• Settings of encoder simulation
• Functions of digital inputs and outputs
The new settings are not saved to the non-volatile memory. Use
StoreParameters_LXM32 to save the new settings to the non-volatile memory.

Additional Information
Writing a Parameter, page 143

ResetParameters_SD328A
Functional Description
This function block restores parameters to the factory settings.

162 EIO0000003592.04
Function Blocks - Administrative

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

EIO0000003592.04 163
Function Blocks - Administrative

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
The function block can only be executed in the PLCopen state Disabled (operating
state 4 Ready To Switch On of drive). To transition to this state, disable the power
stage with the function block MC_Power.
Parameters are restored to the factory settings with the exception of:
• Communication parameters
• Inversion of direction of movement
• Type of reference value signal for position interface
• Settings of encoder simulation
• Functions of digital inputs and outputs
• Control mode
• Logic type
• Default operating mode for Local Control Mode
• Motor type
The new settings are not saved to the non-volatile memory. Use
StoreParameters_SD328A to save the new settings to the non-volatile memory.

Additional Information
Writing a Parameter, page 143

ResetParameters_ILX
Functional Description
This function block restores parameters to the factory settings.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

164 EIO0000003592.04
Function Blocks - Administrative

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Notes
The function block can only be executed in the PLCopen state Disabled (operating
state 4 Ready To Switch On of drive). To transition to this state, disable the power
stage with the function block MC_Power.
Parameters are restored to the factory settings with the exception of:
• Communication parameters
• Inversion of direction of movement
• Functions of digital inputs and outputs
The new settings are not saved to the non-volatile memory. Use
StoreParameters_ILX to save the new settings to the non-volatile memory.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

EIO0000003592.04 165
Function Blocks - Administrative

Additional Information
Writing a Parameter, page 143

StoreParameters_ATV
Functional Description
This function block saves the parameter values to the non-volatile memory.

Library and Namespace


Library name: GMC Independent Altivar
Namespace: GIATV

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

166 EIO0000003592.04
Function Blocks - Administrative

Output Data type Description

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Writing a Parameter, page 143

StoreParameters_LXM32
Functional Description
This function block saves the parameter values to the non-volatile memory.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

EIO0000003592.04 167
Function Blocks - Administrative

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Writing a Parameter, page 143

StoreParameters_SD328A
Functional Description
This function block saves the parameter values to the non-volatile memory.

168 EIO0000003592.04
Function Blocks - Administrative

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

EIO0000003592.04 169
Function Blocks - Administrative

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Writing a Parameter, page 143

StoreParameters_ILX
Functional Description
This function block saves the parameter values to the non-volatile memory.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.

170 EIO0000003592.04
Function Blocks - Administrative

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Writing a Parameter, page 143

EIO0000003592.04 171
Function Blocks - Administrative

Inputs and Outputs


ReadAnalogInput_ATV
Functional Description
This function block reads the value of an analog input.

Library and Namespace


Library name: GMC Independent Altivar
Namespace: GIATV

Graphical Representation

Inputs
Input Data type Description

Enable BOOL Value range: FALSE, TRUE.

Default value: FALSE.

The input Enable starts or terminates execution of a function block.


• FALSE: Execution of the function block is terminated. The outputs Valid,
Busy, and Error are set to FALSE.
• TRUE: The function block is being executed. The function block continues
executing as long as the input Enable is set to TRUE.

InputNumber UINT Default value: 1

ATV320:

Value range: 1...3


• 1: AI1
• 2: AI2
• 3: AI3
ATV340/ATV6••/ATV9••:

Value range: 1...5


• 1: AI1
• 2: AI2
• 3: AI3
• 4: AI4 (with expansion card)
• 5: AI5 (with expansion card)

172 EIO0000003592.04
Function Blocks - Administrative

Outputs
Output Data type Description

Valid BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started or an error has been detected. The
values at the outputs are not valid.
• TRUE: Execution has been completed without an error detected. The values
at the outputs are valid and can be further processed.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Value INT Default value: 0

Corresponds to the input voltage in mV or the input current in 0.001 mA


increments at the selected analog input.

Inputs/Outputs
Input/Output Data type Description

Input Input_Ref Input is a special data type for digital and analog inputs (if available). The data
type corresponds to the axis reference from the device configuration (instance) to
which the inputs belong (similar to Axis). In the case of function blocks provided
for reading analog and digital inputs, Input replaces the input Axis.

Additional Information
Inputs and Outputs, page 172

EIO0000003592.04 173
Function Blocks - Administrative

MC_ReadDigitalInput
Functional Description
This function block reads the state of a digital input.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

174 EIO0000003592.04
Function Blocks - Administrative

Inputs
Input Data type Description

Enable BOOL Value range: FALSE, TRUE.

Default value: FALSE.

The input Enable starts or terminates execution of a function block.


• FALSE: Execution of the function block is terminated. The outputs Valid,
Busy, and Error are set to FALSE.
• TRUE: The function block is being executed. The function block continues
executing as long as the input Enable is set to TRUE.

InputNumber UINT Default value: 1

ATV320:

Value range: 1...6


• 1: LI1
• ...
• 6: LI6
ATV340/ATV6••/ATV9••:

Value range: 1...14


• 1: DI1
• ...
• 8: DI8
• 9: DI11 (with expansion card)
• ...
• 14: DI16 (with expansion card)
LXM32A/LXM32ICAN:

Value range: 1...4


• 1: DI0
• ...
• 4: DI3
LXM32M:

Value range: 1...10


• 1: DI0
• ...
• 6: DI5
• 7: DI10 (with IOM1 module)
• ...
• 10: DI13 (with IOM1 module)
SD328A:

Value range: 1...4


• 1: LI1
• ...
• 4: LI4
Lexium ILA, ILE and ILS integrated drives:

Value range: 1...4


• 1: LIO1 (EtherNet/IP, Modbus TCP), IO0 (CANopen)
• ...
• 4: LIO4 (EtherNet/IP, Modbus TCP), IO3 (CANopen)

EIO0000003592.04 175
Function Blocks - Administrative

Outputs
Output Data type Description

Valid BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started or an error has been detected. The
values at the outputs are not valid.
• TRUE: Execution has been completed without an error detected. The values
at the outputs are valid and can be further processed.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Value BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Level at selected input is 0 V.
• TRUE: Level at selected input is 24 V.

Inputs/Outputs
Input/Output Data type Description

Input MC_Input_Ref Input is a special data type for digital and analog inputs (if available). The data
type corresponds to the axis reference from the device configuration (instance) to
which the inputs belong (similar to Axis). In the case of function blocks provided
for reading analog and digital inputs, Input replaces the input Axis.

Additional Information
Inputs and Outputs, page 172

176 EIO0000003592.04
Function Blocks - Administrative

MC_ReadDigitalOutput
Functional Description
This function block reads the state of a digital output.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

EIO0000003592.04 177
Function Blocks - Administrative

Inputs
Input Data type Description

Enable BOOL Value range: FALSE, TRUE.

Default value: FALSE.

The input Enable starts or terminates execution of a function block.


• FALSE: Execution of the function block is terminated. The outputs Valid,
Busy, and Error are set to FALSE.
• TRUE: The function block is being executed. The function block continues
executing as long as the input Enable is set to TRUE.

OutputNumber UINT Default value: 1

ATV320:

Value range: 1...3


• 1: Relay1
• 2: Relay2
• 3: LO1
ATV340/ATV6••/ATV9••:

Value range: 1...10


• 1: Relay1
• 2: Relay2
• 3: Relay3
• 4: Relay4 (with expansion card)
• 5: Relay5 (with expansion card)
• 6: Relay6 (with expansion card)
• 7: DQ1 (only ATV340 and ATV9••)
• 8: DQ2 (only ATV340)
• 9: DQ11 (with expansion card)
• 10: DQ12 (with expansion card)
LXM32A/LXM32ICAN:

Value range: 1...2


• 1: DQ0
• 2: DQ1
LXM32M:

Value range: 1...5


• 1: DQ0
• 2: DQ1
• 3: DQ2
• 4: DQ10 (with IOM1 module)
• 5: DQ11 (with IOM1 module)
SD328A:

Value range: 1...2


• 1: LO1_OUT
• 2: LO2_OUT
Lexium ILA, ILE and ILS integrated drives:

Value range: 1...4


• 1: LIO1 (EtherNet/IP, Modbus TCP), IO0 (CANopen)
• ...
• 4: LIO4 (EtherNet/IP, Modbus TCP), IO3 (CANopen)

178 EIO0000003592.04
Function Blocks - Administrative

Outputs
Output Data type Description

Valid BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started or an error has been detected. The
values at the outputs are not valid.
• TRUE: Execution has been completed without an error detected. The values
at the outputs are valid and can be further processed.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Value BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Level at selected input is 0 V.
• TRUE: Level at selected input is 24 V.

Inputs/Outputs
Input/Output Data type Description

Output MC_Output_Ref Output is a special data type for digital and analog outputs (if available). The data
type corresponds to the axis reference from the device configuration (instance) to
which the outputs belong (similar to Axis). In the case of function blocks provided
for writing and reading digital inputs, Output replaces the output Axis.

Additional Information
Inputs and Outputs, page 172

EIO0000003592.04 179
Function Blocks - Administrative

MC_WriteDigitalOutput
Functional Description
This function block sets the state of a digital output.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

180 EIO0000003592.04
Function Blocks - Administrative

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.
OutputNumber UINT Default value: 1

ATV320:

Value range: 1...3


• 1: Relay1
• 2: Relay2
• 3: LO1
ATV340/ATV6••/ATV9••:

Value range: 1...10


• 1: Relay1
• 2: Relay2
• 3: Relay3
• 4: Relay4 (with expansion card)
• 5: Relay5 (with expansion card)
• 6: Relay6 (with expansion card)
• 7: DQ1 (only ATV340 and ATV9••)
• 8: DQ2 (only ATV340)
• 9: DQ11 (with expansion card)
• 10: DQ12 (with expansion card)
LXM32A/LXM32ICAN:

Value range: 1...2


• 1: DQ0
• 2: DQ1
LXM32M:

Value range: 1...5


• 1: DQ0
• 2: DQ1
• 3: DQ2
• 4: DQ10 (with IOM1 module)
• 5: DQ11 (with IOM1 module)
Lexium ILA, ILE and ILS integrated drives:

Value range: 1...4


• 1: LIO1 (EtherNet/IP, Modbus TCP), IO0 (CANopen)
• ...
• 4: LIO4 (EtherNet/IP, Modbus TCP), IO3 (CANopen)

Value BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: 0 V is written to the selected signal output.
• TRUE: 24 V is written to the selected signal output.

EIO0000003592.04 181
Function Blocks - Administrative

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Output MC_Output_Ref Output is a special data type for digital and analog outputs (if available). The data
type corresponds to the axis reference from the device configuration (instance) to
which the outputs belong (similar to Axis). In the case of function blocks provided
for writing and reading digital inputs, Output replaces the output Axis.

Additional Information
Inputs and Outputs, page 172

182 EIO0000003592.04
Function Blocks - Administrative

Error Handling
ReadAxisWarning_LXM32
Functional Description
This function block reads the error code of the most recent detected error of error
class 0.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

Inputs
Input Data type Description

Enable BOOL Value range: FALSE, TRUE.

Default value: FALSE.

The input Enable starts or terminates execution of a function block.


• FALSE: Execution of the function block is terminated. The outputs Valid,
Busy, and Error are set to FALSE.
• TRUE: The function block is being executed. The function block continues
executing as long as the input Enable is set to TRUE.

Outputs
Output Data type Description

Valid BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started or an error has been detected. The
values at the outputs are not valid.
• TRUE: Execution has been completed without an error detected. The values
at the outputs are valid and can be further processed.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

EIO0000003592.04 183
Function Blocks - Administrative

Output Data type Description

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

WarningID WORD Default value: 0

Error code of the most recent detected error of error class 0.

Refer to the drive documentation for a description of the error codes and classes.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Error Handling, page 183

ReadAxisWarning_ILX
Functional Description
This function block reads the error code of the most recent detected error of error
class 0.

Library and Namespace


Library name: GMC Independent Lexium
Namespace: GILXM

Graphical Representation

184 EIO0000003592.04
Function Blocks - Administrative

Inputs
Input Data type Description

Enable BOOL Value range: FALSE, TRUE.

Default value: FALSE.

The input Enable starts or terminates execution of a function block.


• FALSE: Execution of the function block is terminated. The outputs Valid,
Busy, and Error are set to FALSE.
• TRUE: The function block is being executed. The function block continues
executing as long as the input Enable is set to TRUE.

Outputs
Output Data type Description

Valid BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started or an error has been detected. The
values at the outputs are not valid.
• TRUE: Execution has been completed without an error detected. The values
at the outputs are valid and can be further processed.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

WarningID WORD Default value: 0

Error code of the most recent detected error of error class 0.

Refer to the drive documentation for a description of the error codes and classes.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Error Handling, page 183

EIO0000003592.04 185
Function Blocks - Administrative

MC_ReadAxisError
Functional Description
This function block reads the error information relative to the most recent detected
error.

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

Inputs
Input Data type Description

Enable BOOL Value range: FALSE, TRUE.

Default value: FALSE.

The input Enable starts or terminates execution of a function block.


• FALSE: Execution of the function block is terminated. The outputs Valid,
Busy, and Error are set to FALSE.
• TRUE: The function block is being executed. The function block continues
executing as long as the input Enable is set to TRUE.

Outputs
Output Data type Description

Valid BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started or an error has been detected. The
values at the outputs are not valid.
• TRUE: Execution has been completed without an error detected. The values
at the outputs are valid and can be further processed.

Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

186 EIO0000003592.04
Function Blocks - Administrative

Output Data type Description

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

AxisErrorID WORD Initial value: 0

This output shows library-specific and drive-specific error codes. Refer to the
chapter Library Diagnostic Codes, page 30 for a list of the library-specific error
codes. Refer to the drive documentation for an overview of the drive-specific error
codes.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Additional Information
Error Handling, page 183

MC_Reset
Functional Description
This function block acknowledges an error message. The error memory is cleared
so that it is available for new error messages. If the power stage is disabled by the
automatic error response, it can be enabled again if the cause of the detected
error has been rectified when the error message is acknowledged.
NOTE: If there is no drive error active, the function block itself will set ErrorId =
109 (Device state invalid).

Library and Namespace


Library name: GMC Independent PLCopen MC
Namespace: GIPLC

Graphical Representation

EIO0000003592.04 187
Function Blocks - Administrative

Inputs
Input Data type Description

Execute BOOL Value range: FALSE, TRUE.

Default value: FALSE.

A rising edge of the input Execute starts the function block. The function block
continues execution and the output Busy is set to TRUE.

A rising edge at the input Execute is ignored while the function block is being
executed.
• FALSE: If Enable is set to FALSE, the outputs Done, Error, or
CommandAborted are set to TRUE for one cycle.
• TRUE: If Enable is set to FALSE, the outputs Done, Error, or
CommandAborted remain set to TRUE.

Outputs
Output Data type Description

Done BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution has not been started, or an error has been detected.
• TRUE: Execution terminated without an error detected.
Busy BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Function block is not being executed.
• TRUE: Function block is being executed.

Error BOOL Value range: FALSE, TRUE.

Default value: FALSE.


• FALSE: Execution of the function block is running, no error has been
detected.
• TRUE: An error has been detected in the execution of the function block.
ErrorID WORD Returns the value of a diagnostic code. Refer to Library Diagnostic Codes, page
30. If the value is 0 and if the output Error of this function block is set to TRUE,
then the diagnostic code can be read with the output AxisErrorID of the function
block MC_ReadAxisError, page 186.

Inputs/Outputs
Input/Output Data type Description

Axis Axis_Ref Reference to the axis (instance) for which the function block is to be executed
(corresponds to the name of the axis). The name of the axis must be defined in
the EcoStruxure Machine Expert Devices tree.

Notes
If you have activated this function block, simultaneous use of the Control_ATV
function block may lead to unintended behavior.

188 EIO0000003592.04
Function Blocks - Administrative

WARNING
UNINTENDED EQUIPMENT OPERATION
• Do not activate the Control_ATV function block when this function block is
active.
• Deactivate this function block or allow the function block to terminate before
activating the Control_ATV function block.
Failure to follow these instructions can result in death, serious injury, or
equipment damage.

Additional Information
Error Handling, page 183

EIO0000003592.04 189
Glossary
B
byte:
A type that is encoded in an 8-bit format, ranging from 00 hex to FF hex.

H
homing:
The method used to establish the reference point for absolute movement.

P
PLCopen:
For more information, refer to http://www.plcopen.org/.

EIO0000003592.04 191
Index MC_ReadStatus.................................................. 137
MC_Reset .......................................................... 187
MC_SetPosition ....................................................95
MC_Stop ..............................................................97
C MC_TorqueControl ................................................53
common inputs and outputs MC_TouchProbe ................................................. 108
behavior of function blocks with the input MC_WriteDigitalOutput ........................................ 180
Enable.............................................................36 MC_WriteParameter............................................ 143
behavior of function blocks with the input MoveVelocity_LXM32 ............................................61
Execute ...........................................................38 MoveVelocity_SD328A ..........................................64
Control_ATV .........................................................70

O
E operating mode Electronic Gear ........................... 119
error handling...................................................... 183 operating mode Homing.........................................84
operating mode Jog...............................................43
operating mode Profile Position ..............................77
G operating mode Profile Torque................................53
operating mode Profile Velocity ..............................59
GearIn_LXM32 ................................................... 126 operating mode SpeedControl................................75
GearInPos_ILX ................................................... 123
GearInPos_LXM32.............................................. 119
GearInPos_SD328A ............................................ 121 P
general description
libraries and related function blocks.....................16 position capture via signal input ............................ 108
library diagnostic codes ......................................30
PLCopen state diagram ......................................20
transitions between function blocks .....................21 R
ReadAnalogInput_ATV ........................................ 172
ReadAxisWarning_ILX......................................... 184
H ReadAxisWarning_LXM32 ................................... 183
Halt_LXM32........................................................ 106 reading a parameter ............................................ 129
Home_ILX ............................................................91 ResetParameters_ATV ........................................ 160
Home_LXM32.......................................................86 ResetParameters_ILX ......................................... 164
Home_SD328A .....................................................89 ResetParameters_LXM32.................................... 161
ResetParameters_SD328A .................................. 162

I
S
initialization...........................................................40
inputs and outputs ............................................... 172 SetDriveRamp_ATV ............................................ 145
SetDriveRamp_ILX.............................................. 150
SetDriveRamp_LXM32 ........................................ 147
J SetDriveRamp_SD328A ...................................... 149
SetFrequencyRange_ATV ................................... 158
Jog_ILX................................................................50 SetLimitSwitch_ILX ............................................. 156
Jog_LXM32 ..........................................................45 SetLimitSwitch_LXM32........................................ 152
Jog_SD328A ........................................................48 SetLimitSwitch_SD328A ...................................... 154
SetStopRamp_ILX .............................................. 101
SetStopRamp_LXM32 ...........................................99
M SetTorqueRamp_LXM32 .......................................54
MC_AbortTrigger................................................. 116 SpeedControl_ILX.................................................75
MC_Halt ............................................................. 104 Stop_LXM32....................................................... 102
MC_Home ............................................................84 stopping ...............................................................97
MC_Jog................................................................43 StoreParameters_ATV......................................... 166
MC_MoveAbsolute ................................................77 StoreParameters_ILX .......................................... 170
MC_MoveAdditive .................................................79 StoreParameters_LXM32 .................................... 167
MC_MoveRelative.................................................81 StoreParameters_SD328A................................... 168
MC_MoveVelocity .................................................59
MC_Power............................................................40
MC_ReadActualPosition ...................................... 132 T
MC_ReadActualTorque ....................................... 129 TorqueControl_LXM32...........................................56
MC_ReadActualVelocity ...................................... 130 TouchProbe_ILX ................................................. 114
MC_ReadAxisError ............................................. 186 TouchProbe_LXM32............................................ 110
MC_ReadAxisInfo ............................................... 133 TouchProbe_SD328A .......................................... 112
MC_ReadDigitalInput .......................................... 174
MC_ReadDigitalOutput........................................ 177
MC_ReadMotionState ......................................... 135
MC_ReadParameter ........................................... 140

192 EIO0000003592.04
V
VelocityControlAnalogInput_ATV ............................66
VelocityControlSelectAI_ATV .................................68

W
writing a parameter.............................................. 143

EIO0000003592.04 193
Schneider Electric
35 rue Joseph Monier
92500 Rueil Malmaison
France
+ 33 (0) 1 41 29 70 00
www.se.com

As standards, specifications, and design change from time to time,


please ask for confirmation of the information given in this publication.

© 2023 Schneider Electric. All rights reserved.


EIO0000003592.04

You might also like