Solenoid Valve Control Method and Device

Through the modular program and the packaging logic of the solenoid valve control function block, the problem of repeated code writing in solenoid valve control is solved, and the rapid and simplified solenoid valve control is achieved, reducing resource waste and time costs.

CN115325249BActive Publication Date: 2025-07-25QINGDAO HUADONG ENG MASCH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210791207.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-08
Publication Date
2025-07-25
Estimated Expiration
2042-07-08

AI Technical Summary

Technical Problem

In the prior art, solenoid valve control requires repeated code writing, resulting in repeated research and development and waste of resources, and is time-consuming.

Method used

Modular programs are adopted, including solenoid valve control function block, and the control logic is packaged. The function block is loaded and called by the controller to generate solenoid coil control information, and the control results are output in combination with the information collected by the displacement sensor to reduce repeated writing logic.

Benefits of technology

It realizes flexibility, speed and simplification of solenoid valve control, reduces repeated research and development and resource waste, and saves time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115325249B_ABST
    Figure CN115325249B_ABST
Patent Text Reader

Abstract

The present invention provides a solenoid valve control method and a control device. The control device includes a controller, a solenoid valve, a first displacement sensor, and a second displacement sensor; the first displacement sensor and the second displacement sensor are arranged at different positions and are used for collecting displacement information of a cylinder piston driven by the solenoid valve; the method includes: the controller loads a modular program; wherein, the modular program at least includes a solenoid valve control function block and an execution module for calling the solenoid valve control function block; a control logic is encapsulated inside the solenoid valve control function block; the controller calls the solenoid valve control function block through the execution module, and the control logic of the solenoid valve control function block at least performs the following operations: generating electromagnetic coil control information according to a control instruction of the execution module; and outputting a control result according to the displacement information collected by the first displacement sensor and the second displacement sensor.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and particularly to a solenoid valve control method and device. Background Art

[0002] Solenoid valves are used to drive the movement of cylinder pistons on many automated devices (such as the flanging machine for the inner drum of a washing machine). To control the solenoid valve, currently, it is necessary to write code for controlling the solenoid valve and then import it into the controller.

[0003] However, a large amount of repetitive writing has caused duplicate research and development and waste of resources, and also wasted time. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a solenoid valve control method and device to solve the above problems.

[0005] To achieve the above object, embodiments of the present invention provide the following technical solutions:

[0006] A solenoid valve control method is applied to a control device. The control device includes a controller, a solenoid valve, a first displacement sensor, and a second displacement sensor; the first displacement sensor and the second displacement sensor are arranged at different positions and are used to collect displacement information of a cylinder piston driven by the solenoid valve;

[0007] The method includes:

[0008] The controller loads a modular program; wherein, the modular program at least includes a solenoid valve control function block and an execution module for calling the solenoid valve control function block; the control logic is encapsulated inside the solenoid valve control function block;

[0009] The controller calls the solenoid valve control function block through the execution module, and the control logic of the solenoid valve control function block at least performs the following operations:

[0010] Generate electromagnetic coil control information according to the control instruction of the execution module; the electromagnetic coil control information is used to control the coil in the solenoid valve to perform an extension or retraction movement;

[0011] Output a control result according to the displacement information collected by the first displacement sensor and the second displacement sensor; the control result at least includes: detection information; the detection information includes first detection information or second detection information; the first detection information is used to represent whether extension is detected, and the second detection information is used to represent whether retraction is detected.

[0012] Optionally, the solenoid valve control function block provides input pins, output pins, and instruction transmission pins externally.

[0013] Optionally, the input pin includes at least: an extension detection signal input pin and a retraction detection signal input pin; the output pin includes at least: a coil control output pin; the input information of the control logic includes: a control instruction of the execution module, the displacement information collected by the first displacement sensor, and the displacement information collected by the second displacement sensor; wherein the control instruction is input through the instruction transmission pin, the displacement information collected by the first displacement sensor is input through the extension detection signal input pin, and the displacement information collected by the second displacement sensor is input through the retraction detection signal input pin; the output information of the control logic includes electromagnetic coil control information and control results; the electromagnetic coil control information is output through the coil control output pin; and the control result is output through the instruction transmission pin.

[0014] Optionally, the solenoid valve control function block also encapsulates alarm logic; the input pin also includes: an alarm clear pin; the output pin also includes: a fault alarm pin; the alarm logic is at least used to perform the following operations: after determining that a preset fault has occurred, generate fault alarm information and output it through the fault alarm pin; and, after inputting the alarm clear information through the alarm clear pin, stop outputting the fault alarm information.

[0015] Optionally, the input pin further includes: a monitoring time input pin, used to input monitoring time;

[0016] The determining that a preset fault occurs includes: detecting whether the coil is completely extended or retracted within a monitoring time according to displacement information collected by the first displacement sensor and the second displacement sensor; if not, determining that a preset fault occurs.

[0017] Optionally, the coil control output pin includes at least: a coil extension signal output pin and a coil retraction signal output pin; the electromagnetic coil control information includes: coil extension information and coil retraction information; the control instruction includes an extension instruction and a retraction instruction; wherein, the coil extension information is used to control the coil in the solenoid valve to make an extension movement; the coil retraction information is used to control the coil in the solenoid valve to make a retraction movement; the generation of the electromagnetic coil control information according to the control instruction of the execution module includes: after receiving the extension instruction, outputting the coil extension information through the coil extension signal output pin; after receiving the retraction instruction, outputting the coil retraction information through the coil retraction signal.

[0018] Optionally, the input pin further includes: a coil extension permission signal input pin and a coil retraction permission signal input pin; the coil extension permission signal input pin is used to input an extension permission instruction; the coil retraction permission signal input pin is used to input a retraction permission instruction; the operation of outputting the coil extension information is performed after the input of the extension permission instruction; the operation of outputting the coil retraction information is performed after the input of the retraction permission instruction.

[0019] Optionally, the control result further includes: motion state information; the motion state information includes: first motion state information or second motion state information; wherein, the first motion state information is used to represent that the coil is extending; the second motion state is used to represent that the coil is retracting.

[0020] A control device includes a controller, a solenoid valve, a first displacement sensor, and a second displacement sensor;

[0021] The first displacement sensor and the second displacement sensor are arranged at different positions and are used to collect the displacement information of the cylinder piston driven by the solenoid valve;

[0022] The controller is used for:

[0023] Loading a modular program; wherein, the modular program at least includes a solenoid valve control function block and an execution module for calling the solenoid valve control function block; the control logic is encapsulated inside the solenoid valve control function block;

[0024] Calling the solenoid valve control function block through the execution module, and the control logic of the solenoid valve control function block at least performs the following operations:

[0025] Generating electromagnetic coil control information according to the control instruction of the execution module; the electromagnetic coil control information is used to control the coil in the solenoid valve to perform an extension or retraction movement;

[0026] Outputting a control result according to the displacement information collected by the first displacement sensor and the second displacement sensor; the control result at least includes: detection information; the detection information includes first detection information or second detection information; the first detection information is used to represent whether an extension is detected, and the second detection information is used to represent whether a retraction is detected;

[0027] The solenoid valve is used for:

[0028] Controlling the coil in the solenoid valve to perform an extension or retraction movement according to the electromagnetic coil control information.

[0029] It can be seen that in the embodiment of the present invention, the modular program loaded and executed by the controller includes a solenoid valve control function block and an execution module. The control logic for the solenoid valve is encapsulated in the solenoid valve control function block.

[0030] Different devices can call the common solenoid valve control function block through the execution module to generate electromagnetic coil control information to control the operation of the solenoid valve and obtain the control result. In this process, there is no need to rewrite the logic repeatedly, reducing repeated R & D and resource waste, saving time, and enabling the solenoid valve control to be realized quickly and simply. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 An exemplary structure of the control device provided by the embodiment of the present invention;

[0032] Figure 2 An exemplary flow of the solenoid valve control method provided by the embodiment of the present invention;

[0033] Figure 3a An exemplary structure of the solenoid valve control function block provided by the embodiment of the present invention;

[0034] Figure 3b A schematic diagram of input and output information provided by the embodiment of the present invention;

[0035] Figure 4 Another exemplary structure of the solenoid valve control function block provided by the embodiment of the present invention;

[0036] Figure 5 Another exemplary flow of the solenoid valve control method provided by the embodiment of the present invention;

[0037] Figure 6 Another exemplary structure of the solenoid valve control function block provided by the embodiment of the present invention;

[0038] Figure 7 Another exemplary structure of the solenoid valve control function block provided by the embodiment of the present invention;

[0039] Figure 8 Another exemplary structure of the solenoid valve control function block provided by the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0040] The embodiment of the present invention provides a solenoid valve control method and device to realize solenoid valve control flexibly, quickly, and simply.

[0041] The above control device can be applied to the side panel of a refrigerator, the U-shell, the flanging machine of the inner cylinder of a washing machine, etc.

[0042] Please refer to Figure 1, the control device may include: a controller 1, a solenoid valve 2, a first displacement sensor ( Figure 1 the displacement sensor a) in Figure 2 and a second displacement sensor (

[0043] the displacement sensor b) in

[0044] Exemplarily, the above-mentioned controller may be a PLC controller.

[0045] Specifically, the solenoid valve 2 may include a pneumatic solenoid valve, which is connected to a cylinder and can control the movement of the cylinder piston.

[0046] In one example, the controller can control the extension or retraction of the electromagnetic coil on the pneumatic solenoid valve, and further control the extension or retraction of the cylinder piston.

[0047] In other embodiments of the present invention, the above system may further include a host computer 3, which is used to configure and load a modular program that can run on the controller 1.

[0048] Next, it will be introduced how the controller controls the solenoid valve.

[0049] Please refer to Figure 2 , the solenoid valve control method executed by the solenoid valve control system exemplarily includes the following steps:

[0050] S1: The controller loads the modular program.

[0051] Among them, the above modular program at least includes: at least one functional module. The functional module at least includes a solenoid valve control function block and an execution module that calls the solenoid valve control function block.

[0052] Logical operations can be encapsulated in each functional module. For example, control logic for the solenoid valve is encapsulated inside the solenoid valve control function block.

[0053] S2: The controller calls the solenoid valve control function block through the execution module, and the control logic of the solenoid valve control function block at least performs the following operations:

[0054] S21: Generate electromagnetic coil control information according to the control instruction of the execution module;

[0055] The above electromagnetic coil control information is used to control the extension or retraction movement of the coil in the solenoid valve.

[0056] In one example, the control instruction of the execution module may specifically include an extension instruction and a retraction instruction, and the electromagnetic coil control information may correspondingly include: coil extension information and coil retraction information.

[0057] The coil extension information is used to control the coil in the solenoid valve to extend;

[0058] The coil retraction information is used to control the coil in the solenoid valve to retract.

[0059] It should be noted that the coil extension information and coil retraction information output by the control logic may be binary data, such as 1, 0, etc. At the hardware level, the control signal of the solenoid valve may exemplarily include a level signal.

[0060] The controller can also convert the binary data into a level signal for the solenoid valve.

[0061] For example, when a high level signal is input to the solenoid valve, the coil in the solenoid valve extends, and when a low voltage signal is input, the coil retracts. The controller can convert the coil extension information into a high level and the coil retraction information into a low voltage.

[0062] Alternatively, the conversion may be performed by other units / devices / modules / components.

[0063] S22: Outputting a control result according to the displacement information collected by the first displacement sensor and the second displacement sensor.

[0064] In one example, the control result may include at least: detection information.

[0065] The detection information may specifically include first detection information or second detection information. The first detection information is used to indicate whether extension is detected, and the second detection information is used to indicate whether retraction is detected.

[0066] The first detection information can be 0 or 1, or other different numerical values or letters. Similarly, the second detection information can be 0 or 1, or other different numerical values or letters.

[0067] As mentioned above, the first displacement sensor and the second displacement sensor are located at different positions. In one example, the first displacement sensor can be set at the position where the coil is in the extended state (referred to as the extended position), and the second displacement sensor can be set at the position where the coil is in the retracted state (referred to as the retracted position). When the coil has not reached the extended position, the first displacement sensor cannot sense the coil and the output is 0, and when it reaches the extended position, the output is 1. Similarly, when the coil has not reached the retracted position, the second displacement sensor cannot sense the coil and the output is 0, and when it reaches the retracted position, its output is 1.

[0068] Alternatively, the first displacement sensor may output a high-level (or low-level) signal, and the controller may convert the level signal into first detection information. Similarly, if the second displacement sensor outputs a high or low level signal, the controller may convert the level signal into second detection information.

[0069] Alternatively, the conversion may also be performed by other dedicated conversion units / devices / modules / components.

[0070] In other embodiments of the present invention, the control result may further include motion state information, which may specifically include first motion state information or second motion state information. The first motion state information is used to characterize that the coil is in the extended state, and the second motion state information is used to characterize that the coil is in the retracted state.

[0071] The motion state information is also determined based on the displacement information collected by the two sensors. Moreover, there is a temporal sequence between the motion state information and the detection information. Taking the operation of controlling the coil to extend as an example, after the coil extension information is output to the solenoid valve, before the solenoid valve reaches the extended position, the first motion state information is output, and after reaching the extended position, the detection information indicating that the extension has been detected is output.

[0072] It can be seen that in the embodiments of the present invention, the modular program loaded and executed by the controller includes a solenoid valve control function block and an execution module. The control logic for the solenoid valve has been encapsulated in the solenoid valve control function block.

[0073] Different devices can call the common solenoid valve control function block through the execution module to generate electromagnetic coil control information to control the operation of the solenoid valve and obtain the control result. In this process, there is no need to rewrite the logic repeatedly, reducing duplicate R & D and resource waste, saving time, and enabling the solenoid valve control to be achieved quickly and simply.

[0074] In other embodiments of the present invention, the above-mentioned solenoid valve control function block may provide input pins, output pins, and instruction transmission pins externally.

[0075] Please refer to Figure 3a , by way of example, the input pins may at least include: an extended detection signal (X1_Extended Detection in Figure 3a ) input pin and a retracted detection signal (X2_Retracted Detection in Figure 3a ) input pin;

[0076] The output pins may at least include: a coil control output pin (Coil Control in Figure 3a ).

[0077] In addition, there may also be an Enable pin, which can input an enable signal, and the enable signal is used to control the normal operation of the solenoid valve control function block.

[0078] In this example, the input information of the control logic may include: control instructions of the execution module 1, displacement information collected by the first displacement sensor (displacement sensor a), and displacement information collected by the second displacement sensor (displacement sensor b).

[0079] Among them, the above control instructions are transmitted through the instruction pin ( Figure 3a Link valve control) input, the displacement information collected by displacement sensor a is input through the X1_extension detection input pin, and the displacement information collected by displacement sensor b is input through the X2-retraction detection input pin.

[0080] The output information of the control logic may include the electromagnetic coil control information and control result. Specifically, the electromagnetic coil control information is output through the coil control output pin; and the control result is output through the instruction transmission pin.

[0081] The schematic diagram of input and output information can be found in Figure 3b .

[0082] As mentioned above, the electromagnetic coil control information may further include: coil extension information and coil retraction information. The coil extension information and coil retraction information may be output through one output pin, or may be output through two output pins respectively.

[0083] For example, see Figure 4 The coil control output pins may include at least: a coil extension signal output pin ( Figure 4 The out_ coil extension pin in the Figure 4 out_retract coil pin in the .

[0084] For example, see Figure 5 The aforementioned “generating electromagnetic coil control information according to the control instruction of the execution module” (S21) may specifically include:

[0085] After receiving the extension command, the coil extension information is output through the coil extension signal output pin;

[0086] After receiving the retraction command, the coil retraction information is output through the coil retraction signal.

[0087] In the process of controlling the solenoid valve, a fault may occur. To cope with this scenario, in other embodiments of the present invention, the solenoid valve control function block also encapsulates an alarm logic. Figure 6 The above-mentioned output pins also include: a fault alarm pin (Error pin), and the input pins may also include: an alarm release pin (ResetError pin).

[0088] The above alarm logic can be used to perform at least the following operations:

[0089] Operation a: After determining that a preset fault has occurred, generate a fault alarm message and output it through the fault alarm pin (Error pin).

[0090] The fault alarm message can be, for example, binary data, such as 1.

[0091] In one example, when there is no fault, 0 can be output through the fault alarm pin to indicate no fault.

[0092] Subsequent fault alarm messages can be converted into forms such as sound alarm signals, optoelectronic alarm signals, information reminders, etc. to notify relevant personnel.

[0093] Operation b: After the alarm cancellation information is input through the alarm cancellation pin (ResetError pin), stop outputting the fault alarm message.

[0094] After the fault is eliminated, the alarm cancellation information can be manually input through the alarm cancellation pin. Or, if the execution module or other modules can automatically detect the elimination of the fault, the alarm cancellation information can also be input through the alarm cancellation pin.

[0095] In other embodiments of the present invention, the preset faults may include: coil extension timeout, coil retraction timeout. Correspondingly, please refer to Figure 7 , the above solenoid valve control function block may further include: a monitoring time input pin (In_Monitoring Time), which is used to input the monitoring time.

[0096] Those skilled in the art can flexibly design the specific value of the monitoring time. For example, 1 ms, 10 ms, etc. The monitoring time can be input in the form of instructions.

[0097] In this embodiment, the determination of the occurrence of a preset fault may specifically include:

[0098] According to the displacement information collected by the first displacement sensor and the second displacement sensor, detect whether the coil has completed extension or retraction within the monitoring time;

[0099] If not completed, it is determined that a preset fault has occurred.

[0100] Specifically, after the coil extension information is sent, the displacement information of the first displacement sensor can be used to detect whether the coil has reached the end of extension within the monitoring time;

[0101] After the coil retraction information is sent, the displacement information of the second displacement sensor can be used to detect whether the coil has completed retraction within the monitoring time.

[0102] As mentioned above, the first displacement sensor can be set at the extended position and the second displacement sensor can be set at the retracted position. When the coil has not reached the extended position, the first displacement sensor cannot sense the coil and the output is 0, and when it reaches the extended position, the output is 1. Similarly, when the coil has not reached the retracted position, the second displacement sensor cannot sense the coil and the output is 0, and when it reaches the retracted position, its output is 1.

[0103] In combination with the above-mentioned use environment, detecting whether the coil has been extended within the monitoring time may include: detecting whether the first displacement sensor outputs 1 within the monitoring time, if so, detecting that the extension is completed, if not, detecting that the extension is not completed. The first detection information mentioned above may also be output according to the detection result.

[0104] Similarly, detecting whether the coil has completed retraction within the monitoring time may include: detecting whether the second displacement sensor outputs 1 within the monitoring time, if so, detecting that the coil has completed retraction, if not, detecting that the coil has not completed retraction. The aforementioned second detection information may also be output according to the detection result.

[0105] In other embodiments of the present invention, see Figure 8 To achieve action protection, the above input pins may also include: allowing the coil to extend the signal input pin ( Figure 8 IN_ in the allow extension) and allow coil retraction signal input pin ( Figure 8 IN_ in allows retraction).

[0106] The coil extension-allowing signal input pin is used to input the extension-allowing instruction; the coil retraction-allowing signal input pin is used to input the retraction-allowing instruction.

[0107] The extension permission instruction and the retraction permission instruction may be input by the aforementioned execution module, or may be input by other modules.

[0108] The aforementioned operation of outputting coil extension information is executed after inputting the extension permission instruction.

[0109] That is, if the extension permission command is not input, the coil extension information will not be output even if the extension command is input.

[0110] Similarly, the operation of outputting coil retraction information is executed after inputting the retraction permission instruction.

[0111] The present invention also claims a control device, see Figure 1 The control device exemplarily includes: a controller 1, a solenoid valve 2, a first displacement sensor ( Figure 1 The displacement sensor a) and the second displacement sensor ( Figure 2 Displacement sensor in b).

[0112] The above-mentioned controller may be, for example, a PLC controller.

[0113] The controller 1 can be used for:

[0114] Loading a modular program; wherein, the modular program at least includes a solenoid valve control function block and an execution module for calling the solenoid valve control function block; the solenoid valve control function block encapsulates control logic inside;

[0115] By the execution module calling the solenoid valve control function block, the control logic of the solenoid valve control function block at least performs the following operations:

[0116] Generating electromagnetic coil control information according to the control instruction of the execution module; the electromagnetic coil control information is used to control the coil in the solenoid valve to perform an extending or retracting movement;

[0117] Outputting a control result according to the displacement information collected by the first displacement sensor and the second displacement sensor; the control result at least includes: detection information; the detection information includes first detection information or second detection information; the first detection information is used to represent whether extension is detected, and the second detection information is used to represent whether retraction is detected;

[0118] The solenoid valve 2 is used for:

[0119] Controlling the coil in the solenoid valve to perform an extending or retracting movement according to the electromagnetic coil control information.

[0120] In other embodiments of the present invention, the above control result may further include: motion state information; the motion state information includes: first motion state information or second motion state information; wherein, the first motion state information is used to represent that the coil is extending; the second motion state is used to represent that the coil is retracting

[0121] For detailed content, please refer to the foregoing introduction and will not be elaborated here.

[0122] In other embodiments of the present invention, the above solenoid valve control function block may provide input pins, output pins, and instruction transmission pins externally.

[0123] In one example, please refer to Figure 3a , the input pins in all the above embodiments at least include: an extension detection signal (X1_extension detection in Figure 3) input pin and a retraction detection signal (X2_retraction detection in Figure 3) input pin; the output pins at least include: (coil control in Figure 3);

[0124] Among them, the foregoing control instruction is input through the instruction transmission pin, the displacement information collected by the first displacement sensor is input through the extension detection signal input pin, and the displacement information collected by the second displacement sensor is input through the retraction detection signal input pin.

[0125] The output information of the control logic may include electromagnetic coil control information and control results. The electromagnetic coil control information can be output through the coil control output pin; the control result can be output through the instruction transmission pin.

[0126] Please refer to the above introduction for details and will not be elaborated here.

[0127] In other embodiments of the present invention, alarm logic is also encapsulated inside the solenoid valve control function block.

[0128] See also Figure 6 The input pins in all the above embodiments may also include: an alarm release pin; the output pins may also include: a fault alarm pin.

[0129] The alarm logic is used to perform at least the following operations:

[0130] After determining that a preset fault occurs, a fault alarm message is generated and output through the fault alarm pin; and,

[0131] After the alarm release information is input through the alarm release pin, the output of the fault alarm information stops.

[0132] Please refer to the above introduction for details and will not be elaborated here.

[0133] In other embodiments of the present invention, the preset fault may include: coil extension timeout, coil retraction timeout. Figure 7 , the input pins in all the above embodiments also include: a monitoring time input pin, used to input the monitoring time;

[0134] In terms of determining the occurrence of a preset fault, the alarm logic of the solenoid valve control function block can be specifically used for:

[0135] According to the displacement information collected by the first displacement sensor and the second displacement sensor, whether the detection coil has completed extension or retraction within the monitoring time;

[0136] If not completed, it is determined that a preset failure has occurred.

[0137] Please refer to the above introduction for details and will not be elaborated here.

[0138] In other embodiments of the present invention, see Figure 4 , the coil control output pins include at least: coil extension signal output pin ( Figure 4 The out_ coil extension pin in the Figure 4 out_retract coil pin in );

[0139] As described above, the electromagnetic coil control information includes: coil extension information and coil retraction information; the control instructions include extension instructions and retraction instructions.

[0140] Correspondingly, in terms of generating electromagnetic coil control information according to the control instructions of the execution module, the control logic of the solenoid valve control function block can be specifically used for:

[0141] After receiving the extension instruction, output the coil extension information through the coil extension signal output pin;

[0142] After receiving the retraction instruction, output the coil retraction information through the coil retraction signal.

[0143] For the detailed content, please refer to the foregoing introduction and will not be elaborated here.

[0144] In other embodiments of the present invention, please refer to Figure 8 , to achieve motion protection, the input pins in all the above embodiments may further include: an allow coil extension signal input pin ( Figure 8 IN_AllowExtension in Figure 8 and an allow coil retraction signal input pin (

[0145] IN_AllowRetraction in

[0146] The allow coil extension signal input pin is used to input an allow extension instruction; the allow coil retraction signal input pin is used to input an allow retraction instruction.

[0147] First, the definition of internal variables of the Link pin (where "extending" corresponds to the first motion state information described above, "retracting" corresponds to the second motion state information described above, "extension detection" corresponds to the first detection information described above, and "retraction detection" corresponds to the second detection information described above): TYPE "Link_solenoid valve" LINK internal variable definition

[0148]

[0149]

[0150] Second, the definition of internal variables of the input pin:

[0151]

[0152]

[0153] Third, the definition of internal variables of the output pin:

[0154]

[0155] Four,

[0156]

[0157] Five,

[0158]

[0159]

[0160] The following is the control logic and alarm logic involved:

[0161]

[0162]

[0163]

[0164]

[0165] The above control word is a 16-bit quantity variable, which is a variable inside the function block and is generated by the function block itself.

[0166] Those skilled in the art can further realize that the units and model steps of each example described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer industrial control software, or a combination of the two. To clearly illustrate the interchangeability of hardware and industrial control software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in the form of hardware or industrial control software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present invention.

[0167] The steps of the method or model described in combination with the embodiments disclosed in this article can be directly implemented by hardware, an industrial control software module executed by a processor, or a combination of the two. The industrial control software module can be placed in a random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, register, hard disk, removable disk, WD-ROM, or any other form of storage medium well-known in the technical field.

[0168] The foregoing description of the disclosed embodiments enables those skilled in the art to practice or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A solenoid valve control method, characterized in that, The invention is applied to a control device, wherein the control device is applied to a side plate of a refrigerator, a U-shell or a flanging machine of an inner drum of a washing machine; the control device comprises a controller, a solenoid valve, a first displacement sensor and a second displacement sensor; the first displacement sensor and the second displacement sensor are arranged at different positions, and are used to collect displacement information of a cylinder piston driven by the solenoid valve; wherein the first displacement sensor is arranged at a position where a coil is in an extended state, and the second displacement sensor is arranged at a position where a coil is in a retracted state; the method comprises: The controller loads a modular program; wherein the modular program at least includes a solenoid valve control function block and an execution module that calls the solenoid valve control function block; the solenoid valve control function block encapsulates control logic; The controller calls the solenoid valve control function block through the execution module, and the control logic of the solenoid valve control function block at least performs the following operations: Generate electromagnetic coil control information according to the control instruction of the execution module; the electromagnetic coil control information is used to control the coil in the electromagnetic valve to extend or retract; Output a control result according to the displacement information collected by the first displacement sensor and the second displacement sensor; the control result at least includes: detection information; the detection information includes first detection information or second detection information; the first detection information is used to indicate whether extension is detected, and the second detection information is used to indicate whether retraction is detected; The control result also includes: motion state information; the motion state information includes: first motion state information or second motion state information; wherein, the first motion state information is used to represent that the coil is extending; the second motion state is used to represent that the coil is retracting; the motion state information is determined based on the displacement information collected by the first displacement sensor and the second displacement sensor.

2. The method according to claim 1, wherein The solenoid valve control function block provides an input pin, an output pin and a command transmission pin to the outside.

3. The method according to claim 2, characterized in that The input pins at least include: an extension detection signal input pin and a retraction detection signal input pin; the output pins at least include: a coil control output pin; The input information of the control logic includes: the control instruction of the execution module, the displacement information collected by the first displacement sensor and the displacement information collected by the second displacement sensor; Wherein, the control instruction is input through the instruction transmission pin, the displacement information collected by the first displacement sensor is input through the extension detection signal input pin, and the displacement information collected by the second displacement sensor is input through the retraction detection signal input pin; The output information of the control logic includes electromagnetic coil control information and control results; the electromagnetic coil control information is output through the coil control output pin; and the control result is output through the instruction transmission pin.

4. The method according to claim 3, characterized in that The solenoid valve control function block also encapsulates alarm logic; The input pins also include: an alarm clear pin; The output pins also include: a fault alarm pin; The alarm logic is used to perform at least the following operations: After determining that a preset fault occurs, generating fault alarm information and outputting it through the fault alarm pin; and, After the alarm release information is input through the alarm release pin, the output of the fault alarm information is stopped.

5. The method according to claim 4, characterized in that The input pins also include: a monitoring time input pin, used to input monitoring time; Determining that a preset fault occurs includes: Detecting whether the coil is extended or retracted within a monitoring time according to the displacement information collected by the first displacement sensor and the second displacement sensor; If not completed, it is determined that a preset failure has occurred.

6. The method according to claim 3, characterized in that The coil control output pins at least include: a coil extension signal output pin and a coil retraction signal output pin; The electromagnetic coil control information includes: coil extension information and coil retraction information; The control instructions include an extension instruction and a retraction instruction; in, The coil extension information is used to control the coil in the solenoid valve to perform extension movement; The coil retraction information is used to control the coil in the solenoid valve to retract; Generating electromagnetic coil control information according to the control instruction of the execution module includes: After receiving the extension instruction, outputting the coil extension information through the coil extension signal output pin; After receiving the retraction instruction, the coil retraction information is output through the coil retraction signal.

7. The method according to claim 6, characterized in that The input pins further include: a coil extension-allowing signal input pin and a coil retraction-allowing signal input pin; the coil extension-allowing signal input pin is used to input an extension-allowing instruction; the coil retraction-allowing signal input pin is used to input a retraction-allowing instruction; The operation of outputting the coil extension information is performed after the extension permission instruction is input; The operation of outputting the coil retraction information is performed after the retraction permission instruction is input.

8. A control device, characterized in that, The control device is applied to the side plate of a refrigerator, a U-shell or a flanging machine of an inner drum of a washing machine; the control device comprises a controller, a solenoid valve, a first displacement sensor and a second displacement sensor; The first displacement sensor and the second displacement sensor are arranged at different positions, and are used to collect displacement information of the cylinder piston driven by the solenoid valve; wherein the first displacement sensor is arranged at the position where the coil is in the extended state, and the second displacement sensor is arranged at the position where the coil is in the retracted state; The controller is used to: Loading a modular program; wherein the modular program at least includes a solenoid valve control function block and an execution module that calls the solenoid valve control function block; the solenoid valve control function block encapsulates control logic; The solenoid valve control function block is called by the execution module, and the control logic of the solenoid valve control function block at least performs the following operations: Generate electromagnetic coil control information according to the control instruction of the execution module; the electromagnetic coil control information is used to control the coil in the solenoid valve to perform an extending or retracting movement; Output a control result according to the displacement information collected by the first displacement sensor and the second displacement sensor; the control result at least includes: detection information; the detection information includes first detection information or second detection information; the first detection information is used to characterize whether an extension is detected, and the second detection information is used to characterize whether a retraction is detected; the control result further includes: motion state information; the motion state information includes: first motion state information or second motion state information; wherein, the first motion state information is used to characterize that the coil is extending; the second motion state is used to characterize that the coil is retracting; the motion state information is determined according to the displacement information collected by the first displacement sensor and the second displacement sensor; The solenoid valve is used for: Control the coil in the solenoid valve to perform an extending or retracting movement according to the electromagnetic coil control information.

Citation Information

Patent Citations

  • Control method and device applied to three-position five-way electromagnetic valve

    CN112268135A