A three-degree-of-freedom robot palletizing method based on intelligent vision and PLC control
Through intelligent vision and PLC control methods, industrial cameras and PLC communication are used to realize rapid identification and orderly stacking of materials, solving the problem of slow recognition of color mark sensors and improving production efficiency.
Patent Information
- Application Number
- CN202210929895.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-04
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-08-04
AI Technical Summary
In the prior art, color standard sensors can only singlely identify materials, resulting in slow identification speed and affecting production efficiency.
Using a method based on intelligent vision and PLC control, the material images are collected through industrial cameras, color recognition and preprocessing, variable assignments are defined, PLC communication channels are established, and the three-degree of freedom robots are controlled to grab the corresponding color materials for palletization.
Reduce repeated scanning of materials by sensors, improve identification speed, realize orderly placement of materials, and improve production efficiency.
Smart Images

Figure CN115157266B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of palletizing, and in particular to a three-degree-of-freedom robot palletizing method based on intelligent vision and PLC control. Background Art
[0002] A three-degree-of-freedom robot is a machine that grabs and stacks items through the control of a controller, and is commonly used in the field of item palletizing.
[0003] In the related art, a Chinese patent with the authorization announcement number CN110371695A provides an integrated training workstation for industrial robot palletizing and depalletizing, which includes a palletizing conveying unit. A double-row sprocket roller is arranged between the palletizing conveying units. A first photoelectric sensor is arranged at one end of the palletizing conveying unit, and a second photoelectric sensor is arranged at the other end of the palletizing conveying unit. A color mark sensor is arranged between the first photoelectric sensor and the second photoelectric sensor. First, the first photoelectric sensor scans whether there is material on the palletizing conveying unit. If there is material, the material is conveyed through the double-row sprocket roller. The color mark sensor identifies the color of the material, and then the second photoelectric sensor locates the material to reach the end of the conveying chain. Finally, the material in-place signal is conveyed to the robot through the communication between the PLC and the robot, and then the robot starts palletizing.
[0004] In the process of implementing the present application, the inventor found that at least the following problems exist in this technology: The color mark sensor can only identify singly. Each time the color mark sensor needs to rescan the material in transit, resulting in staying in the scanning stage for most of the time, causing a slow recognition speed. Summary of the Invention
[0005] In order to accelerate the recognition speed and improve production efficiency, the present application provides a three-degree-of-freedom robot palletizing method based on intelligent vision and PLC control.
[0006] A three-degree-of-freedom robot palletizing method based on intelligent vision and PLC control provided by the present application adopts the following technical solutions: including the following steps:
[0007] S1. Image acquisition: Turn on the industrial camera and programming software. The industrial camera traverses the goods for image acquisition, and the programming software outputs the image;
[0008] S2. Establish a PLC communication channel;
[0009] S3. Image preprocessing: Extract the color channels of the input image into separate monochromatic images, and output the average pixel value of floating-point type;
[0010] S4. Create data analysis and then perform single-target positioning: Assign values to predefined variables, and define what color of material the average pixel value obtained in S3 corresponds to;
[0011] S5. Transmit serial port data to the PLC: Assign the variables created in S4 and send them to the PLC.
[0012] S6. The PLC determines the color of the material and performs palletizing.
[0013] By adopting the above technical solution, the industrial camera collects the material image, performs color recognition on the collected image, assigns values to predefined variables according to the extracted color, finds the corresponding variable assignment by comparing objects and sends a signal to the PLC. The PLC receives the signal and controls the three-degree-of-freedom robot to grasp the materials of the corresponding color for palletizing, reducing the situation where the sensor can only identify singly and needs to rescan the materials each time, thereby reducing the slow recognition speed, achieving the effect of accelerating the recognition speed, and improving production efficiency.
[0014] Preferably, the programming software is the X-SIGHT VISION STUDIO free programming software, and the industrial camera is the X-SIGHT industrial camera.
[0015] By adopting the above technical solution, it is convenient to establish a connection between the industrial camera and the programming software.
[0016] Preferably, the output image in S1 is in png format.
[0017] By adopting the above technical solution, unifying the image output format facilitates subsequent calls.
[0018] Preferably, S2 further includes:
[0019] S21. Connect the programming software and the PLC with a serial cable;
[0020] S22. Select the "Free Serial Port" instruction in the programming software;
[0021] S23. Set the corresponding parameters in the property bar and make the baud rate and protocol in the serial port configurations of the sender and the receiver consistent.
[0022] By adopting the above technical solution, one end of the serial cable is electrically connected to the peripheral where the programming software is located, the other end of the serial cable is connected to the serial data port of the PLC, and the baud rate and protocol in the serial port configurations of the sender and the receiver are made consistent, achieving the effect of establishing a PLC communication channel.
[0023] Preferably, S3 further includes:
[0024] S31. Convert the image obtained in S1 to grayscale, extract the color channels of the input image into a single-channel image, and output zero for the non-existent color channels of the image;
[0025] S32: Perform single-pixel point statistics on the single-channel image obtained in S31;
[0026] S33. Obtain the current coordinates of a single pixel according to S32;
[0027] S34. Output the average pixel value in floating point type according to the current coordinates obtained in S33.
[0028] By adopting the above technical solution, the collected image is subjected to color extraction, and the extracted analog signal is converted into a digital signal.
[0029] Preferably, the S4 further includes:
[0030] S41. Select the variable assignment instruction in the programming software to the task bar;
[0031] S42. Double-click the variable assignment instruction in the task bar in the programming software;
[0032] S43. Select the string type in the popped-up array type selection window;
[0033] S44. Connect the "linked variable" in the property bar to the created number "0001 - created data.output value", and input a value of string type in the property bar;
[0034] S45. Perform single-target positioning on the image obtained according to S1, and execute variable assignment of the corresponding color through an if statement.
[0035] By adopting the above technical solution, variable assignment for each color is defined.
[0036] Preferably, the S45 further includes:
[0037] S451. Match the material model and the contour template with the input image;
[0038] S452. Limit the search range;
[0039] S453. If a target that is not similar to the template is detected, increase the similarity threshold.
[0040] By adopting the above technical solution, a single material is scanned and searched. If a similar target is detected, a signal is output to the PLC. If no similar target is detected, the similarity threshold is increased until a similar target is detected.
[0041] Preferably, the S6 further includes:
[0042] S61: The PLC uses the RS serial data sending instruction, which is used for protocol-free communication through the RS-232C serial communication port installed on the basic unit, and receives the variable assignment for executing S4;
[0043] S62: The ZRN origin return instruction of the PLC makes the mechanical position consistent with the current value register in the PLC;
[0044] S63: Determine the color based on the signal received in S5 and the register setting value in the PLC, and then use the MOV transfer instruction to transfer it to the step number of the corresponding color;
[0045] S64: Define the registers for the rows and columns of the material area to obtain the row and column data of each material;
[0046] S65: The PLC starts to grab the materials in the material area using the PLSY pulse output instruction;
[0047] S66: The PLC grabs the materials for discharging. After placing each material, the data in the register of the corresponding color will be incremented by one to process the placement of the next material. When all the materials of the current color are processed, it returns to S62 and loops until all the materials are processed.
[0048] By adopting the above technical solution, after the PLC receives the color signal, it sends an instruction to the robot, and the robot grabs the materials of the corresponding color and places them in the material area in sequence. After all the materials of this color are grabbed, the robot grabs the materials of the next color and places them in the material area in sequence until all the materials are placed, achieving the effect of placing materials according to color.
[0049] Preferably, the S64 further includes:
[0050] S641: Define the rows, columns and height of the material area;
[0051] S642: Use the ADDP pulse execution type addition operation instruction to perform a binary addition operation on the contents of the origin register and the current row register and then transfer it to the row execution shift register to obtain the number of material discharging rows in the material area corresponding to each color;
[0052] S643: Use the SUBP pulse execution type subtraction operation instruction to perform a binary addition operation on the contents of the origin register and the current column register and then transfer it to the column execution shift register to obtain the number of material discharging columns in the material area corresponding to each color.
[0053] By adopting the above technical solution, by defining the rows, columns and height of the material area, the effect of controlling the robot to place the materials in the material area orderly can be achieved.
[0054] In summary, the present application includes at least one of the following beneficial technical effects:
[0055] 1. Reduce the situation where the sensor can only identify singly and needs to rescan the materials each time, thereby reducing the situation of slow recognition speed, achieving the effect of accelerating the recognition speed and improving production efficiency;
[0056] 2. Achieve the effect that the robot can orderly arrange the materials in the material area. Description of the Drawings
[0057] Figure 1 It is a flowchart of a three-degree-of-freedom robot palletizing method based on intelligent vision and PLC control in an embodiment of the present application.
[0058] Figure 2 It is a flowchart of the intelligent vision part in an embodiment of the present application.
[0059] Figure 3 It is a flowchart of the PLC control part in an embodiment of the present application. Detailed Description of the Embodiment
[0060] The following further describes the present application in detail Figures 1-3 in conjunction with the accompanying drawings.
[0061] An embodiment of the present application discloses a three-degree-of-freedom robot palletizing method based on intelligent vision and PLC control. Referring to Figures 1 to 3 , it includes the following steps:
[0062] S1. Image acquisition: Turn on the industrial camera and programming software. The industrial camera traverses the goods for image acquisition, and the programming software outputs images in png format. The programming software is the X-SIGHT VISION STUDIO free programming software, and the industrial camera is the X-SIGHT industrial camera.
[0063] S2. Establish a PLC communication channel, and its specific steps are as follows:
[0064] S21. Connect the programming software and the PLC with a serial cable. One end of the serial cable is electrically connected to the peripheral where the programming software is located, and the other end of the serial cable is connected to the serial data port of the PLC;
[0065] S22. Select the "Free Serial Port" instruction in the programming software;
[0066] S23. Set the corresponding parameters in the property bar and make the baud rate and protocol in the serial port configurations of the sender and the receiver consistent.
[0067] S3. Image preprocessing: Extract the color channels of the input image into separate monochromatic images and output the average pixel value in floating point type. Its specific steps are as follows:
[0068] S31. Convert the image obtained in S1 to grayscale, so that the color channels of the input image are extracted into a single-channel image, and the color channels that do not exist in the image output zero;
[0069] S32: Perform single-pixel point statistics based on the single-channel image obtained in S31;
[0070] S33. Obtain the current coordinates of a single pixel according to S32;
[0071] S34. Output the average pixel value of floating point type according to the current coordinates obtained in S33.
[0072] S4. Create single-object positioning after data analysis: Assign values to predefined variables, and define what kind of color material the average pixel value obtained in S3 corresponds to. The specific steps are as follows:
[0073] S41. Select the variable assignment instruction in the programming software to the task bar;
[0074] S42. Double-click the variable assignment instruction in the task bar in the programming software;
[0075] S43. Select the string type in the popped-up array type selection window;
[0076] S44. Connect the "linked variable" in the property bar to the "output value of 0001 - create data" of the created number, and enter a value of string type in the property bar;
[0077] S45. Perform single-object positioning according to the image obtained in S1, and execute variable assignment of the corresponding color through the if statement. The specific steps are as follows:
[0078] S451. Match the material model and the contour template with the input image;
[0079] S452. Limit the search range;
[0080] S453. If a target that is not similar to the template is detected, increase the similarity threshold.
[0081] S5. Send serial port data to the PLC: Send the variable assignment created in S4 to the PLC.
[0082] S6. The PLC judges the material color and performs palletizing. The specific steps are as follows:
[0083] S61: The PLC uses the RS serial data sending instruction, which is used for protocol-free communication through the RS-232C serial communication port installed on the basic unit, and receives and executes the variable assignment in S4;
[0084] S62: The PLC uses the ZRN origin return instruction to make the mechanical position consistent with the current value register in the PLC;
[0085] S63: Judge the color according to the signal received in S5 and the register setting value in the PLC, and then use the MOV transfer instruction to transfer it to the step number of the corresponding color;
[0086] S64. The registers that define the rows and columns of the material area are used to obtain the row and column data of each material. The specific steps are as follows:
[0087] S641: Define the rows, columns, and height of the material area.
[0088] S642: Use the ADDP pulse-executed addition operation instruction to perform a binary addition operation on the contents of the origin register and the register of the current row, and then transfer the result to the row execution shift register to obtain the number of material placement rows in the material area corresponding to each color.
[0089] S643: Use the SUBP pulse-executed subtraction operation instruction to perform a binary addition operation on the contents of the origin register and the register of the current column, and then transfer the result to the column execution shift register to obtain the number of material placement columns in the material area corresponding to each color.
[0090] By adopting the above technical solution, by defining the rows, columns, and height of the material area, the effect of controlling the robot to arrange the materials orderly in the material area can be achieved.
[0091] S65. The PLC starts to grab the materials in the material area and uses the PLSY pulse output instruction.
[0092] S66. The PLC grabs the materials for placement. After each material is placed, the data in the register of the corresponding color will be incremented by one to process the placement of the next material. When all the materials of the current color are processed, return to S62 and loop until all the materials are processed.
[0093] The implementation principle of a three-degree-of-freedom robot palletizing method based on intelligent vision and PLC control in an embodiment of the present application is as follows: Turn on the industrial camera and programming software. After the industrial camera finishes traversing the materials, a png-format image is obtained through the programming software. Color recognition is performed on the collected image, variables are assigned according to the extracted colors, and corresponding variables are assigned by comparing the objects and signals are sent to the PLC. The PLC receives the signals and controls the three-degree-of-freedom robot to grab the materials of the corresponding color for palletizing, reducing the situation where the sensor can only identify single items and requires re-scanning the materials each time, thereby reducing the slow recognition speed and achieving the effect of accelerating the recognition speed and improving production efficiency.
[0094] The above are all the preferred embodiments of the present application. The protection scope of the present application is not limited accordingly. Therefore, all equivalent changes made according to the structure, shape, and principle of the present application should be covered within the protection scope of the present application.
Claims
1. A three-degree-of-freedom robot palletizing method based on intelligent vision and PLC control, characterized in that: It includes the following steps: S1. Image acquisition: Turn on the industrial camera and programming software. The industrial camera traverses the goods for image acquisition, and the programming software outputs the image; S2. Establish a PLC communication channel; S3. Image preprocessing: Extract the color channels of the input image into separate monochromatic images, and output the average pixel value of floating-point type; The following is also included in S3: S31. Convert the image obtained in S1 to grayscale, so that the color channels of the input image are extracted into single-channel images, and the non-existent color channels of the image output zero; S32: Perform single-pixel point statistics on the single-channel image obtained in S31; S33. Obtain the current coordinates of a single pixel point according to S32; S34. Output the average pixel value of floating-point type according to the current coordinates obtained in S33; S4. Create data analysis and then perform single-target positioning: Assign values to predefined variables, and define what color of material the average pixel value obtained in S3 corresponds to; The following is also included in S4: S41. Select the variable assignment instruction in the programming software to the task bar; S42. Double-click the variable assignment instruction in the task bar in the programming software; S43. Select the string type in the popped-up array type selection window; S44. Connect the "linked variable” in the property bar to the "0001 - created data. output value” of the created number, and enter a value of string type in the property bar; S45. Perform single-target positioning according to the image obtained in S1, and execute variable assignment of the corresponding color through the if statement; The following is also included in S45: S451. Match the material model and contour template with the input image; S452. Limit the search range; S453. If a target that is not similar to the template is detected, increase the similarity threshold; S5. Send serial port data to the PLC: Send the variable assignment created in S4 to the PLC; S6. The PLC judges the material color and performs palletizing.
2. The method for palletizing by a three-degree-of-freedom robot based on intelligent vision and PLC control according to claim 1, wherein: The programming software is the X-SIGHT VISION STUDIO free programming software, and the industrial camera is the X-SIGHT industrial camera.
3. A three-degree-of-freedom robot palletizing method based on intelligent vision and PLC control according to claim 1, characterized in that: The output image in S1 is in png format.
4. A three-degree-of-freedom robot palletizing method based on intelligent vision and PLC control according to claim 1, characterized in that: The following is also included in S2: S21. Connect the programming software and the PLC with a serial cable; S22. Select the "free serial port” instruction in the programming software; S23. Set the corresponding parameters in the property bar and make the baud rate and protocol in the serial port configurations of the sender and the receiver consistent.
5. A three-degree-of-freedom robot palletizing method based on intelligent vision and PLC control according to claim 1, characterized in that: The following is also included in S6: S61: The PLC uses the RS serial data sending instruction, which is used for protocol-free communication through the RS-232C serial communication port installed on the basic unit, and receives and executes the variable assignment in S4; S62: The PLC uses the ZRN origin return instruction to make the mechanical position consistent with the current value register in the PLC; S63: Judge the color according to the signal received in S5 and the register set value in the PLC, and then use the MOV transfer instruction to transfer it to the step number of the corresponding color; S64. Define the registers for the rows and columns of the material area, and obtain the row and column data of each material; S65. The PLC starts to grab the materials in the material area, using the PLSY pulse output instruction; S66. The PLC grabs the material and discharges it. After each material is placed, the data in the register corresponding to the color will be incremented by one to process the placement of the next material. After processing the materials of the current color, it returns to S62 and loops in this way until all materials are processed.
6. The method for palletizing with a three - degree - of - freedom robot based on intelligent vision and PLC control according to claim 5, wherein: The S64 also includes: S641: Define the rows, columns, and height of the material area. S642: Use the ADDP pulse execution type addition operation instruction to perform a binary addition operation on the contents of the origin register and the register of the current row, and then transfer the result to the row execution shift register to obtain the number of discharge rows in the material area corresponding to each color. S643: Use the SUBP pulse execution type subtraction operation instruction to perform a binary addition operation on the contents of the origin register and the register of the current column, and then transfer the result to the column execution shift register to obtain the number of discharge columns in the material area corresponding to each color.
Citation Information
Patent Citations
Comprehensive practical training workstation for stacking and unstacking of industrial robot
CN110371695A
Logistics storage regular shape goods recognition system
CN110610141A