CN113377057A - Control device - Google Patents

Control device Download PDF

Info

Publication number
CN113377057A
CN113377057A CN202110763971.1A CN202110763971A CN113377057A CN 113377057 A CN113377057 A CN 113377057A CN 202110763971 A CN202110763971 A CN 202110763971A CN 113377057 A CN113377057 A CN 113377057A
Authority
CN
China
Prior art keywords
module
execution device
program file
program
control device
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.)
Pending
Application number
CN202110763971.1A
Other languages
Chinese (zh)
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.)
Henan Muyuan Intelligent Technology Co Ltd
Original Assignee
Henan Muyuan Intelligent Technology 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 Henan Muyuan Intelligent Technology Co Ltd filed Critical Henan Muyuan Intelligent Technology Co Ltd
Priority to CN202110763971.1A priority Critical patent/CN113377057A/en
Publication of CN113377057A publication Critical patent/CN113377057A/en
Pending legal-status Critical Current

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/24Pc safety
    • G05B2219/24215Scada supervisory control and data acquisition

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a control device.A first interface module is connected with a microcontroller module, the first interface module is connected with an execution device through the first interface module, the microcontroller module is used for operating an operating system and running a program for realizing control of the execution device based on the operating system, and the program is divided into at least two module programs for respectively realizing different functions. The program for controlling the execution device in the control device is divided into a plurality of module programs, when the control device is applied to the execution device for executing different works, one or more module programs can be rewritten or modified aiming at the execution device, and the whole control program does not need to be rewritten from the beginning, so that compared with the prior art, the control device can accelerate the research and development speed, and is convenient for later maintenance and quick catcher of new people.

Description

Control device
Technical Field
The invention relates to the technical field of control systems, in particular to a control device.
Background
In the current animal husbandry field, intellectualization is becoming a development trend. Various machines are needed to perform corresponding work on the culture production site, such as cleaning manure under the plate, cleaning on the plate, inspecting the ground, driving cultured animals and the like.
In the prior art, a method for designing a control program by adopting a machine structure is adopted to obtain a machine for executing corresponding work, but the following defects exist: (1) a machine control program needs to be written from the beginning, and is long in period and low in efficiency. (2) The machine is of various types, and the workload and the cost are high during research, development and optimization. (3) The person taking the different machines and getting them familiar with the program code takes a lot of time.
Disclosure of Invention
The invention aims to provide a control device which can be applied to machines for executing various kinds of work, can accelerate research and development speed and is convenient for later maintenance and quick operation of new people.
In order to achieve the purpose, the invention provides the following technical scheme:
a control device comprises a microcontroller module and a first interface module, wherein the first interface module is connected with the microcontroller module and used for being connected with an execution device, the microcontroller module is used for operating an operating system and realizing control based on the operation of the operating system, and a program of the execution device is divided into at least two module programs which respectively realize different functions.
Preferably, the microcontroller module comprises a file transfer module for downloading and storing a program file from a network to be executed by the microcontroller module.
Preferably, the file transfer module is specifically configured to:
storing the program file into a second storage area when the program file is received;
if the program file is successfully verified, controlling to rerun the program corresponding to the program file;
and checking whether the second storage area has the upgrading program file, if so, copying the program file of the second storage area to the first storage area and erasing the second storage area.
Preferably, the verifying the program file includes verifying whether the program file is complete according to a check code recorded in a first preset address in the program file, or verifying whether the program file is correct according to a type of a second preset address in the program file.
Preferably, the file transfer module is further specifically configured to: and if the second storage area does not have the upgraded program file, controlling to operate the program file of the first storage area or controlling to operate the original program file.
Preferably, the microcontroller module is further configured to send a request for querying the type of the execution device to the execution device, and confirm the type of the execution device when receiving a response sent by the execution device.
Preferably, the microcontroller module is further specifically configured to: sending a request indicating that the execution device is of a first type to the execution device, confirming that the execution device is of the first type if a response sent by the execution device is received, and sending a request indicating that the execution device is of a second type to the execution device if the response of the execution device is not received.
Preferably, the microcontroller module further includes a communication module, configured to read parameter data of the execution device and issue a command to the execution device.
Preferably, the microcontroller module further includes a boot loading module, which is used for determining a source of the program run by the microcontroller module.
Preferably, the controller further comprises a second interface module, wherein the second interface module is connected with the microcontroller module and is used for connecting a network to realize communication between the controller and the network.
According to the technical scheme, the control device provided by the invention comprises a microcontroller module and a first interface module, wherein the first interface module is connected with the microcontroller module and is connected with an execution device through the first interface module, the microcontroller module is used for operating an operating system and running a program for controlling the execution device based on the operating system, and the program is divided into at least two module programs for respectively realizing different functions. The program for controlling the execution device in the control device is divided into a plurality of module programs, when the control device is applied to the execution device for executing different works, one or more module programs can be rewritten or modified aiming at the execution device, and the whole control program does not need to be rewritten from the beginning, so that compared with the prior art, the development speed can be accelerated, the later maintenance is convenient, and a new person can take the lead quickly.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a control device according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a control device according to another embodiment of the present invention;
FIG. 3 is a flowchart of a method for controlling a device to update a file according to an embodiment of the present invention;
FIG. 4 is a flowchart of a method for controlling a device to identify an executing device according to an embodiment of the present invention;
FIG. 5 is a diagram of a main control board of a control device according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a control device according to an embodiment of the invention.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. 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.
Referring to fig. 1, fig. 1 is a schematic diagram of a control device provided in this embodiment, as shown in the figure, the control device includes a microcontroller module 100 and a first interface module 101, the first interface module 101 is connected to the microcontroller module 100 and is used for connecting to an execution device 102, the microcontroller module 100 is used for running an operating system and running a program for controlling the execution device 102 based on the operating system, and the program is divided into at least two module programs for respectively implementing different functions.
The execution apparatus 102 is connected through the first interface module 101. The microcontroller module 100 runs an operating system and runs a program for implementing the control execution device 102, so that the control execution device 102 is controlled to execute corresponding work, and a machine for implementing corresponding service functions is obtained.
The program for controlling the execution device in the control device of the embodiment is divided into a plurality of module programs, when the control device is applied to the execution device for executing different works, one or more module programs can be rewritten or modified according to the requirements of the execution device, and the whole control program does not need to be rewritten from the beginning, so that compared with the method for designing a control program by using a machine with one structure in the prior art, the method can accelerate the research and development speed, is convenient for later maintenance and is convenient for a new person to take over quickly.
The program that runs in the microcontroller module 100 and implements the control of the execution device 102 is divided into at least two module programs that implement different functions, and the at least two module programs implement the control of the execution device 102.
Referring to fig. 2, fig. 2 is a schematic diagram of a control device according to another embodiment, in which the microcontroller module 100 includes a file transmission module 103 for downloading and storing a program file from a network so that the program file can be executed by the microcontroller module 100. Therefore, the control device can realize automatic downloading and installation operation of the program files.
Further preferably, the control device of the present embodiment can also implement automatic upgrade of the program. Specifically, the file transmission device 103 is specifically configured to execute the following processes, please refer to fig. 3, where fig. 3 is a flowchart of a method for updating a file by the control device of this embodiment, and includes the following steps:
s200: and storing the program file into a second storage area when the program file is received. When receiving the program file downloaded from the network, the file transfer apparatus 103 stores the program file in the second storage area.
S201: and checking the program file, if the checking is successful, entering the step S203, and if the checking is failed, entering the step S202.
Optionally, verifying the program file may include verifying whether the program file is complete or whether the program file type is correct. Specifically, a check code may be recorded at a fixed address in the program file, and correspondingly, whether the program file is complete or not may be checked according to the check code recorded at the first preset address in the program file.
The type of the program file can be recorded in another fixed address in the program file, and whether the type of the program file is correct or not is verified according to the type of the second preset address record in the program file. Specifically, whether the type of the program file is matched with the control device or not is checked, and whether the program file is the program file of the control device or not is checked. According to the method, the received program file is verified, so that the accuracy of the obtained program file is ensured, and the program is prevented from being upgraded into programs of other machines.
S202: and erasing the program file stored in the second storage area.
S203: and controlling to rerun the program corresponding to the program file. Then, the process proceeds to step S204.
S204: and checking whether the second storage area has the upgrading program file, if so, entering the step S205, and if not, entering the step S206.
S205: and copying the program file of the second storage area to the first storage area and erasing the second storage area. Then, the process proceeds to step S203.
S206: checking whether the first storage area has a program file, if so, going to step S207, and if not, going to step S208.
S207: and controlling the program file of the first storage area to run.
S208: and controlling to run the original program file. The original program file is an original program file for the control device to leave the factory.
In this embodiment, the program file may be a bin file.
Preferably, as shown in fig. 2, the control device of this embodiment further includes a second interface module 104, where the second interface module 104 is connected to the microcontroller module 100 and is used for connecting to a network to implement communication between the control device and the network. The second interface module 104 may be, but is not limited to, an interface module for connecting an ethernet network.
Preferably, the microcontroller module 100 further includes a boot loading module, where the boot loading module is configured to determine a source of an operating program of the microcontroller module 100, and is capable of checking and determining whether a currently operating program of the microcontroller module 100 is an original factory program or an upgraded program. Preferably, the program for realizing the function of the boot loading module is a part of the program run by the microcontroller module, and can be burned together without being burned separately.
Further preferably, the microcontroller module 100 is further configured to send a request to the execution device 102 to inquire about the type of the execution device 102, and to confirm the type of the execution device when receiving a response sent by the execution device 102. The control device of the present embodiment is able to automatically recognize and adapt the execution device 102.
In particular, the microcontroller module 100 may be specifically configured to: sending a request indicating that the execution device is of a first type to the execution device, confirming that the execution device is of the first type if a response sent by the execution device is received, and sending a request indicating that the execution device is of a second type to the execution device if the response of the execution device is not received. Referring to fig. 4, fig. 4 is a flowchart illustrating a method for identifying an execution device by a control device according to the present embodiment, which includes the following steps:
s300: a request is sent to the execution device 102 indicating that the execution device 102 is of the first type and the count is incremented by 1. Alternatively, the transmitted request indicating that the performing device 102 is of the first type may be a protocol frame corresponding to the first type.
S301: and judging whether the response of the execution device 102 is received, if so, entering step S302, and if not, entering step S303.
S302: the execution device 102 is confirmed to be of the first type and the count is cleared. If an acknowledgement is received from the execution device 102 indicating that the execution device 102 is of the first type, the microcontroller module 100 may store the type data of the execution device 102.
S303: and judging whether the counting number is greater than a threshold value, if not, entering the step S300, and if so, entering the step S304.
S304: and clearing the count, and entering a process of sending a request indicating that the execution device is of a second type to the execution device. The microcontroller module 100 identifies to the execution device 102 whether it is of the second type in the same way as described above, and confirms by continuously switching the types so as to finally identify the execution device 102.
Further, referring to fig. 2, the microcontroller module 100 may include a communication module 105 for reading parameter data of the execution device 102 and issuing commands to the execution device 102. The parameter data of the execution device 102 is read through the communication module 105, and then the data is transmitted to the microcontroller module 100, and the instruction issued by the microcontroller module 100 for the execution device 102 is sent to the execution device 102 through the communication module 105.
Alternatively, the microcontroller module 100 may send a request for querying the type of the execution device to the execution device 102 via the communication module 105. The communication module 105 may be a Modbus communication module.
Alternatively, the executing device 102 may be a power supply device for supplying power to the control device, or the executing device 102 may be a motor device, or the executing device 102 may be a sensor or a voice player. The current power amount or type of the power supply device can be read through the communication module 105. The type or operating state of the motor device may be read by the communication module 105.
The first interface module 101 may be a CAN bus interface or an RS485 interface. The CAN bus interface CAN be connected with an executing device such as a motor device, and the RS485 interface CAN be connected with a power supply device.
Alternatively, the microcontroller module 100 may employ a microcontroller. The microcontroller module 100 may further include an IO input pin through which a switching signal may be detected and an IO output pin through which a switching signal may be set.
The control device of the embodiment divides the program for realizing the control execution device into a plurality of module programs, and one or a plurality of module programs can be rewritten or modified according to requirements aiming at machines for realizing different business functions, so that the control device has universality, and the whole control program does not need to be rewritten from the beginning. Can accelerate research and development speed and facilitate later maintenance and rapid reception of new people.
The control device of the embodiment can automatically identify and adapt to the execution device, and can automatically download the program file and upgrade the program file.
In a specific example, referring to fig. 5, fig. 5 is a schematic diagram of a main control board of a control device of this specific example, the control device adopts a microcontroller, and further includes a CAN interface 1, a CAN interface 2, an RS485 interface 1, an RS485 interface 2, an ethernet interface, an IO input pin, an IO output pin, and a power supply device interface, and these devices are integrated on the main control board. Referring to fig. 6, the control device further includes a motor driving device, a motor device 1, a motor device 2, and a power supply device, which are disposed below the interlayer of the control device, and the main control board is disposed above the interlayer.
The above description describes a control device provided by the present invention in detail. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (10)

1. A control device is characterized by comprising a microcontroller module and a first interface module, wherein the first interface module is connected with the microcontroller module and used for being connected with an execution device, the microcontroller module is used for operating an operating system and realizing control of a program of the execution device based on the operation of the operating system, and the program is divided into at least two module programs which respectively realize different functions.
2. The control device of claim 1, wherein the microcontroller module comprises a file transfer module for downloading and storing a program file from a network for execution by the microcontroller module.
3. The control device according to claim 2, wherein the file transfer module is specifically configured to:
storing the program file into a second storage area when the program file is received;
if the program file is successfully verified, controlling to rerun the program corresponding to the program file;
and checking whether the second storage area has the upgrading program file, if so, copying the program file of the second storage area to the first storage area and erasing the second storage area.
4. The control device of claim 3, wherein verifying the program file comprises verifying whether the program file is complete according to a check code recorded at a first predetermined address in the program file, or verifying whether the program file is correct according to a type of a second predetermined address in the program file.
5. The control device according to claim 3, wherein the file transfer module is further specifically configured to: and if the second storage area does not have the upgraded program file, controlling to operate the program file of the first storage area or controlling to operate the original program file.
6. The control device of claim 1, wherein the microcontroller module is further configured to send a request to the execution device to query the type of execution device, and to confirm the type of execution device upon receiving a response from the execution device.
7. The control device of claim 1, wherein the microcontroller module is further configured to: sending a request indicating that the execution device is of a first type to the execution device, confirming that the execution device is of the first type if a response sent by the execution device is received, and sending a request indicating that the execution device is of a second type to the execution device if the response of the execution device is not received.
8. The control device of claim 1, wherein the microcontroller module further comprises a communication module for reading parameter data of the execution device and issuing commands to the execution device.
9. The control device of any one of claims 1-8, wherein the microcontroller module further comprises a boot load module for determining a source of the program run by the microcontroller module.
10. The control device according to any one of claims 1 to 8, further comprising a second interface module, wherein the second interface module is connected to the microcontroller module and is configured to connect to a network to enable the control device to communicate with the network.
CN202110763971.1A 2021-07-06 2021-07-06 Control device Pending CN113377057A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110763971.1A CN113377057A (en) 2021-07-06 2021-07-06 Control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110763971.1A CN113377057A (en) 2021-07-06 2021-07-06 Control device

Publications (1)

Publication Number Publication Date
CN113377057A true CN113377057A (en) 2021-09-10

Family

ID=77581213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110763971.1A Pending CN113377057A (en) 2021-07-06 2021-07-06 Control device

Country Status (1)

Country Link
CN (1) CN113377057A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008242755A (en) * 2007-03-27 2008-10-09 Brother Ind Ltd Operation system for numerical control device, operation control program for numerical control device, and operation recording medium for numerical control device
CN102411353A (en) * 2011-11-03 2012-04-11 固高科技(深圳)有限公司 Driving and control integrated controller and control system
CN103792858A (en) * 2012-10-26 2014-05-14 洛克威尔自动控制技术股份有限公司 Agile control model system and method
CN205563123U (en) * 2016-03-18 2016-09-07 意诺科技有限公司 Control panel and control system
CN105930193A (en) * 2016-05-05 2016-09-07 国网重庆市电力公司电力科学研究院 Operating system based energy meter software online upgrade method and system
CN109101261A (en) * 2018-08-06 2018-12-28 沈阳维尔环保工程有限公司 A kind of the remote online upgrade method and system of data acquisition transmission instrument terminal

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008242755A (en) * 2007-03-27 2008-10-09 Brother Ind Ltd Operation system for numerical control device, operation control program for numerical control device, and operation recording medium for numerical control device
CN102411353A (en) * 2011-11-03 2012-04-11 固高科技(深圳)有限公司 Driving and control integrated controller and control system
CN103792858A (en) * 2012-10-26 2014-05-14 洛克威尔自动控制技术股份有限公司 Agile control model system and method
CN205563123U (en) * 2016-03-18 2016-09-07 意诺科技有限公司 Control panel and control system
CN105930193A (en) * 2016-05-05 2016-09-07 国网重庆市电力公司电力科学研究院 Operating system based energy meter software online upgrade method and system
CN109101261A (en) * 2018-08-06 2018-12-28 沈阳维尔环保工程有限公司 A kind of the remote online upgrade method and system of data acquisition transmission instrument terminal

Similar Documents

Publication Publication Date Title
CN104579719B (en) A kind of upgrade method and system, host computer and optical module of firmware
CN110347412B (en) Electronic control unit firmware upgrade management method, device, equipment and storage medium
CN105183515B (en) The method and device of holder firmware upgrade
CN103995712B (en) A kind of bootloader devices automatically updated and update method
CN105373407A (en) DSP and FPGA online upgrading method for embedded system
CN110633091A (en) Electronic module and software wireless upgrading method thereof
CN101295255B (en) Firmware updating system and method
CN113094072A (en) Vehicle upgrading method and device, electronic device and storage medium
EP3249531B1 (en) Control means, in-vehicle program rewriting device equipped with same, and in-vehicle program rewriting method
CN110990044A (en) Application programming method and computer readable storage medium
CN112698857A (en) Data flashing method and device
CN116382746A (en) Firmware upgrading method, device, equipment and medium
CN113325810A (en) Automatic data interaction method
CN109582341A (en) A kind of host system and its programing change method of On-board System of Cab Signal equipment
CN104538058A (en) Semi-automatic burning device and method
CN101667133B (en) Method for updating firmware and chip updating firmware by using same
CN113377057A (en) Control device
CN110855501B (en) Batch publishing system, method and storage medium for creating middleware
CN104469278A (en) Method and device for upgrading monitoring system
CN110609691A (en) Method for remotely updating DSP program
CN102169439A (en) Data transmission system
CN111190615A (en) Method for remotely modifying equipment parameters and upgrading equipment parameters
CN115934139B (en) FPGA online upgrading method and system
KR20080042502A (en) Electronic control unit for vehicle and method of control program setup thereof
CN112631252B (en) Updating method of production line equipment central control system, external updating module and storage medium

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210910