Share this

Design and Implementation of PLC Program for Quay-Side Container Crane

2026-04-06 06:39:15 · · #1

1. Overview

Due to its reliability and convenience, PLC control systems have been widely used in container cranes, replacing earlier relay control circuit systems. Furthermore, with the development of bus systems, the various switch and sensor signals that the PLC needs to collect can be obtained through remote I/O stations, greatly saving cable wiring costs and troubleshooting time. This article mainly describes the core design of the quay crane control system: the design and implementation of the quay crane PLC program.

In this system, the main component of the control system is the SIEMENS S7-400 as the PLC master station, and the ET200 as the remote module station. The entire system connects the PLC master station with each remote module station and the frequency converter controlling the drive mechanism via a PROFIBUS bus, as shown in Figure 1-1 below:

Figure 1-1: Diagram of the electrical control system for a quay crane with PLC as its core.

In Figure 1-1, the S7-400 PLC is the core of the entire system. It has two PROFIBUS bus interfaces. One bus connects to all the frequency converters of the drive mechanisms (each frequency converter consists of a rectifier and an inverter), allowing the commands and operational status feedback signals required by the frequency converters to be received via PROFIBUS communication. The other bus connects to all I/O remote stations, enabling signal acquisition and output, significantly reducing wiring. The PLC also has an Ethernet interface, allowing for easy connection to a computer. This allows engineers to monitor the quay crane's operation through a computer's human-machine interface. The computer can also be used as a programmer to configure the PLC hardware and modify the PLC program.

2. PLC Programming for the Quay Crane

For the PLC system of the quay crane, the content that needs to be controlled includes the operation of the four main mechanisms of the quay crane: hoisting, trolley, crane, and pitching, as well as the operation of the auxiliary mechanisms. The four main mechanisms have the same operation process, as shown in Figure 2-1 below:

Figure 2-1: Operation process of main components of the quay crane

Therefore, whether the operating conditions are met and whether a deceleration command exists are essential considerations for writing the quay crane PLC program. We must conduct a working condition analysis to gain a clear understanding before we can correctly write the program. Below, we will take the hoisting mechanism as an example to analyze the working conditions in detail.

2.1 . Operating Condition Analysis of the Hoisting Mechanism of the Quay Crane

2.1.1 . Composition of the quay crane lifting mechanism

The main function of the hoisting mechanism is to move the spreader up and down via wire ropes and pulleys on the spreader. After the spreader lifts the container, the container can be moved up and down by the hoisting mechanism, for example, to remove the container from the ship's hold or a container truck. In addition to the spreader and wire ropes, the hoisting mechanism consists of two sets of parallel mechanical transmission devices. The composition of each transmission device is shown in Figure 2-2: an AC motor connected to a gearbox. A hydraulic push rod disc brake is mounted on the main shaft between the motor and the gearbox. A speed encoder and overspeed switch are installed on the non-drive side output shaft of the motor. A cam limit switch is installed on one side output shaft of the drum.

Figure 2-2: Composition of the hoisting transmission mechanism

2.1.2 . Operation control of the quay crane hoisting mechanism

The operation control of the hoisting mechanism is as follows:

The LPLC collects the operating commands and speed setting commands issued by the driver.

The PLC program performs logical judgments to determine whether the "operation allowed" conditions are met.

If the PLC program logic determines that the "running is allowed" condition is met, the next step is to process the hoisting speed, which is as follows:

If no deceleration command is given, the transmission mechanism operates at the speed specified by the driver.

If the PLC receives a deceleration signal, the PLC will process the speed to 10% of the speed given by the driver.

Ultimately, the PLC needs to transmit these operating commands and operating speeds to the frequency converter via the PROFIBUS bus. The frequency converter then drives the motor to operate, thus enabling the hoisting mechanism to run.

2.2 . Programming

2.2.1 . Writing the Symbol Table

Before writing the PLC program, we can input the I/O variables into SYMBOLS since they are already defined on the schematic.

Figure 2-1: SYMBOLS Table

2.2.2 . Quay crane lifting and operation procedures

Below, we will take the hoisting mechanism as an example and write a hoisting operation program for a quay crane.

Step 1: Write the "Lifting Permission" program. The "Lifting Permission" program we wrote is shown in Figure 2-2 below:

Step 2: Write the "Lifting Command Control" program. When the lifting mechanism meets the "lifting permission" condition, the PLC can issue an up/down lifting command. See Figure 2-3:

Figure 2-3: Lifting Operation Command

Step 3: Write the "Lifting Speed ​​Control" program. In this program: when the driver turns on the control power in the cab and issues a lifting command, if a deceleration command exists, the setpoint will be changed to 10% of the original value. The program is shown in Figure 2-4 below.

Figure 2-4: Speed ​​command signal processing

Step 4: Write the "Lifting Command and Speed ​​Control" program. The above program generates the commands and speed settings for the quay crane's lifting operation. Ultimately, we need to transmit these commands and speed settings to the frequency converter via the PROFIBUS bus. Figure 2-6 shows a call to the Siemens function block library's PROFIBUS data transfer function block PCD_SEND, used to transmit 16 words from data block DB123.

Figure 2-5 Lift Command and Speed ​​Control

Figure 2-6 Bus data transmission

2.2.3 . Functions (FCs) corresponding to the main mechanisms of the quay crane

The above analysis describes the programming of the quay crane hoisting mechanism. Similar to the hoisting mechanism program, the programs for the gantry crane's trolley, crane, and pitching mechanisms also need to handle operation permission, command and speed setting, and data transmission. To make the overall project program structure clear, we have subdivided the various functions, as shown in Figure 3-14 below: the main mechanism operation control function FC, and the PROFIBUS bus data transmission function block FB for command and speed setting transmission.

Figure 2-7: Functions of Main Mechanisms of the Quay Crane

The functions of these FCs are as follows:

lFB22 hoisting/trolley #1 inverter PROFIBUS bus data transmission

lFB23 hoisting/trolley #2 inverter PROFIBUS bus data transmission

lFB24 trolley/tilt inverter PROFIBUS bus data transmission

LFC31 Lifting Operation Control

LFC41 Trolley Operation Control

LFC51 Car Operation Control

lFC61 Pitch Control

2.2.4 . Operating Procedures of Auxiliary Mechanisms for Quay Cranes

There are also some auxiliary mechanisms on the quay crane that need to be controlled by a PLC program. These functions are shown in Figure 2-8 below:

Figure 2-8: Auxiliary Mechanism Control

The functions of these FCs are as follows:

The IFC12 floodlight and air conditioner start/stop control.

lFC13 wind speed handling: issues a signal when the wind speed reaches the alarm value.

The lFC16 indicator lights display the indicator lights that control each operator station.

LFC34 lifting encoder position processing: determines the stop position of lifting up and down, deceleration position, etc.

lFC36 load weight handling: Determines whether the load exceeds the rated load.

LFC54 trolley encoder position processing: determines the trolley's stopping and deceleration positions, etc.

lFC63 pitch encoder position processing: determines pitch stop, deceleration position, etc.

lFC71 Spreader Control: Control of spreaders during container lifting, such as the opening and closing function of spreader locks.

The design of the quay crane PLC program was completed by combining the main and auxiliary mechanism control functions (FC) and the PROFIBUS bus communication data transmission function block (FB).

3. Issues related to the uniformity of PLC programs

3.1 . Discovery of PLC program uniformity issues

After the PLC program for the quay crane was written, we immediately debugged it on the quay crane. This revealed a problem with program consistency: Our project involves 12 quay cranes, and some data definitions on the quay cranes need to be defined based on the actual site conditions. For example:

For example, regarding the zero-position data OFFSET of the trolley mechanism's position encoder, for the first quay crane being tested, we can easily define it as follows: Move the trolley to its final destination position and read the encoder reading at that position; this will be used as the zero-position data OFFSET of the trolley mechanism's position encoder. However, when testing the second quay crane, we found that due to mechanical installation errors, the encoder reading when the second trolley mechanism reached its final destination position was different from the value of the first quay crane. In other words, we must set the zero-position data OFFSET of the trolley mechanism's position encoder on the second quay crane to a different value.

Similar issues exist with data such as the proportional gain of the weight sensor, the stopping position of the trolley during automatic parking, and the final position of the pitching mechanism. These problems all result in a situation where, after commissioning, each quay crane has its own PLC program, which is inconsistent across different cranes.

3.2 Analysis of Solving the Problem of PLC Program Uniformity

Analyzing this problem, we proposed the following solutions:

We can add a "quay crane number identification" program to solve the problem: First, number each quay crane: for example, quay crane 1, quay crane 2, ..., quay crane 12. The PLC program runs the "quay crane number identification" program to determine the number of the quay crane. If it is quay crane 1, the "quay crane number identification" program will load the data of quay crane 1 into a "shared data block".

After the "quay crane number identification" process is completed, all the data we need is in this "shared data block". Later, when the PLC runs the program, if it needs data that differs between the various quay cranes, it can read the required data from this "shared data block". The entire process is shown in Figure 3-1:

Figure 3-1: "Shorebridge Number Identification" Program

3.3. Handling PLC program consistency issues

With the above ideas in mind, we will now begin to address the issue of PLC program uniformity:

Step 1: Number the pontoon bridges:

The quay cranes are defined as quay crane 1# to quay crane 12#. However, in order for the PLC to recognize these numbers, we must set input signals to the PLC. We use a spare input byte IB256 to define the quay crane numbers. On the hardware input of the PLC system, we connect a high level to each quay crane according to this definition. Each quay crane is different, as shown in Figure 3-2 below:

In the program, a DB data block (DATABASE) is set for each quay crane, namely DB201~DB212, which correspond to the data of quay cranes 1~12 respectively, as shown in Figure 3-3 below:

Figure 3-3: Data blocks 1-12 of the quay crane

Write a "quay crane number identification" program: Create a function FC74 to handle the identification of different quay crane numbers, and then transfer the data block DB20X of the corresponding quay crane to a common data block DB74. As shown in Figure 3-4: When the quay crane number CRANEID is 2, transfer 44 bytes of the data block DB202 of quay crane 2 to the common data block DB74.

Figure 3-4: "Shorebridge Number Identification" Program

The PLC can read data from the shared data block: The PLC can read any data from the shared data block, which corresponds to the data of the corresponding quay crane, as shown in the program in Figure 3-5 below:

Figure 3-5: Program for reading data from "Shared Data Block DB74"

Therefore, we completely solved the problem of PLC program uniformity by modifying the program, making the PLC program more perfect and reliable.

4. Application and Results Analysis

4.1 . Application of PLC programs on quay cranes

4.1.1 . Practical Application

We applied this PLC program to the first six quay cranes (out of a total of twelve) at the Waigaoqiao Phase IV Container Terminal. These six quay cranes have been in successful operation since their initial deployment. According to engineers from the terminal's engineering department, the program runs very reliably, with no malfunctions caused by program issues. Furthermore, the program runs quickly, has a clear logic, is easy to understand, uses easy-to-remember variable names, and facilitates monitoring and troubleshooting of the quay cranes. The program has also been evaluated and affirmed by a foreign consulting firm hired by Maersk Line, the terminal's joint venture partner.

4.2 . Comparison with other quay crane PLC programs

In the development, design, and implementation of this program, we also referenced and compared the PLC programs of quay cranes from well-known electrical control suppliers such as GE and ABB. In comparison, our PLC program has the following advantages:

The advantages of using a structure where the main program calls subroutines are:

The overall program logic is clear: the control of each main mechanism and each auxiliary mechanism is implemented by corresponding subroutines, or function calls (FCs). Ultimately, these function FCs are called in the main program OB1.

Monitoring the opposite bank bridge is convenient and quick: if a user wants to find a specific monitoring device, such as an indicator light, they only need to find the "Indicator Light" function (FC), turn it on, and they can find it without spending much time, greatly shortening the search time.

The variable names throughout the program are abbreviated, making them easy to understand. Combined with accompanying comments, this facilitates the understanding of the program by dock engineers. Furthermore, engineers can easily remember some commonly used variable names, such as HUPPRM (an abbreviation for HOISTUPPERMIT), which allows hoisting. Once familiar with the variable names, the built-in search function (GOTOLOCATION) of the PLC software SIMATICMANAGER can be used to quickly locate the corresponding program line, further reducing search time.

The program is written using the PLC's unique "ladder diagram" language, which is very intuitive. Ladder diagram language is a method of representing relay diagrams, making it familiar to electrical engineers; reading the program is as easy as viewing a schematic diagram, making it easier to understand.

The program is concise, practical, and uses minimal nesting. Its programming philosophy prioritizes user monitoring, searching, and understanding, rather than simply focusing on ease of writing.

Read next

CATDOLL 108CM Q (TPE Body with Soft Silicone Head)

Height: 108cm Weight: 14.5kg Shoulder Width: 26cm Bust/Waist/Hip: 51/47/59cm Oral Depth: 3-5cm Vaginal Depth: 3-13cm An...

Articles 2026-02-22