hoisting - industrial crane m241 safety - project template
TRANSCRIPT
Hoisting
EIO0000001763 05/2014
EIO
0000
0017
63.0
1
www.schneider-electric.com
HoistingIndustrial Crane M241 Safety Project Template User Guide
05/2014
The information provided in this documentation contains general descriptions and/or technical characteristics of the performance of the products contained herein. This documentation is not intended as a substitute for and is not to be used for determining suitability or reliability of these products for specific user applications. It is the duty of any such user or integrator to perform the appropriate and complete risk analysis, evaluation and testing of the products with respect to the relevant specific application or use thereof. Neither Schneider Electric nor any of its affiliates or subsidiaries shall be responsible or liable for misuse of the information contained herein. If you have any suggestions for improvements or amendments or have found errors in this publication, please notify us.
No part of this document may be reproduced in any form or by any means, electronic or mechanical, including photocopying, without express written permission of Schneider Electric.
All pertinent state, regional, and local safety regulations must be observed when installing and using this product. For reasons of safety and to help ensure compliance with documented system data, only the manufacturer should perform repairs to components.
When devices are used for applications with technical safety requirements, the relevant instructions must be followed.
Failure to use Schneider Electric software or approved software with our hardware products may result in injury, harm, or improper operating results.
Failure to observe this information can result in injury or equipment damage.
© 2014 Schneider Electric. All rights reserved.
2 EIO0000001763 05/2014
Table of Contents
Safety Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5About the Book. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 1 Industrial Crane Application Template. . . . . . . . . . . . . 11Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Before You Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Chapter 2 Industrial Crane Architecture and Environment . . . . . 15Architecture Related Safety Information . . . . . . . . . . . . . . . . . . . . . . . 16Hardware Architecture. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17Hoisting Application System Requirements. . . . . . . . . . . . . . . . . . . . . 19
Chapter 3 Hardware Configuration. . . . . . . . . . . . . . . . . . . . . . . . . 21Embedded I/Os of Controller 1 (MyController1) . . . . . . . . . . . . . . . . . 22Drive I/Os for Controller 1 (MyController1) . . . . . . . . . . . . . . . . . . . . . 24Embedded I/Os of Controller 2 (MyController2) . . . . . . . . . . . . . . . . . 25Embedded I/Os of Preventa XPSMC Safety Controller. . . . . . . . . . . . 27
Chapter 4 Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31Ethernet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32CANopen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Chapter 5 Drive Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Hoisting Drive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Drives for Horizontal Axes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
Chapter 6 Application Software Controller 1 (MyController1) . . . 496.1 Library Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Library Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 506.2 Task Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Task Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 516.3 Global Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Global Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 526.4 Using CSV File for Automatic Configuration . . . . . . . . . . . . . . . . . . . . 53
Using CSV File for Automatic Configuration . . . . . . . . . . . . . . . . . . . . 536.5 Crane Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58
Application_MastTask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59Hoisting_Axis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62Trolley_Axis and Translation_Axis . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
6.6 Application Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70Display Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
EIO0000001763 05/2014 3
6.7 CanOpenState Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77CanOpenState Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Chapter 7 Application Software Controller 2 (MyController2). . . 79Library Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80Task Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81Global Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82Application_MastTask . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
Chapter 8 Interaction between Two Controllers . . . . . . . . . . . . . . 85Interaction between Two Controllers . . . . . . . . . . . . . . . . . . . . . . . . . . 85
Chapter 9 Safety Relevant Functions . . . . . . . . . . . . . . . . . . . . . . 87Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88Safety Relevant Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89Preventa XPSMC Safety Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . 95Preventa XPSMC Safety Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96
Chapter 10 Magelis HMI STU 855 Display . . . . . . . . . . . . . . . . . . . . 99Magelis HMI STU 855 Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
4 EIO0000001763 05/2014
Safety Information
Important Information
NOTICE
Read these instructions carefully, and look at the equipment to become familiar with the device before trying to install, operate, 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.
EIO0000001763 05/2014 5
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.
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.
WARNINGUNGUARDED 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.
6 EIO0000001763 05/2014
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 be made and that enough time is allowed to perform complete and satisfactory testing.
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.
CAUTIONEQUIPMENT 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 injury or equipment damage.
EIO0000001763 05/2014 7
OPERATION AND ADJUSTMENTS
The following precautions are from the NEMA Standards Publication ICS 7.1-1995 (English version prevails): 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 actually required by the operator should be accessible to the operator. Access to other controls should be restricted to prevent unauthorized changes in operating characteristics.
8 EIO0000001763 05/2014
About the Book
At a Glance
Document Scope
This document describes an application template to be used with a Modicon M241 Logic Controller and an HMI STU 855 display for industrial crane applications.
NOTE: The term “functional safety” and “safety”, as used in this document, is defined by the standards EN ISO 13849-1, EN 15011 and EN 14439.
Validity Note
This document has been updated with the release of SoMachine 4.1 Hoisting Library and Project Template add-on.
Related Documents
You can download these technical publications and other technical information from our website at www.schneider-electric.com.
Title of Documentation Reference Number
SoMachine, Hoisting Application Functions, Hoisting Library Guide EIO0000000620
EIO0000001763 05/2014 9
Product Related Information
1 For 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.
WARNINGLOSS OF CONTROL
The designer of any control scheme must consider the potential failure modes of control paths and, for certain critical control functions, provide a means to achieve a safe state during and after a path failure. Examples of critical control functions are emergency stop and overtravel stop, power outage and restart.
Separate or redundant control paths must be provided for critical control functions. System control paths may include communication links. Consideration must be given to the
implications of unanticipated transmission delays or failures of the link.
Observe all accident prevention regulations and local safety guidelines.1
Each implementation of this equipment must be individually and thoroughly tested for proper operation before being placed into service.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
WARNINGUNINTENDED 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.
10 EIO0000001763 05/2014
Hoisting
Industrial Crane Application Template
EIO0000001763 05/2014
Industrial Crane Application Template
Chapter 1Industrial Crane Application Template
Overview
This chapter gives brief introduction about application template.
What Is in This Chapter?
This chapter contains the following topics:
Topic Page
Introduction 12
Before You Begin 13
EIO0000001763 05/2014 11
Industrial Crane Application Template
Introduction
The template project is an example of an application used to control bridge and portal cranes. It includes a hardware configuration for a crane with three axes and programs for controlling the hoist, trolley, and translation movement. It also includes CANopen configuration for various drive configurations.
The functions requiring parameterization can be parameterized through comma separated values (CSV) file or through human machine interface (HMI). This makes commissioning without using PC possible. A PC with SoMachine software installed is necessary to download this template project to M241.
This template project is based on the template project for an M241 with HMI STU 855.
12 EIO0000001763 05/2014
Industrial Crane Application Template
Before You Begin
General
The products specified in this document have been tested under actual service conditions. Of course, your specific application requirements may be different from those assumed for this and any related examples, templates or architectures described herein. In that case, you will have to adapt the information provided in this and other related documents to your particular needs. To do so, you will need to consult the specific product documentation of the hardware and/or software components that you may add or substitute for any information specified in this documentation. Pay particular attention and conform to any safety information, different electrical requirements and normative standards that would apply to your adaptation.
Of particular relevance in many countries is the standards specifically addressing crane applications such as, among others, EN/ISO 60204-32, which governs many environmental characteristics of the equipment proposed in the architectures contained herein. If the intended environment of your machine does not conform to the environmental characteristics specified by the standards such as, but not limited to, temperature, vibration or electromagnetic interference, additional measures and or equipment may be required that are beyond the scope of the architectures presented by this document or other supporting material.
The use and application of the information contained herein require expertise in the design and programming of automated control systems. Only you, the user, machine builder or integrator, can be aware of all the conditions and factors present during installation and setup, operation, and maintenance of the machine or related processes, and can therefore determine the automation and associated equipment and the related safeties and interlocks which can be effectively and properly used. When selecting automation and control equipment, and any other related equipment or software, for a particular application, you must also consider any applicable local, regional or national standards and/or regulations.
Some of the major software functions and/or hardware components used in the proposed architectures and examples described in this document cannot be substituted without significantly compromising the performance or conformance of your application. Further, any such substitutions or alterations may completely invalidate any proposed architectures, descriptions, examples, instructions, wiring diagrams and/or compatibility between the various hardware components and software functions specified herein and in related documentation. You must be aware of the consequences of any modifications, additions or substitutions.
WARNINGREGULATORY INCOMPATIBILITY
Be sure that all equipment applied and systems designed comply with all applicable local, regional and national regulations and standards.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EIO0000001763 05/2014 13
Industrial Crane Application Template
A residual risk, as defined by EN/ISO 12100-1, Article 5, will remain if: it is necessary to modify the recommended logic and if the added or modified components are
not properly integrated in the control circuit. you do not follow the required standards applicable to the operation of the machine, or if the
adjustments to and the maintenance of the machine are not properly made (it is essential to strictly follow the prescribed machine maintenance schedule).
the devices connected to any safety outputs do not have mechanically-linked contacts.
CAUTIONEQUIPMENT INCOMPATIBILITY
Read and thoroughly understand all device and software documentation before attempting any component substitutions or other changes related to the application examples provided in the document.
Failure to follow these instructions can result in injury or equipment damage.
14 EIO0000001763 05/2014
Hoisting
Industrial Crane Architecture and Environment
EIO0000001763 05/2014
Industrial Crane Architecture and Environment
Chapter 2Industrial Crane Architecture and Environment
Overview
This chapter provides the hardware architecture and environment. Altivar 312 does not support the Safe Torque Off (STO) function. Consider replacing it with Altivar 32. To use Altivar 312 in a performance level d (PLd) architecture, the output of Preventa XPSMC Safety Controller is normally connected to Safe Torque Off input of a drive. Use this input to galvanically disconnect the motor from the drive and to open the brake circuit. To reach performance level d (PLd), use two contactors to disconnect the motor and two contactors to disconnect the brake.
What Is in This Chapter?
This chapter contains the following topics:
Topic Page
Architecture Related Safety Information 16
Hardware Architecture 17
Hoisting Application System Requirements 19
EIO0000001763 05/2014 15
Industrial Crane Architecture and Environment
Architecture Related Safety Information
Remote Devices
Remote control operating devices may lead to unintended equipment operation by: incorrect operation insufficient view on the machine during operation unintentional manipulation
The manufacturer or the operating company of the machine must take precautions to avoid unintentional equipment operation that may be caused by remote control.
WARNINGUNINTENDED EQUIPMENT OPERATION
Place operator devices of the control system near the machine or in a place where you have full view of the machine.
Protect critical operator commands against unauthorized access (for example, by access control, password protection, or key switch).
Ensure that unintended equipment operation (for example by remote control) is prohibited at machine site.
If remote control is a necessary design aspect of the application, ensure that there is a local, competent, and qualified observer present when operating from a remote location.
Configure and install the RUN/STOP input for the application so that local control over the starting or stopping of the controller can be maintained regardless of the remote commands sent to any controller.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
16 EIO0000001763 05/2014
Industrial Crane Architecture and Environment
Hardware Architecture
Overview
The following figure shows supported hardware architecture of an industrial crane. Altivar 71 is used for Hoist axis. Altivar 312, Altivar 32, and Altivar 71 variable speed drives are supported for trolley and translation (bridge) axes.
The application supports two controllers in this architecture. One controller controls movement of the crane and the other supervises correct function of the first controller.
Example of Template Architecture
The following figure shows an architecture example of template architecture:
EIO0000001763 05/2014 17
Industrial Crane Architecture and Environment
1 Ewon VPN Gateway 11 Preventa XPSMC
2 Magelis HMI STU 855 12 Altivar active front end
3 Tesys Compact NSX 13 ATV71
4 Phaseo power supply 14 XCC multitum CANopen encoder
5 eXLHoist receiver 15 XCC incremental encoder
6 Harmony XALK 16 XCKVR limit switch
7 Modicon M241 17 XR2 gear limit switch
8 eXLHoist transmitter 18 Scaime load cell
9 Harmony XVGU 19 PM3255 power meter
10 TeSys GV2 – –
18 EIO0000001763 05/2014
Industrial Crane Architecture and Environment
Hoisting Application System Requirements
Using the Library
For more detailed information, see Schneider Electric Libraries (see SoMachine, Functions and Libraries User Guide).
For IEC 61131-3 compatibility, the ability to add the EN/ENO input/output automatically to Function Blocks of certain programming languages is available to the programmer. However, for certain applications that require the complex interaction of multiple function blocks, the use of the IEC 61131-3 input to disable a function block in a series of interrelated functions affecting a process may lead to unintended operation of the system as a whole. For the functions contained in the Library that is the topic of the current document, this is especially true.
The EN/ENO inputs and outputs as defined by IEC 61131-3 are maladapted to, and therefore inappropriate for, the targeted application of these functions. Suddenly disabling one function by a falling edge on the EN input would require all outputs of the function block to immediately fall to their default states, and such an unanticipated action would cause in abrupt change to the entire process. The implication is that such an event would have deleterious results that may invoke undesirable consequences. Therefore, the EN/ENO inputs/outputs as defined by IEC 61131-3 are incompatible with the functions contained within this library.
NOTE: Verify that the EN/ENO option is disabled in the compiler options menu of SoMachine.
WARNINGUNINTENDED EQUIPMENT OPERATION
Verify the SoMachine libraries contained in your program are the correct version after updating SoMachine software.
Verify that the library versions updated are consistent with your application specifications.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
WARNINGUNINTENDED MACHINE OPERATION
Do not use the EN/ENO functionality defined by IEC 61131-3 to control the behavior of the Application Function blocks.
Failure to follow these instructions can result in death, serious injury, or equipment damage.
EIO0000001763 05/2014 19
Industrial Crane Architecture and Environment
System Requirements
Requirements Description
M241 The M241 controllers are connected to the HMI through an Ethernet cable.
Encoder An encoder is used to provide position feedback to the application.The application example uses the position value of an incremental encoder connected to the hoist drive. You can also use different position measurement methods. For example, you can use an absolute encoder on CANopen. However, any alternate method would require a modification of the application example.
20 EIO0000001763 05/2014
Hoisting
Hardware Configuration
EIO0000001763 05/2014
Hardware Configuration
Chapter 3Hardware Configuration
Overview
This chapter describes the inputs and outputs of both controllers.
What Is in This Chapter?
This chapter contains the following topics:
Topic Page
Embedded I/Os of Controller 1 (MyController1) 22
Drive I/Os for Controller 1 (MyController1) 24
Embedded I/Os of Controller 2 (MyController2) 25
Embedded I/Os of Preventa XPSMC Safety Controller 27
EIO0000001763 05/2014 21
Hardware Configuration
Embedded I/Os of Controller 1 (MyController1)
Overview
Some of the digital inputs of the M241 are used for signals coming from the crane and operator. The remaining signals are connected to the digital and analog inputs of the drives. The digital outputs of M241 provide the information about state of the machine. Other signals of the crane are connected to the digital and analog inputs of the drives, and are brought into the logic of the controller through CANopen.
Input Variables
TMC4HOIS01 hoisting cartridge:
TM3AI2H analog input module:
Input Variable Description
I0 li_xLsHstSlowFwd Signal from hoist slow forward limit switch (NC)
I1 li_xLsHstSlowRev Signal from hoist slow reverse limit switch (NC)
I2 li_xLsTrolSlowFwd Signal from trolley slow forward limit switch (NC)
I3 li_xLsTrolSlowRev Signal from trolley slow reverse limit switch (NC)
I4 li_xLsTransSlowFwd Signal from translation slow forward limit switch (NC)
I5 li_xLsTransSlowRev Signal from translation slow reverse limit switch (NC)
I6 li_xSpeedHstBit1 Bit 1 of speed selection for hoist axis
I7 li_xSpeedTrolBit1 Bit 1 of speed selection for trolley axis
I8 li_xSpeedTransBit1 Bit 1 of speed selection for translation axis
I9 li_xAswEn Command to enable Anti-sway
I10-I11 – Reserved
I12 li_xDcAppOk Application OK signal from the second M241 controller
I13 li_xDcAppOkPuls Application OK pulse signal from the second M241 controller.
Input Variable Description
IW0 i_iTrolDistVal Distance measurement 4...20 mA trolley forward
IW1 i_iTransDistVal Distance measurement 4...20 mA translation forward
Input Variable Description
IW0 i_iHoistLoadVal Load measurement 4...20 mA
IW1 – –
22 EIO0000001763 05/2014
Hardware Configuration
Output Variables
Output Variable Description
Q0 lq_xAswActive Anti-sway function currently active
Q1 lq_xAlrm Application detected alarm present
Q2 lq_xOrangeLamp Overload - Orange lamp signal
Q3 lq_xRedLamp Overload - Red lamp signal
Q4 lq_xHorn Overload - Horn signal
Q5 lq_xLsTrolOk Information about the validity of trolley limit switch for XPSMC (TRUE when both limit switch channel signals are equal)
Q6 lq_xLsTransOk Information about the validity of translation limit switch for XPSMC (TRUE when both limit switch channel signals are equal)
Q7 lq_AppOk Application OK output for MyController 2
Q8 lq_xAppOkPuls Application OK pulse output for MyController 2
Q9 – Alarm output for XPSMC
EIO0000001763 05/2014 23
Hardware Configuration
Drive I/Os for Controller 1 (MyController1)
Overview
The digital and analog inputs of the connected drives are read through CANopen and are used in the application.
Input Variables
The following inputs mapping are common to drives:
The following inputs mapping are specific to hoist drive:
Input Variable Description
LI1 Forward command Applicable for all drives
LI2 Reverse
LI3 Speed selection bit 1
LI4 Limit switch forward
LI5 Limit switch reverse
LI6 Forced local mode Applicable for all drivesIn local mode, another drive configuration must be used (multi-assignment for LI6)
AI1 Analog speed reference Applicable for all drives
Input Variable Description
LI7 Load length selector bit 0 Hoisting axis Anti-sway load length selectionBasic I/O extension card (hoist drive only)
LI8 Load length selector bit 1 Hoisting axis Anti-sway load length selectionBasic I/O extension card (hoist drive only)
LI9 Alarm reset Detected alarm resetBasic I/O extension card (hoist drive only)
24 EIO0000001763 05/2014
Hardware Configuration
Embedded I/Os of Controller 2 (MyController2)
Overview
The digital inputs of controller 2 are used for mutual exchange of diagnostic information between the two controllers and for detection of overspeed situation.
Input Variables
TMC4HOIS01 hoisting cartridge:
TM3AI2H analog input module:
Input Variable Description
I0 – Phase 1 of quadrature counter for speed measurement
I1 – Phase 2 of quadrature counter for speed measurement
I2-I11 – Reserved
I12 li_xDcAppOk Application OK signal from the first M241 controller
I13 li_xDcAppOkPuls Application OK pulse signal from the first M241 controller
Analog input channel Variable Description
IW0 i_iTrolDistVal Distance measurement 4...20 mA trolley reverse
IW1 i_iTransDistVal Distance measurement 4...20 mA translation reverse
Analog input channel Variable Description
IW0 i_iHoistLoadVal Load measurement 4...20 mA
IW1 – –
EIO0000001763 05/2014 25
Hardware Configuration
Output Variables
Output Variable Description
Q0 lq_xLsTrolOk Limit switch consistency check trolley
Q1 lq_xLsTrolOk Limit switch consistency check translation
Q2 lq_xLoadMeasOk Load measurement consistency check
Q3 lq_xSpeedMeasOk Speed measurement consistency check
Q4 – –
Q5 – –
Q6 – –
Q7 lq_xAppOk Application OK output for controller 1
Q8 lq_xAppOkPuls Application OK pulse output for controller 1
Q9 Alarm output Configured alarm output handled by controller runtime. Signal is connected to the Preventa XPSMC Safety Controller
26 EIO0000001763 05/2014
Hardware Configuration
Embedded I/Os of Preventa XPSMC Safety Controller
Overview
The safety controller provides the status overview of its digital inputs and authorizes movement of crane axes. If the conditions are not fulfilled, the controller stops related axis using Safe Torque Off input of corresponding Altivar variable speed drive. The status of the inputs and outputs is read through CANopen.
EIO0000001763 05/2014 27
Hardware Configuration
Inputs
Input Variable Description
I1 – Limit switch trolley forward stop (from cross limit switch or digital output of the distance measurement sensor).
I2 Limit switch trolley reverse stop (from cross limit switch or digital output of the distance measurement sensor).
I3 Limit switch trolley forward slow (from cross limit switch or digital output of the distance measurement sensor).
I4 Limit switch trolley reverse slow (from cross limit switch or digital output of the distance measurement sensor).
I5 Limit switch trolley OK.
I6 Laser distance consistency trolley.
I7 Limit switch translation forward stop (from cross limit switch or digital output of the distance measurement sensor).
I8 Limit switch translation reverse stop (from cross limit switch or digital output of the distance measurement sensor).
I9 Limit switch translation forward slow (from cross limit switch or digital output of the distance measurement sensor).
I10 Limit switch translation reverse slow (from cross limit switch or digital output of the distance measurement sensor).
I11 Limit switch translation OK.
I12 Laser distance consistency trolley.
I13 Load signal consistency.
I14 Overspeed measurement speed consistency.
I15 Safety top limit switch hoist, contact 1.
I16 Safety top limit switch hoist, contact 2.
I17 eXLHoist emergency stop, contact 1.
I18 eXLHoist emergency stop, contact 2.
I19 Alarm output M241CEC24T/U (MyController1).
I20 Alarm output M241CEC24T/U (MyController2).
I21 Key switch - safety override.
I22–32 Reserved.
28 EIO0000001763 05/2014
Hardware Configuration
Outputs
Output Variable Description
Q1 – Connected to safe torque off (PWR) input of hoist ATV71.
Q2 Connected to safe torque off (PWR) input of trolley ATV71.
Q3 Connected to safe torque off (PWR) input of translation ATV71.
EIO0000001763 05/2014 29
Hardware Configuration
30 EIO0000001763 05/2014
Hoisting
Communication
EIO0000001763 05/2014
Communication
Chapter 4Communication
Overview
This chapter describes the communication.
This template uses two communication interfaces. The CANopen fieldbus connects the Modicon M241 Logic Controller to Altivar 71, Altivar 312, Altivar 32 variable speed drives and the second M241. Both M241 controllers and Magelis HMI STU 855 communicate through Ethernet.
What Is in This Chapter?
This chapter contains the following topics:
Topic Page
Ethernet 32
CANopen 33
EIO0000001763 05/2014 31
Communication
Ethernet
The M241 is configured with a fixed IP address 192.168.1.55 and subnet mask 255.255.255.0.
The second M241 is configured with a fixed IP address 192.168.1.56 and subnet mask 255.255.255.0.
The HMI is configured with a fixed IP address 192.168.1.57 and subnet mask 255.255.255.0.
32 EIO0000001763 05/2014
Communication
CANopen
Controller 1 (MyController1)
CANopen is used for communication with Altivar variable speed drives. The configuration contains one Altivar 71 for hoisting axis and three variable speed drives (Altivar 71, Altivar 32, and Altivar 312) for each of the trolley and translation axes. Only one of the three possible drives may be used on trolley and translation axes.
The drives have pre-defined node IDs that must be correctly configured. For example, Altivar 32 used on trolley axis must be configured with node ID 3.
This configuration is necessary for compatibility with various drives without changes in the template project.
EIO0000001763 05/2014 33
Communication
Each of the seven pre-configured drives has a pre-defined node ID. Baud rate of CANopen bus is configured to 500 kb/s. PDOs are configured with objects used in the application. The objects have variables mapped to them. The PDOs are transferred cyclically (transmission type 1). M241 produces SYNC object with period of 10 ms. The drives are set to produce heartbeat object with producer time of 200 ms. The drives are configured as optional.
It is essential that the heartbeat remains configured for the template. In the case of a broken cable, or other loss of communication between the drives and the controller, the heartbeat is what is used by the drives to determine the loss of communication, and to take appropriate actions.
NOTE: The configuration has seven total drives configured. However, only up to three drives are physically present on the bus. This causes the CANopen Status LED of the M241 to flash to indicate the absence of the other drive options that are configured. This is expected as, in order to provide the flexibility in the template configuration, the possible drives have been mapped. The actual status of drives is displayed on the HMI display. You may wish to modify the template to remove the drives that are not applied in your application, though doing so would involve major modifications to the configuration and the application.
DANGERUNCONTROLLED MOTOR OPERATION
Verify that heartbeat is enabled on the controller and for all CANopen nodes.
Failure to follow these instructions will result in death or serious injury.
34 EIO0000001763 05/2014
Communication
Altivar 71 Configuration - Hoisting Axes (Node ID 1)
Altivar 312 Configuration - Trolley312 Axis (Node ID 2)
Object Index/Subindex Variable
Receive process data object (RPDO1)
Control word 6040/00h Hoist_Cw
Target velocity 6042/00h Hoist_Tv
Acceleration 203C/02h Hoist_Acc
Deceleration 203C/03h Hoist_Dec
Transmit process data object (TPDO1)
Status word 6041/00h Hoist_Sw
Control effort 6044/00h Hoist_Ce
Motor current 2002/05h Hoist_Mc
Motor torque 2002/06h Hoist_Mt
Transmit process data object (TPDO2)
IL1R 2016/03h Hoist_In
PUC 201A/0Ch Hoist_Puc
AI1 2016/2Bh Hoist_Ai1
AI2 2016/2Ch Hoist_Ai2
Object Index/Subindex Variable
Receive process data object (RPDO1)
Drivecom command register
6040/00h Trolley312_Cw
Receive process data object (RPDO6)
Target velocity 6042/00h Trolley312_Tv
Acceleration ramp time 203C/02h Trolley312_Acc
Deceleration ramp time 203C/03h Trolley312_Dec
Transmit process data object (TPDO1)
Drivecom command register
6041/00h Trolley312_Sw
Transmit process data object (TPDO6)
Control effort 6044/00h Trolley312_Ce
Motor current 2002/05h Trolley312_Mc
Logic input/output image 2016/29h Trolley312_Li
Physical value AI1 2016/2Bh Trolley312_Ai
EIO0000001763 05/2014 35
Communication
Altivar 32 Configuration - Trolley32 Axis (Node ID 3)
Altivar 71 Configuration - Trolley71 Axis (Node ID 4)
Object Index/Subindex Variable
Receive process data object (RPDO1)
Control word 6040/00h Trolley32_Cw
Target velocity 6042/00h Trolley32_Tv
Acceleration 203C/02h Trolley32_Acc
Deceleration 203C/03h Trolley32_Dec
Transmit process data object (TPDO1)
Status word 6041/00h Trolley32_Sw
Control effort 6044/00h Trolley32_Ce
LCR 2002/05h Trolley32_Mc
IL1R 2002/06h Trolley32_Li
Transmit process data object (TPDO2)
AI1R 2016/03h Trolley32_Ai
Object Index/Subindex Variable
Receive process data object (RPDO1)
Control word 6040/00h Trolley71_Cw
Target velocity 6042/00h Trolley71_Tv
Acceleration 203C/02h Trolley71_Acc
Deceleration 203C/03h Trolley71_Dec
Transmit process data object (TPDO1)
Status word 6041/00h Trolley71_Sw
Control effort 6044/00h Trolley71_Ce
Motor current 2002/05h Trolley71_Mc
IL1R 2002/06h Trolley71_Li
Transmit process data object (TPDO2)
AI1R 2016/03h Trolley71_Ai
36 EIO0000001763 05/2014
Communication
Altivar 312 Configuration - Translation312 Axis (Node ID 5)
Altivar 32 Configuration - Translation32 Axis (Node ID 6)
Object Index/Subindex Variable
Receive process data object (RPDO1)
Drivecom command register
6040/00h Translation312_Cw
Receive process data object (RPDO6)
Target velocity 6042/00h Translation312_Tv
Acceleration ramp time
203C/02h Translation312_Acc
Deceleration ramp time
203C/03h Translation312_Dec
Transmit process data object (TPDO1)
Drivecom command register
6041/00h Translation312_Sw
Transmit process data object (TPDO6)
Control effort 6044/00h Translation312_Ce
Motor current 2002/05h Translation312_Mc
Logic input/output image
2016/29h Translation312_Li
Physical value AI1 2016/2Bh Translation312_Ai
Object Index/Subindex Variable
Receive process data object (RPDO1)
Control word 6040/00h Translation32_Cw
Target velocity 6042/00h Translation32_Tv
Acceleration 203C/02h Translation32_Acc
Deceleration 203C/03h Translation32_Dec
Transmit process data object (TPDO1)
Status word 6041/00h Translation32_Sw
Control effort 6044/00h Translation32_Ce
LCR 2002/05h Translation32_Mc
IL1R 2002/06h Translation32_Li
Transmit process data object (TPDO2)
AI1R 2016/03h Translation32_Ai
EIO0000001763 05/2014 37
Communication
Altivar 71 Configuration - Translation71 Axis (Node ID 7)
Object Index/Subindex Variable
Receive process data object (RPDO1)
Control word 6040/00h Translation71_Cw
Target velocity 6042/00h Translation71_Tv
Acceleration 203C/02h Translation71_Acc
Deceleration 203C/03h Translation71_Dec
Transmit process data object (TPDO1)
Status word 6041/00h Translation71_Sw
Control effort 6044/00h Translation71_Ce
Motor current 2002/05h Translation71_Mc
IL1R 2002/06h Translation71_Li
Transmit process data object (TPDO2)
AI1R 2016/03h Translation71_Ai
38 EIO0000001763 05/2014
Communication
Preventa XPSMC Safety Controller (Node ID 9)
Object Index/Subindex Variable
Transmit process data object (TPDO1)
Status byte 2000/00h –
Mode byte 2001/00h
Reserved 2002/00h
2003/00h
Input data state (9-16) 2004/00h i_bXPSMC1
Input data state (1-8) 2005/00h i_bXPSMC0
Input data state (25-32) 2006/00h i_bXPSMC3
Input data state (17-24) 2007/00h i_bXPSMC2
Transmit process data object (TPDO2)
Output data state (1-8) 2008/00h i_bXPSMC4
Unused 2009/00h –
Detected input error (9-16) 200A/00h
Detected input error (1-8) 200B/00h
Detected input error (25-32) 200C/00h
Detected input error (17-24) 200D/00h
Detected output error (1-8) 200E/00h
Unused 200F/00h
Transmit process data object (TPDO3)
Diagnostic information 2010/00h –
2011/00h
2012/00h
Unused 2013/00h
Diagnostic information 2014/00h
2015/00h
2016/00h
Unused 2017/00h
Transmit process data object (TPDO4)
Diagnostic information 2018/00h –
2019/00h
201A/00h
Unused 201B/00h
EIO0000001763 05/2014 39
Communication
Slave M241 Configuration (Node ID 10)
Active Front End (AFE) (Node ID 11)
Object Index/Subindex Variable
Receive process data object (RPDO1)
PosTrolFwdIn_1 3000/01h q_iPosTrolFwdIn
PosTrolRevIn_1 3001/01h q_iPosTrolRevIn
PosTransFwdIn_1 3002/01h q_iPosTransFwdIn
PosTransRevIn_1 3003/01h q_iPosTransRevIn
Receive process data object (RPDO2)
LoadHoistIn_1 3004/01h q_iLoadHoistIn
SpeedHoistIn_1 3005/01h q_iSpeedHoistIn
AppStatIn_1 3006/01h q_wAppStatIn
Transmit process data object (TPDO1)
PosTrolFwdOut_1 3800/01h i_iPosTrollFwdOut
PosTrolRevOut_1 3801/01h i_iPosTrolRevOut
PosTransFwdOut_1 3802/01h i_iPosTransFwdOut
PosTransRevOut_1 3803/01h i_iPosTransRevOut
Transmit process data object (TPDO2)
LoadHoistOut_1 3804/01h q_iLoadHoistOut
SpeedHoistOut_1 3805/01h q_iSpeedHoistOut
Object Index/Subindex Variable
Transmit process data object (TPDO1)
Status word 3010/01h i_wStatAFE
act_value 1 3010/02h –
act_value 2 3010/03h –
act_value 3 3010/04h –
40 EIO0000001763 05/2014
Hoisting
Drive Configuration
EIO0000001763 05/2014
Drive Configuration
Chapter 5Drive Configuration
Overview
This chapter describes a subset of parameters required for the optimum performance and operation of the template application. For more information concerning the configuration of Altivar variable speed drives, refer to the documentation of the devices.
NOTE: You must configure variable speed drives according to the crane and specific application conditions and circumstances.
What Is in This Chapter?
This chapter contains the following topics:
WARNINGUNGUARDED 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.
Topic Page
Hoisting Drive 42
Drives for Horizontal Axes 44
EIO0000001763 05/2014 41
Drive Configuration
Hoisting Drive
Overview
The following steps describe the configuration of the hoisting drive: The drive must be configured to work in closed loop. Set the drive to factory settings. Set the correct motor parameters. The macro configuration selection has to be set first as it changes multiple parameters. Perform the autotuning and encoder check.
42 EIO0000001763 05/2014
Drive Configuration
Parameter Configuration - Altivar 71
The following table describes the configuration of parameters specific to the hoisting drive:
Menu Submenu Parameter Value Type
Simply start (SIM-) – Macro configuration (CFG)
Hoisting (HdG) Mandatory
Command (CtL-) Profile (CHCF) Not separ. (SIM)
Ref. 1 channel (Fr1) CANopen (CAn)
Settings (SEt-) Low speed (LSP) 0
Acceleration 2 (AC2) According to hardware
Optional
Deceleration 2 (dE2)
Motor control (DC) Motor control type (Ctt)
FC Mandatory
Number of pulses (PGI)
According to encoder used
Application function (FUn-)
Brake logic control (bLC-)
Brake assignment (bLC)
R2 (r2)
Movement type (bSt)
Hoisting (HOr)
Brake release time (brt)
According to hardware
Brake engage delay (tb)
Ramp (rPt-) Ramp switch ass. (rPS)
LI6(LI6)
Optional
Communication (COM-) Forced local (LCF-) Forced local assign. (FLO)
Forced local ref. (FLOC)
AI2(AI2)
Inputs/Outputs configuration (I_O-)
AI2 configuration (AI2-)
AI2 Interm. point Y (AI2S)
20% (20)
Fault management (FLt-)
Fault reset (rSt-) Fault reset (rSF) LI6(LI6)
Communication fault management (CLL-)
CANopen fault management (COL)
Freewheel (YES) Mandatory
EIO0000001763 05/2014 43
Drive Configuration
Drives for Horizontal Axes
Overview
The drives for trolley and translation axes are configured similarly. The drives for horizontal movements are expected to work in open loop. Vector motor control mode increases the accuracy of motor speed, which has a positive influence on performance of the Anti-sway function. However, some third-party equipment cannot support the Vector motor control mode. In this case, Scalar motor control mode may be used, though some degradation of performance may be realized.
The following steps describe the configuration of these drives: Set the drive to factory settings. Set the correct motor parameters. The macro configuration selection has to be set first as it changes multiple parameters. Perform the auto-tuning.
44 EIO0000001763 05/2014
Drive Configuration
Parameter Configuration - Altivar 71 and Altivar 32
The following table describes the configuration of parameters specific to the drives for horizontal axes:
Menu Submenu Parameter Value Type
Simply start (SIM-) – Macro configuration (CFG)
Start/Stop (HdG) Mandatory
Command (CtL-) Profile (CHCF) Not separ. (SIM)
Ref. 1 channel (Fr1)
CANopen (CAN)
Settings (SEt-) Acceleration 2 (AC2)
5.0 Optional
Deceleration 2 (dE2)
Low speed (LSP) 0
Application function (FUn-) Brake logic control (bLC-) Brake assignment (bLC)
R2 (r2) Mandatory
Movement type (bSt)
Traveling (HOr)
Brake release time (brt)
According to hardware
Brake engage delay (tb)
Ramp (rPt-) Ramp switch ass. (rPS)
LI6 (LI6) Optional
Communication (COM-� Forced local (LCF-) Forced local assign. (FLO)
Forced local ref. (FLOC)
AI2 (AI2)
Inputs/Outputs configuration (II_O-)
AI2 configuration (AI2-) AI2 Interm. point Y (AI2S)
20% (20)
Fault management (FLt-) Fault reset (rSt-) Fault reset (rSF) LI6 (LI6)
Communication fault management (CLL-)
CANopen fault management (COL)
Freewheel (YES)
Mandatory
EIO0000001763 05/2014 45
Drive Configuration
Parameter Configuration - Altivar 312
The following table describes the configuration of parameters specific to the Altivar 312 drive:
Menu Submenu Parameter Value Type
Control (CtL-) – Function access level (LAC)
Access to advanced function (L3)
Mandatory
Mixed mode (CHCF)
Combined (SIM)
Configuration reference (Fr1)
Reference from CANopen (CAN)
Settings (SEt-) Low speed (LSP) 0 Optional
Application function (FUn-) Second acceleration ramp time (AC2)
5.0
Second deceleration ramp time (dE2)
Brake control (bLC-) Brake control configuration (bLC)
(2) Mandatory
Brake engage frequency threshold (bEn)
0
Brake release time (brt)
According to hardware
Brake engage time (bEt)
Ramp switching (rPS)
LI6 Optional
Preset speeds (PSS-) 2 preset speeds (PS2)
nO Mandatory
4 preset speeds (PS4)
8 preset speeds (PS8)
16 preset speeds (PS16)
46 EIO0000001763 05/2014
Drive Configuration
Communication (COM-) – Forced local mode (FLO)
LI6 Optional
Forced local reference (FLOC)
AI2
Fault (FLt-) Reset of current fault (rSF)
LI6
CANopen fault management (COL)
Freewheel stop (YES)
Mandatory
Menu Submenu Parameter Value Type
EIO0000001763 05/2014 47
Drive Configuration
48 EIO0000001763 05/2014
Hoisting
Application Software
EIO0000001763 05/2014
Application Software Controller 1 (MyController1)
Chapter 6Application Software Controller 1 (MyController1)
Overview
This chapter describes the application software.
What Is in This Chapter?
This chapter contains the following sections:
Section Topic Page
6.1 Library Manager 50
6.2 Task Configuration 51
6.3 Global Variables 52
6.4 Using CSV File for Automatic Configuration 53
6.5 Crane Control 58
6.6 Application Parameters 70
6.7 CanOpenState Program 77
EIO0000001763 05/2014 49
Application Software
Library Manager
Section 6.1Library Manager
Library Manager
The Hoisting library is added manually. The rest of the libraries are configured automatically. The necessary libraries are already configured in the template project.
NOTE: The SoMachine Standard software includes the basic versions of the Hoisting library. The advanced versions of the Hoisting library must be purchased apart from the SoMachine Standard software. Both versions of the libraries must be licensed.
The Industrial Crane M241 safety project template requires the advanced version of the Hoisting library.
50 EIO0000001763 05/2014
Application Software
Task Configuration
Section 6.2Task Configuration
Task Configuration
The following table describes the tasks configuration of the Hoisting application template project:
Task Program Organization Unit (POU) Type Description
MAST Application_MastTask Cyclic Contains hoisting POUs. It is a parent task for CANopen communication and runs with defined cycle time
Freewheel_Task DrivesConfigApplicParam
Freewheeling Contains POUs for configuration of drive data and parameterization of the application. The priority of this task is lower than the priority of MAST task.
EIO0000001763 05/2014 51
Application Software
Global Variables
Section 6.3Global Variables
Global Variables
The object global variable list (GVL) contains global variables used for monitoring the system status and parameterization of the project template application. You can execute the initial variable values through external data file management after first start of the controller or while commissioning through HMI STU.
52 EIO0000001763 05/2014
Application Software
Using CSV File for Automatic Configuration
Section 6.4Using CSV File for Automatic Configuration
Using CSV File for Automatic Configuration
Application Parameters
The ApplicationParameters.csv file contains set of application parameters. Each parameter is defined on one line.
Each line consists of 2 columns: Variable name Value to configure
You can parameterize the Hoist, Trolley, and Bridge programs either through HMI or a .csv file. The ApplicParam program allows initialization of up to 100 variables. The initialization of the application is done automatically after controller boot-up.
The ApplicParam program compares the variable names from a .csv file with the variable names defined in the application to help avoid writing values incorrectly. You can modify this program to meet customer-specific application requirements.
EIO0000001763 05/2014 53
Application Software
Configuration of Variable Speed Drives
The DrivesConfiguration.csv file contains set of drive parameters. Each parameter is defined on one line.
Each line consists of 4 columns: Node Id CANopen index (hex) CANopen subindex (hex) Value to configure
This template includes seven drives of three different types, the hoisting drive is ATV 71, the trolley, and translation axes use Altivar 71, Altivar 312 or Altivar 32. Only three drives may be connected at a time. The configurations of the connected devices are automatically executed directly after the controller restart. The program DrivesConfig reads the device node Id, Index, Subindex of CANopen object from the .csv file.
Exporting Data from Excel File to CSV File
The following steps describe how to export data from an Excel file to .csv file:
Step Action
1 Create a spreadsheet that includes information in a form defined in the previous sections.
2 Click Save As to save the spreadsheet as a .csv file.
3 Select the file type as CSV (comma delimited) from the menu.
54 EIO0000001763 05/2014
Application Software
Implementation of Parameterization in the Application Template
The following function blocks are used to open, read, and close the configuration files Application-Parameters.csv and DrivesConfiguration.csv.
File.Open
This function block of the CAA_File.Library opens an already existing file or creates a new one. The return value is a file handle, which can then be used as an input hFile in the function blocks File.Read and File.Close. There may be restrictions concerning the specification of the directory name. For example, only capital letters are allowed, for different targets.
The following table describes the inputs of this function block:
The following table describes the outputs of this function block:
Input Type Description
xExecute BOOL See CAA guidelines in SoMachine online help (CAA Libraries /CAA_FILE.library/Modules/Function blocks - File services/FILE.Open)
sFileName CAA.FILENAME File name including directory path: No special characters Separator for subdirectories / Absolute or relative path
specifications No empty spaces Use capital letters
eFileMode FILE.MODE Mode in which the file should be accessed.
xExclusive BOOL File access mode: TRUE: exclusive data access. FALSE: multiple data access
possible
Output Type Description
xDone BOOL See CAA guidelines in SoMachine online help (CAA Libraries /CAA_FILE.library/Modules/Function blocks - File services/FILE.Open)
xBusy
xError
eError FILE.ERROR ID error detected
hFile CAA.HANDLE File handle
EIO0000001763 05/2014 55
Application Software
File.Read
This function block of the CAA_File.Library reads the file, which was previously opened through File.Open. If fewer characters can be read than specified in szBuffer, the function block returns an active xDone and indicates the current number of characters in szSize. The size of the target memory structure for the bytes to be read and the number of bytes to be read are not validated.
The following table describes the inputs of this function block:
The following table describes the outputs of this function block:
Input Type Description
xExecute BOOL See CAA guidelines in SoMachine online help (CAA Libraries /CAA_FILE.library/Modules/Function blocks - File services/FILE.Read)
xAbort
udiTimeOut UDINT –
hFile CAA.HANDLE File handle
pBuffer CAA.PVOID Target address for the first byte to be read. This is retrieved through the operator ADR
szBuffer CAA.SIZE Maximum number of bytes to be read. This is retrieved through the operator sizeof
Output Type Description
xDone BOOL See CAA guidelines in SoMachine online help (CAA Libraries /CAA_FILE.library/Modules/Function blocks - File services/FILE.Read)
xBusy
xError
xAborted
eError FILE.ERROR ID error detected
szSize CAA.SIZE Current number of successfully read bytes. This value is already valid before xDone has been set
56 EIO0000001763 05/2014
Application Software
File.Close
This function block of the CAA_File.Library terminates the file access that is it closes the file.
The following table describes the inputs of this function block:
The following table describes the outputs of this function block:
Input Type Description
xExecute BOOL See CAA guidelines in SoMachine online help (CAA Libraries /CAA_FILE.library/Modules/Function blocks - File services/FILE.Close)
hFile CAA.HANDLE File handle
Output Type Description
xDone BOOL See CAA guidelines in SoMachine online help (CAA Libraries /CAA_FILE.library/Modules/Function blocks - File services/FILE.Close)
xBusy
xError
eError FILE.ERROR ID error detected
EIO0000001763 05/2014 57
Application Software
Crane Control
Section 6.5Crane Control
Overview
This section provides brief description of the function blocks used in the template including description of their detected alarm identification outputs for a quick reference in case of a detected alarm. For a detailed description, refer to the online help of the function blocks in SoMachine.
What Is in This Section?
This section contains the following topics:
Topic Page
Application_MastTask 59
Hoisting_Axis 62
Trolley_Axis and Translation_Axis 67
58 EIO0000001763 05/2014
Application Software
Application_MastTask
Introduction
Application master task executes programs for hoisting axes, monitoring the presence of CANopen devices, and calibration of cable length necessary for Anti-sway function. It also connects global variables used for configuration to the application.
EIO0000001763 05/2014 59
Application Software
Components of Application_MastTask
60 EIO0000001763 05/2014
Application Software
CanOpenState
Program CanOpenState provides basic information about status of eight configured CANopen nodes. For each node, it gives TRUE value if the device is in operational state and FALSE if the device is not in operational state or is not connected on the bus.
Load Length Selection
Load length selection consists of an instance of auxiliary function block BiMux that combines 2 bits to a number of WORD datatype and a multiplexer that selects one of three pre-defined load lengths or a zero value.
CableLengthEnc_2
The function block CableLengthEnc_2 calculates length of pendulum for Anti-sway function from the encoder pulses and load length value.
The following table describes the possible detected alarm states:
DiagnosticCoverage
The function block DiagnosticCoverage compares application signature and firmware version with a configured value. It also watches executions of subprograms and actual cycle time of a cyclic task and provides interface for cross-checking of the two controllers. Internally, it tests integrity of variable memory and accuracy of boolean and floating point operations.The output of the function block is used to authorize movement of axes.
NOTE: The function block requires the correct firmware version and application signature in order to authorize movement of the crane. This information must be entered during commissioning. For more information please refer to the description of the DiagnosticCoverage FB.
DriveMux
Auxiliary function block DriveMux selects the drive present on CANopen bus and forwards the input values to the translation and trolley axes program. If more than one CANopen node from the range is reserved for trolley (node IDs 2, 3, 4) or translation (node IDs 5, 6, 7) respectively, the function block enters a detected alarm state.
Axes Programs
The programs Trolley_axis, Translation_Axis, and Hoisting_Axis includes the functions associated with these axes. These are described further in this document.
Alarm Status Description
Bit 0 i_stCLE.rCbleLenMin < 0.5
Bit 1 i_stCLE.rCalbCbleLen < i_stCLE.rCbleLenMin
Bit 2 i_stCLE.rLoadLen < 0
Bit 3 i_stCLE.diCalbPulsVal < 0
EIO0000001763 05/2014 61
Application Software
Hoisting_Axis
Introduction
This includes instances of function blocks used to control hoisting axis of the crane. Hoisting axis uses Altivar 71. To reach higher performance level, position of the hoist is limited by signal from limit switches and position acquired from an absolute encoder.
62 EIO0000001763 05/2014
Application Software
Components of Hoisting_Axis
The following figure shows the components of Hoisting_Axis:
EIO0000001763 05/2014 63
Application Software
Limit Switch Management
The LimitSwitch function block reads limit switch inputs from the field. It verifies the limit switch status and generates the control outputs used to control the movements of the hoist. The function block is to be used with cross and screw limit switches by using normally closed (NC) contacts. The contacts indicate the specific status, for example, the stop position.
The following table describes the possible detected alarm states:
Speed Select
This function block allows selection of pre-defined speed references using digital inputs. It reduces the speed reference if the slow-down limit switch is reached. It allows throughput of analog speed reference if the analog input is used.
The following table describes the possible detected alarm states:
Speed Optimisation Rope Slack
During the movement of a hoist, the load can range between the empty hook and maximum load, but the same nominal speed is used to drive the hoist. The speed optimization function helps you to maintain an optimum working time and increased productivity.
The following table describes the possible detected alarm states:
Alarm Status description
Bit 0 Incorrect order of limit switch signals detected
Bit 1 i_wDrvSpdNom is zero although stop on distance is enabled
Bit 2 i_wMotSpdLin is zero although stop on distance is enabled
Bit 3 i_wScalFact is zero although stop on distance is enabled
Alarm Status description
Bit 0 i_DrvSpdHsp ≤ i_wDrvSpdLsp
Bit 1 One of the preselectable speeds (1–8) is lower than i_wDrvSpdLsp
Bit 2 One of the preselectable speeds (1–8) is higher than i_wDrvSpdHsp
Alarm Status description
Bit 0 i_wDrvSpdLsp ≥ i_wDrvSpdHsp
Bit 1 i_wDrvSpdNom > i_wDrvSpdHsp
64 EIO0000001763 05/2014
Application Software
Overload_EN15011
The function block reads the torque inputs from the hoist drive. This enables you to detect an overload situation according to the calibrated torque threshold. At 90% of nominal calibrated torque, an alert is indicated by lights and horn. If the torque value indicates an overload situation, the function block generates a detected overload alarm. This detected alarm must be interlocked with forward command for hoist axis to block upward (lifting) movement of the load.
The following table describes the possible detected alarm states:
Altivar 71_Control
This function block (available in Altivar library) is the device control function block used to control Altivar 71 drives through communication interface.
Load Overspeed Control
The LoadOverspeedCtrl function block helps you to detect overspeed, brake wear, detected alarm, and detected sensor feedback alarms. This function block detects a load overspeed by monitoring the pulse input of the controller. The brake wear function tests the wear of the hoist brake by detecting any movement of the load when the drive is not running.
The following table describes the possible detected alarm states:
Alarm Status description
Bit 0 i_stOVLD.wSpdDbnd > i_stOVLD.wMeasFreq
Bit 1 i_stOVLD.wAntiTip < 2
Bit 2 Overload timer > 5 hours
Alarm Status description
Bit 0 Overspeed
Bit 1 Brake wear
Bit 2 Detected sensor feedback alarm
EIO0000001763 05/2014 65
Application Software
MaintenanceDataStorage_2
The function block helps you in choosing the right time for maintenance, with an accurate record of the movements and loads. In the case of many movements with a high load, you can schedule maintenance work before a component breaks down and helps you to remove long down times. When the loading is occasional, you can postpone maintenance, leading to a longer life cycle and optimized maintenance costs.
The following table describes the possible detected alarm states:
StatisticDataStorage_2
This function block measures the operation time and number of operations of an axis. It also measures the number of backtracking and pulsating operations, but those are not used in this template.
Alarm Status description
Bit 0 i_stMDS.wHstDrvOphrMax was left at zero (default) or is not connected
Bit 1 i_stMDS.rTrqLoadNom was left at zero (default) or is not connected (and i_stMDS.xLcEn is FALSE)
Bit 2 i_stMDS.dwCranLoadNom was left at zero (default) or is not connected (and i_stMDS.xLcEn is TRUE)
66 EIO0000001763 05/2014
Application Software
Trolley_Axis and Translation_Axis
Introduction
The programs for control of trolley and translation axes are identical in this example. The programs contain instances of function blocks used to control horizontal movement of the crane. Each program contains three instances of Altivar control function blocks for Altivar 71, Altivar 32, and Altivar 312. As only one drive is allowed to be connected per axis, only one of these function blocks are connected to an active drive at a time.
Components of Trolley_Axis and Translation_Axis
The following figure displays the components of trolley and translation axes.
ScaleInput
The function block ScaleInput is used to scale analog input value from AI1 of the drive to speed reference range. Usage of analog input for speed reference is alternative to the selection of speed reference using digital inputs.
The following table describes the possible detected alarm states:
Alarm Status description
Bit 0 The sensor output is outside the hardware range.
Bit 1 Device hardware alarm detected. The detected alarm bit from the sensor is high.
Bit 2 Device input is lower than the threshold of minimum input-range.
Bit 3 Device input is higher than the threshold of maximum input-range.
EIO0000001763 05/2014 67
Application Software
SpeedSelect
The function block SpeedSelect enables selection of pre-defined speed references using digital inputs. It reduces the speed reference if slow-down limit switch is reached. It allows throughput of analog speed reference if analog input is used.
The following table describes the possible detected alarm states:
AntiSwayOpenLoop_2
This function block for industrial cranes is designed to suppress the sway of a suspended load caused by movement of the bridge and trolley of the crane. It is suitable for both manually operated and automatic cranes. It is an evolution of AntiSwayOpenLoop function block.
The following table describes the possible detected alarm states:
StatisticDataStorage_2
The function block StatisticDataStorage_2 measures the operation time and number of operations of an axis. The information acquired by this function block is displayed in user menu 1.14 of local Altivar 71. Although, the StatisticDataStorage_2 function block is capable of measuring number of backtracking and pulsating operations, this information is not used by this hoisting application template project.
Altivar 71_Control, Altivar 32_Control, and Altivar 312_Control
These function blocks (available in Altivar library) are device control function blocks used to control Altivar drives through communication interface. Three function blocks are used in each of the programs for horizontal movement. This is possible as the application works only if one drive per axis is present.
Alarm Status description
Bit 0 i_DrvSpdHsp ≤ i_wDrvSpdLsp.
Bit 1 One of the preselectable speeds (1...8) is lower than i_wDrvSpdLsp.
Bit 2 One of the preselectable speeds (1...8) is higher than i_wDrvSpdHsp.
Alarm Status description
Bit 0 One or more of the function block inputs is/are out of range.
Bit 1 One or more of the function block input structure elements is/are out of range.
Bit 2 Tried to initialize the anti-sway, but the anti-sway speed profile is currently active → output of the anti-sway.
Bit 3 Command to enable anti-sway is given while previous profile has not yet been finished.
68 EIO0000001763 05/2014
Application Software
Speed Consistency Check
The speed consistency check code detects a significant difference between actual speed of the motor and the speed reference. The difference that triggers the detected alarm is hard-coded to two-thirds of maximum speed. The margin is necessary to avoid false alarms detected at high accelerations and longer execution periods. This value can be changed in the code only (not through the interface).
Alarm Management
Alarm management consists of one OR block, which stops the axis using a quick stop input of an Altivar_Control function block.
Estimation of Stop Distance
The estimation of stop distance of trolley and translation axes is performed by AntiSwayOpenLoop_2 function block if display parameters TrDistCalcEn and respective BrDistCalcEn are set to TRUE. You can read over the calculated values Modbus TCP at the IP address of the M241 (Unit id 252). The values are available in 32-bit floating point form at the addresses %MW0, %MW1 for translation movement and %MW2, %MW3 for trolley movement.
Distance Measurement - Limit Switch
This routine calculates the actual position of the horizontal axes based on reading from laser range finders and gives limit switch signals based on the calculated position and pre-configured limits.
EIO0000001763 05/2014 69
Application Software
Application Parameters
Section 6.6Application Parameters
Display Parameters
Overview
The following tables provide the details about the application parameters and application states. You can modify the application parameters either by using CSV file or through the HMI interface. For detailed information about the configuration of the function blocks, refer to the applicable function block documentation in SoMachine.
User Main Parameters (Menu 1)
Parameter Description Access
g_xCanStatNode01 CANopen status of hoisting Altivar 71 (NA/OK) R
g_xCanStatNode02 CANopen status of trolley Altivar 312 (NA/OK)
g_xCanStatNode03 CANopen status of trolley Altivar 32 (NA/OK)
g_xCanStatNode04 CANopen status of trolley Altivar 71 (NA/OK)
g_xCanStatNode05 CANopen status of translation Altivar 312 (NA/OK)
g_xCanStatNode06 CANopen status of translation Altivar 32 (NA/OK)
g_xCanStatNode07 CANopen status of translation Altivar 71 (NA/OK)
g_xCanStatNode09 CANopen status of Preventa XPSMC_ZC (NA/OK)
g_xCanStatNode10 CANopen status of M241 Slave Controller (NA/OK)
g_xCanStatNode11 CANopen status of AFE (NA/OK)
g_xHstAlrm Application alarm of hoisting axis
g_xTransAlrm Application alarm of translation axis
g_xTrolAlrm Application alarm of trolley axis
g_xHstOvld Hoist overload alarm
g_xHstOvldWrn Hoist overload warning
g_xOvspdAlrm Hoist overspeed alarm
70 EIO0000001763 05/2014
Application Software
g_wHstMdsAlrmId Alarm ID of MaintenanceDataStorage_2 function block
R
g_wHstOvldAlrmId Alarm ID of Overload_EN15011 function block
g_wHstSorsAlrmId Alarm ID of SpeedOptRopeSlack function block
g_wHstSsAlrmId Alarm ID of SpeedSelect function block of hoist axis
g_wHstLsAlrmId Alarm ID of LoadOverspeedCtrl function block of hoist axis
g_wHstSi1AlrmId Alarm ID of ScaleInput function block for analog speed reference for hoist axis
g_wHstSi2AlrmId Alarm ID of ScaleInput function block for scaling of load cell reading
g_wCblLenAlrmId Alarm ID of CableLength_Enc_2 function block
g_wTransSSAlrmId Alarm ID of SpeedSelect function block for translation
g_wTransASAlrmId Alarm ID of AntiSwayOpenLoop_2 function block for translation
g_wTransSIAlrmId Alarm ID of ScaleInput function block for analog speed reference for translation axis
g_xTransSDAlrm Information about speed consistency alarm of translation movement (activates at high difference of actual speed of the motor and its speed reference)
g_wTrolSSAlrmId Alarm ID of SpeedSelect function block for trolley
g_wTrolASAlrmId Alarm ID of AntiSwayOpenLoop_2 function block for trolley
g_wTrolSIAlrmId Alarm ID of ScaleInput function block for analog speed reference for trolley axis
g_xTrolSDAlrm Information about speed consistency alarm of translation movement (activates at high difference of actual speed of the motor and its speed reference)
Parameter Description Access
EIO0000001763 05/2014 71
Application Software
Hoist Parameters (Menu 2)
Parameter Description Access
g_rHstActlMass Actual measured mass (kg) R
g_wHstSpdRef1 Speed reference 1 for hoisting drive (rpm) R/W
g_wHstSpdRef2 Speed reference 2 for hoisting drive (rpm)
g_wHstSpdRef3 Speed reference 3 for hoisting drive (rpm)
g_wHstSpdRef4 Speed reference 4 for hoisting drive (rpm)
g_wHstMotCoef Hi-speed value for hoisting drive (rpm)
g_wHstCalbWght Weight for calibration of Overload_EN15011 function block (t)
g_wHstMotCoef Scaling factor for the motor speed limitation in motor mode (%)
g_wHstGenCoef Scaling factor for the motor speed limitation in generator mode (%)
g_wHstNomSpd Nominal speed of hoisting motor (rpm)
g_wHstHookTrqUp Hook torque in forward direction (%)
g_wHstGenTimeAvg Time of sampling of torque for calculation of maximum allowed speed in forward direction
g_wHstHookTrqDown Hook torque in reverse direction (%)
g_wHstSpdDbnd Speed dead band for the Overload_EN15011 to consider the measurement speed reached (rpm)
g_wHstTrqBndCnt Number of cycles at which the torque must be inside the dead band (–)
g_wHstTrqBndWdth Torque dead band (%)
g_wHstSmple Number of samples for calculation of actual load (–)
g_wHstMeasFreq Speed at which the load measurement takes place (rpm)
g_wHstTrqThres Torque increase threshold to detect the change of load (%)
g_wHstAntiTip Maximum number of turns of the motor shaft without torque measurement (–)
g_wHstEncPuls Number of pulses per revolution of the encoder (–)
g_wHstNoTrq No load torque of the motor (without hook) (%)
g_rHstOvldThres Tolerance of load for entering overload state (–) R/W
g_wHstActWghtThres Threshold to enable the actual load output pin (kg)
g_wHstMaxThshOput Maximum of the scaled value. Maximum measurable load (t)
g_wHstMinThshIput Minimum allowed raw value from the load cell sensor (–)
g_wHstMaxThshIput Maximum allowed raw value from the load cell sensor (–)
g_xHstOvldCalb Command to start the overload calibration
g_xHstOvldEn Command to enable the overload test
72 EIO0000001763 05/2014
Application Software
Horizontal Parameters (Menu 3)
Parameter Description Access
g_xCableLengthCalb Enables calibration of the cable length R/W
g_rLoadLength1 First preselected length of the load (m)
g_rLoadLength2 Second preselected length of the load (m)
g_rLoadLength3 Third preselected length of the load (m)
g_rCbleLenMin Minimum cable length - length of the pendulum when hoist is on the top limit switch (m)
g_rCalbCbleLen Length difference between top limit switch and calibration position of the hoist (m)
g_diCalbPulsVal Value containing number of encoder pulses of the incremental encoder corresponding to the calibration length. Used for anti-sway (optional) (–)
g_rLenAct Actual measured length of the hoist cable (m) R
g_wTrolHsp Maximum speed of trolley motor (rpm) R/W
g_wTrolSpdRef1 First speed reference for trolley motor (rpm)
g_wTrolSpdRef2 Second speed reference for trolley motor (rpm)
g_wTrolSpdRef3 Third speed reference for trolley motor (rpm)
g_wTrolSpdRef4 Fourth speed reference for trolley motor (rpm)
g_rTrolSpdLinMax Linear speed of the trolley movement at maximal speed of the trolley motor (m/s)
g_wTrolAccDsbl Acceleration time of the trolley movement used when the Anti-sway function is disabled
g_wTrolDecDsbl Deceleration time of the trolley movement used when the Anti-sway function is disabled
g_wTrolAswAccStrt Acceleration time of the trolley movement used for low speed before Anti-sway function is activated
g_wTrolAswDecStrt Deceleration time of the trolley movement used for low speed before Anti-sway function is activated
g_wTrolAswRampLim The steepest acceleration/deceleration time of the trolley movement the Anti-sway function block is allowed to use for calculation of speed profiles
g_wTrolDrvDecEmgy Emergency deceleration time of the trolley movements
g_wTrolBrakDly How long the trolley motor brake needs to open (ms)
EIO0000001763 05/2014 73
Application Software
g_rTrolCoefFrct Friction coefficient of the rope-pulley system on trolley movement (–) R/W
g_wTrolAswSpdStrt Speed of the trolley motor at which the Anti-sway action starts (%)
g_wTrolAswSpdEnd Speed of the trolley motor at which the Anti-sway action stops (%)
g_wTrolAswTimeEnd Time window for stopping of the Anti-sway movement (ms)
g_rTrolCalcDistEn Command to enable the stop distance estimation for trolley axis
g_rLsStopFwdTrolDist Distance of limit switch forward of trolley axis (0.1 m)
g_rLsStopRevTrolDist Distance of limit switch reverse of trolley axis (0.1 m)
g_rLsSlowFwdTrolDist Distance of limit switch slow forward of trolley axis (0.1 m)
g_rLsSlowRevTrolDist Distance of limit switch slow reverse of trolley axis (0.1 m)
g_rDistMaxTrolFwd Maximum distance measured by the analog distance sensor for limit switch forward of trolley axis (0.1 m)
g_rDistMaxTrolRev Maximum distance measured by the analog distance sensor for limit switch reverse of trolley axis (0.1 m)
g_wLsModeTrol Mode of limit switch for trolley axis:0: forward cross and reverse cross1: forward cross and reverse analog2: forward analog and reverse cross3: forward analog and reverse analog
g_wTransHsp Maximum speed of translation motor (rpm)
g_wTransSpdRef1 First speed reference for translation motor (rpm)
g_wTransSpdRef2 Second speed reference for translation motor (rpm)
g_wTransSpdRef3 Third speed reference for translation motor (rpm)
g_wTransSpdRef4 Fourth speed reference for translation motor (rpm)
Parameter Description Access
74 EIO0000001763 05/2014
Application Software
g_rTransSpdLinMax Linear speed of the translation movement at maximal speed of the translation motor (m/s)
R/W
g_wTransAccDsbl Acceleration time of the translation movement used when the Anti-sway function is disabled
g_wTransDecDsbl Deceleration time of the translation movement used when the Anti-sway function is disabled
g_wTransAswAccStrt Acceleration time of the translation movement used for low speed before Anti-sway function is activated
g_wTransAswDecStrt Deceleration time of the translation movement used for low speed before Anti-sway function is activated
g_wTransAswRampLim The steepest acceleration/deceleration time of the translation movement the Anti-sway function block is allowed to use for calculation of speed profiles
g_wTransDrvDecEmgy Emergency deceleration time of the translation movements
g_wTransBrakDly How long the translation motor brake needs to open (ms)
g_rTransCoefFrct Friction coefficient of the rope-pulley system on translation movement (–)
g_wTransAswSpdStrt Speed of the translation motor at which the Anti-sway action starts (%)
g_wTransAswSpdEnd Speed of the translation motor at which the Anti-sway action stops (%)
g_wTransAswTimeEnd Time window for stopping the Anti-sway movement (ms)
g_xTransCalcDistEn Command to enable the stop distance estimation for translation axis
g_rLsStopFwdTransDist Distance of limit switch forward of translation axis (0.1 m)
g_rLsStopRevTransDist Distance of limit switch reverse of translation axis (0.1 m)
g_rLsSlowFwdTransDist Distance of limit switch slow forward of translation axis (0.1 m)
g_rLsSlowRevTransDist Distance of limit switch slow reverse of translation axis (0.1 m)
g_rDistMaxTransFwd Maximum distance measured by the analog distance sensor for limit switch forward of translation axis (0.1 m)
g_rDistMaxTransRev Maximum distance measured by the analog distance sensor for limit switch reverse of translation axis (0.1 m)
R/W
g_wLsModeTrans Mode of limit switch for translation axis:0: forward cross and reverse cross1: forward cross and reverse analog2: forward analog and reverse cross3: forward analog and reverse analog
Parameter Description Access
EIO0000001763 05/2014 75
Application Software
Monitoring Parameters (Menu 4)
Parameter Description Access
g_dwHstLoadNom Nominal load of the hoist (kg) R/W
g_wHstFemHrs Lifetime of the hoist (h)
g_xHstHrsPrAl Pre-alarm state R
g_xHstHrsAlrm Alarm state
g_wHstDrvOphrRm Remaining hours of operation (h)
g_wHstDrvOphrActl Elapsed hours of operation (h)
g_wHstDrv300OpHr Number of hours with more than 300 operations (h)
g_wHstDrv600OpHr Number of hours with more than 600 operations (h)
g_wHstOpNb Number of operations of the hoist axis (–)
g_wTrolOpHrs Operation time of the trolley axis (–)
g_wTrolOpNb Number of operations of the trolley axis (–)
g_wTransOpHrs Operation time of the translation axis (–)
g_wTransOpNb Number of operations of the translation axis (–)
g_xHstRstMds Command to reset the values in monitoring data storage
R/W
76 EIO0000001763 05/2014
Application Software
CanOpenState Program
Section 6.7CanOpenState Program
CanOpenState Program
This program detects whether configured CANopen devices are in operation state. This information is used to configure behavior of the application and enabling parts of the program.
The following example shows how to get the state of the CANopen node 5. The CIA405.GET_STATE function is automatically executed for a continuous state reading. The information about presence of the CANopen nodes is used in the application for enabling the related program.
Application of both controllers includes the program CanOpenState which monitors state of CANopen devices. The programs differ by number of configured devices.
The information between M241 controller and drives is transferred through CANopen. The drive configuration is done directly after the boot up phase of the controller. You can configure the drives that are present on CANopen.
EIO0000001763 05/2014 77
Application Software
78 EIO0000001763 05/2014
Hoisting
Application Software
EIO0000001763 05/2014
Application Software Controller 2 (MyController2)
Chapter 7Application Software Controller 2 (MyController2)
Overview
This chapter describes the application software of the M241 controller.
What Is in This Chapter?
This chapter contains the following topics:
Topic Page
Library Manager 80
Task Configuration 81
Global Variables 82
Application_MastTask 83
EIO0000001763 05/2014 79
Application Software
Library Manager
The Hoisting library is added manually. The rest of the libraries are configured automatically. The necessary libraries are already configured in the template project.
NOTE: The SoMachine Standard software includes the basic versions of the Hoisting library. The advanced versions of the Hoisting library must be purchased apart from the SoMachine Standard software. Both versions of the libraries must be licensed.
The Industrial Crane CANopen M241 safety project template requires the advanced version of the Hoisting library.
80 EIO0000001763 05/2014
Application Software
Task Configuration
The following table describes the tasks configuration of the Hoisting application template project for the second controller:
Task Program Organization Unit (POU) Type Description
MAST Application_MastTask Cyclic Includes the program needed for diagnostic coverage. It is a parent task for CANopen communication and runs with defined cycle time
EIO0000001763 05/2014 81
Application Software
Global Variables
The object global variable list (GVL) includes global variables used for parameterization of overspeed function in the second controller.
82 EIO0000001763 05/2014
Application Software
Application_MastTask
Introduction
Application master task executes function blocks for diagnostic coverage, overload and over-speed functions
Components of Application_MastTask
LoadOverspeedControl
The Load overspeed control function helps you to detect overspeed, brake wear, detected alarm and detected sensor feedback alarms.
The Load overspeed control function (LoadOverspeedCtrl) helps to detect load overspeed and brake wear. The load overspeed function detects a load overspeed by monitoring the pulse input of the controller. The brake wear function checks the wear of the hoist brake by detecting any movement on the load when the drive is not running. For detailed information, refer to the online help of this function block in SoMachine.
The following table describes the possible detected alarm states:
Alarm Status description
Bit 0 Overspeed
Bit 1 Brake wear
Bit 2 Detected sensor feedback alarm
EIO0000001763 05/2014 83
Application Software
84 EIO0000001763 05/2014
Hoisting
Interaction between Two Controllers
EIO0000001763 05/2014
Interaction between Two Controllers
Chapter 8Interaction between Two Controllers
Interaction between Two Controllers
Both controllers are monitoring load and speed signals using separate channels.
If an inconsistency of load or speed signal is detected on any of the two controllers or if inconsistency of limit switch inputs is detected, the movement of the crane is stopped.
The information is transferred between controllers using their digital I/Os and CANopen.
EIO0000001763 05/2014 85
Interaction between Two Controllers
This table shows the connection between the controllers:
MyController1 MyController2 Comments
Output Variable Input Variable
Q7 Iq_xAppOk I12 Li_xDcAppOk Application OK signal (TRUE when OK)
Q8 Iq_xAppOkPuls I13 Li_xDcAppOkPuls Application OK pulse signal
Q9 – – – Alarm output to DI of XPSMC
CANopen q_iPosMeasTrol CANopen i_iPosMeasTrol Position measurement trolley
q_iPosMeasTrans i_iPosMeasTrans Position measurement translation
q_iLoadMeasHoist i_iLoadMeasHoist Hoist load measurement
q_iSpdMeasHoist i_iSpdMeasHoist Hoist speed measurement
Input Variable Output Variable
I12 Li_xDcAppOk Q7 Iq_xAppOk Application OK signal (TRUE when OK)
I13 Li_xDcAppOkPuls Q8 Iq_xAppOkPuls Application OK pulse signal
– – Q9 – Alarm output to DI of XPSMC
CANopen i_iPosMeasTrol CANopen q_iPosMeasTrol Position measurement trolley
i_iPosMeasTrans q_iPosMeasTrans Position measurement translation
i_iLoadMeasHoist q_iLoadMeasHoist Hoist load measurement
i_iSpdMeasHoist q_iSpdMeasHoist Hoist speed measurement
86 EIO0000001763 05/2014
Hoisting
Safety Relevant Functions
EIO0000001763 05/2014
Safety Relevant Functions
Chapter 9Safety Relevant Functions
What Is in This Chapter?
This chapter contains the following topics:
Topic Page
Introduction 88
Safety Relevant Functions 89
Preventa XPSMC Safety Controller 95
Preventa XPSMC Safety Program 96
EIO0000001763 05/2014 87
Safety Relevant Functions
Introduction
To meet the demands of the required performance level of EN 13849-1, either PLc Cat. 2 or PLd, a programmable safety relay, the Preventa XPSMC, is used. All safety-related functions requiring a certified signal path, for example, the emergency stop, will be handled by this controller.
The Preventa XPSMC features redundancy principle micro-processor based technology to provide advanced functions and flexibility regarding the choice of the safety-related functions and more precise diagnostics are just some of the advantages that can benefit crane manufacturers and users by integrating these innovative solutions.
The Hoisting template for industrial cranes based on the M241 controller is delivered with a respective .MCC file containing the code for the Preventa XPSMC safety controller.
Using the Preventa XPSMC safety controller allows compliance to the required safety level, without the need to exclusively use safety certified components and therefore without the high price usually found in this kind of architecture.
88 EIO0000001763 05/2014
Safety Relevant Functions
Safety Relevant Functions
Overview
This chapter describes a subset of safety relevant functions of a typical industrial bridge crane with one hoist, one trolley, and one bridge axis. Perform a risk analysis of every individual crane to define which safety functions are relevant.
Limit Switch Management - Horizontal Axes
The following figure describes a single horizontal axis (trolley or translation). The cross limit switch has two normally closed mechanically independent contacts for each of the four switching positions (forward stop, forward slow, reverse slow, reverse stop). Alternatively, you can use two limit switches, each with four contacts.
Both M241 and the safety controller test plausibility of limit switch signals and stop the movement using Safe Torque Off (STO) function if a non-standard state is detected.
EIO0000001763 05/2014 89
Safety Relevant Functions
A second option is a combination of analog distance measurement and digital cross limit switch.
You can also use two separate analog distance sensors per axis. Both controllers have to transmit the measured values through CANopen and compare them to detect incorrect reading.
90 EIO0000001763 05/2014
Safety Relevant Functions
Limit Switch Management - Hoist Axis
The following figure describes the hoist axis. The safety controller has to stop the movement of hoist axis when the emergency stop limit switch on top of the movement is reached. This switch must have two mechanically independent normally closed contacts that are both wired to the safety controller. The M241 and its program are not safety related in this case.
EIO0000001763 05/2014 91
Safety Relevant Functions
Overload
The following figure describes the implementation of overload detection. Both controllers measure the load using analog input values from two independent load measurement devices.(load measurement device with two redundant sensors). The load information is compared by both controllers to detect incorrect reading.
The safety controller stops the movement using STO when inconsistent signal readings are detected. If overload is detected, the movement is stopped by the M241 controller.
92 EIO0000001763 05/2014
Safety Relevant Functions
Overspeed
The following figure describes the implementation of overspeed detection. Both controllers measure the speed of hoist axis using incremental encoders connected to the hoist drive and to the counter input of the second M241. The speed information is compared by both controllers to detect incorrect reading.
The safety controller stops the movement using STO when inconsistent signal readings are detected. If overspeed is detected, the movement is stopped by the M241 controller.
EIO0000001763 05/2014 93
Safety Relevant Functions
Safety Circuit
The following figure gives an overview of signals connected to inputs and outputs of the safety controller for three axes of the crane.
94 EIO0000001763 05/2014
Safety Relevant Functions
Preventa XPSMC Safety Controller
The safety controller is an important element of the safety chain. It evaluates status of the crane based on its digital inputs. It authorizes movement of all axes by digital signals connected to Safe Torque Off (STO) inputs of respective variable speed drives (Altivar 71, Altivar 32).
The drives without STO function (Altivar 312) must be galvanically isolated from the motor using two motor contactors. Their brake circuit must also be disconnected using two contactors.
The following figure schematically describes XPSMC connection:
The program for the Preventa XPSMC safety controller is a part of this application template. It is available in the SoMachine installation folder in the following directory: \Documents and Settings\All Users\Documents\SoMachine Software\V4.1\Project Templates\Hoisting\M241_safetyXPSMC.mcc
EIO0000001763 05/2014 95
Safety Relevant Functions
Preventa XPSMC Safety Program
Overview
The safety controller controls Safe Torque Off (STO/PWR) inputs of the 3 variable speed drives. It manages the emergency stop circuit and also controls the additional safety brake of the hoist axis.
Safe Torque Off - Hoist Drive
Following conditions are required for enabling the hoist drive: The crane is not stopped using emergency stop switch. The hoist is not at the emergency limit switch. The signals of both load cells are consistent or safety override switch is activated. The hoist speed signals are consistent or safety override switch is activated.
96 EIO0000001763 05/2014
Safety Relevant Functions
Safe Torque Off - Trolley and Translation Drives
Following conditions are required for enabling the trolley and translation drives: The crane is not stopped using emergency stop switch. Laser distance signals are consistent. Limit switch signals are consistent.
Emergency Stop Circuit
Following conditions are required for the emergency stop circuit: The crane is not stopped using emergency stop switch. Main contactor feedback is present. The crane start is authorized using the start button. Both M241 controllers are operating correctly. The signals of both load cells are consistent or safety override switch is activated. The hoist speed signals are consistent or safety override switch is activated.
EIO0000001763 05/2014 97
Safety Relevant Functions
Open Safety Brake Control
Following conditions are required to open the safety brake control: The crane is not stopped using emergency stop switch. The hoist speed signals for over speed measurement are consistent.
98 EIO0000001763 05/2014
Hoisting
Magelis HMI STU 855 Display
EIO0000001763 05/2014
Magelis HMI STU 855 Display
Chapter 10Magelis HMI STU 855 Display
Magelis HMI STU 855 Display
The panel used in this template is a Magelis HMI STU 855. You can parameterize and monitor the hoist, trolley, and translation axes. You can perform the calibration of CableLength_Enc_2 function block and Overload_EN15011 function block and the application parameterization through the Magelis HMI.
Programming of the Magelis HMI is done by using Vijeo Designer integrated in SoMachine.
EIO0000001763 05/2014 99
Magelis HMI STU 855 Display
100 EIO0000001763 05/2014