Channel matching method based on industrial visual control system
By automating the establishment of the matching relationship between the trigger channel and the industrial camera in the industrial vision control system, the inefficiency and error-proneness caused by manual cable marking in the existing technology are solved, realizing efficient and accurate system deployment and real-time diagnosis, and enhancing the system's flexibility and scalability.
Patent Information
- Application Number
- CN202511685408.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-17
- Publication Date
- 2026-02-13
AI Technical Summary
In existing industrial vision control systems, the methods of manually marking cables and configuring software result in low efficiency and error-prone matching between trigger channels and industrial cameras, making it impossible to achieve automated matching, and the system lacks scalability and diagnostic capabilities.
By using an industrial host to automatically establish a matching relationship between the trigger channel and the industrial camera based on the matching priority sequence of the trigger controller, and by using trigger commands and feedback data in different matching modes, automated matching and real-time diagnosis can be achieved.
It improves system deployment efficiency and accuracy, reduces human error, enhances system flexibility and scalability, and provides high-precision link stability diagnostics.
Smart Images

Figure CN121531243A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of industrial vision, and particularly relates to a channel matching method based on an industrial vision control system. BACKGROUND
[0002] In the industrial vision control system, an engineer needs to manually connect each physical output port of a trigger controller to a specified trigger input port of an industrial camera through a cable to establish a corresponding trigger channel between the trigger controller A and each industrial camera, and a static physical identifier needs to be manually added to the cable between each physical output port and the corresponding industrial camera. The data output port of the industrial camera is also connected to a specified port of a network switch through a network cable, so that the industrial camera can realize data interaction with an industrial host PC through the network switch.
[0003] In the industrial vision control system provided by the prior art, in order to establish the mapping relationship between each trigger channel built by the engineer and the corresponding industrial camera, the engineer must manually enter the physical correspondence relationship between each trigger channel and the corresponding industrial camera in the system software configuration built on the industrial host. This process seriously depends on the static physical label identification and manual software configuration of the cable between the trigger controller and the industrial camera.
[0004] In the matching mode provided by the prior art, when the industrial vision control system includes dozens or even hundreds of industrial cameras and corresponding trigger channels, the process of manually identifying the cable and connecting and matching the software configuration between the trigger controller and the industrial camera will bring a huge workload, and it is easy to make matching information entry errors, which will cause the industrial vision control system to fail to work normally. SUMMARY
[0005] Therefore, the present application aims to at least provide a channel matching method based on an industrial vision control system, which greatly improves the system deployment efficiency and accuracy by providing automatic matching between the industrial camera and the trigger channel, and reduces human errors.
[0006] The present application mainly includes the following aspects: In a first aspect, the embodiments of the present application provide a channel matching method based on an industrial vision control system. The industrial vision control system comprises an industrial host, a plurality of trigger controllers, and at least one industrial camera corresponding to each trigger controller. The industrial host is connected to the plurality of industrial cameras, and a one-to-one trigger channel is formed between each trigger controller and its corresponding industrial camera. The method comprises: the industrial host sequentially starting channel matching for each trigger controller based on a matching priority sequence between the trigger controllers. In the channel matching process of each trigger controller, the matching process for each trigger channel under the trigger controller is sequentially started. In the matching process of each trigger channel, a trigger instruction corresponding to the corresponding trigger channel and the current matching mode is issued to the trigger controller. The trigger controller sends a trigger pulse signal through the trigger channel indicated by the trigger instruction in response to the received trigger instruction. The industrial camera performs exposure in response to the received trigger pulse signal, generates camera feedback data corresponding to the current matching mode, and sends the camera feedback data to the industrial host. The industrial host establishes a matching relationship between the corresponding trigger channel and the corresponding industrial camera in the matching process of each trigger channel according to the camera feedback data received in the matching process and the matching relationship building mode corresponding to the current matching mode.
[0007] In a possible implementation, the industrial host further performs: in response to a power-on start signal, initializing all trigger controllers and all industrial cameras. The initialization at least includes: for each industrial camera, reading a corresponding camera frame rate and an exposure response time from the industrial camera. The exposure response time describes a delay time from receiving a trigger pulse signal to starting exposure of the industrial camera. For each trigger controller, reading a corresponding instruction response time from the trigger controller. The instruction response time describes a delay time from receiving a trigger instruction issued by the industrial host to sending a trigger pulse signal by the trigger controller.
[0008] In a possible implementation, the industrial host determines the matching priority sequence by: sorting the plurality of trigger controllers according to the instruction response time corresponding to each trigger controller to obtain the matching priority sequence. The shorter the instruction response time corresponding to the trigger controller, the higher the matching priority corresponding to the trigger controller.
[0009] In a possible implementation, the method further comprises: the industrial host, if the current matching mode is a frame rate matching mode, issuing a first trigger instruction corresponding to each trigger channel to the trigger controller in the matching process of the trigger channel; the trigger controller, in response to the received first trigger instruction, sending a first trigger pulse signal through the trigger channel indicated by the first trigger instruction; the industrial camera, in response to the received first trigger pulse signal, performing exposure, encapsulating the obtained image data and the identity of the industrial camera into first camera feedback data, and sending the first camera feedback data to the industrial host; and the industrial host, in the trigger channel matching process in the frame rate matching mode, determining a limited response time according to the camera frame rate corresponding to each industrial camera that has not completed matching, and establishing a matching relationship between the trigger channel and the corresponding industrial camera based on the first camera feedback data received within the limited response time.
[0010] In a possible implementation, the industrial host determines the limited response time by: determining the minimum camera frame rate corresponding to each industrial camera that has not completed matching; and taking the reciprocal of the minimum camera frame rate as the limited response time corresponding to the current trigger channel matching process.
[0011] In a possible implementation, the industrial host establishes the matching relationship between each trigger channel and the industrial camera by: determining, from the time when the first trigger instruction corresponding to the trigger channel is issued, whether the first camera feedback data is received within the limited response time corresponding to the trigger channel; if the first camera feedback data is received, parsing the first camera feedback data to obtain the identity of the industrial camera; establishing a matching relationship between the industrial camera indicated by the identity of the industrial camera and the trigger channel; marking the matching state of the industrial camera indicated by the identity of the industrial camera as completed matching, and continuing to perform the matching process of the next trigger channel of the trigger controller; and if the first camera feedback data is not received, determining that the trigger channel is not connected to the industrial camera, and continuing to perform the matching process of the next trigger channel of the trigger controller.
[0012] In a possible implementation, the camera feedback data further comprises an exposure start time recorded by the industrial camera, and the industrial camera further performs: reading, in the channel matching process of the trigger channel, an actual departure time of the trigger pulse signal corresponding to the trigger channel from the trigger controller to which the trigger channel belongs, and a corresponding camera feedback data receiving time; for each trigger channel that successfully completes matching, forming a timestamp triple corresponding to the trigger channel from the actual departure time of the trigger pulse signal corresponding to the trigger channel, the exposure start time, and the camera feedback data receiving time; and for each trigger channel that successfully completes matching, verifying the link stability of the trigger channel according to the corresponding timestamp triple.
[0013] In a possible implementation, the industrial camera verifies the link stability of each trigger channel by: calculating a first time difference between the exposure start time and the actual departure time of the trigger pulse signal according to the timestamp triple corresponding to the trigger channel; calculating a second time difference between the camera feedback data reception time and the exposure start time; comparing the first time difference with a first preset time threshold, if the first time difference is less than the first preset time threshold, determining that the trigger channel is stable, if the first time difference is greater than or equal to the first preset time threshold, determining that the trigger channel is unstable; comparing the second time difference with a second preset time threshold, if the second time difference is less than the second preset time threshold, determining that the link between the industrial camera corresponding to the trigger channel and the industrial host is stable, if the second time difference is greater than or equal to the second preset time threshold, determining that the link between the industrial camera corresponding to the trigger channel and the industrial host is unstable.
[0014] In a possible implementation, the method further comprises: the industrial host, if it is determined that the current matching mode is the hardware identifier matching mode, issuing a second trigger instruction corresponding to each trigger channel to the trigger controller in the matching process of the trigger channel, the second trigger instruction carrying a trigger channel identity; the trigger controller, in response to the received second trigger instruction, generating a first trigger pulse signal, and superimposing a digital code corresponding to the trigger channel identity on the first trigger pulse signal to obtain a second trigger pulse signal, and issuing the second trigger pulse signal through the trigger channel corresponding to the trigger channel identity; the industrial camera, in response to the second trigger pulse signal, performing exposure, and assembling the image data obtained by exposure, the industrial camera identity and the trigger channel identity in the target trigger pulse signal into corresponding second camera feedback data and sending the second camera feedback data to the industrial host; the industrial host further performs: directly establishing a matching relationship between the industrial camera indicated by the industrial camera identity and the trigger channel indicated by the trigger channel identity according to the industrial camera identity and the trigger channel identity indicated by the received second camera feedback data.
[0015] In one possible implementation, the method further includes: an industrial host, which, if the current matching mode is determined to be a relative time matching mode, sends a third trigger instruction corresponding to the trigger channel to the trigger controller during the matching process of each trigger channel. The third trigger instruction carries a specific trigger mode corresponding to the trigger channel. The trigger controller controls the trigger channel to emit a corresponding third trigger pulse signal according to the specific trigger mode indicated by the third trigger instruction. An industrial camera parses the received third trigger pulse signal and simultaneously performs exposure, assembling the exposed image data, the parsed specific trigger mode, and the industrial camera identification into corresponding third camera feedback data and sending it to the industrial host. The industrial host also performs the following: directly establishing a matching relationship between the trigger channel indicated by the specific trigger mode in the third camera feedback data and the industrial camera indicated by the industrial camera identification.
[0016] This application provides a channel matching method based on an industrial vision control system, comprising: an industrial host, which sequentially initiates channel matching for each trigger controller based on a matching priority sequence among trigger controllers, and sequentially initiates the matching process for each trigger channel under each trigger controller. During the matching process of each trigger channel, a trigger command corresponding to the current matching mode for the corresponding trigger channel is issued to the trigger controller; the trigger controller, in response to the received trigger command, emits a trigger pulse signal through the trigger channel indicated by the trigger command; an industrial camera, in response to the received trigger pulse signal, performs exposure, generates camera feedback data corresponding to the current matching mode, and sends it to the industrial host; the industrial host, based on the camera feedback data received during the matching process and the matching relationship construction method corresponding to the current matching mode, establishes a matching relationship between the corresponding trigger channel and the corresponding industrial camera in the matching process. By providing automated matching between the industrial camera and the trigger channel, the system deployment efficiency and accuracy are greatly improved, and human error is reduced.
[0017] The advantages of this application are: 1. Achieving automated and intelligent matching: The channel matching method provided in this application completes the automated matching between the industrial camera and the trigger channel corresponding to the trigger controller in different matching modes through the connection relationship between industrial vision control systems. This completely eliminates the traditional method of relying on manual identification of physical line sequence. After the system is powered on, it can automatically complete the mapping of the matching relationship between the trigger controller (corresponding trigger channel) and the industrial camera, which greatly improves the system deployment efficiency and accuracy and reduces human error.
[0018] 2. Built-in high-precision diagnostic function: The channel matching method provided in this application also provides a real-time system health monitoring solution. Specifically, by recording the corresponding timestamp triplet during the matching process between the trigger channel and the industrial camera, and by analyzing the timestamp triplet, the performance and stability of the entire link from the trigger pulse signal sent by the trigger controller to the camera feedback data being received by the control host can be evaluated in real time, and potential faults such as response delay and signal loss can be detected in a timely manner. This is a capability that traditional methods do not have at all.
[0019] 3. Enhanced system flexibility and scalability: Since the matching relationship is dynamically determined by software algorithms rather than hard-coded on physical cables, when the system needs to be expanded (adding cameras) or maintained (replacing cameras / controllers), simply connect the cables and the system can automatically re-identify and match, significantly reducing the complexity of operation and maintenance.
[0020] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 This illustration shows a connection method diagram of an industrial vision control system provided in an embodiment of this application; Figure 2 The diagram illustrates the interactive flowchart of a channel matching method based on an industrial vision control system provided in an embodiment of this application. Figure 3 A flowchart of a channel matching method in frame rate matching mode provided in an embodiment of this application is shown; Figure 4 A flowchart of a channel matching method in hardware identifier mode provided in an embodiment of this application is shown; Figure 5 A flowchart of a channel matching method in a relative time mode provided by an embodiment of this application is shown. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0024] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0025] Please see Figure 1 , Figure 1 This diagram illustrates a connection method for an industrial vision control system provided in an embodiment of this application. Figure 1 As shown, the industrial vision control system provided in this application includes multiple trigger controllers A1, A2...Am, multiple industrial cameras B1, B2...Bn, and an industrial host PC. The trigger controller A is equipped with multiple physical output ports. In the industrial vision control system, engineers need to manually connect each physical output port of the trigger controller A to the trigger input port of the designated industrial camera through a cable to establish a corresponding trigger channel between the trigger controller A and each industrial camera. The cables between each physical output port and the corresponding industrial camera must be manually marked with corresponding static physical identifiers. The data output ports of the industrial cameras are also connected to one of the designated ports of the network switch through network cables so that the industrial cameras can achieve data interaction with the industrial host PC through the network switch.
[0026] In existing industrial vision control systems, to establish the mapping relationship between each trigger channel and its corresponding industrial camera, engineers must manually input the physical correspondence between each trigger channel and its corresponding industrial camera into the system software configuration on the industrial host (e.g., trigger channel 1 of trigger controller A triggers industrial camera B1). This process heavily relies on manual static physical labeling of the cables between the trigger controller and the industrial camera and manual software configuration. This matching method has at least the following drawbacks: 1. Low deployment efficiency and prone to errors: When an industrial vision control system contains dozens or even hundreds of industrial cameras and corresponding trigger channels, the process of manually marking cables and connecting the trigger controller and the industrial camera, as well as configuring and matching the software, will result in a huge workload. It is very easy to make mistakes in the input of matching information, which will cause the industrial vision control system to malfunction.
[0027] 2. Inability to automate matching: The entire matching process between the trigger channel and the industrial camera relies entirely on manual labor. It is impossible to achieve automatic identification and matching between the trigger controller and the industrial camera after the system is powered on, resulting in a low level of intelligence.
[0028] 3. Poor maintenance and scalability: When it is necessary to replace, add or remove industrial cameras, it is necessary to carry out tedious cable inspection, relabeling and configuration updates again, which greatly limits the system's flexibility and scalability.
[0029] 4. Lack of status diagnosis capability: Traditional methods only focus on whether the trigger channel is connected, and cannot perform high-precision monitoring and diagnosis of the real-time health status (such as response delay and signal loss) of the complete link of "trigger controller-cable (trigger channel)-industrial camera", making it difficult to locate the problem when the industrial vision control system has intermittent faults.
[0030] Based on this, this application provides a channel matching method based on an industrial vision control system. By providing automated matching between industrial cameras and trigger channels, it greatly improves system deployment efficiency and accuracy, and reduces human error, as detailed below: Please see Figure 2 , Figure 2 This document illustrates an interactive flowchart of a channel matching method based on an industrial vision control system provided in an embodiment of this application. Figure 1 As shown, the method provided in this application embodiment is applied to Figure 1 The industrial vision control system shown specifically includes the following steps: Industrial PC execution: S100. Based on the matching priority sequence between trigger controllers, the channel matching process for each trigger controller is started sequentially.
[0031] S101. During the channel matching process of each trigger controller, the matching process for each trigger channel under the trigger controller is started sequentially.
[0032] S102. During the matching process of each trigger channel, a trigger command corresponding to the current matching mode for the corresponding trigger channel is sent to the trigger controller.
[0033] For each trigger controller, execute: S200: In response to the received trigger command, a trigger pulse signal is emitted through the trigger channel indicated by the trigger command.
[0034] For each industrial camera, perform: S300: In response to the received trigger pulse signal, performs exposure and generates camera feedback data corresponding to the current matching mode.
[0035] S301, Sends camera feedback data to the industrial host.
[0036] Industrial host PCs also perform: S103. During the matching process of each trigger channel, based on the camera feedback data received during the matching process and the matching relationship building method corresponding to the current matching mode, establish the matching relationship between the corresponding trigger channel and the corresponding industrial camera.
[0037] In the channel matching method provided in this application, the entire matching process between the trigger channel and the industrial camera is automated only through the connection relationship and interactive data between the industrial host PC, the trigger controller and the industrial camera. This avoids the tedious manual process of entering the matching relationship and eliminates the need to add static physical markers to the cables between the trigger controller and the industrial camera. This simplifies the entire channel matching process, improves channel matching efficiency, and increases matching accuracy.
[0038] In step S100, the matching priority sequence indicates the order in which each trigger controller performs trigger channel matching. In a preferred embodiment, the industrial host PC determines the matching priority sequence in the following manner: Multiple trigger controllers are sorted according to the instruction response time of each trigger controller to obtain a matching priority sequence. The shorter the instruction response time of the trigger controller, the higher its matching priority.
[0039] Preferably, the instruction response time describes the delay time from when the trigger controller receives the trigger instruction from the industrial host PC to when it sends out the trigger pulse signal. Different trigger controllers have different instruction response times. This application sorts the trigger controllers from fastest to slowest based on their instruction response times, generates a corresponding matching priority sequence, and then sequentially starts the channel matching process for each trigger controller according to the matching priority sequence. Specifically, after completing the channel matching for the current trigger controller, the channel matching process for the next trigger controller is started according to the matching priority sequence.
[0040] In one specific embodiment, the command response time is obtained during the power-on initialization process of the industrial vision control system. In another preferred embodiment, before the industrial host PC executes step S100, in response to the power-on start signal, all trigger controllers and all industrial cameras are initialized. The specific initialization process includes at least the following: For each industrial camera, the corresponding camera frame rate and exposure response time are read from that industrial camera. The exposure response time describes the delay time from when the industrial camera receives the trigger pulse signal to when exposure begins. For each trigger controller, the corresponding instruction response time is read from that trigger controller.
[0041] In a preferred embodiment, in step S101, each trigger controller is connected to at least one industrial camera. Therefore, for each trigger controller, during the channel matching process, the matching process between the multiple trigger channels corresponding to the trigger controller and the industrial camera is completed sequentially. After the matching of the current trigger channel is completed, the matching process for the next trigger channel is started until the matching between all trigger channels of the trigger controller and the corresponding industrial camera is completed. Then, the matching process for the trigger controller is stopped, and the matching of the next trigger controller is performed according to the matching priority sequence.
[0042] In step S102, before executing step S100, the industrial host provided in this application first obtains the matching mode selection instruction issued by the user. Based on the connection of the industrial vision control system, this application provides different matching modes for the user to choose from. The user can select the corresponding target matching mode according to actual needs and inform the industrial host PC in the form of a matching mode selection instruction. The matching mode selection instruction can be generated through the matching mode selection interface provided by the industrial host PC. Under different matching modes, the trigger instruction issued by the industrial host PC to the trigger controller is also different during the matching process of each trigger channel.
[0043] In one specific embodiment, the matching modes provided by this application include frame rate matching mode, hardware identifier matching mode, and relative time matching mode.
[0044] In a preferred embodiment, please refer to Figure 3 , Figure 3 A flowchart illustrating a channel matching method in frame rate matching mode provided by an embodiment of this application is shown. Figure 3 As shown, in frame rate matching mode, steps S102 to S300 provided in this application include: When the S400 industrial host determines that the current matching mode is the frame rate matching mode, it sends the first trigger command corresponding to the trigger channel to the trigger controller during the matching process of each trigger channel.
[0045] The first trigger instruction carries the identifier of the trigger channel currently being matched.
[0046] S401. In response to the received first trigger command, the trigger controller sends out a corresponding first trigger pulse signal through the trigger channel indicated by the trigger channel identifier carried in the first trigger command.
[0047] S402, the industrial camera responds to the received first trigger pulse signal and performs an exposure action.
[0048] S403: The industrial camera encapsulates the exposed image data and the industrial camera identification into first camera feedback data and sends it to the industrial host.
[0049] Specifically, the identification identifier for an industrial camera here can be its factory serial number.
[0050] S404. In frame rate matching mode, the industrial host determines the limited response time corresponding to the current trigger channel matching process based on the camera frame rate of each industrial camera that has not completed matching.
[0051] S405: The industrial host establishes a matching relationship between the trigger channel and the corresponding industrial camera based on the first camera feedback data received within the limited response time.
[0052] In one specific embodiment, in steps S400 to S405, since the trigger channel and the industrial camera of this application have a one-to-one connection relationship, that is, one trigger channel is connected to one corresponding industrial camera through a cable, after the industrial host sends a first trigger command to the trigger controller for one of its corresponding trigger channels, if there is an industrial camera connected to the trigger channel, the first trigger pulse signal issued by the trigger controller through the trigger channel under the first trigger command will be transmitted to the corresponding industrial camera. The industrial camera receiving the first trigger pulse signal will perform an exposure action and generate corresponding first camera feedback data to feed back to the industrial host. In this way, after the industrial host sends a first trigger command for the currently matched trigger channel, if it receives the first camera feedback data within the limited response time, it can directly establish a matching relationship between the currently matched trigger channel and the industrial camera corresponding to the first camera feedback data.
[0053] In a preferred embodiment, the industrial host determines the response time limit in the following manner: Determine the minimum camera frame rate for each industrial camera that has not completed matching, and use the reciprocal of the minimum camera frame rate as the limit response time for the current trigger channel matching process.
[0054] In one specific embodiment, the specific value of the corresponding limit response time during each trigger channel matching process depends on the industrial camera that has not yet completed matching. Specifically, the industrial host has already obtained the camera frame rate corresponding to each industrial camera during system initialization. During each trigger channel matching process, the matching status corresponding to each industrial camera is read. The matching status includes completed matching and incomplete matching. The minimum camera frame rate corresponding to each industrial camera that has not completed matching is determined. Based on the determined minimum camera frame rate, the limit response time corresponding to the current trigger channel matching process is further determined.
[0055] In another preferred embodiment, after determining the limited response time corresponding to the current trigger channel matching process, step S405 further includes: The industrial host executes the following steps: Starting from the moment the first trigger command corresponding to the trigger channel is issued, it determines whether feedback data from the first camera is received within the corresponding limited response time. If feedback data from the first camera is received, it parses the feedback data to obtain the industrial camera's identity identifier, establishes a matching relationship between the industrial camera indicated by the parsed industrial camera identity identifier and the currently matched trigger channel, marks the matching status of the industrial camera indicated by the industrial camera identity identifier as completed, ends the matching process of the currently matched trigger channel, and continues to execute the matching process for the next trigger channel of the trigger controller. If no feedback data from the first camera is received, it determines that the currently matched trigger channel is not connected to an industrial camera, adds a floating mark to the currently matched trigger channel, ends the matching process of the currently matched trigger channel, and starts the matching process for the next trigger channel of the trigger controller.
[0056] In a preferred embodiment, please refer to Figure 4 , Figure 4 A flowchart illustrating a channel matching method in frame rate matching mode provided by an embodiment of this application is shown. Figure 4 As shown, in the hardware identifier matching mode, steps S102 to S300 provided in this application include: If the S500 or industrial host determines that the current matching mode is the hardware identifier matching mode, it will send the second trigger command corresponding to the trigger channel to the trigger controller during the matching process of each trigger channel.
[0057] Preferably, the second triggering instruction carries the triggering channel identification identifier.
[0058] S501, The trigger controller responds to the received second trigger command and generates a first trigger pulse signal.
[0059] S502, The trigger controller superimposes the digital code corresponding to the trigger channel identification onto the second trigger pulse signal to obtain the second trigger pulse signal.
[0060] S503, The trigger controller sends out the second trigger pulse signal through the trigger channel corresponding to the trigger channel identification.
[0061] S504: The industrial camera responds to the second trigger pulse signal, performs an exposure action, and analyzes the second trigger pulse signal to obtain the trigger channel identification.
[0062] S505: Assemble the exposed image data, industrial camera identification, and trigger channel identification in the second trigger pulse signal into corresponding second camera feedback data and send it to the industrial host.
[0063] S506. The industrial host directly establishes a matching relationship between the industrial camera indicated by the industrial camera identity identifier and the trigger channel indicated by the trigger channel identity identifier based on the industrial camera identity identifier and the trigger channel identity identifier indicated by the trigger channel identity identifier, as indicated by the received feedback data from the second camera.
[0064] In practice, when the current matching mode is hardware identifier matching mode, a corresponding trigger channel identity identifier should be pre-assigned to each trigger channel corresponding to the trigger controller and synchronized to the corresponding trigger controller.
[0065] In hardware identifier matching mode, manual labor can be freed up to automate the matching process between the trigger channel and the industrial camera. In hardware identifier matching mode, the trigger controller needs to support the encoding function of the trigger pulse signal, and the industrial camera needs to support the decoding function of the trigger pulse signal.
[0066] In a preferred embodiment, please refer to Figure 5 , Figure 5 A flowchart illustrating a channel matching method in a hardware identifier matching mode provided in an embodiment of this application is shown. Figure 5 As shown, in the relative time matching mode, steps S102 to S300 provided in this application include: If the S600 or industrial host determines that the current matching mode is relative time matching mode, it will send the third trigger command corresponding to the trigger channel to the trigger controller during the matching process of each trigger channel.
[0067] Preferably, the third trigger instruction carries a specific trigger mode corresponding to the trigger channel.
[0068] S601, The trigger controller controls the trigger channel to send out the corresponding third trigger pulse signal according to the specific trigger mode indicated by the third trigger instruction.
[0069] A specific trigger mode refers to the trigger controller controlling the trigger channel to send out a corresponding third trigger signal according to a specific rhythm. For example, the third trigger pulse signal can be a combination of two short pulses and one long pulse.
[0070] S602: The industrial camera analyzes the received third trigger pulse signal to obtain a specific trigger mode and simultaneously performs exposure, and then displays the resulting image data.
[0071] S603: The industrial camera assembles the exposed image data, the parsed specific triggering mode, and the industrial camera identification into corresponding third camera feedback data and sends it to the industrial host. S604. The industrial host directly establishes a matching relationship between the trigger channel indicated by the specific trigger mode in the feedback data of the third camera and the industrial camera indicated by the industrial camera identification. In a preferred embodiment, the camera feedback data further includes the exposure start time t2 recorded by the industrial camera. In the method provided in this application, the industrial camera also performs: During the channel matching process of the trigger channel, the actual departure time t1 of the trigger pulse signal corresponding to the trigger channel and the corresponding camera feedback data reception time t3 are read from the trigger controller to which the trigger channel belongs. For each trigger channel that successfully completes the matching, the actual departure time t1 of the trigger pulse signal, the exposure start time t2, and the camera feedback data reception time t3 of the trigger channel are used to form the timestamp triplet (t1, t2, t3) corresponding to the trigger channel. For each trigger channel that successfully completes the matching, the link stability of the trigger channel is verified according to the corresponding timestamp triplet.
[0072] In the specific embodiments provided in this application, for the acquisition of the actual departure time t1, the control host can directly access the output port of the trigger channel corresponding to the trigger controller for direct acquisition. Alternatively, during the matching process of the trigger channel, the trigger command issuance time t4 can be recorded. Then, based on the trigger command issuance time t4, the command response time of the corresponding trigger controller can be accumulated to obtain the actual departure time t1 corresponding to the trigger pulse signal.
[0073] Similarly, the exposure start time t2 can be obtained by directly recording it through the industrial camera, or by recording the time t5 when the industrial camera receives the trigger pulse signal through the control host, and then adding the corresponding exposure response time of the industrial camera to obtain the exposure start time t2.
[0074] In one specific embodiment, the industrial camera verifies the link stability of each trigger channel in the following manner: Based on the timestamp triplet corresponding to the trigger channel, calculate the first time difference between the exposure start time and the actual departure time of the trigger pulse signal, and calculate the second time difference between the camera feedback data reception time and the exposure start time.
[0075] The first time difference is compared with the first preset time threshold. If the first time difference is less than the first preset time threshold, the stability of the trigger channel is determined to be qualified. If the first time difference is greater than or equal to the first preset time threshold, the stability of the trigger channel is determined to be unqualified.
[0076] The second time difference is compared with the second preset time threshold. If the second time difference is less than the second preset time threshold, the stability of the link between the industrial camera and the industrial host corresponding to the trigger channel is determined to be qualified. If the second time difference is greater than or equal to the second preset time threshold, the stability of the link between the industrial camera and the industrial host corresponding to the trigger channel is determined to be unqualified.
[0077] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed system and method can be implemented in other ways. The system embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some communication interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0078] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0079] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0080] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A channel matching method based on an industrial vision control system, wherein the industrial vision control system includes an industrial host, multiple trigger controllers, and at least one industrial camera corresponding to each trigger controller, the industrial host is connected to the multiple industrial cameras, and a one-to-one trigger channel is formed between the trigger controller and its corresponding industrial camera, characterized in that, The method includes: The industrial host, based on the matching priority sequence between trigger controllers, sequentially initiates channel matching for each trigger controller. During the channel matching process of each trigger controller, it sequentially initiates the matching process for each trigger channel under the trigger controller. During the matching process of each trigger channel, it issues a trigger command corresponding to the current matching mode for the corresponding trigger channel to the trigger controller. The trigger controller, in response to a received trigger command, sends a trigger pulse signal through the trigger channel indicated by the trigger command; The industrial camera, in response to the received trigger pulse signal, performs exposure, generates camera feedback data corresponding to the current matching mode, and sends it to the industrial host. The industrial host establishes a matching relationship between the corresponding trigger channel and the corresponding industrial camera during the matching process of each trigger channel, based on the camera feedback data received during the matching process and the matching relationship building method corresponding to the current matching mode.
2. The method according to claim 1, characterized in that, The industrial host also performs: In response to the power-on start signal, all trigger controllers and all industrial cameras are initialized; The initialization includes at least: for each industrial camera, reading the corresponding camera frame rate and exposure response time from that industrial camera, wherein the exposure response time describes the delay time from when the industrial camera receives the trigger pulse signal to when it begins exposure; For each trigger controller, the corresponding instruction response time is read from that trigger controller. The instruction response time describes the delay time from when the trigger controller receives the trigger instruction from the industrial host to when it sends out a trigger pulse signal.
3. The method according to claim 2, characterized in that, The industrial host determines the matching priority sequence in the following manner: Multiple trigger controllers are sorted according to the instruction response time of each trigger controller to obtain a matching priority sequence. The shorter the instruction response time of the trigger controller, the higher its matching priority.
4. The method according to claim 1, characterized in that, The method further includes: If the current matching mode is frame rate matching mode, the industrial host will send the first trigger command corresponding to the trigger channel to the trigger controller during the matching process of each trigger channel. The trigger controller, in response to the received first trigger command, sends out a first trigger pulse signal through the trigger channel indicated by the first trigger command; The industrial camera, in response to the received first trigger pulse signal, performs exposure, encapsulates the exposed image data and the industrial camera identification into first camera feedback data, and sends it to the industrial host. During the trigger channel matching process in frame rate matching mode, the industrial host determines the limited response time based on the camera frame rate corresponding to each industrial camera that has not completed matching, and establishes a matching relationship between the trigger channel and the corresponding industrial camera based on the first camera feedback data received within the limited response time.
5. The method according to claim 4, characterized in that, The industrial host determines the limited response time in the following way: Determine the minimum camera frame rate for each industrial camera that has not completed a match; The reciprocal of the minimum camera frame rate is used as the limit response time corresponding to the current trigger channel matching process.
6. The method according to claim 4, characterized in that, The industrial host establishes a matching relationship between each trigger channel and the industrial camera in the following way: Starting from the moment the first trigger command corresponding to the trigger channel is issued, determine whether the first camera feedback data is received within the limited response time corresponding to the trigger channel; If feedback data from the first camera is received, the feedback data from the first camera is parsed to obtain the industrial camera's identification identifier; Establish a matching relationship between the industrial camera indicated by the industrial camera identification and the trigger channel; The matching status of the industrial camera indicated by the industrial camera identification is marked as completed, and the matching process for the next trigger channel of the trigger controller continues. If no feedback data is received from the first camera, it is determined that the trigger channel is not connected to the industrial camera, and the matching process for the next trigger channel of the trigger controller continues.
7. The method according to claim 1, characterized in that, The camera feedback data also includes the exposure start time recorded by the industrial camera. The industrial camera also performs the following functions: During the channel matching process of the trigger channel, the actual departure time of the trigger pulse signal corresponding to the trigger channel and the corresponding camera feedback data reception time are read from the trigger controller to which the trigger channel belongs; For each trigger channel that successfully completes the matching, the timestamp triplet corresponding to the trigger channel is formed by the actual departure time of the trigger pulse signal under that trigger channel, the exposure start time, and the camera feedback data reception time. For each trigger channel that successfully completes a match, the link stability of that trigger channel is verified based on the corresponding timestamp triplet.
8. The method according to claim 7, characterized in that, The industrial camera verifies the link stability of each trigger channel in the following way: Based on the timestamp triplet corresponding to the trigger channel, calculate the first time difference between the exposure start time and the actual departure time of the trigger pulse signal; Calculate the second time difference between the time the camera feedback data is received and the time the exposure begins; The first time difference is compared with the first preset time threshold. If the first time difference is less than the first preset time threshold, the stability of the trigger channel is determined to be qualified. If the first time difference is greater than or equal to the first preset time threshold, the stability of the trigger channel is determined to be unqualified. The second time difference is compared with the second preset time threshold. If the second time difference is less than the second preset time threshold, the stability of the link between the industrial camera and the industrial host corresponding to the trigger channel is determined to be qualified. If the second time difference is greater than or equal to the second preset time threshold, the stability of the link between the industrial camera and the industrial host corresponding to the trigger channel is determined to be unqualified.
9. The method according to claim 1, characterized in that, The method further includes: If the industrial host determines that the current matching mode is the hardware identifier matching mode, then during the matching process of each trigger channel, it sends a second trigger instruction corresponding to the trigger channel to the trigger controller. The second trigger instruction carries the trigger channel identity identifier. The trigger controller, in response to the received second trigger command, generates a first trigger pulse signal, and superimposes the digital code corresponding to the trigger channel identification on the first trigger pulse signal to obtain a second trigger pulse signal, and sends the second trigger pulse signal through the trigger channel corresponding to the trigger channel identification; The industrial camera, in response to the second trigger pulse signal, performs exposure, assembles the exposed image data, the industrial camera identification, and the trigger channel identification in the target trigger pulse signal into corresponding second camera feedback data, and sends it to the industrial host. The industrial host also performs the following: based on the industrial camera identity identifier and trigger channel identity identifier indicated by the received second camera feedback data, directly establishes a matching relationship between the industrial camera indicated by the industrial camera identity identifier and the trigger channel indicated by the trigger channel identity identifier.
10. The method according to claim 1, characterized in that, The method further includes: If the industrial host determines that the current matching mode is a relative time matching mode, then during the matching process of each trigger channel, it sends a third trigger command corresponding to the trigger channel to the trigger controller. The third trigger command carries the specific trigger mode corresponding to the trigger channel. The trigger controller controls the trigger channel to emit a corresponding third trigger pulse signal according to the specific trigger mode indicated by the third trigger command; The industrial camera analyzes the received third trigger pulse signal and simultaneously exposes it. It assembles the exposed image data, the analyzed specific trigger mode, and the industrial camera identification into corresponding third camera feedback data and sends it to the industrial host. The industrial host also performs the following: directly establishing a matching relationship between the trigger channel indicated by the specific trigger mode in the feedback data of the third camera and the industrial camera indicated by the industrial camera identification.