+ All Categories
Home > Documents > SmartCrane™ Anti-Sway Crane Control

SmartCrane™ Anti-Sway Crane Control

Date post: 27-Oct-2021
Category:
Upload: others
View: 2 times
Download: 0 times
Share this document with a friend
37
SmartCrane™ Anti-Sway Crane Control PLC Function Block Interface
Transcript
Page 1: SmartCrane™ Anti-Sway Crane Control

SmartCrane™

Anti-Sway Crane

Control PLC Function Block Interface

Page 2: SmartCrane™ Anti-Sway Crane Control
Page 3: SmartCrane™ Anti-Sway Crane Control

!

SmartCrane, LLC11 Canal Drive • Poquoson, VA 23662 • 757-303-0167 •

[email protected]

© 2015 by SmartCrane, LLCAll rights reserved

The owner, authorized user, or dealer of a SmartCrane software or hardware product may reproduce this document for the purposes of installing, using, or maintaining the software or hardware.

No other reproduction or commercial uses are permitted.

We have made every effort to ensure this document is up to date and accurate. However, there are numerous SmartCrane products in production that have not been updated to the latest version. In those cases, previous manual versions will still apply. SmartCrane, LLC is not responsible for printing or clerical errors.

We encourage customers and users to provide comments and corrections to SmartCrane, LLC for the purpose of improving the accuracy and usefulness of this and related documents.

The SmartCrane logo and the name “SmartCrane” are trademarks of SmartCrane, LLC.

Page 4: SmartCrane™ Anti-Sway Crane Control

About This Manual

This manual describes detailed data interfaces required to allow the anti-sway software function block to control sway during both manual and automatic moves.

SmartCrane® Anti-sway Function Block (FB) is software to control operation of a crane’s horizontal motion, for the purpose of improving the safety of operations and decreasing the time required to move a suspended load between destinations. The SmartCrane® function block software runs on a PLC in the

customer’s network and responds, through the drive or directly, to operator’s commands. The patented SmartCrane™ Anti-sway Control uses an open-loop algorithm that eliminates load sway induced by trolley

accelerations and decelerations. It operates in three modes: Manual Anti-sway, Automatic Move, and

Suspend. In Manual mode, the control responds to the operator's trolley stick demands and completely

inhibits sway no matter what demands the operator gives. In Automatic Move mode, the control drives the crane to the supplied destination reference position using velocity reference.

In This Guide

This interface manual includes the following information:

Chapter 1, “How Anti-Sway Works“ explains how the SmartCrane Anti-sway controls the motor speeds and what is required from the PLC.

Chapter 2, “PLC-Controlled Anti-sway Interface“ explains how to interface with SmartCrane™ function block to provide “black box” anti-sway functions for one dimension of crane motion.

Chapter 3, “Commissioning” explains how to set up a new crane for use of the Anti-sway function blocks.

Chapter 4, ”Control of Anti-sway functions“ gives suggestions about implementing operator switch control of anti-sway.

Chapter 5, “Demonstration Project” describes the use of the CodeSys software demonstration project.

Page 5: SmartCrane™ Anti-Sway Crane Control

How Anti-Sway Works 1

Read this chapter to understand how the SmartCrane Anti-sway controls the motor speeds and what is required from the PLC.

When an operator moves the control stick to a certain speed, the SmartCrane™ Anti-sway Control accelerates initially according to the operator's demand, inducing an initial load sway. When about half the reference velocity has been reached, the anti-sway "coasts," i.e., maintains constant velocity, for a short time.

Then the trolley is accelerated again, this time to the full operator demand velocity. This second acceleration kills the sway induced by the first acceleration, so the trolley is now traveling at the operator reference velocity with the load hanging directly below the trolley. When the operator releases the stick demanding zero

velocity, the same process is repeated in reverse to bring the load to a stop without sway. If the operator demands movement for a short time, the anti-sway will bring the motion to a stop and then perform a second movement to catch the sway.

No matter what the sequence of demands, the SmartCrane Anti-sway will produce a motion profile that will finish with little or no sway. If if an operator tries to induce dangerous swing while anti-sway is in operation the load will finish with little or no sway. However, because it is open loop, or predictive, if an

operator tries hard enough for a long period of time, some sway can build up.

All this requires precise timing, which in turn depends on the natural frequency of the pendulum motion. The SmartCrane Anti-sway carefully accounts for changes in hoist cable length, changes in operator demand,

etc., in real time. The key feature is that the SmartCrane™ Anti-sway Control uses precise timing of accelerations to control the sway, rather than real-time sway measurement and control feedback. It does not require a camera or other sway-sensing device to control sway induced by moving the crane.

However, in order to remove sway introduced by other factors such as wind and non-vertical lift, the SmartCrane™ system offers an optional SmartCamera™ system that measures and corrects for actual sway in real time, usually at the end of a move once the trolley has come to a stop. This feature is available

separately, using the function block (FB) software with its own license key.

What the Anti-sway needs from the crane

For manual anti-sway operation, the SmartCrane™ system only requires measurement of corrected hang length, along with operator stick demand. In order to perform automatic moves, the system also needs trolley

and/or gantry positions.

Anti-sway will not operate if these measurements are not present (and properly “homed” if necessary).

Page 6: SmartCrane™ Anti-Sway Crane Control

SmartCrane, LLC strongly advises the use of multi-turn absolute encoders for measuring trolley, hoist, and gantry position. While these instruments are more costly than ordinary incremental or absolute encoders, they will guarantee correct readings at all times, prevent possibly dangerous motions that anti-sway can

generate using bad data.

In cases where there is no direct (geared) turning element to drive encoders and reliance must be placed on contact wheels, then homing will always be necessary to account for slips or jumps in the contact wheel.

In these cases, customers should consider other absolute position measuring devices such as laser reflectors.

Modes of operation for Open Loop Antisway

The PLC supplies the mode signal, 0 = SUSPEND, 1 = MANUAL ANTI-SWAY, 2 = MOVE TO POSITION,

7 = TRAP. The Anti-sway function block will return that code if it is acceptable, however under certain conditions the returned code may be different.

In Suspend mode, the control carries out no anti-sway operations, but returns the velocity reference

exactly as supplied in the input parameter. The drive will perform best if its ramp time settings are a short as possible but that means acceleration demands in suspend mode will be out of bounds. The SmartCrane library includes a function block ApplyAcceleration that will condition the velocity reference to stay within

ramp time constraints. The PLC sequence should call this function block after the antisway function every time.

In Manual-assist mode, the control applies anti-sway accelerations to the demand velocity supplied. The

function block will not switch from suspend mode to Manual-assist mode while the crane is moving.

In Automatic Move mode, open loop will move the trolley automatically to a measured position in response to an input destination. The destination must remain the same throughout the move. If the PLC

program changes the destination, or if the operator speed demand is not zero, the function block will revert to Manual-assist mode.

TRAP is only available if the PLC is licensed for CLOSED LOOP control. In this mode, the FB records

the estimated position of the spreader or hook at the instant the mode signal first becomes TRAP. Then, if Closed Loop is enabled, the program will begin a sequence to return the hook to that position, without sway. If the crane is moving at the time AND absolute encoder data are supplied the controller will stop the crane

and return it to the recorded position, using CLOSED LOOP.

If the crane is not moving, the CLOSED LOOP FB will execute two short moves to remove the sway and leave the spreader in the recorded position.

Page 7: SmartCrane™ Anti-Sway Crane Control

How an operator uses anti-sway

With Manual-assist anti-sway, the SmartCrane function block adds accelerations to the operators's stick demands to effect control of sway. During a simple acceleration to a constant speed, for instance, the anti-sway will insert a short “coast” interval (no acceleration) during the ramp up, to achieve zero sway at the set

speed. It will do the same during the stopping ramp. This means that the trolley or crane will move farther than it would without anti-sway, but an operator would need to make other corrections to cancel sway in any case.

Without anti-sway, an operator would need to “guide” the crane to a stop carefully, to control the sway. With anti-sway, an operator just releases the stick and lets anti-sway do the work. The release point will need to be earlier than if one wanted to let the trolley or crane stop in the minimum distance, ignoring the sway.

Operators will learn to judge this distance through practice.

In order to move the hook or load a small distance, an operator should move the trolley or crane exactly half the desired distance and then leave the stick at zero. At the correct time, the SmartCrane anti-sway will

supply the second half of the move and finish with no sway. The operator must gauge that half-move by watching the trolley or gantry/beam move, not the load.

If an operator wishes to stop the trolley or crane in the shortest possible distance (in an emergency), the

stick should be placed at the full-speed reverse position until the trolley or crane just comes to a stop. Then the stick should be released immediately, allowing the SmartCrane function block to apply its anti-sway correction in the reverse direction.

When introducing anti-sway to an operator the first time, it may be useful to encourage the operator to try to induce sway while anti-sway is on and in Manual-assist mode. The operator will discover that with open loop only it will take many repeated full-speed demands in both directions to induce any significant residual

sway.

Page 8: SmartCrane™ Anti-Sway Crane Control

Anti-sway Function Blocks 2

Read this chapter to learn how to employ with SmartCrane™ PLC function blocks to provide anti-sway functions for crane motion.

In this embedded configuration, all interfaces with the crane motors, crane status, and operator controls are provided through the PLC, and the anti-sway functions are supplied by SmartCrane Anti-sway function blocks (FB).

SmartCraneLibrary.lib

SmartCrane embedded library versions are available for PLCs compliant with International Electrotechnical Commission (IEC) international industrial standard IEC 61131-3. Each PLC manufacturer must supply a library function block to supply a secure serial number that identifies the individual machine. To

validate the user license, the PLC programmer adds a 48-character license code, created and supplied by SmartCrane LLC to match the serial number, MAC address, or other fixed identifier. All SmartCrane function blocks on the same machine may use the same license code. For test and evaluation purposes, the license

code “TEST” may be used, and all features and function blocks will operate normally, for a maximum of 1,000 PLC “sweeps” or cycles. After 1,000 cycles, the Smartcrane function block will return a code for LICENSE EXPIRED.

The following function blocks are supplied with the SmartCraneLibrary.lib (some deliveries may contain subsets of these function blocks).

Page 9: SmartCrane™ Anti-Sway Crane Control

• SMARTCRANE (FB): The full antisway program, including operator-assist and point-to-point modes.

• CALIBRATE_HANG (FB): Converts measured hang length to calibrated hang length using three

conversion factors developed from swing experiments. Requires hang length and load weight inputs.

• LOAD_FROM_CURRENT (FB): Uses real-time hoist rate and hoist motor current to generate an

estimate of weight on the hook.

• APPLY_RAMP(FB): Conditions velocity reference in suspend mode to stay within ramp time limits.

Replaces a similar function of the drive, when the drive ramp is set artificially small.

These function blocks are not to be called from the user program:

• ANTISWAY_LOOP (FB)

• LICENSE_HARDWARE (FB)

• MANAGE_)AUTO_STATE (FB)

• TIME_CHECK (FB)

Besides the library, SmartCrane will also supply a project file in CoDeSys format containing a main

program PLC_PRG, a visualization module, and Global Variables that support the visualization. See Chapter

5 for a complete description.

Basic data exchange

The PLC program provides a control code, a brake status, a velocity demand, a real input time, hoist rate,

hang length, maximum speed, and a velocity ramp time. Optionally, it may supply a very small acceleration

ramp time (to control jerk) and a crane response (measured velocity) velocity, so that antisway can delay the

antisway profile until the crane drive begins to respond.

To activate automatic move to position, the PLC must supply current position, destination position and

tolerance window, and response lag time.

In return, the anti-sway function block provides velocity references and brake requests only, plus a return

status code. Normally that status code matches the input control code, but might be different under certain

circumstances. For point-to-point moves the FB also supplies an indication of the move's phase.

Page 10: SmartCrane™ Anti-Sway Crane Control

Where anti-sway velocity demands fit in the PLC control sequence

The principal SmartCrane Anti-sway Control output is a horizontal velocity demand. For the basic

operation of Anti-sway, the algorithm requires reliable drive responses to ensure that the actual trolley

velocities are the same as the output trolley velocity. This means that the PLC and drive system must be

“closed loop,” so that the motor speed is measured and that feedback is used to adjust the motor current or

other controlling attribute to achieve the correct velocity. Development of an effective control technique (such

as PID control) is beyond the scope of this manual, however improper tuning of the motor control feedback

loop can cause severe velocity overshoot or undershoot, rendering the antisway control ineffective.

Unless otherwise supplied in real time, the SmartCrane Anti-sway Control assumes that the maximum

acceleration limit is constant for all trolley velocities and loads, and that the operator's reference (or fixed-

move position) is required to be a legal value. Any "slow down" or other safety limits must be imposed on the

operator's velocity demand before that velocity demand is passed to the SmartCrane Anti-sway Control, or by

changing the maximum speed and ramp times (keeping the ration the same, for constant acceleration) in real

time. In particular, it is best to have the PLC (using smart crane (FB) and apply_ramp(FB)) obey the ramp

time limitations, setting the drive’s ramp to near zero.

Automatic moves are conducted at full speed and maximum acceleration, without regard to slow-down

zones. This is safe to do, because in automatic operation the load never travels past the eventual stopping

position. Thus, if the stopping position is legal and the crane velocity response is accurate, the load will not

swing beyond that point, regardless of the trolley speed during the move.

That said, if the PLC and encoder systems report erroneous position values to the antisway, the antisway

will drive the crane to the indicated destination, which may cause the crane to move out of bounds, move to

physical stops at high speed, or even collide with crane parts or other objects.

For this reason it is critical that the position encoder be highly reliable: we recommend replacing any

“relative” encoders (including hoist) with absolute, multi-turn encoders. While in the past such devices

represented a significant investment, the prices for the best such encoders makes it a reasonable upgrade.

SmartCrane's antisway maximum speed limitation can be modified in real time. Antisway will respect that

maximum, not as an absolute maximum, but as a maximum “desired” speed. The PLC program should set

that speed to the normal maximum except in a “slow” zone.

For more information about the SmartCrane Anti-sway Control algorithm, see the SmartCrane, LLC web

site at http://www.smartcrane.com.

Page 11: SmartCrane™ Anti-Sway Crane Control

Swing calibration

Because cranes are complicated devices, simple pendulum calculations are insufficient. For each crane,

periods must be measured empirically for a range of hang lengths and load conditions. For the function block

version, the customer is required to supply a “calibrated” hang length based on the results of these

measurements.

Any change in the geometric configuration of the suspension system (e.g., moving the trolley hoist

sheaves farther apart or closer together, or changing the head-block configuration on the spreader bar)

requires recalibration of the swing. For procedures, see Chapter 3, Commissioning.

SmartCrane will supply a simple spreadsheet template where the installer can enter the experimental

data observations and solve for three calibration parameters, for each direction of motion.• OFFSET• LENGTH SCALE• LOAD SCALE

When the PLC is in operation, the calibrated hang length for one dimension is calculated as follows, for

empty hook (no load):

CALIBRATED := emptyOffsetFactor + emptyLengthFactor * HANGLENGTH ;

When loaded, the

CALIBRATED := offsetFactor + lengthFactor * HANGLENGTH + loadFactor * LOAD ;

For ease of programming, the SmartCrane embedded library includes a function block calibrated_hang

that applies these values and returns a calibrated hang length. More than one of these FBs may be

instantiated to support multiple dimensions.

While the weight of a load does not affect the period, the fact that the load's center of gravity is lowered

by the addition of the weight does affect the pendulum behavior.

Page 12: SmartCrane™ Anti-Sway Crane Control

Load Estimation

If a direct load measurement is not available, and if no other indication of load is available, use the

SmartCrane function block load_from_current that returns an estimated load calculated from hoist rate and

hoist motor current. When using this function block, the operator must execute a hoisting up after any reset

or reboot of the PLC before antisway will be available. Before then, the function block will return

goodLoadEstimate = FALSE and estimatedLoad = 0.

This function block requires the SmartCrane Open-Loop license key or code.

SmartCrane Open-Loop Function Block

This function block provides the real-time references to control crane motion with anti-sway. More than

one may be instantiated to supply anti-sway for multiple dimensions. The tables below provide the data items

and their definitions. This function block requires the SmartCrane Open-Loop license key. Except for Closed

Loop, the same license code applies to all use of SmartCrane library function blocks on the same machine,

for single or multiple instantiations.

Page 13: SmartCrane™ Anti-Sway Crane Control

INPUTS

Data Item Definition Values

controlCodeIn Designates the Antisway function to be performed.

Integer: 0 = Suspend 1 = Manual Anti-sway2 = Move to Position

brakeIsOff Tell anti-sway that the drive is ready to accept velocity reference

Boolean:FALSE = Brake is closed TRUE = Brake is open

velDemandIn The velocity demanded either by an operator or other source

Real: in Feet/Second

InputTime Current time from PLC system

Real: in Seconds

hoistRate Rate of hoisting or lowering

Real: in Feet/Second, positive values UP

HangLength Hang length, adjusted for load

Real: in Feet

maxSpeed Maximum speed for automatic move, coordinated with velocityRampTime

Real: in Feet/Second

minSpeed Minimum speed for any move; output will remain at this speed until craneResponse is non-zero

Real: in Feet/Second

velocityRampTime Time to accelerate from 0 to maxSpeed

Real: in Seconds

Page 14: SmartCrane™ Anti-Sway Crane Control

accelerationRampTime Time to change from zero acceleration to full acceleration. Used to control for jerk. Must always be much smaller than velocityRampTime; when in Move to Position Mode, the Anti-sway function block will reduce this to no more than one-tenth of velocityRampTime.

Real: in Seconds

crane Response Velocity in this coordinate; only used to delay start of anti-sway profile. Supply a small fixed value if measured velocity not available, otherwise anti-sway will not work.

Real: in Feet/Second

LicenseKey This code is encrypted by SmartCrane for each licensed machine, based on machine ID, serial number, or MAC address.

String: 48 characters. Example: MWGYHBPHAKOPOOXYHSELYAUODGZYSPASXAKNFJTCJQCXOZPA

LicenseCode This is a short code designed for PLC or controller without access to a hardware serial number. Requires the installer to save a 64-character access code in FLASH memory

currentPosition Position of the trolley in the present coordinate system

Real: in Feet

destinationPosition Target position of the trolley in the same coordinate system. Supply a new value to start a new move.

Real: in Feet

Data Item Definition Values

Page 15: SmartCrane™ Anti-Sway Crane Control

OUTPUTS

destinationWindow Maximum error in positioning to destination; should be at least half the value of the shortest small motion the crane or trolley can accomplish

Real: in Feet

lagTimeSeconds Latency from anti-sway reference to actual crane motion. Used to calculate stopping time.

Real: in Seconds

Data Item Definition Values

Data Item Definition Values

velRefOut Velocity Reference Real: in Feet/second

trolley Brake Out Request to open brake for movement. Applies to whichever trolley or gantry/crane dimension is in use

Boolean:FALSE = OK to close brake TRUE = Request open brake

control CodeOut Designates the Antisway function to be performed, or error if present. An input error can be control code greater than 2, hang length zero or less, input time reversed, or acceleration ramp time too large.

Integer: 0 = Suspend 1 = Manual Anti-sway2 = Move to Position -1 = Input Value Error-2 = License Invalid -3 = License Expired

Page 16: SmartCrane™ Anti-Sway Crane Control

ERROR CODES for Error Code Out (All codes except 8 and 9 will remain active for 60 seconds after last

detection unless replaced by a new error code.)

moveStateOut For point-to-point moves only, indicates the state of the move. When using position control drives, the actual destination may safely be sent to the drive after reaching state 4.

Integer:0=IDLE, waiting for a new destination;1=STARTING, possibly waiting for crane motion response; 2=ACCELERATING, increasing to or at full speed;3=SLOWING, beginning deceleration;4=STOPPING, most antisway corrections done and ramping down to zero speed. 5=APPROACHING, trolley is close to the destination, and is moving slowly toward the destination window; or6=FINAL, trolley is within destination window and waiting for residual antisway corrections, after which the state switches back to IDLE state. 7=COMPLETE, move is over and brake release signal has been canceled

antisway PendingOut

For use by Closed Loop FB only, indicates the amount of motion Open Loop will need to remove sway.

Real. Use as input for Closed Loop function block.

errorCodeOut Detect and report errors in input and/or antisway wait conditions

Integer. Consult Error Code Table

Data Item Definition Values

Error Code

Definition Discussion

0 NO ERRORS DETECTED All OK

1 BAD CONTROL CODE IN controlCodeIn less than 0 or greater than 2

2 BAD VEL DEMAND IN more than 110% of max speed

3 BAD HOIST RATE IN Hoist rate absolute value greater than 10 ft/sec

4 BAD HANG LENGTH IN hangLength less than or equal to 0.0 OR hangLength greater than 100 ft

5 BAD MAX SPEED IN maxSpeed less than 0 or greater than 100 ft/sec

6 BAD VELOCITY RAMP IN velocityRamptime less than or equal to 0 or greater than 100

Page 17: SmartCrane™ Anti-Sway Crane Control

7 BAD ACCELERATION RAMP IN accelRampTime less than 0 OR greater than velocityRampTime

8 CRANE NOT RESPONDING craneResponse is 0 and velDemandIn is not 0 (Only active when condition exists)

9 BRAKE NOT RESPONDING velDemandIn is not 0 and brakeIsOff is FALSE (Only active when condition exists)

10 (a) TIME INTERVAL TOO LONG Antisway more than 1 second behind inputTime

11 (b) AWAITING CRANE MOTION Manual antisway sending small demand, waiting for brakes or response

12 (c) HOLD SUSPEND UNTIL STOPPED Delaying switch from SUSPEND to another mode until crane is stopped

13 (d) CALLING INTERVAL TOO LONG inputTime more than 1 second after previous inputTime. SmartCrane FB may cause a system fault by calculating a “catch up” that may take too many system cycles. Calling interval should be 200 milliseconds or less.

14 (e) CLOCK ROLLOVER IN latest inputTime less than previous inputTime. SmartCrane FB adapts to new time sequence, even wile moving.

15 DESTINATION CHANGED Automatic move canceled because the destination was changed during the move.

Page 18: SmartCrane™ Anti-Sway Crane Control

Hang Calibration Function Block

This function block applies the three factors to produce calibrated hang length for one dimension of crane

motion. Note that the factors and results will normally be different for each dimension of sway.

This function block does not require a license key.

INPUTS

OUTPUTS

Data Item Definition Values

rawHangLengthIn Hang length measured by hoist encoder or other means.

Real: in Feet

loadIn Load either measured by load cell or predicted by load_from_current FB.

Real: in Tons

offsetFactor swing parameter, loaded Real: in Feet

lengthFactor swing parameter, loaded Real: No dimensions

loadFactor swing parameter, loaded Real: in Feet/Ton

emptyOffsetFactor swing parameter, empty Real: in Feet

emptyLengthFactor swing parameter, empty Real: No dimensions

Data Item Definition Values

calibratedLength A calibrated hang length that will produce a correct pendulum period for one dimension of swing. Use as an input for HangLengthIn in the corresponding SmartCrane function block for this dimension.

Real: in Feet

Page 19: SmartCrane™ Anti-Sway Crane Control

Load from Motor Current Function Block

The function block load_from_current monitors hoist rate and motor current in order to develop a running

estimate of load on the hoist. This load value may then be used as input to one or more calibrated_hang

function blocks. Only one instantiation is needed. This function block requires the SmartCrane Open-Loop

license key. Except for Closed Loop, the same license key applies to all use of SmartCrane library function

blocks on the same machine, for single or multiple instantiations.

INPUTS

Data Item Definition Values

timeSecondsIn Current time from PLC system. Real: in Seconds

hoistRateIn Rate of hoisting or lowering Real: in Feet/Second, positive values UP

hoistCurrent Measured or demanded current on hoist motor.

Real: in any available scale

RateCurrentScale Linear measure that produces reasonable estimated load values, in Tons. Important only in that it defines the scale, but must be the same value used when taking swing period readings.

Real: greater than zero.

loadSmoother Used to smooth result. Real: 0.5 is recommended

licenseKey This code is encrypted by SmartCrane for each licensed machine, based on machine ID, serial number, or MAC address.

String: 48 characters. Example: MWGYHBPHAKOPOOXYHSELYAUODGZYSPASXAKNFJTCJQCXOZPA

Page 20: SmartCrane™ Anti-Sway Crane Control

OUTPUTS

Closed Loop Anti-Sway Function Block

The function block Closed_Loop supplies velocity reference for one dimension of crane motion, based on

sensor inputs. This function block requires the SmartCrane Closed-Loop license key, which is separate from

the Closed-Loop key.

Closed-loop anti-sway can be used whenever there is opportunity to sense sway under stable

conditions. The measurements will occur whenever the FB senses a stable environment and will execute

small horizontal motions to remove the sway. Once the measurements are made, the motions can occur

independently: either while the crane is otherwise motionless, or when antisway is supplying the velocity

reference. So, when a move has just finished (either manual or automatic) the Closed-loop FB begins

measuring and then makes its adjustments. Also the Closed-loop FB will continue to measure but will not

execute any further motion until antisway motion begins, at which time it may send adjustments to correct any

sway that existed prior to the beginning of the move.

This interface assumes that inertial measurements are used on the hook or spreader to sense sway.

However, a customer may provide any valid method to sense sway, in which case the PLC should supply the

negative of sway angle instead of IMU acceleration (as they are equivalent).

licenseCode This is a short code designed for PLC or controller without access to a hardware serial number. Requires the installer to save a 64-character access code in FLASH memory

Data Item Definition Values

Data Item Definition Values

goodLoadEstimate Will become TRUE after sufficient readings during hoist up event and will remain TRUE thereafter.

Boolean; TRUE of FALSE

estimatedLoad The result of the estimation. Boolean:FALSE = OK to close brake TRUE = Request open brake

Page 21: SmartCrane™ Anti-Sway Crane Control

The mode of operation controls when the corrections may occur. The modes BEGINNING OF

MOVE and END OF MOVE provide the two correction events as described above. The FULL TIME mode

enables both modes (it does NOT continually make adjustments).

The ONE TIME mode will enable a single correction event, which may actually require more than

one correction. When used in conjunction with control code 7 = TRAP, the closed-loop function will record a

spreader or hook estimated position at the instant the TRAP signal is received and will make adjustments to

remove sway AND return the spreader or hook to the recorded position. Similarly, when MOVE TO

POSITION control code is active, the closed-loop FB will make corrections to achieve both minimum sway

and positioning the trolley or crane to the destination.

The modes STOPPED ONLY and MOVING ONLY are not supported in the embedded function

block.

The sway adjustments are simply small periods of acceleration and deceleration designed to move

the trolley or crane a short distance. These motions occur over a relatively short time period and actually

perform the same kind of correction a skilled operator would do to achieve the same goal. If there is a large

Page 22: SmartCrane™ Anti-Sway Crane Control

sway, more than one of these “pulses” may be needed to catch the sway. If either the TRAP or MOVE TO

POSITION control codes are in effect, the system will almost always require two pulses.

The closed-loop FB reports its activity by a stage code, representing its current activity. When not in

idle (1) the sequence always begins with a measuring stage(2), followed by starting(3), accelerating(4),

decelerating(5), and then stopping(9), describing either an isosceles triangle or trapezoid velocity pattern. If

two consecutive adjustments are needed, then after the deceleration stage(5), there will be a waiting stage(6),

then another acceleration(7) and deceleration(8) before the stopping stage (9). Stage 0 represents done and

is only a momentary condition.

INPUTS Velocity

Data Item Definition Values

controlCodeIn Supply the same control code as supplied to Open Loop Anti-sway FB.

Code 0 = Suspend Antisway, 1 = Manual Antisway, 2 = Move to Position (Crane must be stopped)7 = TRAP

mode Defines the mode of operation of closed loop.

Closed Loop mode 0 = SUSPENDED 1 = FULL TIME 2 = STOPPED ONLY3 = ONE TIME 4 = MOVING ONLY5 = BEGINNING OF MOVE6 = END OF MOVE

brakeIsOff Notifies Closed Loop when brake is released.

Boolean:FALSE = brake is ON

An t i swayBrake Release

Informs Closed Loop of output brake request from Open Loop FB.

Boolean: TRUE = release brake

velDemandIn Informs Closed Loop of output velocity request from Open Loop FB.

Real: in Feet/second

Stages: 1 2 3 4 5 6 (7 8 ) 9 0

Velo

city

Page 23: SmartCrane™ Anti-Sway Crane Control

inputTime Clock time Real: in Seconds

observationTime Time of swing observation. Use current time if no separate time tag

Real: in seconds

hangLength Positive distance from trolley to load. Use the calibratedLength from calibrated_hang FB.

Real: In Feet

expiration Time interval after trolley stops in which to remove sway. Set for operator ease of use.

Real: In seconds

maxFinalSway Maximum displacement from center. If estimated swing amplitude exceeds this, Closed Loop FB will try to kill the sway.

Real: In Feet

maxSpeedPositive

Maximum speed available (positive number) in positive direction

Real: in Feet/second

maxSpeedNegative

Maximum speed available (positive number) in negative direction

Real: in Feet/second

minSpeed Minimum speed available Real: in Feet/second

earlyStartSeconds Seconds. Use a negative value to start sending small demands early,, to activate motor

Real: In seconds

phaseBiasSeconds

Use a negative value to shift entire pulse earlier

Real: In seconds

gain normal = 1.0; set smaller or larger to adjust kill sway distance

Real

load Load in Tons from load cell or Load Estimate function block

Real: in Tons (English or Metric) consistent with swing experiments

velocityRampTime Time to accelerate to maxSpeed Real: In seconds

craneResponse CraneResponse Velocity Can be constant <>0.0 or true encoder value. When zero, will delay start of closed loop corrections.

Real: in Feet/second

antiswayPending variable (0.0-1.0) indicating the scale of pending actisway corrections

Real

nObservations 1 or 2 if there are new observation(s), 0 otherwise.

Int (0, 1, or 2)

accelerationIMU Horizontal acceleration in units of gravity Real: in G's

accelerationIMU2 Horizontal acceleration in units of gravity, from second sensor, In case 2 IMUs are installed

Real: in G's

Data Item Definition Values

Page 24: SmartCrane™ Anti-Sway Crane Control

OUTPUTS

LicenseKey Supplied by SmartCrane for individual hardware Serial Number. Use 'TEST' to skip hardware check and run for 1000 cycles, after which reboot is required.

String[64]

currentPosition Only used when position encoder sensor is available, either for position-to-position mode or TRAP mode.

Real: in Feet

destinationPosition

Only used when position-to-position move enabled.

Real: in Feet

destinationWindow

Only used when position-to-position move enabled.

Real: in Feet

Data Item Definition Values

Data Item Definition Values

VelRefOut Velocity Reference Real: in Feet/second

Trolley Brake Out Request to open brake for movement. Boolean:FALSE = OK to close brake TRUE = Request open brake

ClosedLoopStage Indicates the stage of the closed loop corrections.

Integer:0 = Done 1 = Idle 2 = Measuring 3 = Starting 4 = First Acceleration 5 = First Deceleration 6 = Between Pulses7 = Second Acceleration 8 = Second Deceleration 9 = Stopping

Control CodeOut Designates the Antisway function to be performed, or error if present. An input error can be control code greater than 2, hang length zero or less, input time reversed, or acceleration ramp time too large.

Integer: 0 = Suspend 1 = Manual Anti-sway2 = Move to Position7 = Trap -1 = Input Value Error-2 = License Invalid -3 = License Expired

Page 25: SmartCrane™ Anti-Sway Crane Control

Commissioning 3

Read this chapter for steps needed to commission a new crane with SmartCrane™ Anti-sway.

Several steps are required to ensure correct operation of SmartCrane Anti-sway. The job of the anti-sway

is to prevent sway from accumulating during a crane move. There are two keys to good results:

• Precise knowledge of swing period. Swing period is the time needed for a swing to return to a

starting angle, when the suspension point is stationary. A simple pendulum's period can be estimated

using an approximation formula based solely on the length of the pendulum, so in theory all that's

needed is a real-time measure of hang length. A real crane is not a simple pendulum because of

multiple cables and uncertain center of gravity, so it's necessary to measure swing timing at various

lengths and load conditions. These measurements allow the calculation of calibration factors used to

create an “effective” hang length, which in turn produces an accurate swing period.

• Precise crane motion response to velocity demands from anti-sway. The velocity profile is designed

to correct for the sway effects of accelerations demanded either by an operator or by internal speed

demands to reach a designated target. A slight time delay between demand and response will not

affect performance, as long as the time delay is constant and the profile of the response matches the

profile of the demand. It is important to record the demands and crane responses during

commissioning so that engineering measures can be taken to correct any response errors.

Confirm Load Measurement

If direct load-measuring sensor(s) are not in place, configure the PLC using the load_from_current

function block, with a rateCurrentScale = 1.00. Lift a load of known weight and monitor the output of the

function block, until it returns a value TRUE for goodLoadEstimate. Now lower and hoist several times.

Because this is a function that performs real-time estimation of acceleration, the estimatedLoad values will

change slightly every time there is a new hoist event. Record the resulting values for estimatedLoad and at

the end, calculate the average of the recorded values. Now calculate a ratio from known load (tons) / average

estimatedLoad. Replace this value as rateCurrentScale and repeat one lift, confirming that the

estimatedLoad is at least close to the known load.

Page 26: SmartCrane™ Anti-Sway Crane Control

Now, select one or more typical loads to be carried by the crane. At least one load should be nearly the

maximum load carried.

Lift each load and record its measured or value, ensuring that the measured or estimated values are

close to the actual loads.

Perform Swing Measurements

Swing timing tests are simple to do, and should follow the steps below.

1. Arrange for monitoring measured hang length and measured load (either direct load measurement or

output from the load_from_current function block). Have a stopwatch or equivalent. Arrange objects

to mark spots below the crane, as reference marks for swing timing.

2. Perform steps 3-5 with each different load condition (including 0 for empty hook), entering the results

in a table as shown in the following sample.

3. Start at the longest hang length, then lift the load to new heights at 4-6 foot intervals, up to the

shortest operational length.

4. At each height, start a swing in a direction where anti-sway will be in effect (trolley or gantry).

5. When the load reaches a reference mark close to the center of swing, start the stopwatch and begin

counting the swings. Capture the total time for several complete swings, finishing at the same

reference mark and with the load swinging in the same direction. Record the total time and the

number of swings.

6. Repeat steps 4 and 5 if anti-sway will be in effect in a second swing direction (trolley or gantry).

When all loads have been tested, send the table to SmartCrane, LLC for a free analysis.

Load Hang Length (ft) Swing Direction Number of Swings Total Time (secs)

0 30 Trolley 7 35.5

0 25 Trolley 7 32.2

. . . . .

Page 27: SmartCrane™ Anti-Sway Crane Control

Perform Simple Anti-sway Tests

When the swing timing is complete and the hang length correction parameters have been entered in the

PLC, perform the following simple tests in each direction, to ensure correct operation. Perform these tests

first using an empty hook, making sure that the test area is clear of objects and personnel.

For data recording with computer logged in, create a Trace in a visualization and add every dynamic

variable, input and output, for the SmartCrane function blocks in use. Select “History” for recording and

designate a directory on the computer to save the data.

If possible, begin a separate data recording for each test, to assist in post-test analysis. If desired, send

copies of data recordings to SmartCrane, LLC for free analysis.

1. Turn on Anti-sway. Move the stick a small amount and then immediately to stop. The crane should

move just that amount and stop, then move again in the same direction, about one-half pendulum

period later, canceling the sway. Repeat this test in both directions (forward and backward) and in

both dimensions (trolley or gantry) if anti-sway is active in both. Check data recordings and compare

crane response to anti-sway velocity references.

2. Test longer moves, using half speed, checking that sway is cancelled at the end. Check data

recordings and compare crane response to anti-sway velocity references.

3. Set up a free test path and test full speed moves in both directions and both dimensions. Only try this

if crane runs permit achieving full speed safely. The distance covered in a full speed test depends on

the pendulum period.

Note that the pendulum period T in seconds = 2 x ∏ x √(hangFeet/32.2).

With period T and speed ramp R seconds, to reach a maximum speed V requires a minimum distance,

X = V x (R + T)/2.

If the path is long enough and free of obstacles, start a recording, put the stick at full speed, hold it until the

crane reaches full speed, then release the stick. The crane should come to a stop with little or no sway.

Check the data recording to make sure that full speed was actually reached.

4. Add a load and repeat the same tests. Check data recordings and compare crane response to anti-

sway velocity references.

Page 28: SmartCrane™ Anti-Sway Crane Control

Perform Point-to-Point Tests

If point-to-point moves are required, perform the following additional tests.

1. Move the crane to both extreme ends of whichever dimensions are to controlled. Ensure that the

position encoder values supplied to the SmartCrane function block are consistent with the

measurement system. In particular, make sure that signs of velocities are consistent with the encoder

directions; i.e., a positive velocity will increase the position values, and vice versa.

2. Position the crane in the center of its range, and select a destination a few feet away in the positive

direction. Give the SmartCrane function block a ControlCodeIn = 2, Move to Position. Ensure that

the crane moves to the correct position.

3. Repeat step 2 for a destination in the negative direction. Repeat both tests again for the other

dimension, if anti-sway is enabled.

4. Perform tests for successively long runs, as desired.

Page 29: SmartCrane™ Anti-Sway Crane Control

Control of Anti-sway functions 4

Read this chapter for suggestions about implementing operator switch control of anti-sway.

The following are suggested guidelines for providing operator switches and other controls.

Anti-sway control switch

Most customers will wish to have an on/off switch for anti-sway. This switch should have a light or other

indication that anti-sway is responding properly to the PLC.

When this switch is OFF, the PLC should send ANTISWAY=SUSPEND to the SmartCrane function block.

Remember that the PLC should call apply_ramp(FB) if the drive ramp time is set to a minimum value.

Anti-sway suspend switch

In addition, operators should have a momentary "suspend" function because when the operator stops the

load near its destination, the load is frequently a small distance away from the destination. In these cases, it

is sometimes quicker to swing the load that small distance with anti-sway in SUSPEND mode and then drop

the load while it is still swinging. Also, if no sway feedback is available, some small sway may occur requiring

operator intervention. With anti-sway ON, the SmartCrane function block will add accelerations to preserve

any existing sway.

A temporary SUSPEND switch or foot pedal allows the operator to turn anti-sway off while making these

small adjustments. When this switch is depressed, the drive control should send ANTISWAY = SUSPEND to

the anti-sway function. Anti-sway should be reactivated automatically (ANTISWAY = MANUAL ANTISWAY)

when the foot pedal is released.

Closed-loop control switch

Operators may wish to have an on/off switch for closed-loop. This enables the closed loop FB in the

customer-selected mode: when OFF, use SUSPENDED mode for the closed-loop FB.

Page 30: SmartCrane™ Anti-Sway Crane Control

Closed-loop momentary controls

A momentary pushbutton or foot switch may be used to initiate a single closed-loop event. Pressing the

button should enable mode ONE TIME, which should be held until closed-loop signals completion (Brake

Release becomes FALSE). This may be accompanied by a TRAP control code. Customers may wish to

install two momentary closed-loop controls, one with TRAP and one without.

Page 31: SmartCrane™ Anti-Sway Crane Control

CoDeSys Demonstration Project 5

Read this chapter to learn how to use the supplied CoDeSys project to help understand the use of the SmartCrane Library.

The use of this project requires installing the free CoDeSys development library available at

www.codesys.com. CODESYS is developed and marketed by the German software company 3S-Smart

Software Solutions located in the Bavarian town of Kempten. Version 1.0 was released in 1994. The term

CODESYS is an acronym and stands for COntroller DEvelopment SYStem. CODESYS licenses are free of

charge and can be installed legally without copy protection on further workstations. The software tool covers

different aspects of industrial automation technology.

Project Components

The SmartCrane demonstration project contains a main program (or POU) called PLC_PRG. This

program calls function blocks in the SmartCrane library and manipulates GLOBAL variables for

communication with the Visualization component. This program operates on an artificial time step so one can

pause and resume as needed for a fuller understanding of the process.

The Global_Variables (under the Resource Tab) contains variables that are accessible by all components

of the demonstration. The SmartCrane library itself does not access any global variables, thus they are not

needed in the actual PLC implementation. Variables here are all labeled beginning with “Global” except the

point-to-point states that begin with “PTP_”.

The Library Manager requires the CodeSys Standard LIB 4.10.05 11:14:46 as well as the SmartCrane

Library. The Library Manager requires on more library that may be unique to the hardware platform in use.

This library is required to provide secure access to the machine identifier that is used in conjunction with the

license key to restrict operation to properly licensed hardware. For ifm Efector mobile controllers that library

is ifm_CRxxxx_V0x0000.lib or equivalent.

The Visualization component, called “brakes” provides for controlling and observing the operation of the

anti-sway functions. The details are described in the next section.

Page 32: SmartCrane™ Anti-Sway Crane Control

Project Operation

To run the project demonstrations, double-click on the Visualization icon “brakes.”

Then “log in” using the icon .

Then “run” using the icon

You can now control the operation of the program using the buttons and sliders as shown here:

Page 33: SmartCrane™ Anti-Sway Crane Control

You can switch from SUSPEND to MANUAL or AUTO by pressing the buttons. You can change the

length of point to point moves by selecting one of the three buttons. While the program comes with 5, 10, and

15 foot selections, these sizes may be easily changed in PLC_PRG. To begin automatic move, switch to

AUTO. To begin a new move after one is complete, select a new length or switch from AUTO to something

else then back to AUTO. To control manual moves, switch to MANUAL then move the slider right or left. Use

the STOP button to enter zero speed demand.

NOTE: the demonstration works in “TEST” mode only, so the “TEST” license key expires after 1000

cycles. To start over, simply log out using the button and then log in and run again.

When you first touch run, the program will automatically hoist up for a time to simulate the use of the

load_from_current function block. You will see the green light of “Simulated Load From Motor” when this is

done.

When ordering moves you can also observe the anti-sway requests for brake and drive motion alson

with the simulated PLC/drive responses in the four lights Shown. The response parameters are simulated in

PLC_PRG and you can modify those as needed to match your equipment.

When using point-to-point moves you can observe the state transitions in the list:

You can also observe the progress and performance in the bar graph and meter displays:

Page 34: SmartCrane™ Anti-Sway Crane Control

During the move you can observe the performance in one of three “trend” graphs.

The first trend shows velocity, the second position (to go to destination), and the third predicted sway.

Although the PLC_PRG simulation works in simulated time, the trend lines always run in real time. So to see

a realistic profile you must run a sample without pause.

The first trend also records a number of other factors but these are invisible (white). You can make some

of these visible by logging out and double-clicking the graph. In the window that appears, select ”Choose

variable” and see the following list:

Page 35: SmartCrane™ Anti-Sway Crane Control

If you click on any variable in the list you can then assign a new color. Also, you can switch from “only

online” to “History” in order to record a session to disk. In History mode, click “Configure” and enter a file path

(directory path) and a starting file name (the program will add a sequence number for each new recording).

The program will then record every variable in the variable list, no matter what the color, with

GlobalTimeSeconds as the first column. HINT: if you make a recorded file's suffix “.csv” you will be able to

open it directly in a spreadsheet program.

You are of course free to add to the Visualization component or PLC_PRG. If you think the additions

would be useful to other users, you can forward copies of your changes to SmartCrane, LLC.

Page 36: SmartCrane™ Anti-Sway Crane Control

NOTES

Page 37: SmartCrane™ Anti-Sway Crane Control

Recommended