Goods transportation control method based on PLC control technology

By defining input/output image registers and segmented control logic in the PLC control system, the problem of interfacing sensors with power actuators was solved, enabling precise, stable, efficient, and flexible control of cargo transportation.

CN121995840AInactive Publication Date: 2026-05-08SHANXI SUXIN LOGISTICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANXI SUXIN LOGISTICS CO LTD
Filing Date
2026-04-10
Publication Date
2026-05-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing PLC control technology lacks precise integration between sensors and power actuators in cargo transportation systems, leading to signal transmission deviations and control logic conflicts, insufficient flexibility, and impacting transportation accuracy and efficiency.

Method used

Based on PLC control technology, by acquiring the physical layout information of the cargo transportation system, defining the input and output image register area, and connecting the sensors and power actuators to the designated address, a logic control model is constructed. The transportation path is controlled in segments, and the optimal path is selected by using a path evaluation strategy to achieve precise control and flexible adjustment.

Benefits of technology

It achieves precise docking between sensors and power actuators, reduces signal transmission interference, improves the stability and accuracy of cargo transportation, enhances the flexibility and efficiency of transportation path control, and avoids program conflicts.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121995840A_ABST
    Figure CN121995840A_ABST
Patent Text Reader

Abstract

The invention discloses a cargo transportation control method based on a PLC control technology, and relates to the technical field of PLC control, and the method comprises the steps: obtaining the physical layout information of a cargo transportation system, including the position coordinates of a sensor, the interface number of a power actuator, and the coordinates of a cargo handover platform; according to the physical layout information, defining an input image register area and an output image register area in a PLC program editing environment, and accessing corresponding physical sensor and power actuator control loops to specified addresses; constructing a logic control model in the PLC according to the physical layout information, dividing the transportation path into path control sections which are connected in sequence, and assigning a control logic subprogram for each section; receiving a target station instruction of an upper scheduling system, wherein the target station instruction comprises a unique cargo identifier and a target station coordinate; and inputting the information into a PLC intermediate data register. The method improves the accuracy and flexibility of cargo transportation control, and is suitable for an automatic cargo transportation scene.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of PLC control technology, specifically a cargo transportation control method based on PLC control technology. Background Technology

[0002] In cargo transportation systems, PLC control technology has been widely used to realize the automated transportation control of goods. In the existing technology, PLC control usually directly connects physical sensors and power actuators to preset input and output interfaces, and then realizes the overall management and control of the transportation path by writing fixed control programs, without the need to define the input and output image register area in combination with the specific physical layout information of the cargo transportation system.

[0003] Existing technical solutions have shortcomings. The connection of sensors and power actuators lacks correspondence with the physical layout of the system, which can easily lead to problems such as chaotic interface docking and signal transmission deviations. This results in PLC control instructions being unable to accurately match actual transportation needs. At the same time, the transportation path adopts an overall control logic without segmented management of continuous paths. When the transportation path is complex or the control logic of a certain section needs to be adjusted, the entire control program needs to be modified, which is inflexible and prone to control logic conflicts, affecting the accuracy and efficiency of cargo transportation.

[0004] The definition of input / output image registers in the PLC control process needs to be optimized. The precise docking of sensors and actuators should be achieved by combining the physical layout of the system. At the same time, the control logic of the transport path should be improved to solve the problems of insufficient flexibility and low control accuracy caused by the overall control. Summary of the Invention

[0005] This invention aims to solve at least one of the technical problems existing in the prior art; Therefore, this invention proposes a cargo transportation control method based on PLC control technology, comprising: Obtain the physical layout information of the cargo transportation system, which includes the location coordinates of multiple sensors deployed along the transportation path, the interface number of the power actuator, and the coordinate information of the cargo handover station. Based on the physical layout information of the cargo transportation system, an input image register area and an output image register area are defined in the program editing environment of the programmable logic controller (PLC). The physical sensors corresponding to the position coordinates of the multiple sensors are connected to the designated address of the input image register area, and the control loop corresponding to the interface number of the power actuator is connected to the designated address of the output image register area. In the programmable logic controller (PLC), a logic control model for the transportation path is constructed based on the physical layout information. The logic control model divides the continuous transportation path into a series of sequentially connected path control segments and assigns a corresponding control logic subroutine to each path control segment. Receive a target platform instruction for the goods to be transported from the upper-level scheduling system. The target platform instruction includes a unique identifier for the goods to be transported and the coordinate information of the designated goods handover platform. The unique identifier of the goods to be transported and the coordinate information of the designated goods handover station are entered into the intermediate data register of the programmable logic controller (PLC).

[0006] Furthermore, it also includes: Based on the coordinate information of the designated cargo handover station, path planning is performed using the logic control model of the transportation route to calculate a complete drive sequence from the origin to the designated cargo handover station for the goods to be transported, including: Query the coordinate information of the cargo handover platform to determine the final logical node of the cargo to be transported on the transportation path; Starting from the origin, a logical traversal is performed in the logical control model of the transportation path to enumerate all paths from the origin to the final logical node. According to the preset path evaluation strategy, all enumerated paths are compared. The path evaluation strategy includes a comprehensive evaluation index of the number of path control sections and the complexity of the action of the power actuator in the path. The path with the best comprehensive evaluation index is selected as the planned recommended path; Extract the list of path control sections traversed by the recommended route from the logical control model of the transportation route, and determine the passage order of each path control section according to the transportation direction; The path control segment list and its passage order are combined and encapsulated to generate the complete drive sequence and stored in a designated data block of the programmable logic controller (PLC). The complete drive sequence consists of multiple path control sections arranged in the order of passage.

[0007] Furthermore, it also includes the step of executing the complete drive sequence: Read the complete drive sequence from the specified data block of the programmable logic controller (PLC) and extract the target path control segment that needs to be activated. Invoke the control logic subroutine corresponding to the target path control segment; The control logic subroutine is executed, and the control logic subroutine determines the occupancy and idle status of the target path control section by scanning the sensor status related to the target path control section in the input image register area; When the scan confirms that the target path control section is in an idle state, the control logic subroutine writes a drive signal to the power actuator control address corresponding to the target path control section in the output image register, and starts the power actuator to drive the goods into the target path control section.

[0008] Further, the control logic subroutine is executed. This subroutine determines the occupancy and idle status of the target path control segment by scanning the sensor states related to the target path control segment in the input image register, including: The control logic subroutine periodically reads the register bit status associated with the entrance and exit sensors of the target path control segment in the input image register area; Based on the changes in the register bit states of the inlet and outlet sensors, it is determined whether the goods to be transported have completely entered and completely left the target path control section; After the goods to be transported have fully entered the target path control section, but before they have fully left the target path control section, the internal state of the target path control section is marked as occupied and locked. After the goods to be transported have completely left the target path control section, the internal state of the target path control section is switched to idle, and the occupation lock on the path control section is released.

[0009] Furthermore, it also includes steps for monitoring the movement of goods within the target path control section: During the period when the target path control section is in an occupied and locked state, the status signals of the monitoring sensors located inside the target path control section in the input image register are continuously monitored; Record the trigger time and sequence of the status signals of the monitoring sensor and compare them with the preset standard runtime sequence template; When the triggering time and sequence of the status signals of the monitoring sensor deviate from the standard running sequence template by more than a preset tolerance threshold, an operational anomaly determination is triggered. Generate an exception event message containing the exception segment identifier, exception type code, and deviation value; The abnormal event message is stored in the designated data block of the programmable logic controller (PLC), and the currently executing complete drive sequence is immediately interrupted. The control flow of the PLC is then redirected to the preset exception handling branch.

[0010] Furthermore, the control flow of the programmable logic controller (PLC) is redirected to a preset exception handling branch, including: In the exception handling branch, the exception segment identifier in the exception event message is read first. Based on the abnormal section identifier, control the output image register to write a stop signal to the power actuator that causes the cargo to move, so that the cargo stops within the target path control section; Send an interrupt notification containing the abnormal event message to the upper-level scheduling system, requesting manual intervention or a new scheduling instruction; After receiving confirmation of intervention completion or a new driving instruction from the upper-level scheduling system, the driving target of the cargo to be transported is reset according to the new driving instruction, which may include continuing forward, returning to the previous segment, or proceeding to the emergency handling station. Re-plan the path from the current interruption point, or continue the interrupted complete drive sequence according to the new drive instructions.

[0011] Furthermore, it also includes concurrent transportation scheduling steps for multiple goods: In the intermediate data register of the programmable logic controller (PLC), an independent transportation task instance is established for each piece of goods in the transportation state. Each of the transport task instances includes a unique identifier for the corresponding cargo, the target platform, the current path control segment, and a complete drive sequence planned separately for the corresponding cargo. A global path resource placeholder table is established for all active transportation task instances, and each path control segment is marked in real time by which transportation task instance occupies or pre-occupies it. When the programmable logic controller (PLC) performs path planning for a new item to be transported in order to calculate its complete drive sequence, the planning process needs to query the global path resource placeholder table. In the calculated complete drive sequence, any path control segment cannot be occupied by other transportation task instances in the global path resource placeholder table at the time when it is scheduled to be occupied by the new cargo to be transported; otherwise, it must be re-planned or waited for.

[0012] Furthermore, the step of establishing a global path resource occupancy table for all active transportation task instances, and marking in real time which transportation task instance occupies or pre-occupies each path control segment, includes: Define a multi-row data table in the system data block of the programmable logic controller (PLC) as the global path resource placeholder table; Each row of the global path resource placeholder table corresponds to a path control segment. Each row contains the identifier of the path control segment, the unique identifier of the transportation task instance currently occupying the path control segment, and the future time slice information of the path control segment being pre-occupied. Before a transport task instance is about to enter a certain path control segment, the unique identifier of the transport task instance is written into the line corresponding to the path control segment, and the status is marked as pre-occupation. Once a transportation task instance actually enters the path control segment, its status is updated to "actually occupied". Once a transport task instance has completely left the path control segment, clear the occupancy information in the corresponding row and set the status to idle. The future time slice information is derived from the execution progress estimation of the complete driving sequence of each transportation task instance and is used for conflict prediction.

[0013] Furthermore, it also includes the step of deadlock detection and resolution based on the global path resource placeholder table: Periodically analyze all rows in the global path resource placeholder table that are in a pre-occupancy or actual occupancy state to construct a directed graph of resource allocation; In the directed graph of resource allocation, nodes represent transportation task instances, and directed edges represent a transportation task instance occupying the path control segment requested by the next transportation task instance. The system detects whether a cycle exists in the directed graph of resource allocation. If a cycle is detected, the system is determined to have experienced a logical deadlock. Once a logical deadlock is determined, select the lowest priority instance from the transport task instances that constitute the loop, revoke its latest path segment occupancy or pre-occupancy request, and force it into a waiting state. The transport task instances that have been forced into a waiting state are rerouted, and the global path resource placeholder table is updated to break the logical deadlock.

[0014] Furthermore, it also includes closed-loop processing steps for completing the transportation task: After the programmable logic controller (PLC) detects through sensors that the goods to be transported have arrived at the designated goods handover station, it verifies whether the unique identifier of the goods to be transported matches the information in the target station instruction. After successful verification of the match, an action signal is written to the address of the corresponding platform loading and unloading mechanism in the output image register area to trigger cargo unloading or loading operations. After the cargo unloading or loading operation is completed, the transportation task instance corresponding to the cargo to be transported is deleted from the intermediate data register. Clear the occupancy markers of all path control segments associated with the corresponding transport task instance; Send a transportation task completion confirmation message to the upper-level scheduling system. The transportation task completion confirmation message includes the unique identifier of the goods to be transported, the actual arrival time, and the platform identifier.

[0015] Compared with the prior art, the beneficial effects of the present invention are: Based on the physical layout information including sensor position coordinates, actuator interface numbers, and cargo handover station coordinates, an input image register area and an output image register area are defined. The physical sensors corresponding to multiple sensor position coordinates are connected to designated addresses in the input image register area, and the control loops corresponding to the actuator interface numbers are connected to designated addresses in the output image register area. This establishes the connection between sensors, actuators, and the PLC image register area based on the system's physical layout, avoiding interface confusion and achieving precise correspondence between physical components and control addresses. This reduces interference and deviations during signal transmission, enabling the PLC to accurately acquire the real-time status of the transportation system and ensuring that control commands are accurately transmitted to the corresponding actuators, thus improving the stability and accuracy of cargo transportation control.

[0016] Based on the physical layout information of the freight transportation system, a logical control model for the transportation path is constructed. Continuous transportation paths are divided into a series of sequentially connected path control segments, and a corresponding control logic subroutine is assigned to each path control segment. This enables segmented management of continuous transportation paths. Each path control segment can run independent control logic according to its own physical layout characteristics. The control mode of a single segment can be adjusted without modifying the entire control program, improving the flexibility of transportation path control and avoiding program conflicts under the overall control logic. At the same time, it can accurately call the control subroutine of the corresponding segment according to the location of the target station, making the freight transportation process more targeted, effectively avoiding path control deviations, and improving the efficiency of freight transportation. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating the steps of a cargo transportation control method based on PLC control technology according to the present invention. Figure 2 A flowchart for the complete driver sequence execution; Figure 3 A flowchart for monitoring the movement and triggering of anomalies of goods within the route control section; Figure 4 A comparative analysis chart of the estimated vs. actual remaining time for transportation tasks; Figure 5 This is a dual-axis analysis chart showing the duration and frequency of occupancy in the path control section. Detailed Implementation

[0018] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0019] See Figure 1 The system acquires the physical layout information of the cargo transportation system, including the coordinates of multiple sensors deployed along the transportation path, the interface numbers of the power actuators, and the coordinates of the cargo handover stations. Based on the obtained physical layout information, input and output image registers are defined in the programmable logic controller (PLC) programming environment. The physical sensors corresponding to the coordinates of the multiple sensors are connected to designated addresses in the input image registers, and the control loops corresponding to the interface numbers of the power actuators are connected to designated addresses in the output image registers. In the PLC, a logical control model of the transportation path is constructed based on the physical layout information. This model divides the continuous transportation path into a series of sequentially connected path control segments and assigns a corresponding control logic subroutine to each segment. When the system is running, it receives a target station instruction for the cargo to be transported from the upper-level scheduling system. This target station instruction contains the unique identifier of the cargo to be transported and the coordinates of the designated cargo handover station. The unique identifier of the cargo to be transported and the coordinates of the designated cargo handover station are entered into the intermediate data register of the PLC.

[0020] In one embodiment of the present invention, a logical control model for a transportation path, constructed based on physical layout information, maps continuous physical paths into a network composed of logical nodes and edges. The coordinate information of a cargo handover station corresponds to a specific logical node in this network. Upon receiving a target station instruction for the cargo to be transported from the upper-level scheduling system, the programmable logic controller (PLC) parses the instruction to obtain the coordinate information of the specified cargo handover station. In a specific implementation, the PLC queries its internally stored coordinate-logic node mapping table and, based on the coordinate information of the specified cargo handover station, determines the final logical node of the cargo to be transported on the transportation path logical control model. This final logical node is the endpoint of the path planning. In some embodiments, the starting point of the planning is the entry point of the transportation system or the logical node corresponding to the path control segment where the cargo to be transported is currently located. The starting point information can be specified by the upper-level scheduling system or automatically determined by the PLC through sensor status.

[0021] In practical implementation, the logical traversal process of path planning is performed within the storage space of the Programmable Logic Controller (PLC). Starting from the initial logical node, the PLC explores all possible paths to the final logical node using a depth-first or breadth-first search algorithm, based on the connection relationships between path control segments in the logical control model. Each exploration records the sequence of path control segments traversed until the final logical node is reached or no path is confirmed. This process enumerates all paths from the starting point to the final logical node. In some embodiments, the logical traversal process avoids repeatedly traversing the same path control segment to prevent infinite loops when loops exist in the path network.

[0022] In practical implementation, a pre-defined path evaluation strategy is used to quantitatively compare all enumerated paths. The path evaluation strategy includes comprehensive evaluation indicators for the number of path control segments and the complexity of actuator actions within the path. The number of path control segments reflects the physical length of the path and the total number of segments traversed. The complexity of actuator actions within the path reflects the complexity of control commands such as direction switching, start / stop, and speed adjustment that need to be executed on the path. The programmable logic controller (PLC) calculates a comprehensive evaluation value for each enumerated path. This comprehensive evaluation value can be understood as follows: , in: The overall score represents the path. This represents the total number of path control segments included in the route. Represents the first in this pathway The motion complexity factor of a power actuator This represents the summation of the power actuators along all paths. and These are pre-set weighting coefficients. This can be understood as selecting a comprehensive score. The pathway with the smallest value is recommended as the optimal pathway based on the comprehensive evaluation index.

[0023] In practical implementation, after determining the recommended route, the programmable logic controller (PLC) extracts a list of path control segment identifiers that the recommended route will pass through sequentially from the logic control model of the transportation path. Based on the initial position and transportation direction of the goods to be transported, the passage order of each path control segment in the list is determined; this passage order is unidirectional and irreversible. Optionally, the extraction process may simultaneously obtain the judgment logic for the entry and exit conditions of each path control segment. Optionally, the list of path control segments and their determined passage order, along with the call addresses of the control logic subroutines corresponding to each segment, are combined and encapsulated into a structured data body. This structured data body is defined as a complete drive sequence. The complete drive sequence is written and stored in a designated data block of the PLC, such as a dedicated data block or a structure array. In practical implementation, the complete drive sequence consists of multiple path control segments arranged in the passage order; it is the program execution blueprint for controlling the automatic movement of goods from the starting point to the target station.

[0024] See Figure 2 In one embodiment of the present invention, the execution of the complete drive sequence begins by reading the sequence from a designated data block of the programmable logic controller (PLC). This designated data block stores a list of path control segments generated by path planning and arranged in order of passage. The PLC's program pointer is positioned at the beginning of the sequence, and the identifier of the target path control segment to be activated is extracted. In some embodiments, the movement of the program pointer follows a first-in, first-out (FIFO) queue principle. After the current target path control segment is executed, the pointer automatically points to the next path control segment in the sequence, thereby driving the goods along a predetermined path. Based on the extracted target path control segment identifier, the PLC searches for and calls the control logic subroutine corresponding to the target path control segment in the program memory. In specific implementations, each control logic subroutine is a pre-written and stored independent functional code in the PLC, specifically responsible for managing the goods movement logic within a specific path control segment. The call operation jumps the program execution flow to the entry address of that functional code segment.

[0025] Once the control logic subroutine is invoked, it begins execution. This execution is achieved by scanning the sensor states related to the target path control segment in the input image register. These sensors include position sensors located at the entrance, interior, and exit of the target path control segment. The register bit states corresponding to each sensor in the input image register reflect the on / off status of the physical sensor in real time. By scanning the Boolean values ​​of these bits, the control logic subroutine can determine the current occupancy and vacancy status of the target path control segment. When the control logic subroutine confirms through scanning that the target path control segment is vacant, meaning the safety condition of no other goods occupying it is met, it writes a high-level drive signal to the power actuator control address corresponding to the target path control segment in the output image register. Upon receiving the signal, the power actuator, such as a motor or cylinder, starts, thereby driving the goods into the target path control segment. It can be understood that the type and duration of the written drive signal are predefined by the control logic subroutine based on the specific type of power actuator.

[0026] During the execution of the control logic subroutine, the logic for determining the occupancy and idle status of the target path control segment is further refined. The control logic subroutine periodically and automatically reads the register bit states associated with the entrance and exit sensors of the target path control segment from the input image register area. Changes in the register bit states of the entrance and exit sensors directly reflect the relative position of the goods and the sensors; for example, when the goods arrive at the entrance sensor, the corresponding register bit changes from 0 to 1. In some embodiments, based on the combination and timing of the register bit state changes of the entrance and exit sensors, the control logic subroutine runs a status judgment function. This function parses the triggering sequence and duration of the sensors, thereby accurately determining whether the goods to be transported have completely entered and completely left the target path control segment. The logical condition for the control logic subroutine to determine whether the goods to be transported have completely entered the target path control segment can be expressed as the following formula: , in: This represents the logical truth value of "goods have been delivered intact". This indicates that the inlet sensor has been triggered (register bit is 1). This indicates that the exit sensor has been triggered (register bit is 1). Represents the logical NOT operation. This represents a logical AND operation. The formula is true when the inlet sensor is triggered but the outlet sensor is not, meaning the goods have fully entered the section but have not yet left.

[0027] After the goods to be transported have fully entered the target path control section, but before they have fully left it, the control logic subroutine marks the internal state of the target path control section as "occupied and locked." This occupied and locked state is recorded in an internal flag register or a specific status data block of the programmable logic controller (PLC). Optionally, once the occupied and locked state is set, it will prevent other transport task instances from issuing entry requests to the same target path control section until the lock is released. After the goods to be transported have fully left the target path control section (determined by the exit sensor being triggered and recovering after a preset delay), the control logic subroutine switches the internal state of the target path control section from "occupied and locked" to "idle" and performs the operation to release the occupied and locked state of the path control section. The release operation includes clearing the internal status flag and updating any existing global path resource status table. It can be understood that the switch from occupied and locked to idle is an atomic operation to ensure consistency of state during multi-task concurrency. After completing the control of the target path control section, the control logic subroutine returns, and the PLC's main program flow continues to process the next path control section in the complete drive sequence.

[0028] See Figure 3 In one embodiment of the present invention, the operation monitoring step of the goods within the target path control section is activated during the period when the target path control section is in an occupied and locked state. The operation monitoring function is implemented by an independent monitoring task or periodic interrupt function in the programmable logic controller (PLC). The operation monitoring step continuously monitors the status signals of monitoring sensors located inside the target path control section in the input image register. The monitoring sensors are physical sensors, such as photoelectric switches or limit switches, deployed inside the path control section to track the movement trajectory and speed of the goods. In specific implementations, each transition of the monitoring sensor status signal, i.e., a change from 0 to 1 or from 1 to 0, is recorded by the timestamp function unit of the PLC. The recorded content includes the address number of the monitoring sensor that caused the transition and the precise system clock count value. In some embodiments, the PLC stores the trigger time and trigger order of the status signals in a first-in-first-out buffer queue, forming the actual operation event sequence of this transportation.

[0029] After recording the trigger time and sequence of the status signals from the monitoring sensors, the programmable logic controller (PLC) compares them with a preset standard runtime sequence template. The standard runtime sequence template is a predefined data structure that stores the expected state transition sequence of each monitoring sensor and the standard time interval between adjacent transitions during normal operation of goods within the target path control section. In practice, the comparison process checks each event in the actual running event sequence one by one, calculates the deviation between its occurrence time and the expected time of the corresponding event in the standard runtime sequence template, and checks whether the order of events is consistent with the template. When the deviation of the trigger time and sequence of the monitoring sensor status signals from the standard runtime sequence template exceeds a preset tolerance threshold, an operational anomaly judgment is triggered. It can be understood that the tolerance threshold includes a time deviation threshold and a sequence fault tolerance rule. The time deviation threshold is a fixed value in milliseconds or a percentage value based on the standard time interval. The logic for determining whether the deviation exceeds the limit can be expressed by the following formula: , in: Indicates the cumulative time deviation. Indicates the first The actual trigger time of the status signal of each monitoring sensor. Indicates the first The standard trigger time for monitoring sensor status signals This indicates the total number of monitoring sensors activated within the target path control section. This indicates the preset time deviation tolerance threshold. When the accumulated time deviation... Greater than the threshold If the event sequence does not match the template, it is judged as an operational error.

[0030] Upon triggering an operational anomaly detection, the Programmable Logic Controller (PLC) immediately generates a structured anomaly event message. This message includes an anomaly segment identifier, an anomaly type code, and a deviation value. The anomaly segment identifier clearly indicates the target path control segment number where the anomaly occurred. The anomaly type code distinguishes between timeout, stall, sequence error, and sensor failure. The deviation value records the specific deviation calculated using a formula. The specific location of the value or sequence error. In a specific implementation, the exception event message is stored in a designated data block of the programmable logic controller (PLC), such as a persistent data area for storing historical alarms. Simultaneously, the PLC immediately interrupts the currently executing complete drive sequence, forcibly jumping the program execution flow from the normal sequential control main loop to a preset exception handler branch. In some embodiments, the interruption operation includes saving the execution progress pointer of the current complete drive sequence and the state of all relevant intermediate variables.

[0031] In the exception handling branch, the programmable logic controller (PLC) first reads the previously stored exception event message from the designated data block and parses out the exception segment identifier. Based on the exception segment identifier, the exception handling program controls the output image register and writes a logic 0 stop signal or emergency braking signal to the control address of the power actuator that caused the movement of goods within the target path control segment, causing the power actuator to lose power or brake, and the goods to stop within the target path control segment. Optionally, after writing the stop signal, the exception handling program waits for a short delay and reads the status of the relevant sensors in the input image register again to confirm that the movement of goods has stopped. Immediately afterwards, the exception handling program sends an interrupt notification containing the complete exception event message to the upper-level scheduling system. The interrupt notification is transmitted through the industrial communication network, requesting the upper-level scheduling system to perform manual intervention or issue new scheduling instructions.

[0032] Upon receiving confirmation of intervention completion or a new drive instruction from the upper-level scheduling system, the exception handling program resets the drive target of the goods to be transported according to the new drive instruction. The content of the new drive instruction is defined by the upper-level scheduling system and may include continuing forward, returning to the previous segment, or proceeding to the emergency handling station. Resetting the drive target means overwriting or updating the target information previously stored in the intermediate data register with the new target station coordinates or path control segment identifier. Afterward, the exception handling process takes different paths depending on the instruction content. Re-planning the path from the current interruption point is suitable for instructions such as "continue forward" or "proceed to the emergency handling station." The programmable logic controller (PLC) uses the current position of the goods as the starting point and the station specified by the new instruction as the ending point, re-calling the path planning logic. Continuing the interrupted complete drive sequence according to the new drive instruction is suitable for instructions such as "return to the previous segment." In this case, the program may modify the complete drive sequence, inserting a reverse drive step to return to the previous segment. It can be understood that regardless of the subsequent action, after the exception handling program branch completes execution, control returns to the main program, and the system attempts to resume the automated transportation process.

[0033] In one embodiment of the present invention, the concurrent transportation scheduling of multiple goods is implemented through the data management mechanism within the programmable logic controller (PLC). In the intermediate data register of the PLC, an independent transportation task instance data structure is established for each piece of goods that has been received by the system and is in transportation status. Each transportation task instance data structure includes a unique identifier for the corresponding goods, the coordinates of the target station, the identifier of the current path control segment determined by sensors, and a storage pointer to the complete drive sequence planned separately for the corresponding goods. In some embodiments, transportation task instances are organized in the data blocks of the PLC in the form of an array or linked list, with each instance having an independent index number.

[0034] A global path resource placeholder table is established for all active transportation task instances. This table is a centralized resource status mapping table. The global path resource placeholder table continuously marks which transportation task instance occupies or pre-occupies each path control segment. Occupation indicates that the goods are physically located in that segment, while pre-occupation indicates that the segment has been planned as a future path for a certain goods and is locked. For specific implementation details, refer to Table 1 for the structure of the global path resource placeholder table.

[0035] Table 1: Global Path Resource Placeholder Table Path control segment identifier Occupation task instance ID Status Pre-occupation start time slice Pre-occupation end time slice Z001 Empty Free 0 0 Z002 Task_A Occupied 0 0 Z003 Task_B Pre-occupied 1050 1280 Z004 Empty Free 0 0

[0036] When a Programmable Logic Controller (PLC) performs path planning to calculate the complete drive sequence for a new shipment, the planning process requires querying the global path resource occupancy table. During path enumeration and evaluation, the planning algorithm needs to calculate the future time when the new shipment will be scheduled to occupy each path control segment for inclusion in the candidate complete drive sequence. The algorithm queries the global path resource occupancy table for the status information and pre-occupancy time slice information of the corresponding path control segment row. In the calculated complete drive sequence, any path control segment scheduled to be occupied by the new shipment must not be marked as "occupied" or "pre-occupied" by other transport task instances in the global path resource occupancy table at the time it is scheduled to be occupied. Otherwise, it indicates a temporal or spatial conflict, and the planning algorithm needs to replan another path, or, if no conflict-free path can be found, place the new transport task instance in a waiting queue. In some embodiments, the estimation of the future occupancy time is based on the average speed of the shipment and the segment length.

[0037] A multi-row data table is defined in the system data block of the Programmable Logic Controller (PLC) as a global path resource placeholder table. This data table is initialized when the PLC starts. Each row of the global path resource placeholder table corresponds to a physical path control segment. Each row contains the identifier of the path control segment, the unique identifier of the transportation task instance currently occupying the path control segment, and the future time slice information of the path control segment being pre-occupied. The identifier of the path control segment is the primary index. The unique identifier field of the transportation task instance currently occupying the path control segment is null when the segment is idle, and is written with the task ID when it is occupied or pre-occupied. The status field is used to distinguish between "idle", "pre-occupied", and "actually occupied" states. It can be understood that the future time slice information is usually represented by the number of system clock ticks, including the pre-occupancy start time slice and the pre-occupancy end time slice. The future time slice information is derived from the execution progress estimation of the complete drive sequence of each transportation task instance and is used for conflict prediction. The execution progress estimation can take into account the number of completed segments and the historical average transit time. An example of estimating future time slices is as follows: Assume a transportation task instance's complete drive sequence contains m segments, currently in the nth segment, and the historical average time to pass through each segment is t_avg. Then, the total pre-occupancy time T_est for the remaining segments from the (n+1)th to the mth segment can be estimated using the formula: , in: This represents the estimated total time required for the task to complete the remaining path, starting from the current time. This represents the total number of segments in the complete driving sequence. This indicates the current segment number (counting from 1). This represents the average time taken for the cargo to traverse each path control segment throughout its history. This estimate is used to update the pre-occupied time slice field of the relevant segment in the global path resource placeholder table.

[0038] Before a transport task instance prepares to enter a path control segment according to its complete drive sequence, the control logic writes the unique identifier of the transport task instance into the corresponding row of the path control segment and marks the status as "pre-occupied". Optionally, it also writes the pre-occupied start time slice and pre-occupied end time slice calculated based on the current time and estimated travel time. When the transport task instance actually enters the path control segment, i.e., after the sensor confirms the arrival of the goods, the status is updated to "actually occupied". When the transport task instance completely leaves the path control segment, i.e., after the sensor confirms the departure of the goods, the control logic clears the occupancy information in the corresponding row, sets the unique identifier field of the transport task instance to null, resets the status to "idle", and clears the pre-occupied time slice information.

[0039] See Figure 4In the comparative analysis of the estimated and actual remaining time of transportation tasks, the quantification of time deviation relies on a dynamic estimation algorithm driven by a global path resource occupancy table and historical passage data. Specifically, the estimated remaining time is represented by the output of a linear prediction model constructed based on the average cargo speed, segment length, and pre-occupied time slice information, while the actual remaining time is obtained from real-time statistics of sensor trigger timing and path control segment occupancy status. The degree of deviation between the two time series is quantified and evaluated using task-by-task difference and overall mean square error (MSE): for each transportation task instance, the difference between its estimated and actual remaining time is calculated, and the fluctuation trend of the difference throughout the entire task execution cycle is recorded; the same statistics are performed on all task instances, and the overall level of time deviation is measured using mean square error (MSE), which serves as the core indicator for optimizing the time estimation model. During parameter configuration, the update window for the historical average passage time is set to the records of the last 5 passages through the same segment, and the tolerance deviation threshold for pre-occupied time slices is ±10% of the estimated duration.

[0040] In one embodiment of the present invention, the deadlock detection and resolution step based on a global path resource placeholder table runs as a periodic background task. The deadlock detection task is scheduled and executed by the operating system of the programmable logic controller (PLC) at fixed time intervals. The deadlock detection algorithm periodically analyzes all rows in the global path resource placeholder table marked as "pre-occupied" or "actually occupied," traversing these rows to extract the unique identifier of the transport task instance occupying the path control segment and the next path control segment planned to be occupied in the complete drive sequence of that transport task instance. Based on this information, a directed graph structure, called a resource allocation directed graph, is constructed. In the resource allocation directed graph, nodes represent transport task instances, and directed edges represent a transport task instance occupying a path control segment requested by the next transport task instance. In some embodiments, directed edges point from the transport task instance node occupying the resource to the transport task instance node requesting the resource but being blocked.

[0041] The detection of cycles in a directed graph of resource allocation employs depth-first search or topological sorting algorithms from graph theory. If the algorithm detects a closed cycle in the directed graph, a logical deadlock is determined to have occurred. A cycle indicates the existence of a set of transport task instances, where each instance occupies a path control segment required by another instance in the set for its next step, preventing all instances from progressing. The logical result of determining the existence of a cycle can be represented by a Boolean variable, the calculation of which depends on a traversal analysis of the directed graph structure. In essence, cycle detection can be formally represented as a cycle attribute judgment function for the directed graph G of resource allocation: , in: This represents the constructed directed graph of resource allocation. This represents the set of nodes in the graph (each node represents a transportation task instance). This represents the set of directed edges in the graph (each edge represents a resource ownership relationship). It is the boolean value output by the function, when A value of true indicates the presence of a cycle in the graph, i.e., a deadlock has occurred. (Function) A specific ring detection algorithm was implemented.

[0042] Once a logical deadlock is detected, the deadlock resolution logic is triggered, selecting the lowest-priority instance from all transport task instances forming the loop. Priority can be defined based on task creation time, cargo type, or manually specified. The latest path segment occupancy or pre-occupancy request of the selected transport task instance is revoked. Specifically, the global path resource placeholder table is modified, releasing the state of the last path control segment currently occupied or pre-occupied by the instance and clearing its pre-occupancy information. Simultaneously, the transport task instance is forced into a waiting state, removed from the currently active execution queue. A new path is replanned for the transport task instance forced into the waiting state, taking into account the updated global path resource placeholder table state to avoid falling into the same deadlock again. Upon successful replanning, the new pre-occupancy information for the task is updated in the global path resource placeholder table, thus breaking the original logical deadlock cycle.

[0043] In practice, the closed-loop processing steps for completing the transportation task run independently of the deadlock detection logic and are handled by the Programmable Logic Controller (PLC) in the main control loop. The closed-loop processing is triggered after the PLC detects, via sensors deployed at the cargo handover station, that the goods to be transported have arrived at the designated cargo handover station. First, it verifies whether the unique identifier of the goods to be transported matches the information in the initial target station instruction. Verification can be done by scanning the barcode or RFID tag on the goods and comparing it with the information stored in the intermediate data register. In some embodiments, after successful verification, the PLC writes a set of specific action signals to the address controlling the corresponding station's loading and unloading mechanism in the output image register. These action signals trigger the station's unloading or loading operation, such as starting a conveyor belt or lifting platform. After the unloading or loading operation is completed, a loading / unloading completion signal is fed back by the sensors. The PLC then deletes the transportation task instance data structure corresponding to the goods to be transported from the intermediate data register, reclaiming the memory resources it occupied. Simultaneously, it clears the occupied markers of all path control segments associated with the corresponding transportation task instance from the global path resource placeholder table, restoring these segments to their idle state. Finally, a formatted transportation task completion confirmation message is sent to the upper-level scheduling system. The transportation task completion confirmation message is transmitted through the communication interface and contains the unique identifier of the goods to be transported, the actual arrival time, and the platform identifier.

[0044] See Figure 5 In the analysis of occupancy behavior in route control sections, the correlation between average occupancy duration and occupancy frequency can be quantified and analyzed using a dual-axis visualization model. Specifically, the bar chart represents the average occupancy duration (in seconds) of each route control section (S1–S8), while the line chart corresponds to the number of times each section was occupied within the observation period. From the data distribution, the average occupancy duration of section S5 reaches its peak (approximately 27 seconds), while sections S3 and S4 have the highest number of occupancy times (both 12 times), indicating a significant differentiation in resource occupancy intensity and usage frequency among different sections. Further analysis suggests that the high average occupancy duration of section S5 may be related to its functional positioning as a key confluence node, while the high-frequency occupancy of sections S3 and S4 reflects their role as core hubs in the transportation route. Occupancy behavior in each segment can be clustered using a combination of two indicators: for example, S1, S2, and S8 belong to the "medium duration - medium frequency" type segment, S3 and S4 belong to the "low duration - high frequency" type segment, and S5 belongs to the "high duration - low frequency" type segment. This clustering result can provide a quantitative basis for path resource scheduling and conflict prediction. At the parameter configuration level, the observation period is set to 8 hours of continuous operation, the occupancy duration statistical accuracy is 0.1 seconds, and the occupancy count threshold is a complete event of goods fully entering and leaving the segment. Through cross-analysis of the two indicators for each segment, a path resource load heatmap can be constructed, providing data support for optimizing the pre-occupancy strategy of the global path resource occupancy table.

[0045] The above embodiments are only used to illustrate the technical methods of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical methods of the present invention without departing from the spirit and scope of the technical methods of the present invention.

Claims

1. A cargo transportation control method based on PLC control technology, characterized in that, Includes the following steps: Obtain the physical layout information of the cargo transportation system, which includes the location coordinates of multiple sensors deployed along the transportation path, the interface number of the power actuator, and the coordinate information of the cargo handover station. Based on the physical layout information of the cargo transportation system, an input image register area and an output image register area are defined in the program editing environment of the programmable logic controller (PLC). The physical sensors corresponding to the position coordinates of the multiple sensors are connected to the designated address of the input image register area, and the control loop corresponding to the interface number of the power actuator is connected to the designated address of the output image register area. In the programmable logic controller (PLC), a logic control model for the transportation path is constructed based on the physical layout information. The logic control model divides the continuous transportation path into a series of sequentially connected path control segments and assigns a corresponding control logic subroutine to each path control segment. Receive a target platform instruction for the goods to be transported from the upper-level scheduling system. The target platform instruction includes a unique identifier for the goods to be transported and the coordinate information of the designated goods handover platform. The unique identifier of the goods to be transported and the coordinate information of the designated goods handover station are entered into the intermediate data register of the programmable logic controller (PLC).

2. The cargo transportation control method based on PLC control technology according to claim 1, characterized in that, Also includes: Based on the coordinate information of the designated cargo handover station, path planning is performed using the logic control model of the transportation route to calculate a complete drive sequence from the origin to the designated cargo handover station for the goods to be transported, including: Query the coordinate information of the cargo handover platform to determine the final logical node of the cargo to be transported on the transportation path; Starting from the origin, a logical traversal is performed in the logical control model of the transportation path to enumerate all paths from the origin to the final logical node. According to the preset path evaluation strategy, all enumerated paths are compared. The path evaluation strategy includes a comprehensive evaluation index of the number of path control sections and the complexity of the action of the power actuator in the path. The path with the best comprehensive evaluation index is selected as the planned recommended path; Extract the list of path control sections traversed by the recommended route from the logical control model of the transportation route, and determine the passage order of each path control section according to the transportation direction; The path control segment list and its passage order are combined and encapsulated to generate the complete drive sequence and stored in a designated data block of the programmable logic controller (PLC). The complete drive sequence consists of multiple path control sections arranged in the order of passage.

3. The cargo transportation control method based on PLC control technology according to claim 2, characterized in that, It also includes the step of executing the complete drive sequence: Read the complete drive sequence from the specified data block of the programmable logic controller (PLC) and extract the target path control segment that needs to be activated. Invoke the control logic subroutine corresponding to the target path control segment; The control logic subroutine is executed, and the control logic subroutine determines the occupancy and idle status of the target path control section by scanning the sensor status related to the target path control section in the input image register area; When the scan confirms that the target path control section is in an idle state, the control logic subroutine writes a drive signal to the power actuator control address corresponding to the target path control section in the output image register, and starts the power actuator to drive the goods into the target path control section.

4. The cargo transportation control method based on PLC control technology according to claim 3, characterized in that, The control logic subroutine is executed, which determines the occupancy and idle status of the target path control segment by scanning the sensor states related to the target path control segment in the input image register, including: The control logic subroutine periodically reads the register bit status associated with the entrance and exit sensors of the target path control segment in the input image register area; Based on the changes in the register bit states of the inlet and outlet sensors, it is determined whether the goods to be transported have completely entered and completely left the target path control section; After the goods to be transported have fully entered the target path control section, but before they have fully left the target path control section, the internal state of the target path control section is marked as occupied and locked. After the goods to be transported have completely left the target path control section, the internal state of the target path control section is switched to idle, and the occupation lock on the path control section is released.

5. A cargo transportation control method based on PLC control technology according to claim 4, characterized in that, It also includes steps for monitoring the movement of goods within the target route control section: During the period when the target path control section is in an occupied and locked state, the status signals of the monitoring sensors located inside the target path control section in the input image register are continuously monitored; Record the trigger time and sequence of the status signals of the monitoring sensor and compare them with the preset standard runtime sequence template; When the triggering time and sequence of the status signals of the monitoring sensor deviate from the standard running sequence template by more than a preset tolerance threshold, an operational anomaly determination is triggered. Generate an exception event message containing the exception segment identifier, exception type code, and deviation value; The abnormal event message is stored in the designated data block of the programmable logic controller (PLC), and the currently executing complete drive sequence is immediately interrupted. The control flow of the PLC is then redirected to the preset exception handling branch.

6. A cargo transportation control method based on PLC control technology according to claim 5, characterized in that, The control flow of the programmable logic controller (PLC) is redirected to a preset exception handling branch, including: In the exception handling branch, the exception segment identifier in the exception event message is read first. Based on the abnormal section identifier, control the output image register to write a stop signal to the power actuator that causes the cargo to move, so that the cargo stops within the target path control section; Send an interrupt notification containing the abnormal event message to the upper-level scheduling system, requesting manual intervention or a new scheduling instruction; After receiving confirmation of intervention completion or a new driving instruction from the upper-level scheduling system, the driving target of the cargo to be transported is reset according to the new driving instruction, which may include continuing forward, returning to the previous segment, or proceeding to the emergency handling station. Re-plan the path from the current interruption point, or continue the interrupted complete drive sequence according to the new drive instructions.

7. A cargo transportation control method based on PLC control technology according to claim 6, characterized in that, It also includes concurrent transportation scheduling steps for multiple goods: In the intermediate data register of the programmable logic controller (PLC), an independent transportation task instance is established for each piece of goods in the transportation state. Each of the transport task instances includes a unique identifier for the corresponding cargo, the target platform, the current path control segment, and a complete drive sequence planned separately for the corresponding cargo. A global path resource placeholder table is established for all active transportation task instances, and each path control segment is marked in real time by which transportation task instance occupies or pre-occupies it. When the programmable logic controller (PLC) performs path planning for a new item to be transported in order to calculate its complete drive sequence, the planning process needs to query the global path resource placeholder table. In the calculated complete drive sequence, any path control segment cannot be occupied by other transportation task instances in the global path resource placeholder table at the time when it is scheduled to be occupied by the new cargo to be transported; otherwise, it must be re-planned or waited for.

8. A cargo transportation control method based on PLC control technology according to claim 7, characterized in that, The step of establishing a global path resource placeholder table for all active transportation task instances, and marking in real time which transportation task instance occupies or pre-occupies each path control segment, includes: Define a multi-row data table in the system data block of the programmable logic controller (PLC) as the global path resource placeholder table; Each row of the global path resource placeholder table corresponds to a path control segment. Each row contains the identifier of the path control segment, the unique identifier of the transportation task instance currently occupying the path control segment, and the future time slice information of the path control segment being pre-occupied. Before a transport task instance is about to enter a certain path control segment, the unique identifier of the transport task instance is written into the line corresponding to the path control segment, and the status is marked as pre-occupation. Once a transportation task instance actually enters the path control segment, its status is updated to "actually occupied". Once a transport task instance has completely left the path control segment, clear the occupancy information in the corresponding row and set the status to idle. The future time slice information is derived from the execution progress estimation of the complete driving sequence of each transportation task instance and is used for conflict prediction.

9. A cargo transportation control method based on PLC control technology according to claim 8, characterized in that, It also includes the step of deadlock detection and resolution based on the global path resource placeholder table: Periodically analyze all rows in the global path resource placeholder table that are in a pre-occupancy or actual occupancy state to construct a directed graph of resource allocation; In the directed graph of resource allocation, nodes represent transportation task instances, and directed edges represent a transportation task instance occupying the path control segment requested by the next transportation task instance. The system detects whether a cycle exists in the directed graph of resource allocation. If a cycle is detected, the system is determined to have experienced a logical deadlock. Once a logical deadlock is determined, select the lowest priority instance from the transport task instances that constitute the loop, revoke its latest path segment occupancy or pre-occupancy request, and force it into a waiting state. The transport task instances that have been forced into a waiting state are rerouted, and the global path resource placeholder table is updated to break the logical deadlock.

10. A cargo transportation control method based on PLC control technology according to claim 9, characterized in that, It also includes closed-loop processing steps for completing the transportation task: After the programmable logic controller (PLC) detects through sensors that the goods to be transported have arrived at the designated goods handover station, it verifies whether the unique identifier of the goods to be transported matches the information in the target station instruction. After successful verification of the match, an action signal is written to the address of the corresponding platform loading and unloading mechanism in the output image register area to trigger cargo unloading or loading operations. After the cargo unloading or loading operation is completed, the transportation task instance corresponding to the cargo to be transported is deleted from the intermediate data register. Clear the occupancy markers of all path control segments associated with the corresponding transport task instance; Send a transportation task completion confirmation message to the upper-level scheduling system. The transportation task completion confirmation message includes the unique identifier of the goods to be transported, the actual arrival time, and the platform identifier.