A weldment-based counting system and method
By identifying the beam obstruction time of the welded component and the triggering time interval of the dual beams, the redundant counting problem caused by signal interference in the welded component counting system was solved, and accurate counting records were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LONGYAN UNIV
- Filing Date
- 2026-03-30
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies in welding component counting systems are prone to redundant counting due to interference from photoelectric switch signals, making it impossible to accurately identify the direction and continuity of material movement and resulting in distorted production data.
By identifying the instantaneous start and end times of the beams entering and leaving the welded part, the behavior is determined. The time interval between adjacent actions is compared to filter continuous motion trajectories. The time interval of dual-beam triggering and the dynamic change direction are introduced to verify repeated occlusion, determine the counting trigger node, and drive the register to increment sequentially.
It eliminates signal jitter and nonlinear motion interference, locks in the unique correspondence of statistical values under the flow state, and ensures the accuracy and authenticity of production data.
Smart Images

Figure CN121960547B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of conveying and counting technology, and in particular to a counting system and method based on welded parts. Background Technology
[0002] The field of conveyor counting technology involves the statistical recording of the quantity of continuously conveyed or discretely flowing items. This technology includes core aspects such as conveyor layout, item detection, counting signal generation, and counting recording. Common applications include production line parts conveying, packaged item conveying, and metal component transfer. In practical applications, a conveyor track, drive mechanism, and position detection device are typically used to move the items to be counted sequentially along a predetermined path. A detection signal is generated when an item passes a designated detection position, and the counting device accumulates and records the detection signals to complete the item quantity statistics. Traditional weldment-based counting systems are systems that count the quantity of weldments during production or transfer. For recording the quantity of weldments during production line conveying, a drive roller is typically installed on one side of the conveyor track to propel the weldment along the track. A through-beam photoelectric switch or proximity switch is installed at a designated position on the track. When the weldment passes the detection position, it blocks the light beam or changes the magnetic induction state to generate a pulse signal. A counter increments and records each pulse signal, and the current cumulative quantity is displayed on a screen.
[0003] Existing technology relies on a single photoelectric switch to generate pulse signals. When the welded parts move at low speeds or experience mechanical vibrations, the edges of the objects frequently cut off the light beam, causing the counter to receive extra pulses and generate redundant counts. When materials back up or shake on the conveyor track, the sensor only triggers recording based on the change in the obstruction state, failing to identify the direction of material movement and the continuity of the trajectory. This easily leads to misjudging a single pass as multiple independent events, causing cumulative numerical deviations, affecting the accuracy of production planning, and making the statistical process susceptible to interference from equipment vibration. Signal flicker can also cause false counts, resulting in chaotic material connections between processes, failing to reflect the true output, and causing data distortion in the production management process. Summary of the Invention
[0004] To address the technical problems existing in the prior art, embodiments of the present invention provide a counting system and method based on welded parts, the system comprising: The welding part occlusion event recognition module reads the welding part conveyor track status signal, welding fixture pallet status signal, and photoelectric beam switch trigger signal, identifies the time when the welding part enters and leaves the beam area, determines the sequence of occlusion start time and occlusion end time, and obtains the welding part occlusion event sequence. The occlusion event trajectory recognition module reads the occlusion start time and occlusion end time based on the sequence of occlusion events of the welded parts, identifies the time interval between adjacent occlusion behaviors, compares the time intervals to select continuous occlusion behaviors, and obtains a set of occlusion trajectories of the welded parts. The welded component passes through the section recognition module based on the welded component occlusion trajectory set, reads the trajectory start time and end time, determines the time sequence and divides the occlusion section, and obtains the welded component passage section information; The repeated occlusion recognition module receives two photoelectric beams of photoelectric switch trigger signals within the detection area, and combines them with the information of the welded part through the segment to read the corresponding trigger time, identify the interval between the trigger times of the two beams of light, compare the direction of change of continuous trigger time, and obtain the set of segments through which the welded part passes. The welding component counting output module reads the end node of the segment based on the welding component through the segment set, identifies the counting trigger node, increments the count value of the counting register, and obtains the cumulative count of the welding components.
[0005] As a further aspect of the present invention, the welding component occlusion event sequence includes an occlusion event number, an occlusion duration, an occlusion timestamp identifier, an occlusion intensity identifier, and an occlusion event status marker; the welding component occlusion trajectory set includes a trajectory number, a trajectory duration period, a trajectory time span, a trajectory continuity identifier, and a trajectory segment quantity identifier; the welding component passing through segment information includes a segment number, a segment time range, a segment duration, a segment sequence identifier, and a segment boundary identifier; the welding component passing through segment set includes a segment matching identifier, a segment association number, a segment change trend identifier, a segment trigger type identifier, and a segment identifier; and the cumulative count of welding components includes a cumulative count value, a count update time identifier, a count trigger sequence number, a count cycle identifier, and a count status identifier.
[0006] As a further aspect of the present invention, the continuous blocking behavior refers to a set of blocking actions that occur consecutively in chronological order during the continuous conveying of the welded parts, where the time interval between adjacent blocking events is within the normal conveying cycle. The start and end times of the trajectory refer to the time when the welded component begins to block the light beam and the time when it leaves the beam area in a single occlusion trajectory.
[0007] As a further aspect of the present invention, the segment end node refers to the node time that represents the end of the segment time in the divided passing segment; The counting trigger node refers to the time node that selects the welded part from the end node of the section, represents the welded part passing through the detection area, and triggers the counter to increment.
[0008] As a further aspect of the present invention, the weldment occlusion event recognition module includes: The signal acquisition submodule reads the welding part conveying track, welding fixture tray, and photoelectric beam switch trigger signals on the conveyor line, acquires the photoelectric beam switch trigger signals and monitors the beam area occlusion status, and records the beam entry time and beam exit time according to the beam occlusion duration interval to obtain the occlusion time sequence. The timing determination submodule extracts the time when the beam enters the node and the time when the beam leaves the node based on the occlusion time sequence, compares the order of the entry time and the exit time, identifies the time difference and tracks the interval where the entry time is earlier than the exit time to obtain the duration of occlusion. Based on the duration of the occlusion, the event generation submodule reads the corresponding entry and exit times of the node, identifies the sequence of consecutive occlusion start and end times, retains the beam blocking state interval, and arranges the events in ascending order of time to obtain the welding part occlusion event sequence.
[0009] As a further aspect of the present invention, the occlusion event trajectory recognition module includes: The time extraction submodule reads the start time and end time of the occlusion behavior based on the sequence of occlusion events of the welded parts, extracts the start time and end time of the preceding occlusion behavior of adjacent occlusion behaviors, and obtains the time interval of the occlusion behavior. The interval recognition submodule reads the start and end times of occlusion corresponding to adjacent occlusion behaviors based on the time interval of the occlusion behavior, and combines the continuous conveying state interval of the welded parts on the conveyor line with the time interval of the occlusion behavior to select the occlusion behavior corresponding to the continuous conveying state interval to obtain the continuous occlusion sequence identifier. Based on the continuous occlusion sequence identifier, the trajectory generation submodule reads the corresponding occlusion start time and occlusion end time, connects them in chronological order, and combines the continuous occlusion behavior segments to obtain the welding part occlusion trajectory set.
[0010] As a further aspect of the present invention, the welded component includes, via a segment identification module: The trajectory reading submodule reads the start and end times of each occlusion trajectory based on the set of welded component occlusion trajectories, arranges the start and end times of the occlusion trajectories, and obtains the trajectory time interval. Based on the trajectory time interval, the boundary determination submodule extracts the corresponding start and end times of the trajectory, identifies the boundary of the trajectory time interval according to the time arrangement order, locates the trajectory start position and trajectory end position and divides continuous time segments to obtain the occlusion segment sequence. Based on the sequence of obstructed segments, the segment coding submodule extracts the start and end times corresponding to the segments, numbers the segments according to the time order, and obtains the segment information of the welded part.
[0011] As a further aspect of the present invention, the repeated occlusion recognition module includes: Based on the section information of the welded part, the trigger acquisition submodule reads the trigger time of the two photoelectric beam switches in the detection area, obtains the trigger time of the first beam and the trigger time of the second beam, arranges the trigger time of the first beam and the trigger time of the second beam and extracts the time difference between adjacent time nodes to obtain the beam trigger time interval. The spacing recognition submodule extracts continuous trigger time nodes based on the beam trigger time spacing, determines the direction of the beam trigger time spacing according to the time arrangement, analyzes the consistency of the direction of the continuous beam trigger time spacing and identifies the corresponding segments, and obtains the trigger spacing direction sequence. Based on the trigger spacing direction sequence, the segment matching submodule reads the corresponding segment position, extracts the corresponding time interval of the segment, and obtains the segment and time interval position corresponding to the trigger spacing direction sequence to obtain the set of welded parts passing through the segment.
[0012] As a further aspect of the present invention, the weldment counting output module includes: The node extraction submodule reads the end node of the segment based on the segment set of the welded part, extracts the time position corresponding to the end node of the segment, and identifies the sequence of counting trigger nodes by identifying the order of the time positions corresponding to the end nodes of the segment. The sequence recognition submodule extracts the time position corresponding to the trigger node based on the count trigger node sequence, identifies the order of the trigger nodes according to the time sequence, and verifies the trigger node sequence according to the time sequence to obtain the trigger node sequence sequence. The counting increment submodule extracts the corresponding sequential position of the trigger node based on the sequence of trigger nodes, calls the current count value of the counting register, and increments it according to the sequential position of the trigger node, continuously updating the incremented count value to obtain the cumulative count of welded parts.
[0013] On the other hand, a counting method based on welded parts, which is executed based on the above-mentioned counting system based on welded parts, includes the following steps: S1: Acquire the status signal of the welding part conveying track, the status signal of the welding fixture pallet, and the trigger signal of the photoelectric beam switch; detect the time when the welding part enters the beam area and read the start time of the occlusion; detect the time when the welding part leaves the beam area and read the end time of the occlusion; determine the chronological relationship between the start time and the end time of the occlusion; and obtain the sequence of welding part occlusion events. S2: Based on the sequence of events that block the welded parts, read the start time and end time of adjacent blocks, identify the time interval between adjacent blocks, compare the time intervals and select the blocks in the continuous conveying state to obtain the set of blocks of the welded parts. S3: Based on the set of welding component occlusion trajectories, read the start time and end time of continuous occlusion, identify the start position and end position of occlusion, divide the continuous occlusion behavior into segments, and identify the time sequence and segment number of the segments to obtain the information of the welding component passing through the segments. S4: Based on the information of the welded part passing through the section, read the trigger time of the two photoelectric beam switches, identify the interval between the trigger time of the first beam and the trigger time of the second beam, compare the direction of change of the interval between the continuous trigger times and select the section with the same direction to obtain the set of welded part passing through the section; S5: Based on the welded parts through the segment set, read the segment end node, identify the counting trigger node and execute the counting register increment process to obtain the cumulative count of the welded parts.
[0014] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, the sequence of actions is determined by identifying the instantaneous start and end times of the beams entering and leaving the welding part. The time intervals between adjacent actions are compared to filter continuous motion trajectories and divide the physical passage sections. The time interval of dual-beam triggering and the dynamic change direction are used to verify repeated occlusion. The counting trigger node is determined and the register is driven to increment sequentially. The motion process is dynamically mapped to digital records, eliminating signal jitter and nonlinear movement interference. The unique correspondence of statistical values under the flow state is locked, making the production data record seamless at the underlying logic level. This resolves miscounting conflicts under dynamic working conditions and restores the actual process state of the production line. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a system flowchart of the present invention; Figure 2 This is a system block diagram of the present invention; Figure 3 This is a flowchart of the welding component occlusion event recognition module in this invention; Figure 4 This is a flowchart of the occlusion event trajectory recognition module in this invention; Figure 5 This is a flowchart of the welded parts passing through the section identification module in this invention; Figure 6 This is a flowchart of the repeated occlusion recognition module in this invention; Figure 7This is a flowchart of the weldment counting output module in this invention; Figure 8 This is a flowchart of the method steps of the present invention. Detailed Implementation
[0017] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0018] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0019] This invention provides a counting system based on welded parts, such as... Figure 1-2 The diagram shown illustrates a counting system based on welded parts. The system includes: The welding part occlusion event recognition module reads the welding part conveying track, welding fixture tray, and photoelectric beam switch trigger signals on the conveyor line. It detects the moment when the welding part enters the beam area and records the occlusion start time. It detects the moment when the welding part leaves the beam area and records the occlusion end time. It determines the order of the occlusion start time and occlusion end time, identifies the order of consecutive occlusion start time and occlusion end time, and retains the occlusion behavior that occurs during the period when the beam is continuously blocked by the welding part, thus obtaining the welding part occlusion event sequence. The occlusion event trajectory recognition module is based on the sequence of occlusion events of the welded parts. It reads the start time and end time of the occlusion behavior, identifies the time interval between adjacent occlusion behaviors, compares the time intervals and selects the occlusion behaviors with the interval in continuous conveying state, connects the occlusion behaviors in the order of occurrence, identifies the continuous occlusion behaviors during the period when the welded parts pass through the detection area, and obtains the set of occlusion trajectories of the welded parts. The welded component passes through a section recognition module based on the welded component occlusion trajectory set. It reads the start time and end time of each occlusion trajectory, determines the order of the start time and end time, identifies the start position and end position of the trajectory, divides the continuous occlusion trajectory into sections, and identifies the section number according to the time sequence to obtain the welded component passing through section information. The repeated occlusion recognition module reads the trigger time of the two photoelectric beam switches in the detection area based on the information of the welded part passing through the section, obtains the trigger time of the first beam and the trigger time of the second beam, identifies the interval between the two sets of trigger time, compares the direction of change of the interval between the consecutive trigger time, selects the section with the same direction of change, determines the correspondence between the selected section and the welded part based on the section information, and obtains the set of welded part passing through the section. The weldment counting output module reads the end node of the segment based on the weldment passing through the segment set, identifies the end node and records the counting trigger node, identifies the trigger node in the order of occurrence, increments the current count value of the counting register, saves the increment processing result, and obtains the cumulative count of weldments.
[0020] The sequence of welding component occlusion events includes occlusion event number, occlusion duration, occlusion timestamp identifier, occlusion intensity identifier, and occlusion event status marker. The set of welding component occlusion trajectories includes trajectory number, trajectory duration period, trajectory time span, trajectory continuity identifier, and trajectory segment quantity identifier. The information of the welding component passing through the segment includes segment number, segment time range, segment duration, segment sequence identifier, and segment boundary identifier. The set of welding component passing through the segment includes segment matching identifier, segment association number, segment change trend identifier, segment trigger type identifier, and segment identifier. The cumulative count of welding components includes cumulative count value, count update time identifier, count trigger sequence number, count cycle identifier, and count status identifier.
[0021] Specifically, such as Figure 2 , 3 As shown, the weldment occlusion event recognition module includes: The signal acquisition submodule reads the welding part conveying track, welding fixture tray, and photoelectric beam switch trigger signals on the conveyor line, acquires the photoelectric beam switch trigger signals and monitors the beam area occlusion status, and records the beam entry time and beam exit time according to the beam occlusion duration interval to obtain the occlusion time sequence. First, sensor arrays deployed at key nodes of the welding component conveyor line are used to call the underlying drive interface in real time to read and retrieve the frequency status of the inverter on the welding component conveyor track and the magnetic induction switch signal of the welding fixture pallet. During this process, the original level transition of the photoelectric beam switch is captured simultaneously, the trigger signal of the photoelectric beam switch is collected, and the beam occlusion status is monitored. To ensure signal accuracy, the instant the photoelectric signal drops from high to low level is detected, the time is immediately accessed from the time synchronization center to obtain the current absolute time accurate to microseconds. Then, continuous monitoring logic is entered, recording the beam entry and exit times based on the duration of beam occlusion. In actual operation, when a 1800 mm long welding component moves uniformly with the pallet at a speed of 0.5 m / s, the moment the welding component's front end triggers the beam is accurately captured. The first falling edge of the level is marked as the entry time, set to 2000 milliseconds. When the tail end of the welding component completely leaves the beam coverage area and the photoelectric signal returns to high level, the corresponding rising edge of the level is obtained as the exit time, set to 5600 milliseconds. By continuously repeating the above capture actions, the time coordinates of each set of actions can be recorded sequentially for multiple workpieces continuously flowing on the conveyor line. These time coordinates are stored in a specific data buffer and encapsulated according to the physical order of acquisition to obtain the occlusion time sequence.
[0022] The timing determination submodule extracts the time of beam entry into the node and the time of beam exit from the node based on the occlusion time sequence, compares the order of the entry time and the exit time, identifies the time difference and tracks the interval where the entry time is earlier than the exit time to obtain the duration of occlusion. First, the occlusion time series is extracted from the data buffer and loaded into the local cache for timing logic processing. The entry and exit times of the light beams are extracted one by one, and a numerical comparison is performed on each pair of time data. By comparing the order of the entry and exit times, it is determined whether they meet the basic physical logical order. During this process, instantaneous pulse signals caused by sensor optical interference or dust occlusion are automatically filtered out. Subsequently, a time difference identification operation is performed. By calling the processor's internal subtraction instructions, the difference between the exit and entry times in each valid time pair is calculated, and the interval where the entry time is earlier than the exit time is tracked. For example, for a set of sampled data, the extracted entry time to the node is 2000 milliseconds and the exit time to the node is 5600 milliseconds. The value obtained by subtraction is 3600 milliseconds. If in another set of data the entry time to the node is 6000 milliseconds and the exit time to the node is 6005 milliseconds, the difference is only 5 milliseconds. At this time, based on the preset minimum value judgment logic, such as setting the minimum effective occlusion threshold to 50 milliseconds, it is identified as an interference signal, and the duration of occlusion is obtained.
[0023] The event generation submodule reads the corresponding entry and exit times of the node based on the duration of the occlusion, identifies the sequence of consecutive occlusion start and end times, retains the beam blocking state interval, and arranges the events in ascending order of time to obtain the welding part occlusion event sequence. First, the entry and exit times of the corresponding nodes are read from the underlying database to initiate the event-based encapsulation process. By identifying the sequence of start and end times of consecutive occlusions, each discrete time point is assigned a clear business meaning. Each entry node time is defined as the start time of an occlusion event, and the corresponding exit node time is defined as the end time of that event. During the generation process, the beam blocking state intervals are retained and events are arranged in ascending order of time. For example, in a batch of continuous delivery, the interval for the first event is identified as 2000 milliseconds to 5600 milliseconds, and the interval for the second event is 7000 milliseconds to 10600 milliseconds. These intervals with start and end markers are defined as independent welding component occlusion events. In this way, the originally scattered timestamps are transformed into an event model with complete business semantics. Finally, all generated event objects are linearly combined to form a continuous pipeline-like record, resulting in a welding component occlusion event sequence.
[0024] Specifically, such as Figure 2 , 4 As shown, the occlusion event trajectory recognition module includes: The time extraction submodule reads the start and end times of the occlusion behavior based on the sequence of welding part occlusion events, extracts the start and end times of adjacent occlusion behaviors and the end times of the preceding occlusion behavior, and obtains the time interval of the occlusion behavior. First, a high-precision spacing calculation logic is initiated for the sequence of welding component occlusion events. The start and end times of each occlusion action are read, and the start and end times of adjacent occlusion actions are further extracted. Then, the time interval between occlusion actions is divided based on the time difference between time nodes. Specifically, the start time of the current occlusion action is subtracted from the end time of the previous occlusion action to calculate the gap duration between the two workpieces. For example, if the first welding component ends occlusion at 5600 milliseconds and the second welding component begins occlusion at 7000 milliseconds, the time interval between them is 1400 milliseconds. If the third welding component begins occlusion at 12000 milliseconds and the second welding component ends at 10600 milliseconds, the interval is also 1400 milliseconds. All calculated differences are then aggregated to obtain the occlusion action time interval.
[0025] The interval recognition submodule reads the start and end times of occlusion corresponding to adjacent occlusion behaviors based on the time interval of occlusion behavior, and combines the continuous conveying state interval of the welded parts on the conveyor line with the time interval of occlusion behavior to select the occlusion behavior corresponding to the continuous conveying state interval to obtain the continuous occlusion sequence identifier. First, the start and end times of adjacent blocking behaviors are read, and this data is fused and analyzed with the real-time operation mode at the control level. This is combined with the continuous conveying state interval of welded parts on the conveyor line, and the time interval of the blocking behaviors is compared with the time interval of the blocking behaviors. A logical discrimination algorithm is used to filter out data that truly falls within the normal production cycle. During processing, a time interval reflecting the normal conveying state is set, for example, a normal interval is set between 800 milliseconds and 2000 milliseconds. The previously extracted interval value, such as 1400 milliseconds, is retrieved. Since this value falls within the preset continuous conveying state interval, the blocking behaviors corresponding to the continuous conveying state interval are selected and identified as valid process flows. Finally, these selected blocking behaviors that conform to the process cycle are logically marked, and a unique sequence index is assigned to each action to obtain the continuous blocking sequence identifier.
[0026] The trajectory generation submodule reads the corresponding occlusion start time and occlusion end time based on the continuous occlusion sequence identifier, connects them in chronological order, combines the continuous occlusion behavior segments, and obtains the set of welding part occlusion trajectories. First, using the sequential identifier of continuous occlusion, the associated start and end times of occlusion are retrieved, and the trajectory reconstruction algorithm is activated. The time nodes are connected sequentially, linking the scattered segments in a spatiotemporal dimension and combining them into continuous occlusion behavior segments. In implementation, each start time point is considered the entry point for motion features, and the end time point is considered the exit point. Assuming three consecutive actions identified as 1, 2, and 3 are detected, their time intervals are 2000-5600 milliseconds, 7000-10600 milliseconds, and 12000-15600 milliseconds, respectively. Through this strong temporal correlation, the scattered induction signals are transformed into physically consistent running trajectories. The generated multiple motion trajectories are then archived and classified to form a complete database mapping, resulting in a set of welding component occlusion trajectories.
[0027] Specifically, such as Figure 2 , 5 As shown, the welded parts are identified by the section recognition module, which includes: The trajectory reading submodule is based on the set of welded part occlusion trajectories. It reads the start and end times of each occlusion trajectory, arranges the start and end times of the occlusion trajectories, and obtains the trajectory time interval. First, the system accesses the storage medium to retrieve each record in the set of weldment occlusion trajectories and initiates time threshold parsing logic. It reads the start and end times corresponding to each occlusion trajectory and arranges these times according to the linear flow of time. This process aims to lock the absolute occupancy range of each trajectory on the time axis. For example, for record number 201, the start time is read as 2000 milliseconds and the end time as 5600 milliseconds; for record number 202, the start time is 7000 milliseconds and the end time is 10600 milliseconds. These start and end points are then paired to establish a closed-loop time interval from entry to exit. By cyclically scanning all trajectories in the set, the extracted time pairs are formatted and output to obtain the trajectory time interval.
[0028] The boundary determination submodule extracts the start and end times of the trajectory based on the trajectory time interval, identifies the boundary of the trajectory time interval according to the time arrangement order, locates the start and end positions of the trajectory, divides continuous time segments, and obtains the occlusion segment sequence. First, the trajectory time interval is extracted from memory. High-precision time-division multiplexing logic is used to identify the start and end times of the trajectory. The boundaries of the trajectory time intervals are identified based on the time sequence, decomposing a long period of occlusion trajectory into subdivided segments with clear physical boundaries. During implementation, the start and end positions of the trajectory are located, and continuous time segments are divided. For a trajectory lasting 3600 milliseconds, starting at 2000 milliseconds and ending at 5600 milliseconds, it is divided into six continuous sub-intervals, each with a step size of 600 milliseconds: 2000-2600 milliseconds, 2600-3200 milliseconds, 3200-3800 milliseconds, 3800-4400 milliseconds, 4400-5000 milliseconds, and 5000-5600 milliseconds. This division method breaks down macroscopic occlusion behavior into microscopic time slices, thereby capturing the state of the workpiece as it passes the sensor by precisely locking the segment boundaries, thus obtaining the occlusion segment sequence.
[0029] The segment coding submodule extracts the start and end times of the segments based on the sequence of obscured segments, and numbers the segments according to the time order to obtain the information of the segments through which the weldment passes. First, information encoding and attribute association are performed on the occlusion segment sequence. The start and end times of each segment are extracted, and the segments are numbered according to their chronological order. Each sub-segment is assigned a unique numerical code to mark its position in the overall trajectory. For example, the six sub-intervals are assigned numbers 01, 02, 03, 04, 05, and 06 respectively. Simultaneously, the corresponding start and end times are bound to the number as attribute values and stored, and associated with the process attributes of the batch of workpieces. In this way, each time slice possesses traceable identity information. Finally, all numbered time intervals are structurally combined to obtain the welding component's passing segment information.
[0030] Specifically, such as Figure 2 , 6 As shown, the repeated occlusion recognition module includes: The trigger acquisition submodule reads the trigger time of the two photoelectric through-beam switches in the detection area based on the information of the welded part passing through the section, obtains the trigger time of the first beam and the trigger time of the second beam, arranges the trigger time of the first beam and the trigger time of the second beam and extracts the time difference between adjacent time nodes to obtain the beam trigger time interval. First, the information of the section through which the welded component passes is retrieved, and the dual-channel synchronous monitoring logic is activated. The trigger times of the two photoelectric beams in the detection area are read. These two photoelectric beams are the first beam and the second beam, with a fixed spacing of 10 mm along the conveying direction. The trigger times of the first beam and the second beam are obtained from the first and second channels, respectively. These two time points accurately record the instants when the same feature point of the welded component passes through the two detection positions. By arranging the trigger times of the first beam and the second beam and extracting the time difference between adjacent time nodes, this time difference is the second beam trigger time minus the first beam trigger time. Based on actual data calculations, if the first beam is cut off at 2010 milliseconds and the second beam is cut off at 2030 milliseconds, the difference is 20 milliseconds after subtraction. By repeatedly acquiring data from multiple subsequent feature points, a set of time difference values describing the passing speed is obtained. These differences are then categorized according to the sections to obtain the beam trigger time interval.
[0031] The spacing recognition submodule extracts continuous trigger time nodes based on the beam trigger time spacing, determines the direction of the beam trigger time spacing according to the time arrangement, analyzes the consistency of the direction of the continuous beam trigger time spacing and identifies the corresponding segments, and obtains the trigger spacing direction sequence. First, the running direction and consistency verification process is initiated based on the beam trigger time interval. Continuous trigger time nodes are extracted, and the beam trigger time interval direction is determined according to the time sequence. If the trigger time of the first beam is earlier than that of the second beam (i.e., the time difference is greater than zero), it is determined to be a forward running direction; otherwise, it is determined to be a backward running direction. Subsequently, the consistency of the continuous beam trigger time interval direction is analyzed in depth, and corresponding segments are identified. The direction determination is checked to ensure complete uniformity across all sub-segments traversed by a workpiece. For example, in a set of interval data at 20 milliseconds, 21 milliseconds, and 19 milliseconds, if the identification results are all positive, the passage behavior is deemed valid. If a reverse direction or a large deviation occurs, such as exceeding three times the standard deviation of the mean, it is identified as abnormal interference. By logically solidifying the direction attributes of each segment, a sequence with direction vectors is generated, resulting in the trigger interval direction sequence.
[0032] The segment matching submodule reads the corresponding segment position based on the trigger spacing direction sequence, extracts the corresponding time interval of the segment, and obtains the set of segments through which the weldment passes by by matching the corresponding segment and time interval position of the trigger spacing direction sequence. First, the spatial-temporal mapping verification logic is completed using the trigger spacing direction sequence. The corresponding segment position is read, the corresponding time interval is extracted, and the matching operation between the corresponding trigger spacing direction sequence segment and the time interval position is completed. This step aims to verify whether each trigger signal accurately falls within the preset workpiece running trajectory window. If the trigger spacing direction sequence shows a positive pulse generated within the 2000 to 2600 millisecond range, and this time window exactly matches the segment passed by weldment number 01, then the signal is determined to be a valid trigger. Through this comparison of spatiotemporal consistency, all successfully matched segments with physical entities are aggregated to obtain the set of weldment passing segments.
[0033] Specifically, such as Figure 2 , 7 As shown, the weldment counting output module includes: The node extraction submodule reads the end node of a segment based on the segment set of the welded part, extracts the time position corresponding to the end node of the segment, and identifies the sequence of count trigger nodes by identifying the order of the time positions corresponding to the end nodes of the segments. First, the end node of each segment is read and its corresponding time position is extracted. To achieve accurate counting, it's necessary to identify the critical moment representing the complete passage of a workpiece across the detection line from multiple segment signals generated by the workpiece. The order of the segment end nodes' corresponding time positions is then determined. For example, if a workpiece generates six segments upon passing through, with sub-segment end time sequences of 2600 ms, 3200 ms, 3800 ms, 4400 ms, 5000 ms, and 5600 ms, the end time of the last segment (5600 ms) is extracted using logical filtering as the valid counting node for that workpiece. By applying the same extraction logic to all workpieces on the conveyor line, these discrete end times are arranged along the time axis to obtain the counting trigger node sequence.
[0034] The sequence recognition submodule extracts the time position corresponding to the trigger node based on the count trigger node sequence, identifies the order of the trigger nodes according to the time sequence, and verifies the trigger node sequence according to the time sequence to obtain the trigger node sequence sequence. First, a final logical gating check is performed on the counting trigger node sequence. The time position corresponding to the trigger node is extracted, and the order of the trigger nodes is identified based on the time sequence. Each node is checked to ensure it satisfies the unidirectional increasing characteristic, and the rationality of the trigger node sequence is verified according to the time sequence. During the verification process, the time difference between two adjacent trigger nodes is calculated. If this time difference is less than the limit time corresponding to the minimum passage distance of the workpiece (e.g., when the workpiece length is 1.8 meters, the minimum gap is 0.2 meters, and the conveying speed is 0.5 meters per second, the minimum passage period is 4000 milliseconds), then it is judged as an abnormal recount. For example, if there are two nodes in the sequence, 5600 milliseconds and 5615 milliseconds, since the interval is only 15 milliseconds, which is far less than the logical limit of 4000 milliseconds, their sequence will be identified as abnormal or signal jitter, thus retaining the valid sequence nodes. Through this rigorous timing consistency check, it is ensured that each count value corresponds to a real physical workpiece, resulting in the trigger node sequence.
[0035] The counting increment submodule extracts the corresponding sequential position of the trigger node based on the trigger node sequence, calls the current count value of the counting register, and increments it according to the sequential position of the trigger node, continuously updating the incremented count value to obtain the cumulative count of the welded parts; First, a production statistics task is performed. Nodes in the trigger node sequence are retrieved from memory, and their corresponding sequential positions are obtained. Whenever a new valid sequential node is identified, the current count value in the counter register is immediately called, and a specific incrementing logic is used. The current count register value is used as the addend, and a constant 1 is used as the summation operation. For example, if the current count register value is 5000, when the first trigger node in the sequence is identified, 5001 is obtained by incrementing by 1, and so on until the second node is identified, resulting in 5002. The count is incremented according to the trigger node's sequential position, and the incremented count value is continuously updated. The latest result is written to non-volatile memory in real time to obtain the cumulative number of welded parts.
[0036] Please see Figure 8 The weldment-based counting method is executed based on the aforementioned weldment-based counting system and includes the following steps: S1: Obtain the trigger signals of the welding part conveying track, welding fixture tray, and photoelectric beam switch; detect the time when the welding part enters the beam area and read the start time of the occlusion; detect the time when the welding part leaves the beam area and read the end time of the occlusion; determine the chronological relationship between the start time and the end time of the occlusion; and obtain the welding part occlusion event sequence. S2: Based on the sequence of welding part occlusion events, read the start time and end time of adjacent occlusion, identify the time interval of adjacent occlusion behaviors, compare the time intervals and select the occlusion behaviors of continuous conveying state to obtain the set of welding part occlusion trajectories; S3: Based on the set of welding part occlusion trajectories, read the start time and end time of continuous occlusion, identify the start position and end position of occlusion, divide the continuous occlusion behavior into segments, identify the time sequence and segment number of the segments, and obtain the information of the welding part passing through the segment. S4: Based on the information of the welded parts passing through the section, read the trigger time of the two photoelectric through-beam switches, identify the interval between the trigger time of the first beam and the trigger time of the second beam, compare the direction of change of the interval between the continuous trigger times and select the section with the same direction to obtain the set of welded parts passing through the section; S5: Based on the welded parts through the segment set, read the segment end node, identify the counting trigger node and execute the counting register increment process to obtain the cumulative count of the welded parts.
[0037] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A counting system based on welded parts, characterized in that, The system includes: The welding part occlusion event recognition module reads the welding part conveyor track status signal, welding fixture pallet status signal, and photoelectric beam switch trigger signal, identifies the time when the welding part enters and leaves the beam area, determines the sequence of occlusion start time and occlusion end time, and obtains the welding part occlusion event sequence. The occlusion event trajectory recognition module reads the occlusion start time and occlusion end time based on the welding part occlusion event sequence, identifies the time interval between adjacent occlusion behaviors, compares the time interval between the current occlusion start time and the previous occlusion end time corresponding to the adjacent occlusion behavior with the occlusion behavior time interval segment corresponding to the continuous conveying state interval of the welding part on the conveying line, selects the occlusion behaviors that occur continuously in time order within the continuous conveying state interval, and obtains the welding part occlusion trajectory set. The welded component passes through the section recognition module based on the welded component occlusion trajectory set, reads the trajectory start time and end time, determines the time sequence and divides the occlusion section, and obtains the welded component passage section information; The repeated occlusion recognition module receives two photoelectric beams of photoelectric switch trigger signals within the detection area, and combines them with the information of the welded part through the segment to read the corresponding trigger time, identify the interval between the trigger times of the two beams of light, compare the direction of change of continuous trigger time, and obtain the set of segments through which the welded part passes. The weldment counting output module reads the end node of the segment and identifies the counting trigger node based on the weldment passing through the segment set, increments the count value of the counting register, and obtains the cumulative count of the weldment. The sequence of welding component occlusion events includes an occlusion event number, occlusion duration, occlusion timestamp identifier, occlusion intensity identifier, and occlusion event status marker. The set of welding component occlusion trajectories includes a trajectory number, trajectory duration period, trajectory time span, trajectory continuity identifier, and trajectory segment quantity identifier. The information on the welding component passing through a segment includes a segment number, segment time range, segment duration, segment sequence identifier, and segment boundary identifier. The set of welding component passing through segments includes a segment matching identifier, segment association number, segment change trend identifier, segment trigger type identifier, and segment identifier. The cumulative count of welding components includes a cumulative count value, count update time identifier, count trigger sequence number, count cycle identifier, and count status identifier.
2. The counting system based on welded parts according to claim 1, characterized in that, The continuous blocking behavior refers to a set of blocking actions that occur consecutively in chronological order during the continuous conveying of welded parts, where the time interval between adjacent blocking events is within the normal conveying cycle. The start and end times of the trajectory refer to the time when the welded component begins to block the light beam and the time when it leaves the beam area in a single occlusion trajectory.
3. The counting system based on welded parts according to claim 1, characterized in that, The segment end node refers to the node time that represents the end of the segment time in the divided passing segment; The counting trigger node refers to the time node that selects the welded part from the end node of the section, represents the welded part passing through the detection area, and triggers the counter to increment.
4. The counting system based on welded parts according to claim 1, characterized in that, The weldment obstruction event recognition module includes: The signal acquisition submodule reads the welding part conveying track, welding fixture tray, and photoelectric beam switch trigger signals on the conveyor line, acquires the photoelectric beam switch trigger signals and monitors the beam area occlusion status, and records the beam entry time and beam exit time according to the beam occlusion duration interval to obtain the occlusion time sequence. The timing determination submodule extracts the time when the beam enters the node and the time when the beam leaves the node based on the occlusion time sequence, compares the order of the entry time and the exit time, identifies the time difference and tracks the interval where the entry time is earlier than the exit time to obtain the duration of occlusion. Based on the duration of the occlusion, the event generation submodule reads the corresponding entry and exit times of the node, identifies the sequence of consecutive occlusion start and end times, retains the beam blocking state interval, and arranges the events in ascending order of time to obtain the welding part occlusion event sequence.
5. The counting system based on welded parts according to claim 1, characterized in that, The occlusion event trajectory recognition module includes: The time extraction submodule reads the start time and end time of the occlusion behavior based on the sequence of occlusion events of the welded parts, extracts the start time and end time of the preceding occlusion behavior of adjacent occlusion behaviors, and obtains the time interval of the occlusion behavior. The interval recognition submodule reads the start and end times of occlusion corresponding to adjacent occlusion behaviors based on the time interval of the occlusion behavior, and combines the continuous conveying state interval of the welded parts on the conveyor line with the time interval of the occlusion behavior to select the occlusion behavior corresponding to the continuous conveying state interval to obtain the continuous occlusion sequence identifier. Based on the continuous occlusion sequence identifier, the trajectory generation submodule reads the corresponding occlusion start time and occlusion end time, connects them in chronological order, and combines the continuous occlusion behavior segments to obtain the welding part occlusion trajectory set.
6. The counting system based on welded parts according to claim 1, characterized in that, The welded component is identified by the segment recognition module, which includes: The trajectory reading submodule reads the start and end times of each occlusion trajectory based on the set of welded component occlusion trajectories, arranges the start and end times of the occlusion trajectories, and obtains the trajectory time interval. Based on the trajectory time interval, the boundary determination submodule extracts the corresponding start and end times of the trajectory, identifies the boundary of the trajectory time interval according to the time arrangement order, locates the trajectory start position and trajectory end position and divides continuous time segments to obtain the occlusion segment sequence. Based on the sequence of obstructed segments, the segment coding submodule extracts the start and end times corresponding to the segments, numbers the segments according to the time order, and obtains the segment information of the welded part.
7. The counting system based on welded parts according to claim 1, characterized in that, The repeated occlusion recognition module includes: Based on the section information of the welded part, the trigger acquisition submodule reads the trigger time of the two photoelectric beam switches in the detection area, obtains the trigger time of the first beam and the trigger time of the second beam, arranges the trigger time of the first beam and the trigger time of the second beam and extracts the time difference between adjacent time nodes to obtain the beam trigger time interval. The spacing recognition submodule extracts continuous trigger time nodes based on the beam trigger time spacing, determines the direction of the beam trigger time spacing according to the time arrangement, analyzes the consistency of the direction of the continuous beam trigger time spacing and identifies the corresponding segments, and obtains the trigger spacing direction sequence. Based on the trigger spacing direction sequence, the segment matching submodule reads the corresponding segment position, extracts the corresponding time interval of the segment, and obtains the segment and time interval position corresponding to the trigger spacing direction sequence to obtain the set of welded parts passing through the segment.
8. The counting system based on welded parts according to claim 1, characterized in that, The weldment counting output module includes: The node extraction submodule reads the end node of the segment based on the segment set of the welded part, extracts the time position corresponding to the end node of the segment, and identifies the sequence of counting trigger nodes by identifying the order of the time positions corresponding to the end nodes of the segment. The sequence recognition submodule extracts the time position corresponding to the trigger node based on the count trigger node sequence, identifies the order of the trigger nodes according to the time sequence, and verifies the trigger node sequence according to the time sequence to obtain the trigger node sequence sequence. The counting increment submodule extracts the corresponding sequential position of the trigger node based on the sequence of trigger nodes, calls the current count value of the counting register, and increments it according to the sequential position of the trigger node, continuously updating the incremented count value to obtain the cumulative count of welded parts.
9. A counting method based on welded parts, characterized in that, The counting system based on welded parts according to any one of claims 1-8 is executed by comprising the following steps: S1: Obtain the trigger signals of the welding part conveying track, welding fixture tray, and photoelectric beam switch; detect the time when the welding part enters the beam area and read the start time of the occlusion; detect the time when the welding part leaves the beam area and read the end time of the occlusion; determine the chronological relationship between the start time and the end time of the occlusion; and obtain the welding part occlusion event sequence. S2: Based on the sequence of events that block the welded parts, read the start time and end time of adjacent blocks, identify the time interval between adjacent blocks, compare the time intervals and select the blocks in the continuous conveying state to obtain the set of blocks of the welded parts. S3: Based on the set of welding component occlusion trajectories, read the start time and end time of continuous occlusion, identify the start position and end position of occlusion, divide the continuous occlusion behavior into segments, and identify the time sequence and segment number of the segments to obtain the information of the welding component passing through the segments. S4: Based on the information of the welded part passing through the section, read the trigger time of the two photoelectric beam switches, identify the interval between the trigger time of the first beam and the trigger time of the second beam, compare the direction of change of the interval between the continuous trigger times and select the section with the same direction to obtain the set of welded part passing through the section; S5: Based on the welded parts through the segment set, read the segment end node, identify the counting trigger node and execute the counting register increment process to obtain the cumulative count of the welded parts.