Industrial camera, program loading method of industrial camera and data transmission method
By designing a parallel data transmission method of multiple control units in industrial cameras, the problem of low data transmission efficiency of traditional industrial cameras is solved, and high-speed transmission of high bandwidth and high frame rate images is achieved.
Patent Information
- Application Number
- CN202411758604.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-12-02
AI Technical Summary
Traditional industrial cameras only have one data transmission interface, which leads to low data transmission efficiency and cannot meet the transmission needs of high bandwidth and high frame rate images.
设计一种工业相机,包含第一控制单元、第二控制单元、程序存储单元和开关单元,通过在同一程序存储单元中存储各控制单元加载所需的程序,并通过开关单元实现各控制单元与程序存储单元的连接,实现并行数据传输。
By reducing the number of program storage units, the cost of industrial cameras is reduced, and data transmission is achieved through parallel data transmission, meeting the transmission needs of high bandwidth and high frame rate images.
Smart Images

Figure CN119621186A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine vision technology, and in particular to an industrial camera, a program loading method for an industrial camera, and a data transmission method. Background Art
[0002] Industrial cameras are key components widely used in the field of machine vision. The collected image data usually needs to be transmitted to other devices through the data transmission interface of the industrial camera before image analysis can be performed. Traditional industrial cameras only have one data transmission interface (hereinafter referred to as the interface), and the transmission rate is slow when transmitting data, resulting in low data transmission efficiency of industrial cameras. When users require high bandwidth to transmit high frame rate images, industrial cameras with a single interface cannot be used normally. Summary of the invention
[0003] The purpose of the embodiments of the present application is to provide an industrial camera, a program loading method for an industrial camera, and a data transmission method to improve the efficiency of data transmission by the industrial camera. The specific technical solution is as follows:
[0004] A first aspect of an embodiment of the present application provides an industrial camera, the industrial camera comprising a first control unit and a second control unit, a program storage unit, and a switch unit; the switch unit is signal-connected to the first control unit, the second control unit, and the program storage unit respectively;
[0005] The program storage unit stores the programs required by each control unit when loading;
[0006] The first control unit is used to control the second control unit to be in a non-loading state, control the switch unit to make the first control unit conductive with the program storage unit, read the first program required for loading by the first control unit from the program storage unit and load it; after completing the loading of the first program, control the second control unit to be in a loading state;
[0007] The second control unit is used to obtain and load a second program required for loading by the second control unit;
[0008] The first control unit is further used to realize data transmission using the loaded first program;
[0009] The second control unit is further configured to implement data transmission in parallel with the first control unit using the loaded second program.
[0010] In a possible implementation, the industrial camera further includes a field programmable logic gate array, and the program storage unit further includes a third program required for the field programmable logic gate array to load;
[0011] The first control unit is further used to control the field programmable logic gate array to be in a non-loading state before reading the first program required for loading by the first control unit from the program storage unit; and control the field programmable logic gate array to be in a loading state after completing the loading of the first program;
[0012] The field programmable logic gate array is used to obtain and load the third program.
[0013] In a possible implementation manner, the first control unit is further configured to, after completing the loading of the first program, control the switch unit so that the second control unit is connected to the program storage unit; the second control unit is specifically configured to read and load the second program required for loading by the second control unit from the program storage unit;
[0014] or,
[0015] The first control unit is further used to read the second program from the program storage unit and send it to the second control unit; the second control unit is specifically used to receive and load the second program sent by the first control unit.
[0016] In a possible implementation manner, the first control unit is provided with a first pin, and the second control unit is provided with a second pin;
[0017] The first control unit is specifically configured to determine that it is a master device after identifying that the first pin is pulled low;
[0018] The second control unit is specifically configured to determine that the second control unit is a slave device after identifying that the second pin is pulled high;
[0019] The first control unit is specifically used to, in response to the data to be sent, determine the first data to be sent that the first control unit needs to send according to the data amount of the data to be sent; drive the first control unit to transmit the first data to be sent, and drive the second control unit to transmit the second data to be sent; wherein the sum of the data amount of the first data to be sent and the data amount of the second data to be sent is equal to the data amount of the data to be sent.
[0020] In a possible implementation manner, the first program is the same as the second program.
[0021] In a possible implementation, the industrial camera further includes at least one third control unit, and the third control unit is signal-connected to the switch unit;
[0022] The first control unit is further used to control the third control unit to be in a non-loading state before reading the first program required by the first control unit to load from the program storage unit; after the second control unit completes loading the second program, control the third control unit to be in a loading state, and control the switch unit to make the third control unit conductive with the program storage unit;
[0023] The third control unit is used to read and load the fourth program required by the third control unit from the program storage unit;
[0024] The third control unit is further configured to implement data transmission in parallel with the first control unit and the second control unit using the loaded fourth program.
[0025] In a possible implementation, the first control unit is further used to read the third program from the program storage unit and send it to the field programmable gate array; or, after the second program is loaded, control the switch unit so that the first control unit is connected to the program storage unit, and read the third program from the program storage unit and send it to the field programmable gate array.
[0026] In a possible implementation manner, the first control unit is specifically configured to control the field programmable logic gate array to be in a loading state after the second program is loaded;
[0027] The second control unit is further configured to read the third program from the program storage unit and send the third program to the field programmable logic gate array.
[0028] In a possible implementation manner, the first control unit is further used to drive the second control unit to read the third program from the program storage unit and send the third program to the field programmable logic gate array;
[0029] The first control unit is specifically configured to control the second control unit to be in a loading state after the third program is loaded;
[0030] The second control unit is further configured to, under the drive of the first control unit, read the third program from the program storage unit and send the third program to the field programmable logic gate array.
[0031] In a possible implementation manner, the first control unit is further configured to, after the first program is loaded, or after the second program is loaded, control the switch unit to connect the field programmable logic gate array to the program storage unit;
[0032] The field programmable logic gate array is specifically used to read and load the third program from the program storage unit.
[0033] In a possible implementation manner, the first control unit is specifically used to control the circuit unit to be in a loading state in the following manner, including: pulling up a reset pin of the circuit unit, wherein the circuit unit includes a second control unit, a third control unit or a field programmable logic gate array;
[0034] The first control unit is specifically used to control the circuit unit to be in a non-loaded state in the following manner, including: pulling down a reset pin of the circuit unit.
[0035] A second aspect of an embodiment of the present application provides a program loading method for an industrial camera, the industrial camera comprising a first control unit and a second control unit, a program storage unit, and a switch unit; the switch unit is signal-connected to the first control unit, the second control unit, and the program storage unit, respectively;
[0036] The method comprises:
[0037] The first control unit controls the second control unit to be in a non-loading state, controls the switch unit to make the first control unit conductive with the program storage unit, reads a first program required for loading by the first control unit from the program storage unit and loads it; after completing the loading of the first program, controls the second control unit to be in a loading state;
[0038] The second control unit obtains and loads a second program required for loading by the second control unit.
[0039] A third aspect of an embodiment of the present application provides a data transmission method, which is applied to an industrial camera, wherein the industrial camera includes a first control unit and a second control unit, a program storage unit, and a switch unit; the switch unit is respectively connected to the first control unit, the second control unit, and the program storage unit by signal;
[0040] The method comprises:
[0041] The first control unit controls the second control unit to be in a non-loading state, controls the switch unit to make the first control unit conductive with the program storage unit, reads a first program required for loading by the first control unit from the program storage unit and loads it; after completing the loading of the first program, controls the second control unit to be in a loading state;
[0042] The second control unit obtains and loads a second program required for loading by the second control unit;
[0043] The first control unit and the second control unit perform data transmission in parallel using the loaded first program and the second program.
[0044] In a possible implementation, the industrial camera further includes an image acquisition component and a field programmable logic gate array, and the industrial camera is connected to a target device; the image acquisition component is used to acquire an original image and send the original image to the field programmable logic gate array; the field programmable logic gate array is used to process the original image to obtain a target image, and send the target image to the first control unit and the second control unit;
[0045] The first control unit and the second control unit perform data transmission in parallel using the loaded first program and the loaded second program, including:
[0046] The first control unit and the second control unit transmit the target image to the target device in parallel using the loaded first program and the second program.
[0047] A fourth aspect of an embodiment of the present application provides a program loading device for an industrial camera, the industrial camera comprising a first control unit and a second control unit, a program storage unit, and a switch unit; the switch unit is signal-connected to the first control unit, the second control unit, and the program storage unit, respectively;
[0048] The device comprises a first control module and a second control module;
[0049] The first control module is used to drive the first control unit to control the second control unit to be in a non-loading state, control the switch unit to make the first control unit conductive with the program storage unit, read the first program required for loading by the first control unit from the program storage unit and load it; after completing the loading of the first program, control the second control unit to be in a loading state;
[0050] The second control module is used to drive the second control unit to obtain and load the second program required for loading by the second control unit.
[0051] A fifth aspect of an embodiment of the present application provides a data transmission device, which is applied to an industrial camera, wherein the industrial camera includes a first control unit and a second control unit, a program storage unit, and a switch unit; the switch unit is respectively connected to the first control unit, the second control unit, and the program storage unit by signal;
[0052] The device comprises: a first control module and a second control module;
[0053] The first control module is used to drive the first control unit to control the second control unit to be in a non-loading state, control the switch unit to make the first control unit conductive with the program storage unit, read the first program required for loading by the first control unit from the program storage unit and load it; after completing the loading of the first program, control the second control unit to be in a loading state;
[0054] The second control module is used to drive the second control unit to obtain and load the second program required for loading by the second control unit;
[0055] The first control module is further used to drive the first control unit to realize data transmission using the loaded first program;
[0056] The second control module is further used to drive the second control unit to perform data transmission in parallel with the first control unit using the loaded second program.
[0057] Beneficial effects of the embodiments of the present application:
[0058] The embodiments of the present application provide an industrial camera, a program loading method and a data transmission method for an industrial camera. Before loading a first program, the first control unit first controls the second control unit to be in a non-loading state, and controls the switch unit to turn on the first control unit and the program storage unit. After reading the first program required for loading by the first control unit from the program storage unit and loading it, the second control unit is controlled to be in a loading state. The second control unit obtains the second program required for loading by the second control unit and loads it. After the first program and the second program are loaded, the first control unit and the second control unit use the loaded programs to realize data transmission in parallel. According to the industrial camera provided by the embodiment of the present application, compared with the prior art in which each control unit obtains the required program for loading from different program storage units, the first program required for loading the first control unit and the second program required for loading the second control unit are stored in the same program storage unit in the present application, which reduces the number of program storage units and reduces the cost of the industrial camera; and, compared with the prior art in which each control unit is connected to different program storage units, the first control unit in the present application is connected to the program storage unit through a switch unit, and the first control unit and the second control unit can obtain the required program for loading by controlling the switch unit, which reduces the number of pins required for establishing the connection, and the first control unit and the second control unit can use the loaded first program and the second program to realize data transmission in parallel after loading, thereby realizing the effect of high-speed data transmission using a small number of pins; on the other hand, there is only one program storage unit in the present application, and it is relatively simple to encrypt, upgrade or maintain the program storage unit in the industrial camera later, without the need to encrypt, upgrade or maintain multiple program storage units separately. And, since there is no need to upgrade multiple program storage units in the present application, there will be no situation in which the program versions of multiple control units are not unified due to upgrading the programs in some program storage units and not upgrading the programs in other program storage units.
[0059] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0061] Figure 1 This is a structural example diagram of an industrial camera;
[0062] Figure 2A schematic diagram of the first structure of an industrial camera provided in an embodiment of the present application;
[0063] Figure 3 for Figure 2 A schematic diagram of the interaction of an industrial camera when the industrial camera is loaded provided by the illustrated embodiment;
[0064] Figure 4a for Figure 3 A first schematic diagram of an industrial camera in which a switch unit is connected during loading;
[0065] Figure 4b for Figure 3 A second schematic diagram of an industrial camera in which a switch unit is connected during loading;
[0066] Figure 5a and Figure 5b A first structural diagram of the process of loading a program for an industrial camera provided in an embodiment of the present application;
[0067] Figure 6 A second structural schematic diagram of an industrial camera provided in an embodiment of the present application;
[0068] Figure 7 A third structural schematic diagram of an industrial camera provided in an embodiment of the present application;
[0069] Figure 8 for Figure 7 A schematic diagram of the interaction of an industrial camera when the industrial camera is loaded provided by the illustrated embodiment;
[0070] Figure 9a for Figure 7 A first schematic diagram of an industrial camera in which a switch unit is connected during loading;
[0071] Figure 9b for Figure 7 A second schematic diagram of an industrial camera in which a switch unit is connected during loading;
[0072] Fig.9c for Figure 7 A third schematic diagram of an industrial camera in which a switch unit is connected during loading;
[0073] Fig.10a , Fig.10b , Fig.10c A second structural diagram of the process of loading a program for an industrial camera provided in an embodiment of the present application;
[0074] Fig.11 A fourth structural schematic diagram of an industrial camera provided in an embodiment of the present application;
[0075] Fig.12 for Fig.11A schematic diagram of the interaction of an industrial camera when the industrial camera is loaded provided by the illustrated embodiment;
[0076] Fig.13a A fifth structural schematic diagram of an industrial camera provided in an embodiment of the present application;
[0077] Fig.13b A sixth structural schematic diagram of an industrial camera provided in an embodiment of the present application;
[0078] Fig.14 A seventh structural schematic diagram of an industrial camera provided in an embodiment of the present application;
[0079] Fig.15 for Fig.11 Another interactive schematic diagram of an industrial camera when the industrial camera is loaded provided by the illustrated embodiment;
[0080] Fig.16a and Fig.16b A third structural schematic diagram of the process of loading a program for an industrial camera provided in an embodiment of the application;
[0081] Fig.17a and Fig.17b A fourth structural schematic diagram of the process of loading a program for an industrial camera provided in an embodiment of the application;
[0082] Fig.18a , Fig.18b , Fig.18c A fifth structural schematic diagram of the process of loading a program for an industrial camera provided in an embodiment of the application;
[0083] Fig.19 An example diagram of the structure of an industrial camera provided in an embodiment of the present application;
[0084] Fig. 20 An example diagram of data transmission between an industrial camera and a target device provided in an embodiment of the present application;
[0085] Fig.21 This is a schematic diagram of the eighth structure of the industrial camera provided in an embodiment of the present application. DETAILED DESCRIPTION
[0086] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.
[0087] In order to more clearly explain the multi-control unit device and the multi-control unit loading method provided by the present application, some terms appearing in this article are explained below:
[0088] FPGA (Field-Programmable Gate Array): used for high-speed interface data transmission, reception and exchange, video image signal processing, wireless signal channel encoding and decoding, etc.
[0089] MCU (Micro Control Unit, also known as control unit): refers to the integration of a computer's CPU (Central Processing Unit), memory, timer counter and input / output interface on a silicon chip to form a small and complete microcomputer system.
[0090] CLK (Serial Clock, clock line interface): used to synchronize the operation of each module; CS (Chip Select Interface): used to select or enable each device connected to the bus separately; DI (Serial Data Input, data input port): used to receive signals from external devices or modules; DO (Serial Data Output, data output port): used to send instructions or data to other devices or modules; MISO (Master Input Slave Output, host data input slave data output): used to transfer data from the slave device to the master device; MOSI (Master Output Slave I Input host data output slave data input): used to transfer data from the master device to the slave device; GPIO (General Purpose Input / Output, general purpose input and output port): used to realize the interaction between the control unit and other devices, and can be configured as input mode or output mode.
[0091] Industrial cameras, which are widely used in the fields of machine vision and automation, are high-performance image acquisition devices that use data interface technology. However, traditional industrial cameras only have one data interface, and the transmission rate is limited when transferring files. For example, when the traditional data interface is a USB interface, the maximum transmission rate of industrial cameras is only 3Gbp / s. When users need high bandwidth to transmit high-frame rate images, single-interface industrial cameras cannot be used normally. In related technologies, the problem of low transmission rate can be solved by selecting CML (CameraLink, a communication protocol) cameras, CXP cameras (high-speed cameras using the CoaXPress transmission protocol, CoaXPress is a high-speed point-to-point serial transmission protocol), or 10G port cameras, optical port cameras, etc., but the above cameras usually require a camera plus acquisition card integration solution, which is costly, and many users cannot add acquisition cards on site, thus failing to solve the problem of low transmission rate of industrial cameras.
[0092] In order to improve the transmission rate of industrial cameras, dual-interface industrial cameras are used in related technologies. In related technologies, dual-interface industrial cameras use two flash memories to store the programs required for loading the control units of the two data interfaces. When the industrial camera is powered on, each control unit needs to obtain the required programs from different flash memories for loading. Figure 1 As shown, control unit 1 (MCU1) and control unit 2 (MCU2) are connected to flash memory 3 (Flash1) and flash memory 4 (Flash2) respectively, and general pin 11 (MCU1_GPIO0 pin) of MCU1 is connected to reset pin 51 (FPGA_RST) signal of field programmable gate array 5 (FPGA). When the industrial camera is powered on, MCU2 and FPGA perform reset operation at the same time; pin 52 (FPGA_Done pin) of FPGA is also connected to pin 12 (MCU1_GPIO1 pin) of MCU1, FPGA_Done is the FPGA loading completion signal, which is used to ensure that MCU1 can monitor the configuration status of FPGA; in order to ensure the transmission of synchronous data, pin 33 (CLK pin) of Flash1 is connected to pin 16 (MCU1_CLK pin) of MCU1 and pin 54 (FPGA_CONFIG_CLK pin) of FPGA respectively, and pin 42 (CLK pin) of Flash2 is connected to pin 23 (MCU2_CLK pin) of MCU2. Pin 17 (MCU1_GPIO3 pin) of MCU1 is connected to a resistor 19, and pin 26 (MCU2_GPIO3 pin) of MCU2 is connected to a resistor 27. The master control unit and the slave control unit are identified by the pull-up state and the pull-down state of the resistor 19 and the resistor 27.
[0093] After the industrial camera is powered on, MCU1 connects to Pin 31 (DO pin), Pin 32 (DI pin), Pin 33 (CLK pin), Pin 34 (CS pin) of Flash1 through Pin 13 (MISO pin), Pin 14 (MOSI pin), Pin 15 (CLK pin), Pin 16 (CS pin), reads the required program from Flash1 and loads it, and FPGA connects to Pin 53 (FPGA_CONFIG_DATAO Pin) reads the required degree of FPGA loading from Flash1 and loads it. After loading is completed, a loading completion signal is sent to pin 12 (MCU1_GPIO1 pin) of MCU1 through pin 52 (FPGA_Done pin). Pin 18 (MCU1_GPIO4 pin) of MCU1 sends a signal to pin 21 (MCU2_RST) of MCU2. MCU2 is in the loading state. MCU2 is connected to pin 41 (CS pin), pin 42 (CLK pin), pin 44 (DO pin) and pin 43 (DI pin) of Flash2 through pin 22 (CS pin), pin 23 (CLK pin), pin 25 (MISO pin), and pin 24 (MOSI pin). The program required for MCU2 loading is read from Flash2 and loaded. It can be seen that in the related art, when there are multiple control units in the industrial camera, the programs required for each control unit to load are actually stored in multiple flash memories respectively.
[0094] But if Figure 1 When two or more flash memories are used to store the programs required for each control unit to load, each control unit is usually connected to each flash memory, and each control unit reads the programs required for each control unit to load from different flash memories. In this case, the more control units there are, the more flash memories there are, resulting in a higher cost for the industrial camera. In addition, each control unit is connected to a flash memory, and the number of pins occupied when establishing the connection between each control unit and each flash memory is large. In addition, in this case, when the flash memory needs to be encrypted, upgraded or maintained later, each flash memory needs to be encrypted, upgraded and maintained separately, and the operation is relatively cumbersome. In addition, if the programs required for each control unit to load are the same, when the programs need to be upgraded, each program needs to be upgraded in each flash memory separately, which not only increases the time cost of the staff, but also may cause the program versions of each control unit to be inconsistent due to the upgrade of the programs in some flash memories and the failure to upgrade the programs in other flash memories.
[0095] In order to solve the above technical problems, Figure 2As shown, an embodiment of the present application provides an industrial camera, which includes a first control unit 100, a second control unit 200, a program storage unit 300, and a switch unit 400. The switch unit 400 is respectively connected to the first control unit 100, the second control unit 200, and the program storage unit 300 by signals; the program storage unit 300 stores the programs required for each control unit to load; the first control unit 100 is used to control the second control unit 200 to be in a non-loading state, control the switch unit 400 to make the first control unit 100 and the program storage unit 300 conductive, read the first program required for loading by the first control unit 100 from the program storage unit 300 and load it; after completing the loading of the first program, control the second control unit 200 to be in a loading state; the second control unit 200 is used to obtain and load the second program required for loading by the second control unit 200; the first control unit 100 is also used to use the loaded first program to realize data transmission; the second control unit 200 is also used to use the loaded second program to realize data transmission in parallel with the first control unit 100.
[0096] According to the industrial camera provided by the embodiment of the present application, compared with the prior art in which each control unit obtains the required program for loading from different program storage units, the first program required for loading the first control unit and the second program required for loading the second control unit are stored in the same program storage unit in the present application, which reduces the number of program storage units and reduces the cost of the industrial camera; and, compared with the prior art in which each control unit is connected to different program storage units, the first control unit in the present application is connected to the program storage unit through a switch unit, and the first control unit and the second control unit can obtain the required program for loading by controlling the switch unit, which reduces the number of pins required for establishing the connection, and the first control unit and the second control unit can use the loaded first program and the second program to realize data transmission in parallel after loading, thereby realizing the effect of high-speed data transmission using a small number of pins; on the other hand, there is only one program storage unit in the present application, and it is relatively simple to encrypt, upgrade or maintain the program storage unit in the industrial camera later, without the need to encrypt, upgrade or maintain multiple program storage units separately. And, since there is no need to upgrade multiple program storage units in the present application, there will be no situation in which the program versions of multiple control units are not unified due to upgrading the programs in some program storage units and not upgrading the programs in other program storage units.
[0097] The control unit in the present application may be a single-chip microcomputer, a system on a chip, or other components with control functions, and the embodiments of the present application do not impose any restrictions on this. In addition, the program storage unit in the present application may be a flash memory, a random access memory, a read-only memory, or other memory with storage functions, and the embodiments of the present application do not impose any restrictions on this.
[0098] In order to more clearly understand the industrial camera of the present application, the following will be described in conjunction with the accompanying drawings. It can be understood that the number of control units in the industrial camera provided by the present application can be 2, or an integer greater than 2. For example, the number of control units can be 3, and the programs required for loading each control unit can be the same or different, which is all possible. In addition, when other control units other than the first control unit obtain the required program for loading, they can actively read it from the program storage unit, or the first control unit can read it from the program storage unit and send it to other control units.
[0099] It is understandable that the programs required to be loaded by each control unit can be the same or different. If the programs required to be loaded by each control unit are different, the program storage unit is partitioned, and the programs required to be loaded by each control unit are stored in different partitions; if the programs required to be loaded by each control unit are the same, there is no need to partition the program storage unit, and the programs required to be loaded by the control unit are directly stored in the program storage unit. The same programs required to be loaded by each control unit can reduce the workload of developers for development and testing, reduce development costs, and when the program needs to be updated, it is only necessary to update the program in the program storage unit, without the need to program each control unit separately, which simplifies the upgrade and maintenance process.
[0100] The following takes an industrial camera with two control units as an example to explain the industrial camera and its program loading method and data transmission method:
[0101] In a possible embodiment, the second control unit 200 reads the second program from the program storage unit 300. In this embodiment, the structure of the industrial camera is as follows: Figure 2 As shown, the interactive diagram of the industrial camera when loading is as follows Figure 3 In this case, the industrial camera includes a first control unit 100, a second control unit 200, a program storage unit 300, and a switch unit 400. The first control unit 100 is connected to the switch unit 400 through access point 1 on the switch unit 400, the second control unit 200 is connected to the switch unit through access point 2, and the program storage unit is connected to the switch unit 400 through access point 3. Figure 4aAs shown, when the first control unit 100 is connected to the program storage unit 300, the access point 1 on the switch unit 400 is connected to the access point 3; Figure 4b As shown, when the second control unit 200 is connected to the program storage unit 300, the access point 2 on the switch unit is connected to the access point 3. For the convenience of description, the state of the switch unit when the access point 1 on the switch unit 400 is connected to the access point 3 is referred to as the first state, and the state of the switch unit when the access point 2 on the switch unit 400 is connected to the access point 3 is referred to as the second state.
[0102] After the industrial camera is powered on, the first control unit 100 controls the switch unit 400 to connect the first control unit 100 and the program storage unit (corresponding to Figure 3 The first control unit 100 also controls the second control unit to be in a non-loading state in order to avoid data reading errors caused by multiple control units accessing the program storage unit 300 at the same time. Then, the first control unit 100 reads the first program (corresponding to the first program) required for loading by the first control unit 100 from the program storage unit 300 through the switch unit 400. Figure 3 After the first control unit 100 finishes loading the first program, the switch unit 400 controls the second control unit 200 and the program storage unit 300 to conduct (corresponding to Figure 3 The first control unit 100 then controls the second control unit to be in a loading state, and sends a first loading signal to the second control unit 200. The second control unit 200 responds to the first loading signal by reading the second program (corresponding to the second program) required for loading by the second control unit 200 from the program storage unit 300 through the switch unit 400. Figure 3 Finally, the first control unit 100 and the second control unit 200 use the loaded programs to implement data transmission in parallel.
[0103] Among them, when the second control unit 200 is in a non-loading state, it cannot read the program from the program storage unit 300, and when it is in a loading state, it can read the program from the program storage unit 300. The first control unit can make the second control unit 200 in a loading state by pulling up the reset pin of the second control unit 200, and make the second control unit 200 in a non-loading state by pulling down the reset pin of the second control unit 200. It can be understood that the process of the control unit or the FPGA in the following embodiment of the present application reading the program required for loading is represented by "reading the Xth program and returning to the Xth program" in the figure, and "X" represents the type of program required for the control unit or FPGA to load, which will not be repeated below. The first control unit 100 controls the second control unit 200 to be in a loading state / non-loading state, or the FPGA in the following first control unit is in a loading state / non-loading state, which is achieved by pulling up / lowering the reset pin, which will not be repeated below.
[0104] By pulling up the reset pin of the circuit unit (i.e., FPGA, the second control unit, the third control unit, etc.) to put the circuit unit in a loaded state, or by pulling down the reset pin of the circuit unit (i.e., FPGA, the second control unit, the third control unit, etc.) to put the circuit unit in a non-loaded state, the problem of the industrial camera system crashing due to the simultaneous loading of multiple control units can be avoided.
[0105] In a possible implementation, the switch unit 400 initially connects the access point 1 to the access point 3. After the industrial camera is powered on, the first control unit 100 does not need to send a first state switching signal to the switch unit 400. In the following, the switch unit 400 initially connects the access point 1 to the access point 3, which will not be described in detail below.
[0106] In the above embodiment, the access point 1 of the switch unit 400 may be used to realize the connection between the program storage unit 300 and the first control unit 100 with the access point 3, or may be used to switch the connection state of the switch unit 400 under the control of the first control unit 100. For example, if the access point 2 of the switch unit 400 is currently connected to the access point 3, the first control unit 100 may control the connection between the access point 1 of the switch unit 400 and the access point 3 through the access point 1; for another example, if the access point 1 of the switch unit 400 is currently connected to the access point 3, the first control unit 100 may control the connection between the access point 2 of the switch unit 400 and the access point 3 through the access point 1. In the embodiment of the present application, the access point used to realize the connection between the program storage unit 300 and the first control unit 100 with the access point 3 is the same as the access point used to switch the connection state of the switch unit 400 under the control of the first control unit 100.
[0107] In another possible implementation, the first control unit 100 reads the second program from the program storage unit 300 and sends it to the second control unit 200. Figure 5a and Figure 5b As shown in the first structural schematic diagram of the process of loading a program for an industrial camera provided by an embodiment of the present application, after the industrial camera is powered on, the first control unit 100 controls the switch unit 400 to connect the access point 1 and the access point 3 of the switch unit 400, so that the first control unit 100 and the program storage unit 300 are connected. Then the first control unit reads the first program required for loading the first control unit 100 from the program storage unit 300 through the switch unit 400, and loads the first program.
[0108] After the first control unit 100 finishes loading the first program, it reads the second program required by the second control unit 200 from the program storage unit 300, and controls the access point 1 and the access point 2 of the switch unit 400 to be turned on, so that the second control unit 200 and the first control unit 100 are turned on, see Figure 5b Then, the first control unit 100 sends the read second program to the second control unit 200, and the second control unit 200 loads the second program. Finally, the first control unit 100 and the second control unit 200 use the loaded programs to implement data transmission in parallel.
[0109] It can be seen from the above embodiments that the access point 1 on the switch unit 400 can not only be used to control the switch state switching, but also can be used to access the first control unit 100, which reduces the number of wiring and related hardware in the industrial camera and reduces the cost of the industrial camera. However, there may be a corresponding problem of reduced stability and reliability of the switch unit.
[0110] In order to improve the stability and reliability of the switch unit 400 , in another possible embodiment, the access point on the switch unit 400 for controlling the state switching of the switch unit may be different from the access point for accessing the first control unit.
[0111] The following takes the second control unit 200 reading the second program from the program storage unit 300 as an example, and describes an industrial camera in which the access point on the switch unit for controlling the state switching of the switch unit is different from the access point for accessing the first control unit. Figure 6 , Figure 6 The second structural diagram of the industrial camera provided by the embodiment of the present application is shown, and the industrial camera includes a first control unit 100, a second control unit 200, a program storage unit 300, and a switch unit 400; the access point 4 on the switch unit 400 is used to switch the conduction state of the switch unit 400 under the control of the first control unit 100, and for the convenience of description, it is hereinafter referred to as a state switching access point. Figure 6 As shown, the first control unit 100 switches the state of the switch unit 400 to access point 4 and access point 1 to access the switch unit 400, the second control unit 200 accesses the switch unit 400 through access point 2, and the program storage unit 300 accesses the switch unit 400 through access point 3. In this embodiment, after the industrial camera is powered on, the process of the first control unit 100 and the second control unit 200 reading, loading programs and transmitting data from the program storage unit 300 is exactly the same as the process of the first control unit 100 and the second control unit 200 reading, loading programs and transmitting data from the program storage unit 300 in the previous embodiment, and will not be repeated here.
[0112] It is understandable that the more control units there are, the faster the data transmission efficiency is. Similar to the industrial camera with two control units mentioned above, when there are three or more control units in the industrial camera, the control units other than the first control unit can directly read from the program storage unit when acquiring the program required for loading, or the first control unit can read from the program storage unit and send it to other control units.
[0113] Taking the second control unit 200 reading the second program from the program storage unit 300 as an example, an industrial camera with three control units and a program loading method and a data transmission method of the industrial camera are described below.
[0114] In a possible embodiment, the structure of the industrial camera is as follows Figure 7 As shown, the interaction diagram when the industrial camera is loaded is as follows Figure 8 In this case, if Figure 7 As shown, the industrial camera includes a first control unit 100, a second control unit 200 and a third control unit 500, a program storage unit 300, and a switch unit 400; the first control unit 100 is connected to the switch unit 400 through access point 1 on the switch unit 400, the second control unit 200 is connected to the switch unit through access point 2, the program storage unit is connected to the switch unit 400 through access point 3, and the third control unit 500 is connected to the switch unit 400 through access point 5. The state of the switch unit when access point 5 on the switch unit 400 is connected to access point 3 is called the third state. Figure 9a As shown, when the first control unit 100 is connected to the program storage unit 300, the access point 1 on the switch unit 400 is connected to the access point 3; Figure 9b As shown, when the second control unit 200 is connected to the program storage unit 300, the access point 2 on the switch unit is connected to the access point 3; Fig.9c As shown, when the third control unit 500 is connected to the program storage unit 300, the access point 3 on the switch unit is connected to the access point 5.
[0115] After the industrial camera is powered on, the first control unit 100 controls the switch unit 400 to turn on the second control unit 200 and the program storage unit (corresponding to Figure 8 The first control unit 100 also controls the second control unit to be in a non-loading state in order to avoid data reading errors caused by multiple control units accessing the program storage unit 300 at the same time. Then, the first control unit 100 reads the first program (corresponding to the first program) required for loading by the first control unit 100 from the program storage unit 300 through the switch unit 400. Figure 8 After the first control unit 100 finishes loading the first program, the switch unit 400 controls the second control unit 200 and the program storage unit 300 to conduct (corresponding to Figure 8 Then, the first control unit 100 controls the second control unit to be in the loading state, and sends a loading signal to the second control unit 200. The second control unit 200 responds to the first loading signal by reading the second program (corresponding to the second program) required for loading by the second control unit 200 from the program storage unit 300 through the switch unit 400. Figure 8 in to return to the second program) and load the second program.
[0116] After the loading is completed, the second control unit 200 sends a loading completion signal to the first control unit 100, and the first control unit 100 controls the switch unit 400 to turn on the third control unit 500 and the program storage unit 300 (corresponding to Figure 8 Then, the first control unit 100 controls the third control unit 500 to be in a loading state, and sends a loading signal to the third control unit 500. In response to the loading signal, the third control unit 500 reads the fourth program (corresponding to the fourth program) required for loading the third control unit 500 from the program storage unit 300 through the switch unit 400. Figure 8 Finally, the first control unit 100, the second control unit 200, and the third control unit 500 use the loaded programs to implement data transmission in parallel.
[0117] The following describes an industrial camera with three control units and a program loading method and a data transmission method of the industrial camera, with the first control unit 100 reading from the program storage unit 300 and sending the required program to other control units.
[0118] like Fig.10a , Fig.10b , Fig.10cThe second structural schematic diagram of the process of loading a program for an industrial camera provided by an embodiment of the present application is shown. After the industrial camera is powered on, the first control unit 100 controls the switch unit 400 to connect the access point 1 and the access point 3 of the switch unit 400, so that the first control unit 100 and the program storage unit 300 are connected, as shown in Figure 10. Then the first control unit reads the first program required for loading the first control unit 100 from the program storage unit 300 through the switch unit 400, and loads the first program.
[0119] After the first control unit 100 finishes loading the first program, it reads the second program required by the second control unit 200 from the program storage unit 300, and controls the access point 1 and the access point 2 of the switch unit 400 to be turned on, so that the second control unit 200 and the first control unit 100 are turned on, see Fig.10b Then, the first control unit 100 sends the read second program to the second control unit 200, and the second control unit 200 loads the second program.
[0120] After the first control unit 100 sends the second program to the second control unit 200, the third control unit 500 reads the fourth program required to load from the program storage unit, and controls the access point 1 and the access point 5 of the switch unit 400 to be connected, so that the first control unit 100 and the third control unit 500 are connected, see Fig.10c Then, the first control unit 100 sends the read fourth program to the third control unit 500, and the third control unit 500 loads the third program. Finally, the first control unit 100 and the second control unit 200 and the third control unit 500 use the loaded programs to implement data transmission in parallel.
[0121] Through the embodiments of the present application, three control units are used to implement data transmission in parallel, which further improves the speed of data transmission of industrial cameras compared to two control units performing data transmission in parallel, thereby meeting the demand for high-speed data transmission.
[0122] The structure of an industrial camera with more than three control units and the program loading method and data transmission method of the industrial camera are similar to those of the industrial camera with three control units and the program loading method and data transmission method of the industrial camera in the above-mentioned embodiments, and will not be described in detail here.
[0123] In order to meet the real-time requirements of industrial cameras, industrial cameras usually also include FPGAs. Before the MCU processes and sends data, the FPGA implements the encoding and decoding of wireless signal channels, video image signal processing, or the reception and exchange of high-speed interface data. For example, image processing equipment or surgical robots in the field of medical equipment will use FPGAs for high-speed image processing. The combination of FPGAs and control units in wireless communication and network equipment in the field of communications can be used to process high-speed data streams. Industrial cameras in the fields of machine vision and automation use FPGAs to process camera images. Therefore, in a possible implementation, the program storage unit 300 also stores a third program required for FPGA loading. After the industrial camera is powered on, the FPGA needs to obtain the third program required for FPGA loading and load it before the FPGA can be used to process data.
[0124] By adopting the embodiment of the present application, since FPGA has high-speed parallel processing capabilities, a large number of computing tasks can be completed in a short time, thereby performing real-time processing on the images captured by the industrial camera, ensuring the real-time nature of the industrial camera image processing.
[0125] Taking an industrial camera with two control units as an example, the following describes an industrial camera including an FPGA and a program loading method and a data transmission method for the industrial camera.
[0126] In a possible implementation, the multi-control unit device includes a first control unit, a second control unit, a program storage unit, an FPGA, and a switch unit. The loading order of the second control unit and the FPGA can be set according to user needs. The loading order of the second control unit and the FPGA is not limited in the embodiment of the present application. For example, in order to ensure that the industrial camera can perform data transmission in a timely manner, the first control unit may be loaded first, then the second control unit, and finally the FPGA; in order to ensure that the industrial camera can process the image collected by the industrial camera in a timely manner, the first control unit may be loaded first, then the FPGA, and finally the second control unit.
[0127] Based on the above, the program required for loading by the second control unit can be directly read from the program storage unit by the second control unit, or can be read from the program storage unit by the first control unit and sent to the second control unit. Similarly, the third program required for loading by the FPGA can also be directly read from the program storage unit by the FPGA, or can be read from the program storage unit by the first control unit and sent to the FPGA. Since the program required for loading the FPGA is different from the program required for loading the control unit, a partition is set in the program storage unit for storing the third program required for loading the FPGA. Similarly, if the programs required for loading by each control unit are different, it is necessary to partition the program storage unit to obtain multiple partitions, and the programs required for loading by each control unit are stored in different partitions, and the partitions for storing the programs required for loading by each program control unit are different from the partitions for storing the programs required for loading by the FPGA; if the programs required for loading by each control unit are the same, it is only necessary to partition to obtain the first partition for storing the programs required for loading by the FPGA, and the programs required for loading by the control unit are directly stored in the area other than the first partition in the program storage unit.
[0128] Based on this, according to the different loading orders of the FPGA and the second control unit, the different execution entities that read the program required for FPGA loading and give it to the FPGA, and the different ways of obtaining the program required for the second control unit and FPGA loading, it is divided into the following eight situations.
[0129] Case 1: After the first control unit is loaded, the second control unit is loaded, and finally the FPGA is loaded. The program required for loading the second control unit is directly read from the program storage unit by the second control power supply, and the program required for loading the FPGA is sent to the FPGA by the first control unit;
[0130] In a possible embodiment, the structure of the industrial camera is as follows Fig.11 As shown, the interaction diagram of the industrial camera when loading is as follows Fig.12 As shown, since the program required for FPGA loading is sent by the first control unit 100 to the field programmable logic gate array 600, the FPGA is connected to the switch unit 400 through the access point 1.
[0131] In this embodiment, after the industrial camera is powered on, the first control unit 100 controls the switch unit 400 to connect the first control unit 100 and the program storage unit (corresponding to Fig.12The first control unit 100 sends a first state switching signal to the second control unit 200 and the field programmable logic gate array 600, respectively. The second control unit and the field programmable logic gate array 600 remain in a non-loading state in response to the reset signal (corresponding to the aforementioned control of the second control unit in a non-loading state and the control of the FPGA in a non-loading state). Then the first control unit reads the first program required for loading the first control unit 100 from the program storage unit 300 through the switch unit 400, and loads the first program (corresponding to Fig.12 Read the first program in the program and return to the first program). At this time, the structure of the industrial camera is as follows Fig.13a As shown, the access point 1 and the access point 3 of the switch unit 400 are connected;
[0132] After the first control unit 100 finishes loading the first program, the switch unit 400 is controlled to turn on the second control unit 200 and the program storage unit 300 (corresponding to Fig.12 The first control unit 100 controls the second control unit 200 to be in a loading state and sends a loading signal to the second control unit 200. The second control unit 200 responds to the loading signal by reading the second program (corresponding to the second program) required for loading by the second control unit 200 from the program storage unit 300 through the switch unit 400. Fig.12 Return to the second program in the above code) and load the second program. At this time, the structure of the industrial camera is as follows Fig.13b As shown, the access point 3 of the switch unit 400 is connected to the access point 2 .
[0133] After the second control unit 200 is loaded, it sends a loading completion signal to the first control unit 100. In response to the loading completion signal, the first control unit 100 controls the switch unit 400 to connect the first control unit 100 and the program storage unit 300 (corresponding to Fig.12 In this case, the structure of the industrial camera is as follows: Fig.13a As shown, the access point 1 of the switch unit 400 is connected to the access point 3. Then the first control unit 100 reads and sends the third program (corresponding to the third program) required for FPGA loading from the program storage unit 300 via the switch unit 400 in the first state to the FPGA. Fig.12 The FPGA receives the third program and loads it.
[0134] After each control unit and FPGA are loaded, when the industrial camera collects image data, the FPGA processes the image data using the loaded third program to obtain processed image data, and the first control unit 100 and the second control unit 200 transmit the processed image data in parallel using the loaded program.
[0135] According to the embodiment of the present application, after the first control unit is loaded, the second control unit is loaded first, so that data transmission can be performed in time after the control unit is loaded.
[0136] Case 2: After the first control unit is loaded, the second control unit is loaded, and finally the FPGA is loaded. The program required for loading the second control unit is directly read from the program storage unit by the second control power supply, and the program required for loading the FPGA is sent by the second control unit to the FPGA.
[0137] In a possible embodiment, the structure of the industrial camera is as follows Fig.14 As shown, since the program required for FPGA loading is sent by the second control unit 200 to the field programmable gate array 600, the FPGA is connected to the switch unit 400 through the access point 2.
[0138] In this embodiment, after the industrial camera is powered on, the first control unit 100 controls the switch unit 400 to turn on the first control unit 100 and the program storage unit, and the first control unit 100 sends a reset signal to the second control unit 200 and the field programmable logic gate array 600, respectively, and the second control unit and the FPGA remain in an unloaded state in response to the reset signal. Then the first control unit reads the first program required for loading the first control unit 100 from the program storage unit 300 through the switch unit 400, and loads the first program.
[0139] After the first control unit 100 completes loading of the first program, it controls the switch unit 400 to turn on the second control unit 200 and the program storage unit 300. Then the first control unit 100 controls the second control unit 200 to be in a loading state and sends a loading signal to the second control unit 200. In response to the loading signal, the second control unit 200 reads the second program required for loading by the second control unit 200 from the program storage unit 300 through the switch unit 400 and loads it.
[0140] After the second control unit 200 is loaded, the second control unit 200 reads the third program required for FPGA loading from the program storage unit 300 and sends it to the FPGA. The FPGA receives the third program and loads it.
[0141] After each control unit and FPGA are loaded, when the industrial camera collects image data, the FPGA processes the image data using the loaded third program to obtain processed image data, and the first control unit 100 and the second control unit 200 transmit the processed image data in parallel using the loaded program.
[0142] According to the embodiment of the present application, after the first control unit is loaded, the second control unit is loaded first, so that data transmission can be performed in time after the control unit is loaded.
[0143] Case 3: After the first control unit is loaded, the FPGA is loaded, and finally the second control unit is loaded. The program required for loading the second control unit is directly read from the program storage unit by the second control power supply, and the program required for loading the FPGA is sent by the first control unit to the FPGA.
[0144] In a possible embodiment, the structure of the industrial camera is as follows Fig.11 As shown, the interaction diagram of the industrial camera when loading is as follows Fig.15 As shown, since the program required for FPGA loading is sent to the FPGA by the first control unit, the field programmable logic gate array 600 is connected to the switch unit 400 through the access point 1.
[0145] In this embodiment, after the industrial camera is powered on, the first control unit 100 controls the switch unit 400 to connect the first control unit 100 and the program storage unit (corresponding to Fig.15 The first control unit 100 sends a first state switching signal to the second control unit 200 and the field programmable logic gate array 600, respectively. The second control unit and the FPGA remain in a non-loading state in response to the reset signal (corresponding to the aforementioned control of the second control unit in a non-loading state and the control of the FPGA in a non-loading state). Then the first control unit reads the first program required for loading the first control unit 100 from the program storage unit 300 through the switch unit 400, and loads the first program (corresponding to Fig.15 Read the first program in and return to the first program).
[0146] After the first control unit 100 finishes loading the first program, it reads the third program (corresponding to the third program) required for FPGA loading from the program storage unit 300 and sends it to the FPGA. Fig.15 The FPGA receives the third program and loads it.
[0147] After the FPGA is loaded, it sends a loading completion signal to the first control unit 100. In response to the loading completion signal, the first control unit 100 controls the switch unit 400 to turn on the second control unit 200 and the program storage unit 300 (corresponding to Fig.15 The first control unit 100 controls the second control unit 200 to be in a loading state and sends a loading signal to the second control unit 200. The second control unit 200 responds to the loading signal by reading the second program (corresponding to the second program) required for loading by the second control unit 200 from the program storage unit 300 through the switch unit 400. Fig.15 in to return to the second program) and load the second program.
[0148] After each control unit and FPGA are loaded, when the industrial camera collects image data, the FPGA processes the image data using the loaded third program to obtain processed image data, and the first control unit 100 and the second control unit 200 transmit the processed image data in parallel using the loaded program.
[0149] In this embodiment, the first control unit 100 controls the switch unit 400 to conduct the second control unit 200 and the program storage unit 300 only after the field programmable gate array 600 is loaded. However, since the second control unit 200 and the FPGA are independent units, during the process of loading the third program on the field programmable gate array 600, the second control unit can actually read and load the second program from the program storage unit 300.
[0150] Based on this, in another possible embodiment, the first control unit reads the first program required for loading the first control unit 100 from the program storage unit 300 through the switch unit 400, and loads the first program.
[0151] After the first control unit 100 completes loading the first program, it reads the third program required for FPGA loading from the program storage unit 300 and sends it to the FPGA, and the first control unit 100 controls the switch unit 400 to turn on the second control unit 200 and the program storage unit 300, and controls the second control unit 200 to be in a loading state, and then the second control unit 200 reads the second program required for the second control unit 200 to load from the program storage unit 300 through the switch unit 400 and loads it.
[0152] After the second control unit 200 completes loading the second program and the FPGA completes loading the third program, when the industrial camera captures image data, the FPGA processes the image data using the loaded third program to obtain processed image data, and the first control unit 100 and the second control unit 200 transmit the processed image data in parallel using the loaded programs.
[0153] According to the embodiment of the present application, after the first control unit is loaded, the FPGA is controlled to load so that the FPGA can process the images captured by the industrial camera in a timely manner.
[0154] Case 4: After the first control unit is loaded, the FPGA is loaded, and finally the second control unit is loaded. The program required for loading the second control unit is directly read from the program storage unit by the second control power supply, and the program required for loading the FPGA is sent by the second control unit to the FPGA.
[0155] In a possible embodiment, the structural diagram of the industrial camera loading program process is as follows: Fig.16a and Fig.16b As shown, since the program required for FPGA loading is sent to the FPGA by the second control unit, the field programmable logic gate array 600 is connected to the switch unit 400 through the access point 2.
[0156] In this embodiment, after the industrial camera is powered on, the first control unit 100 controls the access point 1 and the access point 4 of the switch unit 400 to be turned on, so that the first control unit 100 and the program storage unit 300 are turned on, see Fig.16a The first control unit 100 sends a reset signal to the second control unit 200 and the field programmable logic gate array 600 respectively, and the second control unit and the FPGA remain in a non-loading state in response to the reset signal (corresponding to the aforementioned control of the second control unit in a non-loading state and the control of the FPGA in a non-loading state). Then the first control unit 100 reads the first program required for loading the first control unit 100 from the program storage unit 300 through the switch unit 400, and loads the first program.
[0157] After the first control unit 100 loads the first program, it sends a read signal to the second control unit 200 and controls the access point 3 of the switch unit 400 to be connected to the access point 2, so that the second control unit 200 is connected to the program storage unit 300. Fig.16bThe second control unit 200 responds to the read signal and reads the third program required for FPGA loading from the program storage unit 300 via the switch unit 400 and sends it to the FPGA. After the FPGA loading is completed, it sends a loading completion signal to the first control unit 100. The first control unit 100 responds to the loading completion signal and controls the second control unit 200 to be in a loading state. The second control unit 200 reads the second program required for the second control unit 200 to load from the program storage unit 300 via the switch unit 400 and loads it.
[0158] After the industrial camera acquires the image data, the FPGA processes the image data using the loaded third program to obtain processed image data, and the first control unit 100 and the second control unit 200 transmit the processed image data in parallel using the loaded program.
[0159] According to the embodiment of the present application, after the first control unit is loaded, the second control unit is loaded first, so that data can be transmitted in time after the control unit is loaded.
[0160] For the sake of ease of description, only the connection relationship and loading order between the first control unit, the second control unit, the switch unit, the program storage unit and the FPGA will be explained below, and the signaling interaction process will not be described in detail.
[0161] Case 5: After the first control unit is loaded, the second control unit is loaded, and finally the FPGA is loaded. The program required for loading the second control unit and the program required for loading the FPGA are sent by the first control unit;
[0162] In this embodiment, if Fig.17a and Fig.17b The fourth structure of the process of loading a program for an industrial camera provided in the embodiment of the application is shown. After the industrial camera is powered on, the first control unit 100 controls the switch unit 400 to connect the access point 1 and the access point 3 of the switch unit 400, so that the first control unit 100 and the program storage unit 300 are connected. Then the first control unit reads the first program required for loading the first control unit 100 from the program storage unit 300 through the switch unit 400, and loads the first program.
[0163] After the first control unit 100 finishes loading the first program, it reads the second program required by the second control unit 200 from the program storage unit 300, and controls the access point 1 and the access point 2 of the switch unit 400 to be turned on, so that the second control unit 200 and the first control unit 100 are turned on, see Fig.17b Then, the first control unit 100 sends the read second program to the second control unit 200, and the second control unit 200 loads the second program.
[0164] After the first control unit 100 sends the second program to the second control unit 200, the access point 1 and the access point 3 of the control switch unit 400 are connected. Fig.17a , so that the first control unit 100 is connected to the program storage unit 300, and the field programmable logic gate array 600 reads the third program required for loading from the program storage unit 300, and then the first control unit 100 sends the read third program to the field programmable logic gate array 600, and the field programmable logic gate array 600 loads the third program.
[0165] After the industrial camera acquires the image data, the FPGA processes the image data using the loaded third program to obtain processed image data, and the first control unit 100 and the second control unit 200 transmit the processed image data in parallel using the loaded program.
[0166] Case 6: After the first control unit is loaded, the second control unit is loaded, and finally the FPGA is loaded. The program required for loading the second control unit and the program required for loading the FPGA are directly read from the program storage unit by the second control unit and the FPGA;
[0167] In this embodiment, if Fig.18a , Fig.18b , Fig.18c The fifth structural schematic diagram of the process of loading a program for an industrial camera provided in an embodiment of the application is shown. After the industrial camera is powered on, the first control unit 100 controls the switch unit 400 to connect the access point 1 and the access point 3 of the switch unit 400, so that the first control unit 100 and the program storage unit 300 are connected. Then the first control unit reads the first program required for loading the first control unit 100 from the program storage unit 300 through the switch unit 400, and loads the first program.
[0168] After the first control unit 100 finishes loading the first program, it controls the access point 3 and the access point 2 of the switch unit 400 to be turned on, so that the second control unit 200 and the program storage unit 300 are turned on. Fig.18b ; Then the second control unit 200 reads the second program from the program storage unit 300 and loads it.
[0169] After the second control unit 200 finishes loading the second program, the first control unit 100 controls the access point 3 and the access point 6 of the switch unit 400 to be connected, so that the field programmable logic gate array 600 is connected to the first control unit 100, see Fig.18c , the FPGA 600 reads and loads the third program from the program storage unit 300 .
[0170] After the industrial camera acquires the image data, the FPGA processes the image data using the loaded third program to obtain processed image data, and the first control unit 100 and the second control unit 200 transmit the processed image data in parallel using the loaded program.
[0171] Case 7: After the first control unit is loaded, the FPGA is loaded, and finally the second control unit is loaded. The program required for loading the second control unit and the program required for loading the FPGA are directly read from the program storage unit by the second control unit and the FPGA;
[0172] In this embodiment, if Fig.18a As shown, after the industrial camera is powered on, the first control unit 100 controls the switch unit 400 to connect the access point 1 and the access point 3 of the switch unit 400, so that the first control unit 100 and the program storage unit 300 are connected. Then the first control unit reads the first program required for loading the first control unit 100 from the program storage unit 300 through the switch unit 400, and loads the first program.
[0173] After the first control unit 100 loads the first program, the first control unit 100 controls the access point 3 and the access point 6 of the switch unit 400 to be connected, so that the field programmable logic gate array 600 and the first control unit 100 are connected. Fig.18c , the FPGA 600 reads and loads the third program from the program storage unit 300 .
[0174] After the FPGA 600 has finished loading the third program, the first control unit 100 controls the access point 3 and the access point 2 of the switch unit 400 to be turned on, so that the second control unit 200 and the program storage unit 300 are turned on. Fig.18b ; Then the second control unit 200 reads the second program from the program storage unit 300 and loads it.
[0175] After the industrial camera acquires the image data, the FPGA processes the image data using the loaded third program to obtain processed image data, and the first control unit 100 and the second control unit 200 transmit the processed image data in parallel using the loaded program.
[0176] Case 8: After the first control unit is loaded, the FPGA is loaded, and finally the second control unit is loaded. The program required for loading the second control unit and the program required for loading the FPGA are sent by the first control unit;
[0177] In this embodiment, if Fig.17aAs shown, after the industrial camera is powered on, the first control unit 100 controls the switch unit 400 to connect the access point 1 and the access point 3 of the switch unit 400, so that the first control unit 100 and the program storage unit 300 are connected. Then the first control unit reads the first program required for loading the first control unit 100 from the program storage unit 300 through the switch unit 400, and loads the first program.
[0178] After the first control unit 100 completes loading of the first program, the first control unit 100 reads the third program required for loading the field programmable logic gate array 600 from the program storage unit 300, and then the first control unit 100 sends the read third program to the field programmable logic gate array 600, and the field programmable logic gate array 600 loads the third program.
[0179] After the first control unit 100 sends the third program to the field programmable logic gate array 600, the access point 1 and the access point 2 of the switch unit 400 are controlled to be turned on, so that the second control unit 200 and the first control unit 100 are turned on, see Fig.17b Then, the first control unit 100 sends the read second program to the second control unit 200, and the second control unit 200 loads the second program.
[0180] After the industrial camera acquires the image data, the FPGA processes the image data using the loaded third program to obtain processed image data, and the first control unit 100 and the second control unit 200 transmit the processed image data in parallel using the loaded program.
[0181] Based on the above embodiment, if the FPGA directly reads the program required for loading from the program storage unit, there is no need to transfer through the control unit, which reduces potential communication delays. If the first control unit or the second control unit reads the program required for FPGA loading from the program storage unit and sends it to the FPGA, there is no need to equip the FPGA with an interface and reading circuit of the program storage unit, which can reduce the hardware cost of the industrial camera. In addition, if the second control unit directly reads the program required for loading from the program storage unit, the communication delay caused by forwarding by the first control unit is reduced; the first control unit sends the program required for the second control unit to load to the second control unit, which can realize the centralized control and management of the entire industrial camera by the first control unit.
[0182] It can be understood that in the above embodiments, the connection and communication between each control unit and the FPGA, the switch unit, and the program storage unit are actually achieved through pins (i.e., pins). For example, the first control unit controls the second control unit to be in a loading state by pulling up the reset pin of the second control unit, and controls the FPGA to be in a non-loading state by pulling down the reset pin of the FPGA.
[0183] Since the industrial camera provided in the embodiment of the present application includes at least two control units, each control unit can be used to jointly implement data when data is transmitted. In the process of data transmission, one of the control units can use the loaded program to transmit data, or multiple control units can use their own loaded programs to jointly transmit data. It can be understood that the control unit that can perform data transmission independently is the main control unit, that is, the master device hereinafter, and the control unit that cannot perform data transmission independently is the slave control unit, that is, the slave device hereinafter.
[0184] In order to facilitate the control unit to identify whether it is a master control unit or a slave control unit, in a possible embodiment, a pin can be set on each control unit, and the control unit determines whether it is a master control unit or a slave control unit by identifying the high or low state of its own pin.
[0185] When data transmission is required, the main control unit responds to the data to be sent, and determines the first data to be sent that the main control unit needs to send and the second data to be sent that the slave control unit needs to send according to the data volume of the data to be sent. Among them, the data volume of the first data to be sent that the main control unit needs to send is equal to the data volume of the second data to be sent that the slave control unit needs to send. The slave control unit cannot perform data transmission alone. Therefore, when the main control unit and the slave control unit transmit data in parallel, the main control unit actually drives itself to send the first data to be sent and drives the slave control unit to send the second data to be sent.
[0186] For example, assume that there are four control units in an industrial camera, and the first control unit identifies the first control unit as a master device by pulling down the pin on the first control unit, and the second control unit, the third control unit, and the fourth control unit identify the second control unit, the third control unit, and the fourth control unit as slave devices by pulling up the pins on the second control unit, the third control unit, and the fourth control unit. After each control unit has loaded its own required program, if data transmission is required, the first control unit can perform data transmission independently, or the first control unit can drive at least one of the second control unit, the third control unit, and the fourth control unit to perform data transmission in parallel with the first control unit.
[0187] It is understandable that if the amount of data to be sent is small or the bandwidth requirement of the data to be sent is low, the main control device can be used to transmit the data to be sent. If the amount of data to be sent is large or the bandwidth requirement of the data to be sent is high, the main control unit and the slave control unit can be used to cooperate to realize data transmission. For example, assuming that there are two control units in an industrial camera and the amount of data to be sent is 4 Gb, the main control unit can send 4 Gb and the slave control unit can send 0 Gb; the main control unit can send 3 Gb and the slave control unit can send 1 Gb; the main control unit can send 2 Gb and the slave control unit can send 2 Gb; or other allocation methods can be used for allocation, specifically the main control unit can adaptively allocate according to the performance of the main control unit and the slave control unit, which is not limited in this application.
[0188] By adopting the embodiment of the present application, after the first control unit identifies itself as a master device and the second control unit identifies itself as a slave device, the first control unit and the second control unit can implement data transmission in parallel through master-slave cooperation, thereby improving the efficiency of data transmission.
[0189] like Fig.19 The figure shows an example of the structure of an industrial camera provided by an embodiment of the present application. The industrial camera provided by an embodiment of the present application includes a program storage unit 30 (Flash), two control units (a first control unit 10 (MCU1) and a second control unit 20 (MCU2)), a field programmable gate array 50 (FPGA), and four load switches (switch 41, switch 42, switch 43, switch 44). After the device is powered on, MCU1 pulls down the reset pin 501 (FPGA_RST) of the FPGA through the general input and output interface 101 (MCU1_GPIO0), and pulls down the reset pin 205 (MCU2_RST) of MCU2 through the general input and output interface 109 (MCU1_GPIO3), and does not allow MCU2 and FPGA to load.
[0190] Then the MCU1 general input and output interface 103 (MCU1_GPIO2) pulls down the state of load switch 41, load switch 42, load switch 43, and load switch 44 to switch access point 1, and realizes the connection between access point 2 of the above load switch and access point 4. Since the pins 301 (DO pin), 302 (DI pin), 303 (CLK pin), and 304 (CS pin) of Flash are respectively connected to access point 4 of the load switch, and the access point 2 of the load switch is respectively connected to pins 104 (MCU1_MISO), 105 (MCU1_MOSI), 106 (MCU1_CLK), and 107 (MCU1_CS) of MCU1, the signal of Flash can be connected to MCU1 at this time, and MCU1 can read the program required for MCU1 to load from Flash through the load switch and load it. At this time, MCU1 can be identified as the main control unit by the pull-down state of the resistor 120 connected to pin 109 (MCU1_GPIO3).
[0191] After MCU1 is loaded, MCU1 releases the reset of FPGA, and the pin 503 (FPGA_CONFIG_DATAO) of FPGA is connected to the access point 2 signal of switch 41. MCU1 can use pin 104 (MCU1_MISO) to send a read signal to Flash through switch 41. Flash reads the program required for FPGA loading and sends it to FPGA, which is loaded by FPGA. After FPGA loading is completed, FPGA pulls up pin 502 (FPGA_Done) to indicate the loading completion signal, and sends the loading completion signal to the general input and output port 102 (MCU1_GPIO1) of MCU1.
[0192] Finally, MCU1 switches the access point by controlling the state of the load switch to achieve the connection between access point 4 and access point 3. Since pins 201 (MCU2_CS), 202 (MCU2_CLK), 203 (MCU2_MOSI), and 204 (MCU2_MISO) of MCU2 are respectively connected to the access point 3 of each switch, the signal of Flash can be connected to MCU2 at this time. MCU1 pulls up the reset pin MCU2_RST of MCU2 through pin 108 (MCU1_GPIO4) to release MCU2. MCU2 reads the program required for MCU2 loading from the program storage unit 30 through the load switch and loads it. After MCU2 is loaded, MCU2 can be identified as a slave control unit through the pull-up state of resistor 207 connected to pin 206 (MCU2_GPIO3).
[0193] from Fig.19It can be seen that there are 4 load switches, which are connected to Flash pins 303 (CLK), 304 (CS), 301 (DO), and 302 (DI). Flash1's CLK pin is connected to MCU1's pin 106 (MCU1_CLK), MCU2's pin 202 (MCU2_CLK), and FPGA's pin 504 (FPGA_CONFIG_CLK) through load switches. Each load switch has a state switching access point (corresponding to Fig.19 Access point 1 in the first control unit access point (corresponding to Fig.19 Access point 2 in the second control unit access point (corresponding to Fig.19 Access point 3 in the program storage unit (corresponding to Fig.19 4). It is understandable that when the number of control units increases, the number of access points on each switch unit also increases. For example, if there are three control units in the device, each switch unit should also include at least one third control unit access point, and if there are four control units in the device, each switch unit should also include at least two control unit access points.
[0194] In addition, industrial cameras can usually collect and process image data in real time. Therefore, in a possible embodiment, the industrial camera also includes an image acquisition module, such as Fig. 20 FIG. 1 is an example diagram of data transmission between an industrial camera and a target device provided in an embodiment of the present application. The industrial camera 110 transmits data to another device 220 via a data line 330 connected to an interface. The structure of the industrial camera 110 is as follows: Fig.21As shown, it includes an image acquisition module 1101, a field programmable logic gate array 1102, a first control unit 1105, a second control unit 1106, a switch unit 1104 and a program storage unit 1103. After the industrial camera is powered on, the switch unit 1104 is initially in the first state, the first control unit 1105 controls the second control unit 1106 to be in a non-loading state, and reads the first program required for the first control unit 1105 to load from the program storage unit 1103 through the switch unit 1104. After loading, the first control unit 1105 controls the switch unit 1104 to be in the second state, and controls the second control unit 1106 to be in a loading state. The second control unit 1106 reads and loads the second program from the program storage unit 1103 through the switch unit 1104. After the second control unit 1106 is loaded, the first control unit 1105 controls the switch unit 1104 to be in the first state, and reads the third program required for loading the field programmable logic gate array 1102 from the program storage unit 1103 and sends it to the field programmable logic gate array 1102. The field programmable logic gate array 1102 receives the third program and loads it. After the loading of each control unit and the field programmable logic gate array 1102 is completed, the field programmable logic gate array 1102 receives the original image sent by the image acquisition module 1101, processes the original image, and sends it to the first control unit 1105 and the second control unit 1106. The first control unit 1105 and the second control unit 1106 transmit the processed image data through the data transmission interface 1107 and the data transmission interface 1108 in a master-slave cooperation manner, thereby achieving bandwidth increase.
[0195] It can be understood that in the process of realizing industrial camera data transmission, the loading order of the FPGA and the second control unit, the method of obtaining the program required for FPGA loading, and can be any one of the aforementioned embodiments, and the embodiments of the present application are not limited to this.
[0196] Based on the above embodiments, it can be seen that in the first aspect of the present application, an industrial camera is provided, which includes a first control unit and a second control unit, a program storage unit, and a switch unit; the switch unit is respectively connected to the first control unit, the second control unit, and the program storage unit by signal;
[0197] The program storage unit stores the programs required for each control unit to load;
[0198] The first control unit is used to control the second control unit to be in a non-loading state, control the switch unit to make the first control unit conductive with the program storage unit, read the first program required for loading by the first control unit from the program storage unit and load it; after completing the loading of the first program, control the second control unit to be in a loading state;
[0199] The second control unit is used to obtain and load the second program required for loading by the second control unit;
[0200] The first control unit is further used to implement data transmission using the loaded first program;
[0201] The second control unit is further configured to implement data transmission in parallel with the first control unit using the loaded second program.
[0202] According to the industrial camera provided by the embodiment of the present application, compared with the prior art in which each control unit obtains the required program for loading from different program storage units, the first program required for loading the first control unit and the second program required for loading the second control unit are stored in the same program storage unit in the present application, which reduces the number of program storage units and reduces the cost of the industrial camera; and, compared with the prior art in which each control unit is connected to different program storage units, the first control unit in the present application is connected to the program storage unit through a switch unit, and the first control unit and the second control unit can obtain the required program for loading by controlling the switch unit, which reduces the number of pins required for establishing the connection, and the first control unit and the second control unit can use the loaded first program and the second program to realize data transmission in parallel after loading, thereby realizing the effect of high-speed data transmission using a small number of pins; on the other hand, there is only one program storage unit in the present application, and it is relatively simple to encrypt, upgrade or maintain the program storage unit in the industrial camera later, without the need to encrypt, upgrade or maintain multiple program storage units separately. And, since there is no need to upgrade multiple program storage units in the present application, there will be no situation in which the program versions of multiple control units are not unified due to upgrading the programs in some program storage units and not upgrading the programs in other program storage units.
[0203] In a possible implementation, the industrial camera further includes a field programmable logic gate array, and the program storage unit further includes a third program required for loading the field programmable logic gate array;
[0204] The first control unit is further used to control the field programmable logic gate array to be in a non-loading state before reading the first program required for loading by the first control unit from the program storage unit; and to control the field programmable logic gate array to be in a loading state after completing loading of the first program;
[0205] The field programmable logic gate array is used to obtain and load the third program.
[0206] In a possible implementation manner, the first control unit is further configured to, after completing loading of the first program, control the switch unit so that the second control unit is connected to the program storage unit; the second control unit is specifically configured to read and load the second program required for loading by the second control unit from the program storage unit;
[0207] or,
[0208] The first control unit is further used to read the second program from the program storage unit and send it to the second control unit; the second control unit is specifically used to receive and load the second program sent by the first control unit.
[0209] In a possible implementation manner, a first pin is provided on the first control unit, and a second pin is provided on the second control unit;
[0210] The first control unit is specifically used to determine that it is a master device after identifying that the first pin is pulled low;
[0211] The second control unit is specifically configured to determine that it is a slave device after identifying that the second pin is pulled high;
[0212] The first control unit is specifically used to, in response to the data to be sent, determine the first data to be sent that the first control unit needs to send according to the data amount of the data to be sent; drive the first control unit to transmit the first data to be sent, and drive the second control unit to transmit the second data to be sent; wherein the sum of the data amount of the first data to be sent and the data amount of the second data to be sent is equal to the data amount of the data to be sent.
[0213] In a possible implementation, the first program is the same as the second program.
[0214] In a possible implementation, the industrial camera further includes at least one third control unit, and the third control unit is signal-connected to the switch unit;
[0215] The first control unit is further used to control the third control unit to be in a non-loading state before reading the first program required for loading by the first control unit from the program storage unit; after the second control unit completes loading the second program, control the third control unit to be in a loading state, and control the switch unit to make the third control unit conductive with the program storage unit;
[0216] The third control unit is used to read and load the fourth program required by the third control unit from the program storage unit;
[0217] The third control unit is further configured to implement data transmission in parallel with the first control unit and the second control unit using the loaded fourth program.
[0218] In a possible implementation, the first control unit is further used to read a third program from the program storage unit and send it to the field programmable gate array; or, after the second program is loaded, control the switch unit to connect the first control unit to the program storage unit, and read the third program from the program storage unit and send it to the field programmable gate array.
[0219] In a possible implementation manner, the first control unit is specifically configured to control the field programmable logic gate array to be in a loading state after the second program is loaded;
[0220] The second control unit is further used to read a third program from the program storage unit and send it to the field programmable logic gate array.
[0221] In a possible implementation manner, the first control unit is further used to drive the second control unit to read the third program from the program storage unit and send the third program to the field programmable logic gate array;
[0222] The first control unit is specifically used to control the second control unit to be in a loading state after the third program is loaded;
[0223] The second control unit is further configured to, under the drive of the first control unit, read a third program from the program storage unit and send the third program to the field programmable logic gate array.
[0224] In a possible implementation manner, the first control unit is further configured to, after the first program is loaded, or after the second program is loaded, control the switch unit to connect the field programmable logic gate array to the program storage unit;
[0225] The field programmable logic gate array is specifically used to read and load the third program from the program storage unit.
[0226] In a possible implementation, the first control unit is specifically used to control the circuit unit to be in a loading state in the following manner, including: pulling up a reset pin of the circuit unit, wherein the circuit unit includes a second control unit, a third control unit, or a field programmable logic gate array;
[0227] The first control unit is specifically used to control the circuit unit to be in a non-loaded state in the following manner, including: pulling down a reset pin of the circuit unit.
[0228] In a second aspect of the present application, a program loading method for an industrial camera is provided, wherein the industrial camera comprises a first control unit and a second control unit, a program storage unit, and a switch unit; the switch unit is respectively connected to the first control unit, the second control unit, and the program storage unit by signals;
[0229] Methods include:
[0230] The first control unit controls the second control unit to be in a non-loading state, controls the switch unit to make the first control unit conductive with the program storage unit, reads the first program required for loading by the first control unit from the program storage unit and loads it; after completing the loading of the first program, controls the second control unit to be in a loading state;
[0231] The second control unit obtains and loads the second program required for loading by the second control unit.
[0232] According to the program loading method for industrial cameras provided by the embodiments of the present application, compared with the prior art in which each control unit obtains the required program for loading from different program storage units, the first program required for loading by the first control unit and the second program required for loading by the second control unit are stored in the same program storage unit in the present application, which reduces the number of program storage units and reduces the cost of industrial cameras; and, compared with the prior art in which each control unit is connected to different program storage units, the first control unit in the present application is connected to the program storage unit through a switch unit, and the first control unit and the second control unit can obtain the required program for loading by controlling the switch unit, reducing the number of pins required for establishing a connection; on the other hand, there is only one program storage unit in the present application, and it is relatively simple to encrypt, upgrade or maintain the program storage unit in the industrial camera later, without the need to encrypt, upgrade or maintain multiple program storage units separately. In addition, since there is no need to upgrade multiple program storage units in the present application, there will be no situation in which the program versions of multiple control units are not unified due to upgrading the programs in some program storage units and not upgrading the programs in other program storage units.
[0233] In a third aspect of the present application, a data transmission method is provided, which is applied to an industrial camera, wherein the industrial camera includes a first control unit and a second control unit, a program storage unit, and a switch unit; the switch unit is respectively connected to the first control unit, the second control unit, and the program storage unit by signal;
[0234] Methods include:
[0235] The first control unit controls the second control unit to be in a non-loading state, controls the switch unit to make the first control unit conductive with the program storage unit, reads the first program required for loading by the first control unit from the program storage unit and loads it; after completing the loading of the first program, controls the second control unit to be in a loading state;
[0236] The second control unit obtains and loads the second program required for loading by the second control unit;
[0237] The first control unit and the second control unit perform data transmission in parallel using the loaded first program and second program.
[0238] In a possible implementation, the industrial camera further includes an image acquisition component and a field programmable logic gate array, and the industrial camera is connected to the target device; the image acquisition component is used to acquire an original image and send the original image to the field programmable logic gate array; the field programmable logic gate array is used to process the original image to obtain a target image, and send the target image to the first control unit and the second control unit;
[0239] The first control unit and the second control unit perform data transmission in parallel using the loaded first program and the loaded second program, including:
[0240] The first control unit and the second control unit transmit the target image to the target device in parallel using the loaded first program and the loaded second program.
[0241] Through the data transmission method provided by the embodiment of the present application, compared with the prior art that each control unit obtains the required program for loading from different program storage units, the first program required for loading the first control unit and the second program required for loading the second control unit are stored in the same program storage unit in the present application, which reduces the number of program storage units and reduces the cost of industrial cameras; and, compared with the prior art that each control unit is connected to different program storage units, the first control unit in the present application is connected to the program storage unit through a switch unit, and the first control unit and the second control unit can obtain the required program for loading by controlling the switch unit, which reduces the number of pins required for establishing a connection. After the first control unit and the second control unit are loaded, the loaded first program and the second program can be used to realize data transmission in parallel, thereby realizing the effect of high-speed data transmission using a small number of pins; on the other hand, there is only one program storage unit in the present application, and it is relatively simple to encrypt, upgrade or maintain the program storage unit in the industrial camera later. In addition, since there is no need to upgrade multiple program storage units in the present application, there will be no situation where the program versions of multiple control units are not unified due to upgrading the programs in some program storage units and not upgrading the programs in other program storage units.
[0242] In a possible implementation, the industrial camera further includes an image acquisition component and a field programmable logic gate array, and the industrial camera is connected to the target device; the image acquisition component is used to acquire an original image and send the original image to the field programmable logic gate array; the field programmable logic gate array is used to process the original image to obtain a target image, and send the target image to the first control unit and the second control unit;
[0243] The first control unit and the second control unit perform data transmission in parallel using the loaded first program and the loaded second program, including:
[0244] The first control unit and the second control unit transmit the target image to the target device in parallel using the loaded first program and the loaded second program.
[0245] By adopting the method of the embodiment of the present application, the first control unit and the second control unit can transmit data to the target device in parallel, thereby improving the efficiency of data transmission.
[0246] In a fourth aspect of the present application, a program loading device for an industrial camera is provided, the industrial camera comprising a first control unit and a second control unit, a program storage unit, and a switch unit; the switch unit is signal-connected to the first control unit, the second control unit, and the program storage unit, respectively;
[0247] The device comprises a first control module and a second control module;
[0248] The first control module is used to drive the first control unit to control the second control unit to be in a non-loading state, control the switch unit to make the first control unit conductive with the program storage unit, read the first program required for loading by the first control unit from the program storage unit and load it; after completing the loading of the first program, control the second control unit to be in a loading state;
[0249] The second control module is used to drive the second control unit to obtain and load the second program required for loading by the second control unit.
[0250] Through the program loading device of the industrial camera provided by the embodiment of the present application, compared with the prior art that each control unit obtains the required program for loading from different program storage units, the first program required for loading the first control unit and the second program required for loading the second control unit are stored in the same program storage unit in the present application, which reduces the number of program storage units and reduces the cost of the industrial camera; and, compared with the prior art that each control unit is connected to different program storage units, the first control unit in the present application is connected to the program storage unit through a switch unit, and the first control unit and the second control unit can obtain the required program for loading by controlling the switch unit, reducing the number of pins required for establishing the connection; on the other hand, there is only one program storage unit in the present application, and it is relatively simple to encrypt, upgrade or maintain the program storage unit in the industrial camera later, without the need to encrypt, upgrade or maintain multiple program storage units separately. In addition, since there is no need to upgrade multiple program storage units in the present application, there will be no situation where the program versions of multiple control units are not unified due to upgrading the programs in some program storage units and not upgrading the programs in other program storage units.
[0251] In a fifth aspect of the present application, a data transmission device is provided, which is applied to an industrial camera, wherein the industrial camera comprises a first control unit and a second control unit, a program storage unit, and a switch unit; the switch unit is respectively connected to the first control unit, the second control unit, and the program storage unit by signal;
[0252] The device comprises: a first control module and a second control module;
[0253] The first control module is used to drive the first control unit to control the second control unit to be in a non-loading state, control the switch unit to make the first control unit conductive with the program storage unit, read the first program required for loading by the first control unit from the program storage unit and load it; after completing the loading of the first program, control the second control unit to be in a loading state;
[0254] The second control module is used to drive the second control unit to obtain and load the second program required for loading by the second control unit;
[0255] The first control module is further used to drive the first control unit to realize data transmission using the loaded first program;
[0256] The second control module is further used to drive the second control unit to perform data transmission in parallel with the first control unit using the loaded second program.
[0257] Through the data transmission device provided by the embodiment of the present application, compared with the prior art that each control unit obtains the required program for loading from different program storage units, the first program required for loading the first control unit and the second program required for loading the second control unit are stored in the same program storage unit in the present application, which reduces the number of program storage units and reduces the cost of industrial cameras; and, compared with the prior art that each control unit is connected to different program storage units, the first control unit in the present application is connected to the program storage unit through a switch unit, and the first control unit and the second control unit can obtain the required program for loading by controlling the switch unit, which reduces the number of pins required for establishing a connection. After the first control unit and the second control unit are loaded, the loaded first program and the second program can be used to realize data transmission in parallel, thereby realizing the effect of high-speed data transmission using a small number of pins; on the other hand, there is only one program storage unit in the present application, and it is relatively simple to encrypt, upgrade or maintain the program storage unit in the industrial camera later. In addition, since there is no need to upgrade multiple program storage units in the present application, there will be no situation where the program versions of multiple control units are not unified due to upgrading the programs in some program storage units and not upgrading the programs in other program storage units.
[0258] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the program loading method and data transmission method for an industrial camera in any of the above-mentioned embodiments.
[0259] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.
[0260] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0261] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
[0262] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. An industrial camera, characterized in that: The industrial camera comprises a first control unit and a second control unit, a program storage unit, and a switch unit; the switch unit is respectively connected to the first control unit, the second control unit, and the program storage unit by signals; The program storage unit stores the programs required by each control unit when loading; The first control unit is used to control the second control unit to be in a non-loading state, control the switch unit to make the first control unit conductive with the program storage unit, read the first program required for loading by the first control unit from the program storage unit and load it; after completing the loading of the first program, control the second control unit to be in a loading state; The second control unit is used to obtain and load a second program required for loading by the second control unit; The first control unit is further used to realize data transmission using the loaded first program; The second control unit is further configured to implement data transmission in parallel with the first control unit using the loaded second program.
2. The industrial camera according to claim 1, characterized in that: The industrial camera further includes a field programmable logic gate array, and the program storage unit further includes a third program required for the field programmable logic gate array to load; The first control unit is further used to control the field programmable logic gate array to be in a non-loading state before reading the first program required for loading by the first control unit from the program storage unit; and control the field programmable logic gate array to be in a loading state after completing the loading of the first program; The field programmable logic gate array is used to obtain and load the third program.
3. The industrial camera according to claim 1, characterized in that: The first control unit is further used to, after completing the loading of the first program, control the switch unit so that the second control unit is connected to the program storage unit; the second control unit is specifically used to read the second program required for loading by the second control unit from the program storage unit and load it; or, The first control unit is further used to read the second program from the program storage unit and send it to the second control unit; the second control unit is specifically used to receive and load the second program sent by the first control unit.
4. The industrial camera according to claim 1, characterized in that: The first control unit is provided with a first pin, and the second control unit is provided with a second pin; The first control unit is specifically configured to determine that it is a master device after identifying that the first pin is pulled low; The second control unit is specifically configured to determine that the second control unit is a slave device after identifying that the second pin is pulled high; The first control unit is specifically used to, in response to the data to be sent, determine the first data to be sent of the first control unit according to the data amount of the data to be sent; drive the first control unit to transmit the first data to be sent, and drive the second control unit to transmit the second data to be sent; wherein the sum of the data amount of the first data to be sent and the data amount of the second data to be sent is equal to the data amount of the data to be sent.
5. The industrial camera according to claim 1, characterized in that: The first procedure is the same as the second procedure.
6. The industrial camera according to claim 1, characterized in that: The industrial camera further comprises at least one third control unit, wherein the third control unit is signal-connected to the switch unit; The first control unit is further used to control the third control unit to be in a non-loading state before reading the first program required by the first control unit to load from the program storage unit; after the second control unit completes loading the second program, control the third control unit to be in a loading state, and control the switch unit to make the third control unit conductive with the program storage unit; The third control unit is used to read and load the fourth program required by the third control unit from the program storage unit; The third control unit is further configured to implement data transmission in parallel with the first control unit and the second control unit using the loaded fourth program.
7. The industrial camera according to claim 2, characterized in that: The first control unit is further used to read the third program from the program storage unit and send it to the field programmable gate array; or, after the second program is loaded, control the switch unit so that the first control unit is connected to the program storage unit, and read the third program from the program storage unit and send it to the field programmable gate array.
8. The industrial camera according to claim 2, characterized in that: The first control unit is specifically configured to control the field programmable logic gate array to be in a loading state after the second program is loaded; The second control unit is further configured to read the third program from the program storage unit and send the third program to the field programmable logic gate array.
9. The industrial camera according to claim 2, characterized in that: The first control unit is further used to drive the second control unit to read the third program from the program storage unit and send the third program to the field programmable logic gate array; The first control unit is specifically configured to control the second control unit to be in a loading state after the third program is loaded; The second control unit is further configured to, under the drive of the first control unit, read the third program from the program storage unit and send the third program to the field programmable logic gate array.
10. The industrial camera according to claim 2, characterized in that: The first control unit is further used to, after the first program is loaded, or after the second program is loaded, control the switch unit to connect the field programmable logic gate array to the program storage unit; The field programmable logic gate array is specifically used to read and load the third program from the program storage unit.
11. The industrial camera according to any one of claims 1 to 10, characterized in that: The first control unit is specifically used to control the circuit unit to be in a loading state in the following manner, including: pulling up a reset pin of the circuit unit, wherein the circuit unit includes a second control unit, a third control unit or a field programmable logic gate array; The first control unit is specifically used to control the circuit unit to be in a non-loaded state in the following manner, including: pulling down a reset pin of the circuit unit.
12. A method for loading a program for an industrial camera, characterized in that: The industrial camera comprises a first control unit and a second control unit, a program storage unit, and a switch unit; the switch unit is respectively connected to the first control unit, the second control unit, and the program storage unit by signals; The method comprises: The first control unit controls the second control unit to be in a non-loading state, controls the switch unit to make the first control unit conductive with the program storage unit, reads a first program required for loading by the first control unit from the program storage unit and loads it; after completing the loading of the first program, controls the second control unit to be in a loading state; The second control unit obtains and loads a second program required for loading by the second control unit.
13. A data transmission method, characterized in that: Applied to an industrial camera, the industrial camera comprises a first control unit and a second control unit, a program storage unit, and a switch unit; the switch unit is respectively connected to the first control unit, the second control unit, and the program storage unit by signals; The method comprises: The first control unit controls the second control unit to be in a non-loading state, controls the switch unit to make the first control unit conductive with the program storage unit, reads a first program required for loading by the first control unit from the program storage unit and loads it; after completing the loading of the first program, controls the second control unit to be in a loading state; The second control unit obtains and loads a second program required for loading by the second control unit; The first control unit and the second control unit perform data transmission in parallel using the loaded first program and the second program.
14. The method according to claim 13, characterized in that The industrial camera further includes an image acquisition component and a field programmable logic gate array, and the industrial camera is connected to a target device; the image acquisition component is used to acquire an original image and send the original image to the field programmable logic gate array; the field programmable logic gate array is used to process the original image to obtain a target image and send the target image to the first control unit and the second control unit; The first control unit and the second control unit perform data transmission in parallel using the loaded first program and the loaded second program, including: The first control unit and the second control unit transmit the target image to the target device in parallel using the loaded first program and the second program.
15. A program loading device for an industrial camera, characterized in that: The industrial camera comprises a first control unit and a second control unit, a program storage unit, and a switch unit; the switch unit is respectively connected to the first control unit, the second control unit, and the program storage unit by signals; The device comprises a first control module and a second control module; The first control module is used to drive the first control unit to control the second control unit to be in a non-loading state, control the switch unit to make the first control unit conductive with the program storage unit, read the first program required for loading by the first control unit from the program storage unit and load it; after completing the loading of the first program, control the second control unit to be in a loading state; The second control module is used to drive the second control unit to obtain and load the second program required for loading by the second control unit.
16. A data transmission device, characterized in that: Applied to an industrial camera, the industrial camera comprises a first control unit and a second control unit, a program storage unit, and a switch unit; the switch unit is respectively connected to the first control unit, the second control unit, and the program storage unit by signals; The device comprises: a first control module and a second control module; The first control module is used to drive the first control unit to control the second control unit to be in a non-loading state, control the switch unit to make the first control unit conductive with the program storage unit, read the first program required for loading by the first control unit from the program storage unit and load it; after completing the loading of the first program, control the second control unit to be in a loading state; The second control module is used to drive the second control unit to obtain and load the second program required for loading by the second control unit; The first control module is further used to drive the first control unit to realize data transmission using the loaded first program; The second control module is further used to drive the second control unit to perform data transmission in parallel with the first control unit using the loaded second program.
Citation Information
Patent Citations
Safe starting method and device and terminal
CN108229132A
Firmware upgrading method of electronic equipment and electronic equipment
CN111309348A
Method for putting a camera control unit (CCU) into operation
CN113647091A
Electronic equipment and configuration file loading method
CN114265472A
Data storage system architecture with controller and data access method thereof
CN114579047A