CN-121994517-A - Portable simulated car coupler reconnection test device and control method
Abstract
The invention discloses a portable simulated coupler reconnection test device and a control method, wherein a main control module in the device is internally provided with control logic in the test process, the method comprises a priority hierarchical scheduling mechanism, a double mutual exclusion locking mechanism and a state real-time synchronization mechanism. The control method comprises the steps of configuring a GPIO interface, UART communication and a mutual exclusion lock of a main control module, triggering an operation instruction based on an instruction interaction module, performing priority classification on the triggered operation instruction, performing mutual exclusion judgment on the operation instruction being executed based on a double-interlocking safety state, constructing a real state mirror image, synchronously updating a physical control point and a virtual control point with state change, performing input acquisition and output control of a reconnection train level signal based on an acquisition output module, and synchronously displaying state information on an HMI serial port screen module. The device disclosed by the invention is portable and easy to use, has a low operation threshold, and comprehensively meets the high-efficiency and safe debugging requirements of rail transit vehicles.
Inventors
- CHEN YUANSHENG
- XU YAOXING
- ZHANG ZHEHENG
- TAN NING
Assignees
- 广州中车轨道交通装备有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20260409
Claims (10)
- 1. The portable simulated car coupler reconnection test device is characterized by comprising a main control module, a power supply module, an acquisition output module, an instruction interaction module and an HMI serial screen module; The main control module is respectively connected with the power supply module, the acquisition output module, the instruction interaction module and the HMI serial port screen module, is an ESP32S3-N16R8 singlechip and comprises a priority hierarchical scheduling mechanism, a double mutual exclusion locking mechanism and a state real-time synchronization mechanism in a built-in test process of the main control module; The power supply module comprises a step-down power supply circuit and is used for converting the output voltage of the reconnection train into the working voltage of the test device; the acquisition output module comprises a plurality of parallel acquisition output circuits and is used for acquiring level signals of the reconnection train and outputting the level signals to the reconnection train; the instruction interaction module is used for realizing operation instruction interaction; the HMI serial port screen module is connected with the main control module based on serial port communication, and is used for displaying state information of a test process.
- 2. A control method of a portable analog coupler reconnection test apparatus, wherein the control method is implemented based on the portable analog coupler reconnection test apparatus according to claim 1, the control method comprising: connecting the test device with the reconnection train, and powering up the main control module by the power supply module after connection is completed; Configuring GPIO interfaces, UART communication and mutual exclusion locks of a main control module; triggering an operation instruction based on the instruction interaction module, and prioritizing the triggered operation instruction; Sequentially executing the operation instructions subjected to priority division, and performing mutual exclusion arbitration on the operation instructions being executed based on the double-interlocking safety state; A real state mirror image is built, and a physical control point and a virtual control point with state change in the real state mirror image are synchronously updated; And based on the acquisition output module, the input acquisition and output control of the reconnection train level signals are executed, and the state information display is synchronously carried out on the HMI serial screen module.
- 3. The method for controlling a portable analog coupler reconnection test apparatus according to claim 2, wherein connecting the test apparatus to a reconnection train comprises: The power supply module of the test device is connected to the output power point of the control host of the reconnection train; The acquisition output module of the test device is connected to the coupler connector point position of the reconnection train; And accessing the instruction interaction module of the test device into a control hardware point of the reconnection train.
- 4. The method for controlling the portable analog coupler reconnection test apparatus according to claim 2, wherein configuring the GPIO interface, UART communication, and mutual exclusion lock of the master control module comprises: initializing and setting an input/output pin for a GPIO interface of a main control module; initializing UART communication of a main control module; And extracting mutually exclusive functional modes in the test process, and defining the relationship between the mutually exclusive functional modes as a mutually exclusive lock.
- 5. The method for controlling a portable analog coupler reconnection test apparatus according to claim 2, wherein the triggering operation instructions based on the instruction interaction module and prioritizing the triggered operation instructions comprises: triggering an operation instruction based on the instruction interaction module, and generating an operation task corresponding to the operation instruction; Dividing the generated operation task into a high-priority task and a low-priority task according to a preset priority division standard; And preferentially executing the high-priority task, and continuing to execute the low-priority task after the high-priority task is executed.
- 6. The method for controlling a portable analog coupler reconnection test apparatus according to claim 2, wherein mutually exclusive arbitration of the executing operation instructions based on the double interlock security status comprises: The method comprises the steps of respectively defining a zone bit of a first key state and a zone bit of a second key state, wherein the first key state and the second key state are in a mutual exclusion relation, and the priority of the first key state is higher than that of the second key state; When the first key state is activated, judging whether the second key state is in an activated state or not based on a flag bit of the second key state, if the second key state is in the activated state, immediately stopping the second key state, and activating the first key state; When the second key state is activated, whether the first key state is in an activated state or not is judged based on the flag bit of the first key state, and if the first key state is in the activated state, the activation of the second key state is immediately stopped.
- 7. The method for controlling the portable analog coupler reconnection test apparatus according to claim 2, wherein the constructing a real state image and synchronously updating a physical control point and a virtual control point of which states change in the real state image comprises: Extracting all physical control points and virtual control points in the test process, and constructing a real state mirror image based on the extracted physical control points and virtual control points; Extracting a previous period state cache array and a current period state cache array, and comparing the previous period state cache array with the current period state cache array bit by bit; when the change rate in the comparison result exceeds a preset change threshold, determining a physical control point and a virtual control point with state change, and monitoring the time difference between the current time and the last full-quantity synchronous time; and when the time difference exceeds a preset time threshold, synchronously updating the physical control point and the virtual control point which are determined to have the state change in the real state mirror image, and correspondingly updating the full synchronization time stamp.
- 8. The method for controlling the portable analog coupler reconnection test apparatus according to claim 2, wherein the performing input acquisition and output control of the reconnection train level signal based on the acquisition output module comprises: the acquisition output module acquires the level signal of the reconnection train and transmits the acquired level signal to the main control module; The main control module updates the collected level signals based on the synchronous update condition of the real state mirror image, and transmits the level signals after the update processing to the back collection output module; and the acquisition output module outputs the updated level signal to the reconnection train.
- 9. The method for controlling the portable analog coupler reconnection test apparatus according to claim 2, wherein the synchronizing the status information display on the HMI serial screen module comprises: the main control module transmits the synchronous update status information of the real state mirror image to the HMI serial port screen module for display based on a serial port communication mode, a serial port communication transmission frame adopts a delimiter mark, and a frame structure is composed of a frame head identifier, a data field and a frame tail identifier.
- 10. The method for controlling a portable analog coupler reconnection test apparatus according to claim 2, wherein the method further comprises: After the test device is electrified, a central mirror image is built according to the initial state of the test device, the health degree of a communication link of the test device is continuously monitored, and when the communication link is judged to be abnormal, forced state synchronization is carried out on the test device, so that the state of the test device is restored to be completely consistent with the central mirror image.
Description
Portable simulated car coupler reconnection test device and control method Technical Field The invention relates to the technical field of rail transit, in particular to a portable simulated coupler reconnection test device and a control method. Background In the whole train debugging links of rail transit subways, city railways and rolling stocks, the coupler reconnection function is a key performance for guaranteeing the safe running of trains, and strict function verification and fault detection are required. At present, a traditional test mode of occupying a dynamic line and dispatching at least two rows of real vehicles to carry out physical butt joint and electric reconnection is generally adopted in the industry, the mode is required to finish train transportation, line coordination and multi-team cooperation preparation work in advance, the problems of high test resource consumption, long preparation period, high labor investment and the like exist, meanwhile, a visual interface is not used in the traditional test, the state of an input and output point position is monitored in real time, a physical switch and an interface display are easy to be inconsistent due to communication delay or data packet loss, the line is required to be checked point by point in a cross-vehicle mode after a fault occurs, the fault positioning time is long, the troubleshooting efficiency is low, and the manual operation is easy to cause derivative faults such as wiring errors. Disclosure of Invention The invention aims to overcome the defects of the prior art, and provides a portable simulated coupler reconnection test device and a control method, which are portable and easy to use, have low operation threshold and comprehensively meet the high-efficiency and safe debugging requirements of rail transit vehicles. The invention provides a portable simulated coupler reconnection test device, which comprises a main control module, a power supply module, an acquisition output module, an instruction interaction module and an HMI serial screen module, wherein the main control module is connected with the power supply module; The main control module is respectively connected with the power supply module, the acquisition output module, the instruction interaction module and the HMI serial port screen module, is an ESP32S3-N16R8 singlechip and comprises a priority hierarchical scheduling mechanism, a double mutual exclusion locking mechanism and a state real-time synchronization mechanism in a built-in test process of the main control module; The power supply module comprises a step-down power supply circuit and is used for converting the output voltage of the reconnection train into the working voltage of the test device; the acquisition output module comprises a plurality of parallel acquisition output circuits and is used for acquiring level signals of the reconnection train and outputting the level signals to the reconnection train; the instruction interaction module is used for realizing operation instruction interaction; the HMI serial port screen module is connected with the main control module based on serial port communication, and is used for displaying state information of a test process. The invention also provides a control method of the portable simulated coupler reconnection test device, which is realized on the basis of the portable simulated coupler reconnection test device, and comprises the following steps: connecting the test device with the reconnection train, and powering up the main control module by the power supply module after connection is completed; Configuring GPIO interfaces, UART communication and mutual exclusion locks of a main control module; triggering an operation instruction based on the instruction interaction module, and prioritizing the triggered operation instruction; Sequentially executing the operation instructions subjected to priority division, and performing mutual exclusion arbitration on the operation instructions being executed based on the double-interlocking safety state; A real state mirror image is built, and a physical control point and a virtual control point with state change in the real state mirror image are synchronously updated; And based on the acquisition output module, the input acquisition and output control of the reconnection train level signals are executed, and the state information display is synchronously carried out on the HMI serial screen module. Further, the connecting the test device with the reconnection train includes: The power supply module of the test device is connected to the output power point of the control host of the reconnection train; The acquisition output module of the test device is connected to the coupler connector point position of the reconnection train; And accessing the instruction interaction module of the test device into a control hardware point of the reconnection train. Further, the configuring the GPIO interface, UART communicatio