A PLC-based automatic optical alignment device and control method
Patent Information
- Application Number
- CN202311560763.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-22
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-11-22
AI Technical Summary
现有技术的操作繁琐,由于光罩外部还有一层外壳体,将光罩和光源一起笼罩在箱体里面,在对光时需要先打开外壳体,再手动推压活动阶梯,这种操作方式使得标定操作变得十分繁琐,标定效率低下
[0033]本发明通过设置有PLC控制器,实现光谱仪标定操作中白板和黑板的自动对光操作,解决人工摆放工具板不方便、位置不稳定的问题。本发明通过设置有基于PLC的自动对光装置的控制方法,能够实现自动化判定标定工具黑板和标定工具白板的位置,且根据不同的标定工具黑板和标定工具白板的位置进行相应的自动化操作。据此实现光谱仪标定操作中白板和黑板的自动对光操作。通过设备的控制方法选择对光的工具黑板或者白板,由自动化滑动机构将工具板紧贴着光罩内壁送到遮挡光纤端子的位置,完成工具板的对光。本发明可以摆脱对人手或者半自动化操作的依赖,将对光操作的部件集成到无损检测系统中,实现整个系统进一步自动化。
Smart Images

Figure CN117452871B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automation technology, specifically to a PLC-based automatic light matching device and control method. Background Technology
[0002] In agricultural engineering, post-harvest non-destructive testing of the internal quality of thick-skinned fruits is required. Currently, there are relatively few commercially available, mature non-destructive testing equipment for internal quality, primarily relying on spectrometers within the testing equipment. For non-destructive testing of thick-skinned fruits, the thick peel necessitates the use of high-energy light in spectrometers. Furthermore, spectrometers require calibration before operation, and the calibration toolboard used is quite thick and heavy, determining the zero-point and upper limit of the spectral energy it can receive.
[0003] Existing mainstream technical solutions such as Figure 1 As shown: A retractable step is installed below the fiber optic end, which does not extend into the photomask in its initial position. During spectrometer calibration, the retractable step is pressed into the photomask to form a small step for placing the calibration tool plate. The tool plate is then placed firmly against the photomask on the step. After calibration, the tool plate is removed, and the retractable step is pushed back to its initial position. The existing technology is cumbersome. Because there is an outer shell surrounding the photomask, enclosing both the photomask and the light source, the outer shell must be opened before alignment, and then the retractable step must be manually pushed. This method makes calibration extremely cumbersome and inefficient. Summary of the Invention
[0004] The purpose of this invention is to provide a PLC-based automatic light matching device and control method, so as to solve at least one of the problems mentioned in the background art.
[0005] The technical solution of this invention is:
[0006] A PLC-based automatic light-aligning device includes:
[0007] A photomask, wherein a PLC controller is installed inside the photomask;
[0008] A sliding mechanism is fixedly mounted on the photomask. The sliding mechanism includes a first sliding mechanism and a second sliding mechanism. The first sliding mechanism includes a first translation drive device, a first slide rail, and a first slider. The first translation drive device is used to drive the first slider to slide on the first slide rail and is electrically connected to a PLC controller. The second sliding mechanism includes a second translation drive device, a second slide rail, and a second slider. The second translation drive device is used to drive the second slider to slide on the second slide rail and is also electrically connected to a PLC controller.
[0009] A calibration mechanism, comprising a blackboard and a whiteboard, wherein the blackboard is fixedly connected to the first slider and the whiteboard is fixedly connected to the second slider;
[0010] The testing mechanism includes a light source and an optical fiber terminal. The optical fiber terminal is disposed on the outer wall of the photomask. The light source is located on the side of the photomask away from the optical fiber terminal. The photomask has light-transmitting holes near both the optical fiber terminal and the light source.
[0011] Furthermore, the PLC controller includes an input module and an output module. The input module includes pins X0, X1, X2, X3, X4, X10, X11, X12, X13, and X14. The output module includes pins Axis 1, Axis 2, Y0, Y1, Y2, Y3, Y10, Y11, Y12, and Y13.
[0012] Furthermore, a first photoelectric limit switch is provided on the top of the photomask near the first slide rail, and a second photoelectric limit switch is provided on the top of the photomask near the second slide rail.
[0013] Furthermore, pin X0 is electrically connected to the first photoelectric limit switch, pin shaft 1 is electrically connected to the first translation drive device, pin X10 is electrically connected to the second photoelectric limit switch, and pin shaft 2 is electrically connected to the second translation drive device.
[0014] Furthermore, pin X1 is electrically connected to relay KM1, relay KM1 is electrically connected to pin Y0, pin X2 is electrically connected to relay KM2, relay KM2 is electrically connected to pin Y1, pin X11 is electrically connected to relay KM5, relay KM5 is electrically connected to pin Y10, and pin X12 is electrically connected to relay KM6, relay KM6 is electrically connected to pin Y0.
[0015] Furthermore, pin X3 is electrically connected to button SB1, pin X4 is electrically connected to button SB2, pin X13 is electrically connected to button SB3, and pin X14 is electrically connected to button SB4.
[0016] Furthermore, pin Y12 is electrically connected to relay KM7, relay KM7 is electrically connected to relay KM4, relay KM4 is a bidirectional switch, relay KM4 is electrically connected to button SB1 or button SB2 respectively, pin Y2 is electrically connected to relay KM3, relay KM3 is electrically connected to relay KM8, relay KM8 is a bidirectional switch, relay KM8 is electrically connected to button SB3 or button SB4 respectively.
[0017] Furthermore, a first fixing ring is fixedly provided on the first slider, the blackboard is fixedly provided inside the first fixing ring, a second fixing ring is fixedly provided on the second slider, and the whiteboard is fixedly provided inside the second fixing ring.
[0018] Furthermore, several fans are installed on the photomask.
[0019] This application also proposes a PLC-based automatic light-aligning control method, including the aforementioned PLC-based automatic light-aligning device, wherein the control method includes the following steps:
[0020] S1. When the automatic light-aligning device is powered on, if X0 does not sense the rising edge level signal, the normally closed switch of relay KM1 turns on the X1 input port. After the X1 input port turns on, the PLC controls the axis 1 to turn on, the first translation drive device operates, and the first translation drive device drives the blackboard to move towards the zero position to reset until the first photoelectric limit switch is triggered, pulling up the signal level so that X0 senses the rising level signal.
[0021] If X10 does not sense the rising edge level signal, the normally closed switch of relay KM5 turns on the X11 input port. After the X11 input port is turned on, the PLC controls the axis 2 to turn on, and the second translation drive device operates. The second translation drive device drives the whiteboard to move towards the zero position to reset until the limit switch is triggered, pulling up the signal level so that X10 senses the rising level signal. Here, the zero position of the blackboard is defined as the end of the first slide rail near the first photoelectric limit switch, and the zero position of the whiteboard is defined as the end of the second slide rail near the second photoelectric limit switch.
[0022] S2. When X0 senses the rising edge of the signal, output port Y0 is set, the coil of relay KM1 is triggered, causing its normally closed switch to open, X1 is no longer conducting, and axis 1 is no longer conducting. The first translation drive device does not drive the blackboard to move. The current position of the first translation drive device is set to zero. Output port Y2 is set, the coil of relay KM3 is triggered, causing its normally open switch to close, and the common main circuit of X13 and X14 is grounded. After the X13 or X14 pin is turned on, it controls axis 2 to drive the second translation drive device to operate. In addition, since the blackboard is at zero, it will not interfere with the movement of the whiteboard. Therefore, the whiteboard enters the movement enable state. Output port Y3 is reset, relay KM4 is not triggered and is in its normally closed contact. That is, the X4 circuit that controls the blackboard's light-facing action can be turned on, and the movement enable of the blackboard in the light-facing direction is enabled. Correspondingly, the movement enable of the X3 circuit in the reset direction is disabled.
[0023] When X10 senses the rising edge of the signal, output port Y10 is set, the coil of relay KM5 is triggered, causing its normally closed switch to open, X11 is no longer conducting, and axis 2 is no longer conducting. The second translation drive device does not move the whiteboard. The current position of the second translation drive device is set to zero. Output port Y12 is set, the coil of relay KM7 is triggered, causing its normally open switch to close, the common main circuit of X3 and X4 is grounded, and after X3 or X4 is conducting, it controls axis 1 to drive the first translation drive device to operate. In addition, since the whiteboard is at zero, it will not interfere with the movement of the blackboard, so the blackboard enters the movement enable state. Output port Y13 is reset, relay KM8 is not triggered and is in its normally closed contact, that is, the X14 circuit that controls the whiteboard's light-facing action can be conducted, and the movement enable of the whiteboard in the light-facing action direction is enabled. Correspondingly, the movement enable of the X13 circuit in the reset direction is disabled.
[0024] S3. When the automatic light alignment device is powered on, if the calibration blackboard is already at the zero position, X0 senses the rising edge level signal, then the blackboard does not move, Y0 and Y2 output ports are set, Y3 is reset, and axis 1 is set to the zero position.
[0025] If the whiteboard is already at the zero position, X10 senses the rising edge level signal, then the whiteboard remains stationary, the output ports of Y10 and Y12 are set, Y13 is reset, and axis 2 is set to the zero position.
[0026] S4. When both calibration tool boards are at the zero position, only SB2 and SB4 are active. Pressing SB2 or SB4 will move the corresponding blackboard or whiteboard, thus completing the light calibration operation.
[0027] S5. When the SB2 control key is pressed, the X4 input port is turned on, Y1 is set, the relay KM2 is triggered, its normally open switch is closed, and the X2 input port is turned on. When the SB4 control key is pressed, the X14 input port is turned on, Y11 is set, the relay KM6 is triggered, its normally open switch is closed, and the X12 input port is turned on.
[0028] After the S6 and X2 input ports are turned on, the first translation drive device operates, driving the blackboard with the movement enabled state activated, moving the blackboard to a position that completely blocks the light-transmitting hole in front of the fiber optic end; at the same time, the Y2 output port is reset, the relay KM3 trigger fails to activate, the switch is opened, causing both X13 and X14 lines to fail to conduct, the whiteboard's movement enable to fail, that is, at this time the whiteboard's movement control keys cannot work, ensuring that the two tool boards will not interfere with each other; the Y3 output is set, the relay KM4 is triggered, the switch contact switches from the X4 line to the X3 line, at this time the blackboard's reset movement enable is activated, the light movement is disabled, and only SB1 of the four control keys is in the active state;
[0029] After the X12 input port is turned on, the second translation drive device operates, moving the whiteboard with the movement enabled state active, so that the whiteboard moves to the position that completely blocks the light-transmitting hole in front of the fiber optic end; at the same time, the Y12 output port is reset, the relay KM7 is deactivated, the switch is opened, causing the X3 and X4 lines to be unable to conduct, the movement enable of the whiteboard is deactivated, that is, at this time the movement control keys of the whiteboard cannot work, ensuring that the two tool boards will not interfere with each other; the Y13 output is set, the relay KM8 is triggered, the switch contact is switched from the X14 line to the X13 line, at this time the reset movement enable of the whiteboard is active, the light movement is deactivated, and only SB3 of the four control keys is active;
[0030] S7. When the host computer software or manual control key SB1 is closed, input port X3 is turned on, output port Y0 is reset, relay KM1 is deactivated and its switch returns to the normally closed state, input port X1 is turned on, the blackboard returns to the zero position, and the logic process of S1 and S2 is repeated; output port Y1 is reset, relay KM2 is deactivated, the switch is opened, and preparation is made for the next light-adjusting operation.
[0031] When the host computer software or manual control key SB3 is closed, input port X13 is turned on, output port Y10 is reset, relay KM5 is deactivated and its switch returns to the normally closed state, input port X11 is turned on, the whiteboard returns to the zero position, and the logic process of S1 and S2 is repeated; output port Y11 is reset, relay KM6 is deactivated, the switch is opened, and preparation is made for the next light adjustment operation.
[0032] This invention provides an improved PLC-based automatic light-aligning device and control method, which, compared with the prior art, has at least one of the following improvements and advantages:
[0033] This invention, by incorporating a PLC controller, automates the alignment of the whiteboard and blackboard during spectrometer calibration, solving the problems of inconvenience and unstable positioning of manual tool boards. Through a PLC-based automatic alignment device control method, this invention automates the determination of the positions of the calibration tool blackboard and whiteboard, and performs corresponding automated operations based on their different positions. This achieves automatic alignment of the whiteboard and blackboard during spectrometer calibration. The device's control method selects either the blackboard or whiteboard for alignment, and an automated sliding mechanism moves the tool board close to the inner wall of the photomask to the position blocking the fiber optic terminal, completing the alignment. This invention eliminates reliance on manual or semi-automated operations, integrating the alignment components into a non-destructive testing system, further automating the entire system. Attached Figure Description
[0034] The present invention will be further explained below with reference to the accompanying drawings and embodiments:
[0035] Figure 1 This is a schematic diagram of the structure of an existing calibration device in the background art described in this invention;
[0036] Figure 2 This is a schematic diagram of the automatic light-aligning device described in this invention;
[0037] Figure 3 This is a schematic diagram of the automatic light-aligning device described in this invention from another angle;
[0038] Figure 4 is a partial structural schematic diagram of the automatic light-aligning device described in this invention;
[0039] Figure 5 This is a circuit diagram of the automatic light-aligning device described in this invention;
[0040] Figure 6 This is the PLC ladder diagram program for the automatic light-aligning device described in this invention.
[0041] Explanation of reference numerals in the attached figures:
[0042] 1. Light cover; 11. Light-transmitting hole; 12. Fan; 21. First sliding mechanism; 22. Second sliding mechanism; 211. First translation drive device; 212. First slide rail; 214. First fixing ring; 31. Blackboard; 221. Second translation drive device; 222. Second slide rail; 224. Second fixing ring; 32. Whiteboard; 41. Light source; 42. Fiber optic terminal; 5. Movable step; 61. First photoelectric limit switch; 62. Second photoelectric limit switch. Detailed Implementation
[0043] The present invention will now be described in detail, and the technical solutions in the embodiments of the present invention will be clearly and completely described.
[0044] In the description of this invention, it should be understood that the terms "upper", "lower", "front", "rear", "left", "right", "top", "bottom", "inner", "outer", etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.
[0045] In the description of this invention, "several" means one or more, "multiple" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. It should also be understood that the term "and / or" as used in this application specification and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0046] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0047] In the description of this invention, unless otherwise explicitly defined, terms such as "set up," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.
[0048] This invention provides an improved PLC-based automatic light-aligning device and control method. The technical solution of this invention is as follows:
[0049] like Figure 1 As shown, an automatic light-aligning device based on a PLC includes: a light cover 1, a sliding mechanism, a calibration mechanism, and a detection mechanism. The light cover 1 is used to block light, the sliding mechanism is used to drive the calibration mechanism to slide, the calibration mechanism is used for calibration, and the detection mechanism is used for detection.
[0050] A PLC controller is installed inside the photomask 1; the PLC controller is used to intelligently control the calibration mechanism, so that the calibration mechanism can achieve automated calibration.
[0051] In some embodiments, such as Figure 2As shown in Figure 4(a), the sliding mechanism is fixedly mounted on the photomask 1. The sliding mechanism includes a first sliding mechanism 21 and a second sliding mechanism 22. The first sliding mechanism 21 includes a first translation drive device 211, a first slide rail 212, and a first slider. The first translation drive device 211 drives the first slider to slide on the first slide rail 212. The first translation drive device 211 is electrically connected to a PLC controller. The first translation drive device 211 can be a motor. The first slider can be connected to the motor via a lead screw. The motor drives the lead screw to rotate, and the first slider slides on the lead screw. The first slide rail 212 is used to limit the trajectory of the first slider. The second sliding mechanism 22 includes a second translation drive device 221, a second slide rail 222, and a second slider. The second translation drive device 221 drives the second slider to slide on the second slide rail 222. The second translation drive device 221 is also electrically connected to a PLC controller. The second translation drive device 221 can be a motor. The second slider can be connected to the motor via a lead screw. The motor drives the lead screw to rotate, and the second slider slides on the lead screw. The second slide rail 222 is used to limit the trajectory of the second slider. The PLC controller is used to drive the first translation drive device 211 or the second translation drive device 221 to operate.
[0052] In some embodiments, as shown in FIG4(a), the calibration mechanism includes a blackboard 31 and a whiteboard 32. The blackboard 31 is fixedly connected to the first slider, and the whiteboard 32 is fixedly connected to the second slider. The first slider is used to move the blackboard 31, and the second slider is used to move the whiteboard 32.
[0053] In some embodiments, such as Figure 2 , 3 As shown, the detection mechanism includes a light source 41 and an optical fiber terminal 42. The optical fiber terminal 42 is disposed on the outer wall of the photomask 1, and the light source 41 is located on the side of the photomask 1 away from the optical fiber terminal 42. The photomask 1 has light-transmitting holes 11 near both the optical fiber terminal 42 and the light source 41. The light source 41 emits light, the light-transmitting holes 11 allow the light source 41 to enter the photomask 1, and the optical fiber terminal 42 receives the light from the light source 41 and analyzes the received data. Specifically, the detection steps include: light emitted by the halogen lamp light source 41 enters the interior of the photomask 1 through the light-transmitting holes; when the fruit sample being tested passes through the area of the light source 41, the optical fiber end fixed on the other side of the photomask 1 receives the transmitted infrared / near-infrared light; and the internal moisture and solid dissolved components of the fruit sample are detected by measuring the energy change of the transmitted light.
[0054] In some embodiments, such as Figure 3 As shown, a first photoelectric limit switch 61 is provided on the top of the photomask 1 near the first slide rail 212, and a second photoelectric limit switch 62 is provided on the top of the photomask 1 near the second slide rail 222.
[0055] In some embodiments, as shown in FIG4(a), a first fixing ring 214 is fixedly disposed on the first slider, the blackboard 31 is fixedly disposed within the first fixing ring 214, a second fixing ring 224 is fixedly disposed on the second slider, and the whiteboard 32 is fixedly disposed within the second fixing ring 224. The first fixing ring 214 is used to fix the calibration blackboard 31, and the second fixing ring 224 is used to fix the calibration whiteboard 32. Figure 2 As shown, a plurality of fans 12 are installed on the photomask 1, and the fans 12 are used for heat dissipation. There can be 7 fans 12, 3 of which are installed on the top plate of the photomask 1 and draw airflow from the inside of the photomask 1 to the outside when working; the other 4 are installed in pairs on the side plates of the photomask 1 and blow airflow into the photomask 1 when working, forming convection with the fan 12 outlets on the top plate, thereby limiting the operating temperature of the photomask 1.
[0056] In some embodiments, such as Figure 5 As shown in the figure, X0-X4 and X10-X14 are the input ports of the PLC controller input module. In this embodiment, X0 is the level signal terminal of the first photoelectric limit switch 61, and X10 is the level signal terminal of the second photoelectric limit switch 62. The output is triggered when a rising edge of the level is detected. Axis 1 is the signal output terminal of the first translation drive device 211, and axis 2 is the signal output terminal of the second translation drive device 221. In this embodiment, axis 1 controls the movement of the blackboard 31, and axis 2 controls the movement of the whiteboard 32. Y0-Y3 and Y10-Y13 are the output terminals of the PLC controller. KM1-KM8 are relays. The switches of relays KM1 and KM5 are normally closed, relays KM4 and KM8 are bidirectional switches, and the switches of the remaining relays are normally open. SB1-SB4 are trigger switches, which are controlled by the upper-level software or manually triggered.
[0057] As shown in Figures 4(b) and 4(c), the calibration operation requires that the white board 32 and the black board 31 be used to calibrate the lower and upper limits of the received light signal energy, respectively. When calibrating the zero point of the light intensity curve, the black board 31, which can completely absorb light, is used as the calibration tool; when calibrating the upper limit of the light intensity curve, the white board 32, which can completely transmit light, is used. The host computer software sends a working signal to the PLC controller. The PLC controller controls the stepper motor to move the set step size, and then the first sliding mechanism 21 or the second sliding mechanism 22 moves the first slider or the second white board 32, which is fixed to the calibration tool black board 31 or white board 32 on the first slide rail 212 or the second slide rail 222, to the target position. At this time, the center of the calibration tool board is aligned with the center of the optical fiber end, and the calibration tool board is almost in close contact with the inner wall of the photomask 1 to prevent diffusely reflected light from entering the optical fiber end through the gap. The calibration tool board is defined as the calibration tool black board 31 or the calibration tool black board 32.
[0058] The calibration logic of this invention is as follows: When powered on, if the calibration tool board is not near the photoelectric limit switch, it will move upward by default. When the slider moves to the vicinity of the photoelectric limit switch and triggers a change in the level of its signal output line, the tool board stops moving, and the system records this position as the zero point position of the calibration tool board. When both the white board 32 and the black board 31 are at their respective zero point positions, both are in a movement enabled state, and the host computer software can select either board to perform the light alignment operation; when one board moves to the light alignment position, the movement enable of the other board will be disabled. At this time, if the other board is selected for the light alignment operation, the other board will not move according to the host computer's command. For example, in the state shown in Figure 4(c), when the white board 32 is lowered to the light hole to perform the light alignment operation, the movement enable of the black board 31 will be disabled. At this time, clicking the light alignment button or the reset button on the black board 31 will not make the black board 31 move; similarly, in the state of the black board 31 being aligned as shown in Figure 4(b), the white board 32 also cannot be moved by the control key.
[0059] In some embodiments, such as Figure 5 As shown, the PLC controller includes an input module and an output module. The input module includes pins X0, X1, X2, X3, X4, X10, X11, X12, X13, and X14. The output module includes pins Axis 1, Axis 2, Y0, Y1, Y2, Y3, Y10, Y11, Y12, and Y13.
[0060] In some embodiments, such as Figure 5 As shown, pin X0 is electrically connected to the first photoelectric limit switch 61, pin shaft 1 is electrically connected to the first translation drive device 211, pin X10 is electrically connected to the second photoelectric limit switch 62, and pin shaft 2 is electrically connected to the second translation drive device 221. Figure 5In the diagram, M1 represents the first translation drive device 211, and M2 represents the second translation drive device 221.
[0061] In some embodiments, such as Figure 5 As shown, pin X1 is electrically connected to relay KM1, relay KM1 is electrically connected to pin Y0, pin X2 is electrically connected to relay KM2, relay KM2 is electrically connected to pin Y1, pin X11 is electrically connected to relay KM5, relay KM5 is electrically connected to pin Y10, pin X12 is electrically connected to relay KM6, relay KM6 is electrically connected to pin Y0.
[0062] In some embodiments, such as Figure 5 As shown, pin X3 is electrically connected to button SB1, pin X4 is electrically connected to button SB2, pin X13 is electrically connected to button SB3, and pin X14 is electrically connected to button SB4.
[0063] In some embodiments, such as Figure 5 As shown, pin Y12 is electrically connected to relay KM7, relay KM7 is electrically connected to relay KM4, relay KM4 is a bidirectional switch, relay KM4 is electrically connected to button SB1 or button SB2 respectively, pin Y2 is electrically connected to relay KM3, relay KM3 is electrically connected to relay KM8, relay KM8 is a bidirectional switch, relay KM8 is electrically connected to button SB3 or button SB4 respectively.
[0064] In this embodiment, input ports X3 and X4 primarily manage the movement of the calibration tool blackboard 31. X3 controls the reset movement of the blackboard 31 (SB1 is the blackboard 31 reset control key), while X4 controls the light-adjusting movement of the blackboard 31 (SB2 is the blackboard 31 light-adjusting control key). X13 and X14 primarily manage the movement of the calibration tool whiteboard 32. X13 controls the reset movement of the whiteboard 32 (SB3 is the whiteboard 32 reset control key), while X14 controls the light-adjusting movement of the whiteboard 32 (SB4 is the whiteboard 32 light-adjusting control key). Figure 5 As shown in the circuit diagram, when the switch of relay KM4 contacts the contact of line X3, the reset movement enable of blackboard 31 is activated, while the light-direction movement enable is deactivated; conversely, when the switch of relay KM4 contacts the contact of line X4, the light-direction movement enable of blackboard 31 is activated, while the reset movement enable is deactivated; and when the switch of relay KM7 is open, X3 and X4 cannot be conducted under any circumstances, meaning that the movement enable of blackboard 31 is deactivated at this time. The above circuit logic rules apply to whiteboard 32 as well.
[0065] This application also proposes a PLC-based automatic light-aligning control method, including the aforementioned PLC-based automatic light-aligning device. The ladder diagram of the PLC controller in this embodiment is shown below. Figure 6 As shown, the definitions and interface labels of the input and output sections in the figure correspond to the circuit schematic in Figure 4. According to the corresponding circuit schematic, the control method for the automatic light-sensing device during operation includes the following steps:
[0066] S1. When the automatic light-aligning device is powered on, if X0 does not sense a rising edge level signal, the normally closed switch of relay KM1 turns on the X1 input port. After the X1 input port turns on, the PLC controls the axis 1 to turn on, and the first translation drive device 211 operates. The first translation drive device 211 drives the blackboard 31 to move towards the zero position to reset until the first photoelectric limit switch 61 is triggered, pulling up the signal level so that X0 senses the rising level signal.
[0067] If X10 does not sense the rising edge level signal, the normally closed switch of relay KM5 turns on the X11 input port. After the X11 input port is turned on, the PLC controls the axis 2 to turn on, and the second translation drive device 221 operates. The second translation drive device 221 drives the whiteboard 32 to move towards the zero position to reset until the limit switch is triggered, pulling up the signal level so that X10 senses the rising level signal. The zero position of the blackboard 31 is defined as the end of the first slide rail near the first photoelectric limit switch, and the zero position of the whiteboard 32 is defined as the end of the second slide rail near the second photoelectric limit switch.
[0068] S2. When X0 senses the rising edge of the signal, output port Y0 is set, the coil of relay KM1 is triggered, causing its normally closed switch to open, X1 is no longer conducting, thus controlling the shaft 1 to stop conducting, the first translation device stops moving, and the first translation drive device 211 does not drive the blackboard 31 to move; instruction M7500 sets the current position of the first translation drive device 211 to zero, that is, sets the current position of the blackboard to the absolute zero position of the blackboard; output port Y2 is set, the coil of relay KM3 is triggered, causing its normally open switch to open. When the switch is closed, the common main circuit of X13 and X14 is grounded. After the X13 or X14 pin is turned on, it controls the axis 2 to drive the second translation drive device to operate. In addition, since the blackboard 31 is in the zero position, it will not interfere with the movement of the whiteboard 32. Therefore, the whiteboard 32 enters the movement enable state. When the output port Y3 is reset, the relay KM4 is not triggered and is in its normally closed contact. That is, the X4 circuit that controls the blackboard 31 to move in the light direction can be turned on, and the movement enable of the blackboard 31 in the light direction is enabled. Correspondingly, the movement enable of the X3 circuit that controls the reset direction is disabled.
[0069] When X10 senses the rising edge of the signal, output port Y10 is set, the coil of relay KM5 is triggered, causing its normally closed switch to open, X11 is no longer conducting, thus controlling the axis 2 to no longer conduct, and the second translation drive device 221 does not move the whiteboard 32; instruction M7510 sets the current position of the second translation drive device 221 to zero, that is, sets the current position of the whiteboard to the absolute zero position of the whiteboard; output port Y12 is set, the coil of relay KM7 is triggered, causing its normally open switch to close, X3 The common main line of X3 and X4 is grounded. After X3 or X4 is turned on, it controls the shaft 1 to drive the first translation drive device 211 to operate. In addition, since the whiteboard 32 is in the zero position, it will not interfere with the movement of the blackboard 31. Therefore, the blackboard 31 enters the movement enable state. The output port Y13 is reset, the relay KM8 is not triggered, and it is in its normally closed contact. That is, the X14 line that controls the whiteboard 32 to move in the light direction can be turned on, and the movement enable of the whiteboard 32 in the light direction is enabled. Correspondingly, the movement enable of the X13 line that controls the reset direction is disabled.
[0070] S3. When the automatic light-aligning device is powered on, if the calibration blackboard 31 is already in the zero position, and X0 senses the rising edge level signal, then the blackboard 31 will not move, the output ports of Y0 and Y2 will be set, Y3 will be reset, and axis 1 will be set to the zero position.
[0071] If whiteboard 32 is already in the zero position, and X10 senses the rising edge level signal, then whiteboard 32 will not move, Y10 and Y12 output ports will be set, Y13 will be reset, and axis 2 will be set to zero.
[0072] S4. When both calibration tool boards are at the zero position, only SB2 and SB4 are active. Pressing SB2 or SB4 will move the corresponding blackboard 31 or whiteboard 32, thus completing the light alignment operation.
[0073] S5. When the SB2 control key is pressed, the X4 input port is turned on, Y1 is set, the relay KM2 is triggered, its normally open switch is closed, and the X2 input port is turned on. When the SB4 control key is pressed, the X14 input port is turned on, Y11 is set, the relay KM6 is triggered, its normally open switch is closed, and the X12 input port is turned on.
[0074] After the S6 and X2 input ports are turned on, the M7504 command enables the movement of the blackboard 31 at the target position on axis 1. The first translation drive device 211 operates, moving the blackboard 31, which is now in the movement-enabled state, to a position that completely blocks the light-transmitting hole 11 at the front of the fiber optic end. This movement can be a relative positioning movement, and the movement distance is determined by the DMOV. The KφD7800 command is set, where φ is the number of motor pulses required to achieve the target distance. This moves the calibration tool blackboard 31 to a position that completely blocks the light-transmitting hole 11 at the fiber optic end. Simultaneously, the Y2 output port is reset, the relay KM3 trigger fails, and the switch is opened, causing both X13 and X14 lines to be unable to conduct. The movement enable of the whiteboard 32 is disabled, meaning that the movement control keys of the whiteboard 32 cannot work at this time, ensuring that the two tool boards do not interfere with each other. The Y3 output is set, and the relay KM4 is triggered. In the relay KM4, the contact of the main X4 is the normally closed contact of its bidirectional switch. When the relay is triggered, this contact will be open. The main X3 line is the normally open contact line of KM4. When the relay is triggered, this contact will be closed. After the relay KM4 is triggered, the switch contact switches from the X4 line to the X3 line. At this time, the relay KM4 changes from normally closed to normally open. At this time, the reset movement enable of the blackboard 31 is effective, the light movement is disabled, and only SB1 of the four control keys is in the effective state.
[0075] After the X12 input port is turned on, the M7514 command enables the movement of the whiteboard 32 at the target position on axis 2. The second translation drive device 221 operates, moving the whiteboard 32, which is now in the movement-enabled state, to a position where it completely blocks the light-transmitting hole 11 at the front of the fiber optic end. This movement can also be a relative positioning movement, with the movement distance measured by the DMOV. Command KφD7810 sets φ to the number of motor pulses required to achieve the target distance, thereby moving the calibration tool whiteboard 32 to a position that completely blocks the light-transmitting hole 11 at the front of the fiber optic end; at the same time, the Y12 output port is reset, the relay KM7 trigger fails, the switch is opened, causing the X3 and X4 lines to be unable to conduct, and the movement enable of the blackboard 31 is disabled, that is, at this time, the movement control keys of the blackboard 31 cannot work, ensuring that the two tool boards will not interfere; the Y13 output is set, the relay KM8 is triggered, in the relay KM8, the contact of the main X14 is the normally closed contact of its bidirectional switch, and this contact will be open when the relay is triggered, the main X13 line is the normally open contact line of KM8, and this contact will be closed when the relay is triggered, after the relay KM8 is triggered, the switch contact switches from the X14 line to the X13 line, at this time the relay KM8 changes from normally closed to normally open, at this time the reset movement enable of the whiteboard 32 is effective, the light movement is disabled, and only SB3 of the four control keys is in the effective state;
[0076] S7. When the host computer software or manual control key SB1 is closed, input port X3 is turned on, output port Y0 is reset, relay KM1 is deactivated and its switch returns to the normally closed state, input port X1 is turned on, blackboard 31 returns to the zero position, and the logic process of S1 and S2 is repeated; output port Y1 is reset, relay KM2 is deactivated, and the switch is opened, preparing for the next light-adjusting operation;
[0077] When the host computer software or manual control key SB3 is closed, input port X13 is turned on, output port Y10 is reset, relay KM5 is deactivated and its switch returns to the normally closed state, input port X11 is turned on, whiteboard 32 returns to zero, and the logic process of S1 and S2 is repeated; output port Y11 is reset, relay KM6 is deactivated, and the switch is opened, preparing for the next light-adjusting operation.
[0078] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A PLC-based automatic light-aligning device, characterized in that, include: A photomask, wherein a PLC controller is installed inside the photomask; A sliding mechanism is fixedly mounted on the photomask. The sliding mechanism includes a first sliding mechanism and a second sliding mechanism. The first sliding mechanism includes a first translation drive device, a first slide rail, and a first slider. The first translation drive device is used to drive the first slider to slide on the first slide rail and is electrically connected to the PLC controller. The second sliding mechanism includes a second translation drive device, a second slide rail, and a second slider. The second translation drive device is used to drive the second slider to slide on the second slide rail and is also electrically connected to the PLC controller. A first photoelectric limit switch is provided on the top of the photomask near the first slide rail, and a second photoelectric limit switch is provided on the top of the photomask near the second slide rail; A calibration mechanism, comprising a blackboard and a whiteboard, wherein the blackboard is fixedly connected to the first slider and the whiteboard is fixedly connected to the second slider; The calibration operation requires that the whiteboard and blackboard be used to calibrate the lower and upper limits of the received light signal energy, respectively. When calibrating the zero point of the light intensity curve, a blackboard that can completely absorb light is used as the calibration tool; when calibrating the upper limit of the light intensity curve, a whiteboard that can completely transmit light is used. The host computer software sends a working signal to the PLC controller, which controls the stepper motor to move the set step size. Then, the first or second sliding mechanism moves the first slider or the second whiteboard, which is fixed to the calibration tool blackboard or whiteboard on the first or second slide rail, to the target position. At this time, the center of the calibration tool board is aligned with the center of the fiber optic end. When the power is turned on, if the calibration tool board is not near the photoelectric limit switch, it will move upward by default. When the slider moves to the vicinity of the photoelectric limit switch and triggers a change in the level of its signal output line, the tool board stops moving, and the system records this position as the zero point position of the calibration tool board. When both the whiteboard and the blackboard are at their respective zero point positions, both are in the movement enabled state, and the host computer software can select either board to perform the light operation. The testing mechanism includes a light source and an optical fiber terminal. The optical fiber terminal is disposed on the outer wall of the photomask. The light source is located on the side of the photomask away from the optical fiber terminal. The photomask has light-transmitting holes near both the optical fiber terminal and the light source.
2. The PLC-based automatic light-aligning device according to claim 1, characterized in that, The PLC controller includes an input module and an output module. The input module includes pins X0, X1, X2, X3, X4, X10, X11, X12, X13, and X14. The output module includes pins Axis 1, Axis 2, Y0, Y1, Y2, Y3, Y10, Y11, Y12, and Y13.
3. The PLC-based automatic light-aligning device according to claim 2, characterized in that, Pin X0 is electrically connected to the first photoelectric limit switch, pin shaft 1 is electrically connected to the first translation drive device, pin X10 is electrically connected to the second photoelectric limit switch, and pin shaft 2 is electrically connected to the second translation drive device.
4. The PLC-based automatic light-aligning device according to claim 3, characterized in that, Pin X1 is electrically connected to relay KM1, which is electrically connected to pin Y0. Pin X2 is electrically connected to relay KM2, which is electrically connected to pin Y1. Pin X11 is electrically connected to relay KM5, which is electrically connected to pin Y10. Pin X12 is electrically connected to relay KM6, which is electrically connected to pin Y0.
5. The PLC-based automatic light-aligning device according to claim 4, characterized in that, Pin X3 is electrically connected to button SB1, pin X4 is electrically connected to button SB2, pin X13 is electrically connected to button SB3, and pin X14 is electrically connected to button SB4.
6. The PLC-based automatic light-aligning device according to claim 5, characterized in that, Pin Y12 is electrically connected to relay KM7, relay KM7 is electrically connected to relay KM4, relay KM4 is a bidirectional switch, relay KM4 is electrically connected to button SB1 or button SB2 respectively. Pin Y2 is electrically connected to relay KM3, relay KM3 is electrically connected to relay KM8, relay KM8 is a bidirectional switch, relay KM8 is electrically connected to button SB3 or button SB4 respectively.
7. The PLC-based automatic light-aligning device according to claim 1, characterized in that, A first fixing ring is fixedly provided on the first slider, and the blackboard is fixedly provided inside the first fixing ring. A second fixing ring is fixedly provided on the second slider, and the whiteboard is fixedly provided inside the second fixing ring.
8. The PLC-based automatic light-aligning device according to claim 1, characterized in that, Several fans are mounted on the photomask.
9. A PLC-based automatic light control method, characterized in that, Including the PLC-based automatic light-aligning device as described in claim 6, the control method includes the following steps: S1. When the automatic light-aligning device is powered on, if X0 does not sense the rising edge level signal, the normally closed switch of relay KM1 turns on the X1 input port. After the X1 input port turns on, the PLC controls the axis 1 to turn on, the first translation drive device operates, and the first translation drive device drives the blackboard to move towards the zero position to reset until the first photoelectric limit switch is triggered, pulling up the signal level so that X0 senses the rising level signal. If X10 does not sense the rising edge level signal, the normally closed switch of relay KM5 turns on the X11 input port. After the X11 input port is turned on, the PLC controls the axis 2 to turn on, and the second translation drive device operates. The second translation drive device drives the whiteboard to move towards the zero position to reset until the limit switch is triggered, pulling up the signal level so that X10 senses the rising level signal. Here, the zero position of the blackboard is defined as the end of the first slide rail near the first photoelectric limit switch, and the zero position of the whiteboard is defined as the end of the second slide rail near the second photoelectric limit switch. S2. When X0 senses the rising edge of the signal, output port Y0 is set, the coil of relay KM1 is triggered, causing its normally closed switch to open, X1 is no longer conducting, and axis 1 is no longer conducting. The first translation drive device does not drive the blackboard to move. The current position of the first translation drive device is set to zero. Output port Y2 is set, the coil of relay KM3 is triggered, causing its normally open switch to close, and the common main circuit of X13 and X14 is grounded. After the X13 or X14 pin is turned on, it controls axis 2 to drive the second translation drive device to operate. In addition, since the blackboard is at zero, it will not interfere with the movement of the whiteboard. Therefore, the whiteboard enters the movement enable state. Output port Y3 is reset, relay KM4 is not triggered and is in its normally closed contact. That is, the X4 circuit that controls the blackboard's light-facing action can be turned on, and the movement enable of the blackboard in the light-facing direction is enabled. Correspondingly, the movement enable of the X3 circuit in the reset direction is disabled. When X10 senses the rising edge of the signal, output port Y10 is set, the coil of relay KM5 is triggered, causing its normally closed switch to open, X11 is no longer conducting, and axis 2 is no longer conducting. The second translation drive device does not move the whiteboard. The current position of the second translation drive device is set to zero. Output port Y12 is set, the coil of relay KM7 is triggered, causing its normally open switch to close, the common main circuit of X3 and X4 is grounded, and after X3 or X4 is conducting, it controls axis 1 to drive the first translation drive device to operate. In addition, since the whiteboard is at zero, it will not interfere with the movement of the blackboard, so the blackboard enters the movement enable state. Output port Y13 is reset, relay KM8 is not triggered and is in its normally closed contact, that is, the X14 circuit that controls the whiteboard's light-facing action can be conducted, and the movement enable of the whiteboard in the light-facing action direction is enabled. Correspondingly, the movement enable of the X13 circuit in the reset direction is disabled. S3. When the automatic light alignment device is powered on, if the calibration blackboard is already at the zero position, X0 senses the rising edge level signal, then the blackboard does not move, Y0 and Y2 output ports are set, Y3 is reset, and axis 1 is set to the zero position. If the whiteboard is already at the zero position, X10 senses the rising edge level signal, then the whiteboard remains stationary, the output ports of Y10 and Y12 are set, Y13 is reset, and axis 2 is set to the zero position; S4. When both calibration tool boards are at the zero position, only SB2 and SB4 are active. Pressing SB2 or SB4 will move the corresponding blackboard or whiteboard, thus completing the light calibration operation. S5. When the SB2 control key is pressed, the X4 input port is turned on, Y1 is set, the relay KM2 is triggered, its normally open switch is closed, and the X2 input port is turned on. When the SB4 control key is pressed, the X14 input port is turned on, Y11 is set, the relay KM6 is triggered, its normally open switch is closed, and the X12 input port is turned on. After the S6 and X2 input ports are turned on, the first translation drive device operates, driving the blackboard with the movement enabled state activated, moving the blackboard to a position that completely blocks the light-transmitting hole in front of the fiber optic end; at the same time, the Y2 output port is reset, the relay KM3 trigger fails to activate, the switch is opened, causing both X13 and X14 lines to fail to conduct, the whiteboard's movement enable to fail, that is, at this time the whiteboard's movement control keys cannot work, ensuring that the two tool boards will not interfere with each other; the Y3 output is set, the relay KM4 is triggered, the switch contact switches from the X4 line to the X3 line, at this time the blackboard's reset movement enable is activated, the light movement is disabled, and only SB1 of the four control keys is in the active state; After the X12 input port is turned on, the second translation drive device operates, moving the whiteboard with the movement enabled state active, so that the whiteboard moves to the position that completely blocks the light-transmitting hole in front of the fiber optic end; at the same time, the Y12 output port is reset, the relay KM7 is deactivated, the switch is opened, causing the X3 and X4 lines to be unable to conduct, the movement enable of the whiteboard is deactivated, that is, at this time the movement control keys of the whiteboard cannot work, ensuring that the two tool boards will not interfere with each other; the Y13 output is set, the relay KM8 is triggered, the switch contact is switched from the X14 line to the X13 line, at this time the reset movement enable of the whiteboard is active, the light movement is deactivated, and only SB3 of the four control keys is active; S7. When the host computer software or manual control key SB1 is closed, input port X3 is turned on, output port Y0 is reset, relay KM1 is deactivated and its switch returns to the normally closed state, input port X1 is turned on, the blackboard returns to the zero position, and the logic process of S1 and S2 is repeated; output port Y1 is reset, relay KM2 is deactivated, the switch is opened, and preparation is made for the next light-adjusting operation. When the host computer software or manual control key SB3 is closed, input port X13 is turned on, output port Y10 is reset, relay KM5 is deactivated and its switch returns to the normally closed state, input port X11 is turned on, the whiteboard returns to the zero position, and the logic process of S1 and S2 is repeated; output port Y11 is reset, relay KM6 is deactivated, the switch is opened, and preparation is made for the next light adjustment operation.
Citation Information
Patent Citations
Non-destructive testing system and method for testing internal quality of fruit by using near-infrared spectra
CN103048277A
Automatic calibration device and method for white balance and flat field correction of camera
CN116437071A