Using Anti-Sway on a Crane
Introduction
The purpose of this example is to demonstrate how to use the CDP open-loop Anti-Sway operator to profile speed inputs in a way that cancels out the sway of the load when moved. It also demonstrates how to use Simulator to simulate the physical load for a simple Gantry Crane.
Open-loop Anti-Sway does not require any measurement devices to be attached to the load or crane hook making retrofitting cranes with Anti-Sway functionality simpler.
The example makes use of NoCode and LowCode programming similar to PLC IEC 61131-3. The only actual code in this example is the physics formulas declared in the two provided simulator models.
This example also makes use of CDPPort as interfaces to simplify the overall system design.
How to Run the Example
To run the example from CDP Studio, open Welcome mode and find it under Examples. Next, in Configure mode right-click on the library project and select Build, then right-click on the system project and select Run & Connect. See the Running the Example Project tutorial for more information.
Project Overview
This example includes:
- A library project containing NoCode helper blocks and two simulation models
- FFJoystic - ForceFeedback IO container with GUI override option and input scalers and filters.
- SpeedTaper - Filter to taper speed to 0 on edges of allowed movement region.
- PositionSim - Small simulator model to convert speed changes over time to the current position.
- CraneLoad - Crane Load simulator model for calculating Phi and Position for one load axis.
- A system project containing three applications:
- CraneApp - contains the optional joystick support, bounds checking and Anti-Sway operators.
- CraneGUI - contains widgets to display crane positions/controls and math operators for position calculations.
- CraneSim - contains gantry crane simulation models and filters to emulate hardware response.
In this example, a real gaming Joystick or UI override sliders control the Gantry Crane simulator with the Anti-Sway feature.
The Joystick IO block is CraneApp.JoysticIO.FFJoystic.ForceFeedbackJoystick
and is by default set up to use Linux joystick device /dev/input/js0
. The Device property shoud refer to hardware Joystick location, if available. The UI is setup to use sliders to control the Crane form startup.
The user inputs from UI (CraneGUI) or Joystick (CraneApp) are speed requests for cable, girder and crab.
The raw values from controls are scaled to SI units and filtered to allow the maximum rate of change of 1 meter per second. Additional bounds filtering is applied to avoid edge collisions.
The girder and crab speed requests are passed trough Anti-Sway operators before they get used by the simulation model of the Gantry Crane (CraneSim).
The CraneSim application provides the simulation results for cable length, X Y positions and angles.
Get started with CDP Studio today
Let us help you take your great ideas and turn them into the products your customer will love.