CN110618625B - Control system, control method and electronic device - Google Patents

Control system, control method and electronic device Download PDF

Info

Publication number
CN110618625B
CN110618625B CN201910649653.5A CN201910649653A CN110618625B CN 110618625 B CN110618625 B CN 110618625B CN 201910649653 A CN201910649653 A CN 201910649653A CN 110618625 B CN110618625 B CN 110618625B
Authority
CN
China
Prior art keywords
control module
output port
control
pull
resistor
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910649653.5A
Other languages
Chinese (zh)
Other versions
CN110618625A (en
Inventor
白智锐
盛保敬
陈小雷
张斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Haier Smart Home Co Ltd
Qingdao Economic and Technological Development Zone Haier Water Heater Co Ltd
Original Assignee
Haier Smart Home Co Ltd
Qingdao Economic and Technological Development Zone Haier Water Heater Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Haier Smart Home Co Ltd, Qingdao Economic and Technological Development Zone Haier Water Heater Co Ltd filed Critical Haier Smart Home Co Ltd
Priority to CN201910649653.5A priority Critical patent/CN110618625B/en
Publication of CN110618625A publication Critical patent/CN110618625A/en
Application granted granted Critical
Publication of CN110618625B publication Critical patent/CN110618625B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/25Pc structure of the system
    • G05B2219/25257Microcontroller

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)

Abstract

The invention belongs to the technical field of electronics, and particularly relates to a control system, a control method and electronic equipment. The control system provided by the invention comprises: the first control module reads a first level from an output port which is used for connecting an external load in the second output port set before the second control module receives a control instruction sent by the first control module, and reads a second level from an output port which is not used for connecting the external load in the second output port set to generate a level sequence, wherein the first control module determines the type of the second control module according to the level sequence and a preset module type mapping rule. The control system, the control method and the electronic equipment provided by the invention realize the quick judgment of the specific type of the second control module so as to perform the specific selection and execution of the subsequent control logic program.

Description

Control system, control method and electronic device
Technical Field
The invention belongs to the technical field of electronics, and particularly relates to a control system, a control method and electronic equipment.
Background
With the popularization of electronic products and the improvement of the living standard of residents, the configuration requirements of people on the electronic products are more and more abundant, so manufacturers often need to provide different levels of configuration for the same type of products to meet different requirements of users.
At present, in a control system of an electronic product, for example, in a control system of a home appliance, it is common to perform cooperative control by providing a plurality of control modules connected to each other. For example, the electronic product may be controlled by providing a master control module with a programmable chip and a slave control module for performing a specific function according to an instruction from the master control module, and the master control module and the slave control module are usually connected through a standardized interface.
However, for different levels of product configurations, the master control module in the electronic product needs to connect different slave control modules, and the adaptation between the two control modules is performed manually, and the master control module itself cannot automatically determine the specific type of the connected slave control module.
Disclosure of Invention
The invention provides a control system, a control method and electronic equipment, so that the control system can quickly judge the specific type of a second control module to perform subsequent specific selection and execution of a control logic program.
In a first aspect, the present invention provides a control system comprising: the device comprises a first control module and a second control module connected with the first control module;
a second output port set is arranged in the second control module;
before the second control module receives the control instruction sent by the first control module, the first control module reads a first level from an output port used for connecting an external load in the second output port set, and reads a second level from an output port not used for connecting the external load in the second output port set, so as to generate a level sequence;
and the first control module determines the type of the second control module according to the level sequence and a preset module type mapping rule.
In one possible design, the first control module is connected to the corresponding input port in the second input port set of the second control module through all or part of the output ports in the first output port set;
and all or part of the output ports in the second output port set are connected with the input end of a relay drive circuit, the output end of the relay drive circuit is connected with a coil of a relay, and one end of the contact side of the relay is connected with the external load.
In one possible design, the relay driving circuit includes a pull-down resistor and a driving transistor, and the driving transistor is an NPN transistor;
each output port in the second output port set, which is used for being connected with the relay drive circuit, is connected with the base electrode of the driving triode, the emitting electrode of the driving triode is grounded, and the collecting electrode of the driving triode is connected with a driving power supply;
the first end of the pull-down resistor is connected to the base electrode of the driving triode or connected to the corresponding output port in the first output port set, and the second end of the pull-down resistor is grounded.
In one possible design, the relay driving circuit includes a base current limiting resistor, a pull-down resistor, a driving triode and a freewheeling diode, and the driving triode is an NPN triode;
each output port in the second output port set, which is used for being connected with the relay drive circuit, is connected with a first end of the base current-limiting resistor, a second end of the base current-limiting resistor is connected with a base of the driving triode, an emitter of the driving triode is grounded, a collector of the driving triode is connected with an anode of the freewheeling diode, and a cathode of the freewheeling diode is connected with a driving power supply;
the first end of the relay coil is connected between the collector of the driving triode and the anode of the freewheeling diode, and the second end of the relay coil is connected with the driving power supply;
the first end of the pull-down resistor is connected between the second end of the base current-limiting resistor and the base of the driving triode, and the second end of the pull-down resistor is grounded.
In one possible design, each output port of the second set of output ports that is not connected to the relay driver circuit is connected to a first terminal of a pull-up resistor, and a second terminal of the pull-up resistor is connected to the driving power supply.
In one possible design, an output port of the first set of output ports not used for connection with the second control module is connected with a first end of a pull-up resistor, and a second end of the pull-up resistor is connected with the driving power supply;
and the ratio of the resistance value of the pull-up resistor to the resistance value of the pull-down resistor is greater than a preset ratio.
In one possible design, the relay driving circuit includes a pull-up resistor and a driving transistor, and the driving transistor is a PNP transistor;
each output port in the second output port set, which is used for being connected with the relay drive circuit, is connected with the base electrode of the driving triode, the emitting electrode of the driving triode is grounded, and the collecting electrode of the driving triode is connected with a driving power supply;
the first end of the pull-up resistor is connected to the base electrode of the driving triode or connected to the corresponding output port in the first output port set, and the second end of the pull-up resistor is connected with the driving power supply.
In one possible design, the relay driving circuit comprises a base current limiting resistor, a pull-up resistor, a driving triode and a freewheeling diode, wherein the driving triode is a PNP triode;
each output port in the second output port set, which is used for being connected with the relay drive circuit, is connected with a first end of the base current-limiting resistor, a second end of the base current-limiting resistor is connected with a base of the driving triode, an emitter of the driving triode is grounded, a collector of the driving triode is connected with an anode of the freewheeling diode, and a cathode of the freewheeling diode is connected with a driving power supply;
the first end of the relay coil is connected between the collector of the driving triode and the anode of the freewheeling diode, and the second end of the relay coil is connected with the driving power supply;
the first end of the pull-up resistor is connected between the second end of the base current-limiting resistor and the base of the driving triode, and the second end of the pull-up resistor is connected with the driving power supply.
In one possible design, each output port of the second set of output ports that is not connected to the relay driver circuit is connected to a first terminal of a pull-down resistor, and a second terminal of the pull-down resistor is connected to ground.
In one possible design, an output port of the first output port set, which is not used for being connected with the second control module, is connected with a first end of a pull-down resistor, and a second end of the pull-down resistor is connected with the driving power supply;
and the ratio of the resistance value of the pull-down resistor to the resistance value of the pull-up resistor is greater than a preset ratio.
In one possible design, a control chip is arranged in the first control module;
a first output port set is arranged in the first control module, and a second input port set is arranged in the second control module;
and the output port which needs to output the control instruction in the first output port set is connected with the control chip through a protection current-limiting resistor.
In one possible design, the first control module is configured to generate a load code according to the level sequence, so as to determine the type of the second control module according to the load code and a preset module type mapping rule.
In one possible design, a plurality of sets of control logic programs are arranged in the first control module;
the first control module is used for determining a control logic program to be executed according to the type of the second control module and a preset program type mapping rule.
In a second aspect, the present invention further provides a control method, which is applied to a control system, where the control system includes a first control module and a second control module connected to the first control module; the method comprises the following steps:
before a control instruction sent by the first control module to the second control module, the first control module reads a first level from an output port used for connecting an external load in a second output port set, and reads a second level from an output port not used for connecting the external load in the second output port set, and the second control module is provided with the second output port set;
the first control module generates a level sequence according to the acquired level;
and the first control module determines the type of the second control module according to the level sequence and a preset module type mapping rule.
In one possible design, the determining, by the first control module, the type of the second control module according to the level sequence and a preset module type mapping rule includes:
the first control module generates a load code according to the level sequence;
and the first control module determines the type of the second control module according to the load code and a preset module type mapping rule.
In one possible design, after the first control module determines the type of the second control module according to the load code and a preset module type mapping rule, the method further includes:
and the first control module determines a control logic program to be executed according to the type of the second control module and a preset program type mapping rule, wherein a plurality of sets of control logic programs are arranged in the first control module.
In a third aspect, the present invention further provides an electronic device, including any one of the possible control systems in the first aspect.
In this embodiment, a first control module in the control system acquires a multi-bit level from an output port in a second output port set before sending a control instruction, and then determines the type of a second control module according to the acquired level sequence and a preset module type mapping rule, so that automatic identification of the second control module in the control system is realized without increasing the hardware cost of the control system.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic diagram of a control system provided in the prior art;
FIG. 2 is a schematic block diagram of a control system according to an exemplary embodiment of the present invention;
FIG. 3 is a schematic circuit diagram of the control system of the embodiment shown in FIG. 2;
FIG. 4 is a schematic diagram of port connections to a relay drive circuit according to an exemplary embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating an unconnected relay port connection in accordance with an exemplary embodiment of the present invention;
FIG. 6 is a flow chart illustrating a control method according to an exemplary embodiment of the present invention;
FIG. 7 is a flow chart illustrating a control method according to another exemplary embodiment of the present invention;
fig. 8 is a schematic diagram illustrating an electronic device structure according to an exemplary embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Next, it should be noted that in the description of the present invention, the terms of direction or positional relationship indicated by the terms "inside", "outside", and the like are based on the direction or positional relationship shown in the drawings, which are only for convenience of description, and do not indicate or imply that the device or member must have a specific orientation, be constructed in a specific orientation, and operate, and thus, should not be construed as limiting the present invention.
Furthermore, it should be noted that, in the description of the present invention, unless otherwise explicitly specified or limited, the terms "connected" and "connected" should be interpreted broadly, e.g., as being fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; the two components can be directly connected or indirectly connected through an intermediate medium, and the two components can be communicated with each other. The specific meanings of the above terms in the present invention can be understood by those skilled in the art according to specific situations.
Fig. 1 is a schematic configuration diagram of a control system provided in the prior art. As shown in fig. 1, in a control system of an electronic product, for example, a control system of a home appliance, it is common to perform cooperative control by providing a plurality of control modules connected to each other, for example, a first control module with a programmable chip and a second control module for executing a specific function according to an instruction sent by the first control module may be provided to control the electronic product, and the master control module and the slave control module are usually connected through a standardized interface.
With continued reference to fig. 1, in the design of electronic products, different levels of product configuration are typically configured, and therefore, it is necessary for the first control module to be configured with a plurality of designs carrying different logic control programs, including, for example, a1, a2, and A3; it is also desirable for the second control module to be configured with designs that drive different loads, including B1, B2, and B3, for example, where the first control module passes through the standardized terminalsMouth CAAnd a standardized port C in the second control moduleBAnd (4) connecting. However, since the loads driven by the second control modules are different, the logic control programs adapted to each second control module are also very different, and therefore, the first control module and the second control module can only adopt a one-to-one design, and cannot be adapted universally, for example, a1 can only be adapted to B1, a2 can only be adapted to B2, and A3 can only be adapted to B3. However, the adaptation between the two control modules is dependent on manual work, and the first control module itself cannot automatically determine the specific type of slave second control module connected.
Optionally, the first control module may be a module with a programmable control chip and capable of executing judgment and operation, and the second control module executes a specific function only according to an instruction sent by the first control module, and does not contain a programmable chip and has no communication function.
Aiming at the problems, the first control module can quickly judge the specific type of the second control module so as to perform the subsequent specific selection and execution of the control logic program.
In electronic products, there are often two circuit modules, a class a module (including a1, a2, A3 … …) and a class B module (including B1, B2, B3 … …), whose functions are clearly divided and connected by standardized interfaces, and any one of the a module and any one of the B module can be connected by standardized interfaces CA and CB.
FIG. 2 is a schematic block diagram of a control system according to an exemplary embodiment of the present invention. As shown in fig. 2, the control system provided in this embodiment includes: the device comprises a first control module and a second control module connected with the first control module, wherein the first control module and the second control module can be connected through a standardized port. And the first control module in the control system can acquire different electric potential sequences according to different types of the connected second control modules, so that the specific type of the connected second control modules is determined according to the acquired electric potential sequences and a preset module type mapping rule. In one possible design, the first control module may be a control panel of the household appliance, the second control module may be a power panel of the household appliance, and the loads connected to the second control module may be a motor, a heater, a compressor, and the like.
For different second control modules, due to the fact that the number of external loads is different and the output ports connected to the second control modules are different, before the second control modules receive the control instruction sent by the first control module, the level sequences acquired by the first control module from the output ports of the second control modules can be different. Optionally, the output port of the second control module externally connected with the load may be configured as a first level, and the output port of the second control module not externally connected with the load may be configured as a second level, which is worth explaining, so that it is only required to ensure that the first level and the first level are different levels for distinguishing.
With continued reference to FIG. 2, the first control module A, may pass through the standardized port CAAnd a standardized port C in the second control moduleBThe connection is made. When the first control module A is connected with the second control module B1, the level sequence acquired by the first control module A is a first level sequence; when the first control module a is connected with the second control module B2, the level sequence acquired by the first control module a is a second level sequence; when the first control module a is connected to the third control module B3, the level sequence acquired by the first control module a is a third level sequence. As can be seen, the first control module A may determine whether the second control module B1, the second control module B2, or the third control module B3 is currently connected based on the retrieved sequence of levels. It should be noted that, in the present embodiment, the number of types of the second control module is not limited, and the three types are only exemplified for the convenience of understanding.
After the control system provided in the above embodiment determines the type of the second control module of the first control module, the control logic program to be executed may also be determined according to the type of the second control module and a preset program type mapping rule, where multiple sets of control logic programs are provided in the first control module, so that the same first control module may be adapted to multiple different second control modules.
Fig. 3 is a circuit schematic of the control system in the embodiment of fig. 2. As shown in fig. 3, a second output port set may be disposed in the second control module, and before the first control module is powered on and the second control module receives the control instruction sent by the first control module, the first control module may read a first level from an output port of the second output port set, which is used to connect to an external load, and read a second level from an output port of the second output port set, which is not used to connect to the external load, so as to generate a level sequence, and then the first control module determines a type of the second control module according to the level sequence and a preset module type mapping rule.
It should be noted that, in order to enable the second control module to effectively drive the load, the second control module generally needs to be connected to the relay driving circuit first, and then connected to the relay, so as to drive the external load through the relay. Optionally, the relay driving circuit generally includes a driving transistor, and the relay is controlled by a common-emitter amplifying method.
Fig. 4 is a schematic diagram illustrating a port connection to a relay drive circuit according to an exemplary embodiment of the present invention. As shown in fig. 4, the first control module is connected to the corresponding input ports in the second input port set of the second control module through all or part of the output ports in the first output port set, all or part of the output ports in the second output port set are connected to the input terminals of the relay driving circuit, the output terminals of the relay driving circuit are used for being connected to the coil of the relay, and one end of the relay on the contact side is used for being connected to the external load.
Optionally, a control chip is disposed in the first control module, a first output port set is disposed in the first control module, a second input port set is disposed in the second control module, and an output port, which needs to output a control instruction, in the first output port set is connected to the control chip through a protection current-limiting resistor.
In one possible design, the relay driving circuit includes a pull-down resistor and a driving triode, the driving triode is an NPN triode, each output port in the second output port set, which is used for being connected with the relay driving circuit, is connected with a base of the driving triode, an emitter of the driving triode is grounded, a collector of the driving triode is connected with a driving power supply, a first end of the pull-down resistor is connected with the base of the driving triode or connected with a corresponding output port in the first output port set, and a second end of the pull-down resistor is grounded.
In another possible design, with continued reference to FIG. 4, the relay drive circuit includes a base current limiting resistor RBA pull-down resistor RBEDrive triode and freewheeling diode DnThe driving triode is an NPN triode, namely the driving triode is conducted at a high level and is cut off at a low level. With continued reference to fig. 4, each output port of the second set of output ports of the second control module for connection to the relay driver circuit is connected to a base current limiting resistor RBIs connected with a base current limiting resistor RBThe second end of the driving triode is connected with the base electrode of the driving triode, the emitting electrode of the driving triode is grounded, and the collecting electrode of the driving triode is connected with a freewheeling diode DnIs connected to the anode of a freewheeling diode DnA first end of the relay coil is connected between the collector of the drive transistor and the anode of the freewheeling diode, a second end of the relay coil is connected with the drive power supply, and a pull-down resistor RBEFirst end of the resistor is connected with a base current limiting resistor RBBetween the second end of the driving transistor and the base of the driving transistor, a pull-down resistor RBEThe second terminal of (a) is grounded.
Therefore, after passing through the second control module, the control signal sent by the first control module is input into the relay drive circuit through the output port of the second output port set, and then passes through the base current limiting resistor RBAnd entering a driving triode, and driving the triode to amplify the circuit and then drive a relay to suck or break. It is worth to say that the relay is a normally open relay, i.e. a coilWhen the input control signal is high level, the triode is conducted and the relay is attracted, and when the input control signal is low level, the triode is cut off and the relay is disconnected. Wherein R isBIs a base current limiting resistor, RBEThe resistor is pulled down, so that the base of the triode is put low when the output port of the second output port set does not have any signal, and the relay is in an off state.
It can be seen that when no signal is input to an output port of the second set of output ports, this output port will also be steadily at a low level (due to the pass through R)BEGrounded), whether the output port is at a certain low level can be read by the principle to judge whether a relay is connected or not, and then whether a load is connected to the output port or not can be judged.
In addition, in order to make the port without the relay and the port with the relay in the second output port set of the second control module have a clear and stable difference for the first control module to read, it is also necessary to make the output port have a high level without control signal input.
Optionally, fig. 5 is a schematic diagram illustrating an unconnected relay port connection according to an exemplary embodiment of the invention. As shown in fig. 5, each output port of the second set of output ports, which is not connected to the relay driver circuit, is connected to a first terminal of a pull-up resistor, and a second terminal of the pull-up resistor is connected to the driving power supply.
In addition, the pull-up resistor is used for marking the pull-up without a relay, and may also be directly placed at the end of the first control module, specifically, the output port which is not used for being connected with the second control module in the first output port set may be connected with the first end of the pull-up resistor, and the second end of the pull-up resistor is connected with the driving power supply, where the resistance value of the pull-up resistor is much larger than that of the pull-down resistor, for example, the ratio of the resistance value of the pull-up resistor to that of the pull-down resistor is larger than a preset ratio.
In one possible design, the relay driving circuit comprises a pull-up resistor and a driving triode, wherein the driving triode is a PNP triode; each output port in the second output port set, which is used for being connected with the relay drive circuit, is connected with the base electrode of the drive triode, the emitting electrode of the drive triode is grounded, and the collecting electrode of the drive triode is connected with the drive power supply; the first end of the pull-up resistor is connected to the base electrode of the driving triode or connected to the corresponding output port in the first output port set, and the second end of the pull-up resistor is connected with the driving power supply.
In another possible design, the driving transistor may also be a PNP transistor, and at this time, the relay driving circuit includes a base current-limiting resistor, a pull-up resistor, a driving transistor, and a freewheeling diode, the driving transistor is a PNP transistor, each output port of the second output port set, which is used for being connected to the relay driving circuit, is connected to a first end of the base current-limiting resistor, a second end of the base current-limiting resistor is connected to a base of the driving transistor, an emitter of the driving transistor is grounded, a collector of the driving transistor is connected to an anode of the freewheeling diode, a cathode of the freewheeling diode is connected to the driving power supply, a first end of the relay coil is connected between the collector of the driving transistor and the anode of the freewheeling diode, a second end of the relay coil is connected to the driving power supply, and a first end of the pull-up resistor is connected between the second end of the base current-limiting resistor and the base of the driving transistor, and the second end of the pull-up resistor is connected with a driving power supply.
At this time, in order to make the port without the relay and the port with the relay in the second output port set of the second control module have a clear and stable difference for the first control module to read, it is also necessary to make the output port have a low level under the condition of no control signal input.
Optionally, each output port not connected to the relay driving circuit in the second output port set is connected to the first end of the pull-down resistor, and the second end of the pull-down resistor is grounded.
In addition, the pull-down resistor is used for marking a pull-down resistor without a relay, and may also be directly placed at the end of the first control module, specifically, the output port which is not used for being connected with the second control module in the first output port set may be connected with the first end of the pull-down resistor, and the second end of the pull-down resistor is connected with the driving power supply, where the resistance value of the pull-down resistor is much larger than that of the pull-up resistor, for example, the ratio of the resistance value of the pull-down resistor to that of the pull-up resistor is larger than a preset ratio.
In addition, the first control module generally obtains the level through the control chip, and generates the load code according to the level sequence, so as to determine the type of the second control module according to the load code and the preset module type mapping rule. In addition, the control chip can also determine a control logic program to be executed according to the type of the second control module and a preset program type mapping rule, wherein a plurality of sets of control logic programs can be arranged in the control chip of the first control module.
In this embodiment, before sending the control instruction, the first control module in the control system obtains the multi-bit level from the output port in the second output port set, and then determines the type of the second control module according to the obtained level sequence and the preset module type mapping rule, thereby implementing automatic identification of the second control module in the control system, and without increasing the hardware cost of the control system.
In addition, after the type of the second control module is determined, the control logic program to be executed can be determined according to the type of the second control module and a preset program type mapping rule, so that universal adaptation between the first control module and the second control module in the control system is realized.
Moreover, in the prior art, even if a plurality of sets of control logic programs are reserved in the first control module, the selection of which set is to be adopted is only selected by connecting an upper computer during production or manually selecting the set on the first control module through a dial switch or other modes, and if the input is wrong, the control system cannot work normally, so that the sold product is poor, and the quality loss is caused. In addition, the existing manual method consumes the production time cost, is slow in production beat, is manually operated, has high error rate, and can cause the system to be incapable of normally running if the input is wrong. The method of writing in by using the upper computer also needs a production process and equipment, consumes the production time and cost and has slow production beat.
However, the control system provided by this embodiment can directly realize the identification of the first control module to the second control system, select a matched control logic program for control according to the identification result, and send out a corresponding control instruction, without increasing the cost, and has strong reliability, avoiding human errors, and effectively optimizing the production process.
In addition, the identification process of the second control module in the above embodiment may be described in detail in a manner that a load code determines the type of the second control module:
specifically, in the above embodiment, the number of the external connections of the second control module may be determined according to an actual planning of the product, where the number of the relays is large when the high-end product corresponds to a large number of loads, and conversely, the number of the relays is small when the low-end product corresponds to a small number of relays. The form that the number of the relays externally connected to the second control module is at most 4 may be selected for description, but it is worth describing that the number of the relays externally connected to the second control module is not specifically limited in this embodiment.
With continued reference to FIG. 3, the output ports of the second set of output ports in the second control module include KA1, KA2, KA3, and KA 4. Pins P1, P2, P3 and P4 of the chip in the first control module are respectively connected with corresponding ports of the first input port set through protection current limiting resistors RP1, RP2, RP3 and RP4, the first output port set is connected with corresponding ports of the second input port set, and KA1, KA2, KA3 and KA4 are respectively connected with the circuit shown in FIG. 4 or the circuit shown in FIG. 5.
The control chip in the first control module reads level signals of the KA1, KA2, KA3 and KA4 pins between the time of electrifying and the time of sending a relay control command, if a certain bit is read to be 0, the position is connected with a relay, and if the position is read to be 1, the position is not connected with the relay. The 4 bits can be judged to be 2 to the power of 4 in total, and 16 different cases are total. Finally, according to a predefined mapping rule, which second type control module is received is judged so as to select a corresponding control logic and instruction.
Optionally, the second type of control module planning can be defined as such.
The second category of control modules can be classified roughly according to the number of relays: no-load product, single-load product, double-load product, three-load product and four-load product.
For a second type of control module for unloaded products (typically used in a demonstration prototype with no actual electrical load), the identified KA1-KA4 (hereinafter referred to as load code) is 1111. (1 kind)
For a second type of control module for a single load product, the identified load code may be 0111, 1011, 1101, 1110. (4 kinds)
For the second type of control module for dual-load products, the identified load codes may be 0011, 1001, 1100, 0110, 0101, 1010. (6 kinds).
For the second type of control module for the three-load product, the identified load codes can be 0001, 1000, 0100 and 0010. (4 kinds)
For a second type of control module for a four-load product, the identified load code is 0000. (1 kind)
And selecting a unique load code for each type of second control module according to other functional configurations, such as the following table:
Figure RE-GDA0002280610760000131
thereby meeting the market demands of diversification of middle-end machine type configuration and multiple styles and models.
And then writing an automatic identification program in a chip of the first control module when 1 kind of first control module is required to correspond to a plurality of kinds of second control modules.
For example, any one of the first control modules is required to be compatible with 4 kinds of second control modules, i.e., B8 (double load medium distribution), B9 (double load high distribution), B13 (triple load high distribution) and B14 (triple load secondary top distribution) at the same time according to the product configuration. Then in the software program of the control chip of the first control module:
when the power is powered on for the first time (or each time), the I/O port is used for reading the level of the load end to obtain the load code.
If the load code is 0110, then the module is considered to be the B8 module, and the control logic and instructions applicable to B8 are adopted;
if the load code is 1001, the load code is considered as a B9 module, and control logic and instructions applicable to B9 are adopted;
if the load code is 0100, the load code is considered as a B13 module, and control logic and instructions applicable to B13 are adopted;
if the load code is 0010, the load code is considered as a B14 module, and control logic and instructions applicable to B14 are adopted;
and if the identification is carried out, selecting the control logic and the instruction which are applicable to the second control module.
If the load code does not conform to any of the above, any instruction about the second control module may not be output, and a corresponding prompt (e.g., a buzzer, an indicator light, a fault code, etc.) may be output.
Further, FIG. 6 is a flow chart illustrating a control method according to an exemplary embodiment of the present invention. As shown in fig. 6, the present invention further provides a control method, which is applied to the control method provided in any of the above embodiments, and specifically includes:
and 101, powering on the first control module.
Step 102, the first control module reads a first level from an output port for connecting an external load in the second output port set.
Step 103, the first control module reads a second level from an output port not used for connecting the external load in the second output port set.
And step 104, the first control module generates a level sequence according to the acquired level.
And 105, the first control module determines the type of the second control module according to the level sequence and a preset module type mapping rule.
And 106, sending a control instruction to the second control module by the first control module.
On the basis of the embodiment shown in fig. 6, fig. 7 is a flow chart illustrating a control method according to another exemplary embodiment of the present invention. As shown in fig. 7, the present invention further provides a control method, which is applied to the control method provided in any of the above embodiments, and specifically includes:
step 201, the first control module is powered on.
In step 202, the first control module reads a first level from an output port of the second set of output ports for connecting to an external load.
In step 203, the first control module reads a second level from an output port of the second set of output ports that is not used for connecting an external load.
And step 204, the first control module generates a level sequence according to the acquired level.
And step 205, the first control module generates a load code according to the level sequence.
And step 206, the first control module determines the type of the second control module according to the load code and the preset module type mapping rule.
And step 207, the first control module determines a control logic program to be executed according to the type of the second control module and a preset program type mapping rule.
And step 208, the first control module sends a control instruction to the second control module.
Fig. 8 is a schematic diagram illustrating an electronic device structure according to an exemplary embodiment of the present invention. As shown in fig. 8, the electronic device 300 provided in this embodiment includes: any of the embodiments above provides a control system, and the control system comprises: a first control module 301 and a second control module 302 connected to the first control module 301.
Wherein the first control module 301 passes through the standardized port CAAnd C in the second control module 302BAnd performing connection, wherein the connection can be bidirectional connection or unidirectional connection. In addition, a control chip 3012 is further disposed in the first control module 301, where the control chip 3012 is configured to read a second output port for connecting an external load from a second set of output ports of the second control module 302And reading a second level from an output port which is not used for connecting an external load in the second output port set to generate a level sequence, determining the type of a second control module according to the level sequence and a preset module type mapping rule, and selecting a corresponding control logic program to realize control.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A control system, comprising: the device comprises a first control module and a second control module connected with the first control module;
a second output port set is arranged in the second control module;
the first control module is connected with corresponding input ports in a second input port set of the second control module through all or part of output ports in a first output port set, all or part of output ports in the second output port set are connected with input ends of a relay driving circuit, the output end of the relay driving circuit is used for being connected with a relay coil, and one end of a contact side of the relay is used for being connected with an external load;
before the second control module receives the control instruction sent by the first control module, the first control module reads a first level from an output port used for connecting an external load in the second output port set, and reads a second level from an output port not used for connecting the external load in the second output port set, so as to generate a level sequence;
and the first control module determines the type of the second control module according to the level sequence and a preset module type mapping rule.
2. The control system of claim 1, wherein the relay drive circuit comprises a pull-down resistor and a drive transistor, the drive transistor being an NPN transistor;
each output port in the second output port set, which is used for being connected with the relay drive circuit, is connected with the base electrode of the driving triode, the emitting electrode of the driving triode is grounded, and the collecting electrode of the driving triode is connected with a driving power supply;
the first end of the pull-down resistor is connected to the base electrode of the driving triode or connected to the corresponding output port in the first output port set, and the second end of the pull-down resistor is grounded.
3. The control system of claim 2, wherein each output port of the second set of output ports not connected to the relay driver circuit is connected to a first terminal of a pull-up resistor, a second terminal of the pull-up resistor being connected to the drive power supply; or
An output port which is not used for being connected with the second control module in the first output port set is connected with a first end of a pull-up resistor, and a second end of the pull-up resistor is connected with the driving power supply;
and the ratio of the resistance value of the pull-up resistor to the resistance value of the pull-down resistor is greater than a preset ratio.
4. The control system of claim 1, wherein the relay drive circuit includes a pull-up resistor and a drive transistor, the drive transistor being a PNP transistor;
each output port in the second output port set, which is used for being connected with the relay drive circuit, is connected with the base electrode of the driving triode, the emitting electrode of the driving triode is grounded, and the collecting electrode of the driving triode is connected with a driving power supply;
the first end of the pull-up resistor is connected to the base electrode of the driving triode or connected to the corresponding output port in the first output port set, and the second end of the pull-up resistor is connected with the driving power supply.
5. The control system of claim 4, wherein each output port of the second set of output ports not connected to the relay driver circuit is connected to a first terminal of a pull-down resistor, a second terminal of the pull-down resistor being connected to ground; or
An output port which is not used for being connected with the second control module in the first output port set is connected with a first end of a pull-down resistor, and a second end of the pull-down resistor is connected with the driving power supply;
and the ratio of the resistance value of the pull-down resistor to the resistance value of the pull-up resistor is greater than a preset ratio.
6. The control system according to any one of claims 1 to 5, wherein a control chip is arranged in the first control module;
a first output port set is arranged in the first control module, and a second input port set is arranged in the second control module;
and the output port which needs to output the control instruction in the first output port set is connected with the control chip through a protection current-limiting resistor.
7. The control system according to claim 6, wherein the first control module is configured to generate a load code according to the level sequence, so as to determine the type of the second control module according to the load code and a preset module type mapping rule;
a plurality of sets of control logic programs are arranged in the first control module;
the first control module is used for determining a control logic program to be executed according to the type of the second control module and a preset program type mapping rule.
8. The control method is applied to a control system, wherein the control system comprises a first control module and a second control module connected with the first control module; the first control module is connected with corresponding input ports in a second input port set of the second control module through all or part of output ports in a first output port set; all or part of the output ports in the second output port set are connected with the input end of a relay driving circuit, the output end of the relay driving circuit is used for being connected with a relay coil, and one end of the relay on the contact side is used for being connected with an external load; the method comprises the following steps:
before a control instruction sent by the first control module to the second control module, the first control module reads a first level from an output port used for connecting an external load in a second output port set, and reads a second level from an output port not used for connecting the external load in the second output port set, and the second control module is provided with the second output port set;
the first control module generates a level sequence according to the acquired level;
and the first control module determines the type of the second control module according to the level sequence and a preset module type mapping rule.
9. An electronic device, characterized in that it comprises a control system according to any one of claims 1-7.
CN201910649653.5A 2019-07-18 2019-07-18 Control system, control method and electronic device Active CN110618625B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910649653.5A CN110618625B (en) 2019-07-18 2019-07-18 Control system, control method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910649653.5A CN110618625B (en) 2019-07-18 2019-07-18 Control system, control method and electronic device

Publications (2)

Publication Number Publication Date
CN110618625A CN110618625A (en) 2019-12-27
CN110618625B true CN110618625B (en) 2021-12-07

Family

ID=68921456

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910649653.5A Active CN110618625B (en) 2019-07-18 2019-07-18 Control system, control method and electronic device

Country Status (1)

Country Link
CN (1) CN110618625B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080063309A (en) * 2005-09-15 2008-07-03 오픈픽 인크. Device control system, method, and apparatus
CN203014439U (en) * 2012-12-21 2013-06-19 联芯科技有限公司 Automatic identification apparatus of charger
CN107179698A (en) * 2017-05-25 2017-09-19 青岛海信日立空调系统有限公司 The inter-linked controlling method and device of a kind of home appliance
CN107357543A (en) * 2017-07-05 2017-11-17 青岛海信智能商用系统股份有限公司 A kind of electronic equipment and its control method of compatible polytype display module
CN107884012A (en) * 2017-11-15 2018-04-06 深圳市融川成医网络技术有限公司 Self-identifying Self Matching senses detection device
CN108183050A (en) * 2018-02-27 2018-06-19 厦门芯阳科技股份有限公司 A kind of high security switch control relay drive circuit
CN108415865A (en) * 2018-02-02 2018-08-17 广东欧珀移动通信有限公司 Interface circuit and electronic device
CN108614188A (en) * 2018-04-25 2018-10-02 广州供电局有限公司 Voltage dip kind identification method and device
CN208027116U (en) * 2017-12-05 2018-10-30 田角峰 Suitable for the controller of multiple types of tools and the electric tool system of a variety of applications of adaptation

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20080063309A (en) * 2005-09-15 2008-07-03 오픈픽 인크. Device control system, method, and apparatus
CN203014439U (en) * 2012-12-21 2013-06-19 联芯科技有限公司 Automatic identification apparatus of charger
CN107179698A (en) * 2017-05-25 2017-09-19 青岛海信日立空调系统有限公司 The inter-linked controlling method and device of a kind of home appliance
CN107357543A (en) * 2017-07-05 2017-11-17 青岛海信智能商用系统股份有限公司 A kind of electronic equipment and its control method of compatible polytype display module
CN107884012A (en) * 2017-11-15 2018-04-06 深圳市融川成医网络技术有限公司 Self-identifying Self Matching senses detection device
CN208027116U (en) * 2017-12-05 2018-10-30 田角峰 Suitable for the controller of multiple types of tools and the electric tool system of a variety of applications of adaptation
CN108415865A (en) * 2018-02-02 2018-08-17 广东欧珀移动通信有限公司 Interface circuit and electronic device
CN108183050A (en) * 2018-02-27 2018-06-19 厦门芯阳科技股份有限公司 A kind of high security switch control relay drive circuit
CN108614188A (en) * 2018-04-25 2018-10-02 广州供电局有限公司 Voltage dip kind identification method and device

Also Published As

Publication number Publication date
CN110618625A (en) 2019-12-27

Similar Documents

Publication Publication Date Title
CN103063234B (en) Electric transducer and automatically select the method for interface modes of this electric transducer
US11162700B2 (en) Method and apparatus for identifying air-conditioning circuit, and air conditioner
US6181189B1 (en) Interface circuit switching between a source-input mode and a sink-input mode
CN110618625B (en) Control system, control method and electronic device
US9680449B2 (en) Encoder input device
US11221605B2 (en) Intelligent fan control system with interface compatibility
CN111758078A (en) Configuration method and device for I/O modules connected to a field bus controller
KR19980079408A (en) Control board
CN111929562A (en) Chip test system, test method, test response method of chip and chip
CN215581226U (en) Exchanger capable of customizing protocol line sequence
CN100407511C (en) Method for preventing veneer misplug and its realizing apparatus
CN103676818A (en) A relay for automatically selecting a monitoring range
CN110632866A (en) Control system, control method and electronic device
CN113836076B (en) Exchanger capable of self-defining protocol line sequence
CN112947215A (en) Data acquisition feedback system
CN108933062B (en) Relay setting system and intelligent relay
US20050207356A1 (en) Stand-alone device for determining communication parameters and channel configuration of an asynchronous serial channel using a user determined methodology
CN214895731U (en) Detection device
CN111832324A (en) Online automatic bar code scanning method and system for SMT production line
CN212381109U (en) Parameter switching circuit of frequency converter input port wiring mode
CN108733587A (en) Sub- equipment localization method and system
CN116340233A (en) Working state configuration circuit and control method thereof
CN220342328U (en) Delay power supply device for equipment power-on
CN220543091U (en) Analog interface connection confirming circuit and brushless motor driving control system
CN216719059U (en) Reset control circuit and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant