CN110347430A - A kind of parameter of electric machine read method, apparatus and system - Google Patents

A kind of parameter of electric machine read method, apparatus and system Download PDF

Info

Publication number
CN110347430A
CN110347430A CN201910629459.0A CN201910629459A CN110347430A CN 110347430 A CN110347430 A CN 110347430A CN 201910629459 A CN201910629459 A CN 201910629459A CN 110347430 A CN110347430 A CN 110347430A
Authority
CN
China
Prior art keywords
parameter
electric machine
electric
mcu
read operation
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
CN201910629459.0A
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.)
Sichuan Hongmei Intelligent Technology Co Ltd
Original Assignee
Sichuan Hongmei 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 Sichuan Hongmei Intelligent Technology Co Ltd filed Critical Sichuan Hongmei Intelligent Technology Co Ltd
Priority to CN201910629459.0A priority Critical patent/CN110347430A/en
Publication of CN110347430A publication Critical patent/CN110347430A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/22Microcontrol or microprogram arrangements

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Control Of Electric Motors In General (AREA)

Abstract

The present invention provides a kind of parameter of electric machine read methods, apparatus and system, this method comprises: executing the first data read operation for reading the parameter of electric machine from the external EEPROM being connected with electric-controlled plate when the MCU on electric-controlled plate is powered on;If the first data read operation runs succeeded, the parameter of electric machine read is stored in internal dataflash, and terminate current process;If the first data read operation executes failure, the second data read operation that the parameter of electric machine is read from internal dataflash is executed;If the second data read operation runs succeeded, terminate current process;If the second data read operation executes failure, the parameter of electric machine pre-configured in internal header file is read.As it can be seen that may be read into the parameter of electric machine without external memory, to guarantee the normal work of electric-controlled plate, and then product cost is reduced.

Description

A kind of parameter of electric machine read method, apparatus and system
Technical field
The present invention relates to electronic technology field, in particular to a kind of parameter of electric machine read method, apparatus and system.
Background technique
Electric appliance electric-controlled plate after the power-up, can read the parameter of electric machine, and control motor based on the parameter of electric machine.
Currently, being plugged with external memory on electric-controlled plate, the parameter of electric machine is carried in memory.Electric-controlled plate can be from after powering on The parameter of electric machine is read in memory.
As it can be seen that being necessarily dependent upon external memory, electric-controlled plate can just be worked normally.Due to being both needed to grafting on each electric-controlled plate There is memory, therefore will increase product cost.
Summary of the invention
It is readable without external memory the present invention provides a kind of parameter of electric machine read method, apparatus and system The parameter of electric machine is got, to guarantee the normal work of electric-controlled plate, and then product cost reduces.
In order to achieve the above object, the present invention is achieved through the following technical solutions:
In a first aspect, the present invention provides a kind of parameter of electric machine read methods, applied to the MCU on electric-controlled plate (Microcontroller Unit, micro-control unit), comprising:
When powering on, execute from external EEPROM (the Electrically Erasable being connected with the electric-controlled plate Programmable read only memory, with Electrically Erasable Programmable Read-Only Memory) in read the parameter of electric machine first number According to read operation;
If first data read operation runs succeeded, the parameter of electric machine read is stored in inside In dataflash (data flash memory), and terminate current process;
If first data read operation executes failure, executes and read the parameter of electric machine from internal dataflash Second data read operation;
If second data read operation runs succeeded, terminate current process;
If second data read operation executes failure, motor ginseng pre-configured in internal header file is read Number.
Further, this method further comprises: setting is used for the state variable in mark data source, the state variable The first variable, the second variable corresponding to dataflash, the third variable corresponding to header file including corresponding to EEPROM;
After first data read operation runs succeeded, further comprise: first variable is exported to outer The display in portion is to be shown;
After second data read operation runs succeeded, further comprise: second variable is exported to institute Display is stated to be shown;
In the header file inside the reading after the pre-configured parameter of electric machine, further comprise: by described Ternary is exported to the display to be shown.
Further, this method further comprises: after reading the parameter of electric machine each time, the motor that will be read The unique identification value of parameter is exported to external display to be shown.
Second aspect, the present invention provides the MCU on a kind of electric-controlled plate, comprising:
First reading unit, when for powering on, execution reads motor from the external EEPROM being connected with the electric-controlled plate First data read operation of parameter;If first data read operation runs succeeded, the parameter of electric machine read is saved In the dataflash inside MCU, and terminate;If first data read operation executes failure, triggering second is read single Member;
Second reading unit, for executing the second data for reading the parameter of electric machine from the dataflash inside MCU Read operation;If second data read operation runs succeeded, terminate;If second data read operation executes failure, Trigger third reading unit;
The third reading unit, for reading the parameter of electric machine pre-configured in the header file inside MCU.
Further, the MCU passes through in I2C (Inter-Integrated Circuit) bus, with the electric-controlled plate The external EEPROM of connection is communicated;
The memory space of dataflash inside the MCU is 4KB;
The header file for being provided with the parameter of electric machine in advance inside the MCU is user.h header file.
Further, the MCU further include: setting unit, it is described for the state variable for being used for mark data source to be arranged State variable includes the first variable corresponding to EEPROM, the second variable corresponding to dataflash, corresponding to the of header file Ternary;
First reading unit, for after first data read operation runs succeeded, described first to be become Amount output is to external display to be shown;
Second reading unit, for after second data read operation runs succeeded, described second to be become Amount output is to the display to be shown;
The third reading unit, after the parameter of electric machine pre-configured in the header file inside reading MCU, The third variable is exported to the display to be shown.
Further, each reading unit, is used to after reading the parameter of electric machine each time, the electricity that will be read The unique identification value of machine parameter is exported to external display to be shown.
The third aspect, the present invention provides a kind of parameters of electric machine to read system, comprising: display is automatically controlled at least one Plate;
Wherein, MCU as described above is installed on the electric-controlled plate;
The display, for the unique identification information in conjunction with each electric-controlled plate pre-set, to each institute It states the state variable that the MCU on electric-controlled plate is sent and carries out corresponding displaying.
Fourth aspect, the present invention also provides a kind of readable mediums, including execute instruction, when the processor of storage control When executing instruction described in execution, the storage control executes any of the above-described parameter of electric machine read method.
5th aspect, the present invention also provides a kind of storage controls, comprising: processor, memory and bus;
The memory is executed instruction for storing, and the processor is connect with the memory by the bus, when When the storage control is run, the processor executes the described of memory storage and executes instruction, so that the storage Controller executes any of the above-described parameter of electric machine read method.
The present invention provides a kind of parameter of electric machine read methods, apparatus and system, this method comprises: the MCU on electric-controlled plate When powering on, the first data read operation that the parameter of electric machine is read from the external EEPROM being connected with electric-controlled plate is executed;If first Data read operation runs succeeded, and the parameter of electric machine read is stored in internal dataflash, and terminates current stream Journey;If the first data read operation executes failure, the second data reading that the parameter of electric machine is read from internal dataflash is executed Extract operation;If the second data read operation runs succeeded, terminate current process;If the second data read operation executes failure, read Take the parameter of electric machine pre-configured in internal header file.As it can be seen that may be read into motor ginseng without external memory Number, to guarantee the normal work of electric-controlled plate, and then product cost reduces.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the present invention Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.
Fig. 1 is a kind of flow chart for parameter of electric machine read method that one embodiment of the invention provides;
Fig. 2 is the flow chart for another parameter of electric machine read method that one embodiment of the invention provides;
Fig. 3 is the schematic diagram of the MCU on a kind of electric-controlled plate that one embodiment of the invention provides;
Fig. 4 is the schematic diagram of the MCU on another electric-controlled plate that one embodiment of the invention provides;
Fig. 5 is the schematic diagram that a kind of parameter of electric machine that one embodiment of the invention provides reads system.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments, based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
As shown in Figure 1, the embodiment of the invention provides a kind of parameter of electric machine read method, applied to the MCU on electric-controlled plate, It may comprise steps of:
Step 101: when powering on, executing and read the first of the parameter of electric machine from the external EEPROM being connected with the electric-controlled plate Data read operation, and execute step 102 or step 103.
Step 102: if first data read operation runs succeeded, the parameter of electric machine read being stored in inside In dataflash, and terminate current process.
Step 103: if first data read operation executes failure, executing and read electricity from internal dataflash Second data read operation of machine parameter, and execute step 104 or step 105.
Step 104: if second data read operation runs succeeded, terminating current process.
Step 105: if second data read operation executes failure, reading pre-configured in internal header file The parameter of electric machine.
The embodiment of the invention provides a kind of parameter of electric machine read methods, this method comprises: the MCU on electric-controlled plate is powered on When, execute the first data read operation that the parameter of electric machine is read from the external EEPROM being connected with electric-controlled plate;If the first data Read operation runs succeeded, and the parameter of electric machine read is stored in internal dataflash, and terminate current process;If First data read operation executes failure, executes the second reading data behaviour that the parameter of electric machine is read from internal dataflash Make;If the second data read operation runs succeeded, terminate current process;If the second data read operation executes failure, in reading The pre-configured parameter of electric machine in the header file in portion.As it can be seen that may be read into the parameter of electric machine without external memory, with Guarantee the normal work of electric-controlled plate, and then product cost reduces.
In detail, header file is mainly used for saving as a kind of bearer documents stated comprising power function, data-interface The statement of program.Under normal conditions, after selecting compressor, that is, it can determine the parameter of electric machine of its default.In this way, the electricity in header file Machine parameter can be configured to the parameter of electric machine of default compressor when writing program.The parameter of electric machine in header file is not made usually Change.When needing replacing the parameter of electric machine, the EEPROM for being stored with new motor parameter can be usually plugged on electric-controlled plate, with New motor parameter can be therefrom read after powering on MCU and is stored into inside dataflash, can pull out EEPROM later.
Due to data can wherein will be just written after needing replacing the parameter of electric machine Shi Caihui grafting EEPROM, grafting EEPROM Dataflash, without replace the parameter of electric machine when will not grafting EEPROM, and then will not execute data write-in dataflash Operation, therefore priority ranking is EEPROM > dataflash > header file.
Based on above content it is found that MCU reads the parameter of electric machine after powering on every time from EEPROM first.In detail, MCU can To read the parameter of electric machine prestored in external EEPROM by I2C communication protocol.It is counted if electric-controlled plate is currently plugged with EEPROM It according to reading successfully, and is written in internal dataflash, so that after EEPROM is pulled out, MCU can be from after powering on next time The parameter of electric machine is read in dataflash, reading process terminates, so i.e. using the parameter of electric machine read to control motor fortune Row.
In detail, due to needing to occupy specific memory space, and stored data volume is usually little, therefore inside MCU The memory capacity of dataflash is usually little, for example can be 4KB, 5KB etc..In detail, MCU can call special library letter Number is to read and write dataflash.
Conversely, reading data fails if electric-controlled plate is not plugged with EEPROM currently, and then can be from internal dataflash Read the parameter of electric machine.If EEPROM is crossed in grafting to electric-controlled plate before this, motor ginseng has been written into internal dataflash Number, therefore reading data can succeed, reading process terminates, so i.e. using the parameter of electric machine read to control motor operation.
Conversely, if electric-controlled plate EEPROM is crossed in not yet grafting before this, be not yet written into electricity in internal dataflash Machine parameter, therefore reading data will fail.Since not yet EEPROM is crossed in grafting to electric-controlled plate before this, that is, indicate the parameter of electric machine not more It changes, keeps the default parameter of electric machine constant, and the parameter of electric machine of the as default compressor prestored in internal header file.
Based on this, after internal dataflash reading parameter of electric machine failure, and then motor can be read from internal header file Parameter.Certainly, this reading data can succeed, and reading process terminates, so i.e. using the parameter of electric machine read to control Motor operation.
In conclusion the reading of the parameter of electric machine can have 3 realization channels, 3 channels are used cooperatively, so that in any feelings Under condition, MCU can read required correct parameter from a certain channel, so that being no longer limited to can only be from external EEPROM It reads, it is seen then that the flexibility of reading data correspondinglys increase.Accordingly, electric-controlled plate operating condition is more flexible, using more convenient.
In detail, the electric appliance for including above-mentioned electric-controlled plate and motor to be controlled can be refrigerator, air-conditioning etc..Based on above-mentioned electricity The realization of machine parameter read method it is found that can only tie up when executing internal debugging before electric appliance dispatches from the factory, or in maintenance personal on demand It when repairing household electrical appliances, is possible to for EEPROM being plugged on electric-controlled plate, and can be pulled out after grafting, without being always maintained at grafting State, the realization of this technology can support electric-controlled plate to the normal control of motor, to guarantee that electric appliance runs well.Due to without always Grafting EEPROM, therefore EEPROM can be recycled for different electric-controlled plates, so that EEPROM demand number greatly reduces, electricity Device cost accordingly reduces.
In the production line, the usual substantial amounts of electric appliance that same batch generates, since the configuration of same batch electric appliance is identical, Therefore its parameter of electric machine reading source should be consistent, it is abnormal to illustrate that it exists for inconsistent a example if it exists, needs staff Manual inspection causes abnormal reason.In this way, can be shown to this reading data source, in order to abnormal examination.
Based on this, in an embodiment of the invention, this method be may further include: setting is used for mark data source State variable, the state variable include corresponding to EEPROM the first variable, corresponding to dataflash the second variable, Third variable corresponding to header file;
After first data read operation runs succeeded, further comprise: first variable is exported to outer The display in portion is to be shown;
After second data read operation runs succeeded, further comprise: second variable is exported to institute Display is stated to be shown;
In the header file inside the reading after the pre-configured parameter of electric machine, further comprise: by described Ternary is exported to the display to be shown.
In detail, this state variable can be called by Awatcher debugging tool, to show on computer monitor Come.
Preferably, these state variables can be simple number or letter.For example, the first variable is 1, the second variable is 2, third variable is 3.
In the present embodiment, the parameter of electric machine is read from where, corresponding state variable can be exported to display.In this way, Monitoring personnel can intuitively recognize whether the reading data source of each MCU of present lot is consistent.In this way, monitoring personnel It is recognized that the motor data for whether thering is MCU not read update as scheduled, i.e., whether leak grafting and cross EEPROM, or can be with The EEPROM for whether having leakage to pull out solved.
Certainly, in other embodiments of the present invention, while output to display, it also may be output to and connect with display Processor, whether the reading data source that processor can automatically analyze each MCU of present lot be consistent, and will analysis As a result it is pushed on display, to directly display analysis result to user.
It, in an alternative embodiment of the invention, can also be by light flash number come area based on similar realization principle Divide different data sources.For example, light flash number can be preset be, corresponding to 1 time of EEPROM, correspond to 2 times of dataflash, corresponding to 3 times of header file.In this way, MCU is after the first data read operation runs succeeded, controllably The period distances such as dedicated flashing lamp flashing certain time length is made, each period flashes 1 time, runs succeeded in the second data read operation Later, the period distances such as dedicated flashing lamp can control to flash certain time length, each period flashes 2 times, the head text inside reading In part after the pre-configured parameter of electric machine, the period distances such as dedicated flashing lamp can control to flash certain time length, each period Flashing 3 times.
In detail, grafting EEPROM this means that motor data on-demand update, the not motor data of homogeneous it is specific in It stores in more or less difference.Staff can not update or update at least once on demand.In this way, guaranteeing reading data Under the unanimous circumstances of source, whether identical the motor data that each MCU is read also further can be specifically verified.In this way, For the motor data of each version, its settable unique identification value, this unique identification value exists with motor data.
Therefore, it is based on above content, in an embodiment of the invention, this method may further include: each time After reading the parameter of electric machine, the unique identification value of the parameter of electric machine read is exported to external display to open up Show.In this way, primary dcreening operation first can be carried out for state variable, screening again is carried out in primary dcreening operation result, then for unique identification value.
As shown in Fig. 2, one embodiment of the invention provides another parameter of electric machine read method, it is applied on electric-controlled plate MCU, specifically includes the following steps:
Step 201: setting be used for mark data source state variable and light flash number: EEPROM be 1 and 1 time, Dataflash is 2 and 2 times, header file is 3 and 3 times.
Step 202: passing through I2C communication protocol after powering on, it is intended to read the parameter of electric machine from EEPROM, and execute step 203 or step 204.
Step 203: if reading from EEPROM successfully, calling special library function, the parameter of electric machine read is written In internal dataflash, by the output of state variable 1 to external display to be shown, external indicator light etc. is controlled Period distances flash 1min, and each period flashes 1 time, and executes step 207.
For example, can be using 3s as a cycle, every 3s flashes 1 time, amounts to flashing 1min.
Step 204: if reading failure from EEPROM, calling special library function, it is intended to from internal dataflash The parameter of electric machine is read, and executes step 205 or step 206.
Step 205: if reading from dataflash successfully, state variable 2 being exported into display the control to be shown The period distances such as indicator light processed flash 1min, and each period flashes 2 times, and executes step 207.
Step 206: if reading failure from dataflash, reading pre-configured in internal user.h header file The parameter of electric machine exports state variable 3 to display to be shown, and the period distances such as control instructions lamp flash 1min, each Period flashes 3 times.
Step 207: based on the parameter of electric machine read, controlling the operation of motor.
As shown in figure 3, one embodiment of the invention provides the MCU on a kind of electric-controlled plate, may include:
First reading unit 301 when for powering on, executing and reading electricity from the external EEPROM being connected with the electric-controlled plate First data read operation of machine parameter;If first data read operation runs succeeded, the parameter of electric machine read is protected There are in the dataflash inside MCU, and terminate;If first data read operation executes failure, triggering second is read single Member 302;
Second reading unit 302 reads the second of the parameter of electric machine for executing from the dataflash inside MCU Data read operation;If second data read operation runs succeeded, terminate;If second data read operation executes mistake It loses, triggers third reading unit 303;
The third reading unit 303, for reading the parameter of electric machine pre-configured in the header file inside MCU.
In an embodiment of the invention, the MCU passes through the outside connected in I2C bus, with the electric-controlled plate EEPROM is communicated;
The memory space of dataflash inside the MCU is 4KB;
The header file for being provided with the parameter of electric machine in advance inside the MCU is user.h header file.
In an embodiment of the invention, referring to FIG. 4, the MCU further include: setting unit 401, for being arranged for marking Know the state variable of data source, the state variable includes corresponding to the first variable of EEPROM, corresponding to dataflash's Second variable, the third variable corresponding to header file;
First reading unit 301, for after first data read operation runs succeeded, by described first Variable is exported to external display to be shown;
Second reading unit 302, for after second data read operation runs succeeded, by described second Variable is exported to the display to be shown;
The third reading unit 303, in reading the header file inside MCU the pre-configured parameter of electric machine it Afterwards, the third variable is exported to the display to be shown.
In an embodiment of the invention, each reading unit, is used to after reading the parameter of electric machine each time, will The unique identification value of the parameter of electric machine read is exported to external display to be shown.
The contents such as the information exchange between each unit, implementation procedure in above-mentioned apparatus, due to implementing with the method for the present invention Example is based on same design, and for details, please refer to the description in the embodiment of the method for the present invention, and details are not described herein again.
As shown in figure 5, the embodiment of the invention provides a kind of parameters of electric machine to read system, may include:
Display 501 and at least one electric-controlled plate 502;
Wherein, MCU5021 as claimed in claims 6 or 7 is installed on the electric-controlled plate 502;
The display 501, it is right for the unique identification information in conjunction with each electric-controlled plate 502 pre-set The state variable that MCU5021 on each electric-controlled plate 502 is sent carries out corresponding displaying.
In detail, referring to FIG. 5, MCU is after reading the parameter of electric machine, the operation of motor can be controlled based on this.
In detail, referring to FIG. 5, EEPROM can be plugged on electric-controlled plate by staff on demand, and after use by it It pulls out.
Based on above content, in an embodiment of the invention, as shown in figure 5, each electric-controlled plate can also be and signal Lamp is connected, to reflect the reading source of the parameter of electric machine by the flashing rule of signal lamp.
In addition, one embodiment of the invention additionally provides a kind of readable medium, including execute instruction, when storage control When executing instruction described in processor execution, the storage control executes any of the above-described parameter of electric machine read method.
In addition, one embodiment of the invention additionally provides a kind of storage control, comprising: processor, memory and bus;
The memory is executed instruction for storing, and the processor is connect with the memory by the bus, when When the storage control is run, the processor executes the described of memory storage and executes instruction, so that the storage Controller executes any of the above-described parameter of electric machine read method.
In conclusion the embodiment of the present invention have it is at least following the utility model has the advantages that
1, in the embodiment of the present invention, when parameter of electric machine read method includes: that the MCU on electric-controlled plate is powered on, execute from electricity Control the first data read operation that the parameter of electric machine is read in the connected external EEPROM of plate;If the first data read operation execute at The parameter of electric machine read is stored in internal dataflash, and terminates current process by function;If the first reading data is grasped Work executes failure, executes the second data read operation that the parameter of electric machine is read from internal dataflash;If the second data are read Extract operation runs succeeded, and terminates current process;If the second data read operation executes failure, read in internal header file in advance The configured parameter of electric machine.As it can be seen that may be read into the parameter of electric machine without external memory, to guarantee the normal of electric-controlled plate Work, and then product cost reduces.
2, in the embodiment of the present invention, the reading of the parameter of electric machine can have 3 realization channels, and 3 channels are used cooperatively, so that Under any circumstance, MCU can read required correct parameter from a certain channel, so that being no longer limited to can only be from outside It is read in EEPROM, it is seen then that the flexibility of reading data correspondinglys increase.Accordingly, electric-controlled plate operating condition is more flexible, using more It is convenient.
3, it in the embodiment of the present invention, can only be tieed up on demand when executing internal debugging before electric appliance dispatches from the factory, or in maintenance personal It when repairing household electrical appliances, is possible to for EEPROM being plugged on electric-controlled plate, and can be pulled out after grafting, without being always maintained at grafting State, the realization of this technology can support electric-controlled plate to the normal control of motor, to guarantee that electric appliance runs well.Due to without always Grafting EEPROM, therefore EEPROM can be recycled for different electric-controlled plates, so that EEPROM demand number greatly reduces, electricity Device cost accordingly reduces.
It should be noted that, in this document, such as first and second etc relational terms are used merely to an entity Or operation is distinguished with another entity or operation, is existed without necessarily requiring or implying between these entities or operation Any actual relationship or order.Moreover, the terms "include", "comprise" or its any other variant be intended to it is non- It is exclusive to include, so that the process, method, article or equipment for including a series of elements not only includes those elements, It but also including other elements that are not explicitly listed, or further include solid by this process, method, article or equipment Some elements.In the absence of more restrictions, the element limited by sentence " including one ", is not arranged Except there is also other identical factors in the process, method, article or apparatus that includes the element.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can store in computer-readable storage medium, the program When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light In the various media that can store program code such as disk.
Finally, it should be noted that the foregoing is merely presently preferred embodiments of the present invention, it is merely to illustrate skill of the invention Art scheme, is not intended to limit the scope of the present invention.Any modification for being made all within the spirits and principles of the present invention, Equivalent replacement, improvement etc., are included within the scope of protection of the present invention.

Claims (10)

1. a kind of parameter of electric machine read method, which is characterized in that applied to the MCU on electric-controlled plate, comprising:
When powering on, the first reading data behaviour that the parameter of electric machine is read from the external EEPROM being connected with the electric-controlled plate is executed Make;
If first data read operation runs succeeded, the parameter of electric machine read is stored in internal dataflash, And terminate current process;
If first data read operation executes failure, executes and read the second of the parameter of electric machine from internal dataflash Data read operation;
If second data read operation runs succeeded, terminate current process;
If second data read operation executes failure, the parameter of electric machine pre-configured in internal header file is read.
2. the method according to claim 1, wherein
Further comprise: setting is used for the state variable in mark data source, and the state variable includes corresponding to EEPROM First variable, the second variable corresponding to dataflash, the third variable corresponding to header file;
After first data read operation runs succeeded, further comprise: first variable is exported to external Display is to be shown;
After second data read operation runs succeeded, further comprise: second variable is exported to described aobvious Show device to be shown;
In the header file inside the reading after the pre-configured parameter of electric machine, further comprise: the third is become Amount output is to the display to be shown.
3. method according to claim 1 or 2, which is characterized in that
Further comprise: that the unique identification value of the parameter of electric machine read is defeated after reading the parameter of electric machine each time Out to external display to be shown.
4. the MCU on a kind of electric-controlled plate characterized by comprising
First reading unit, when for powering on, execution reads the parameter of electric machine from the external EEPROM being connected with the electric-controlled plate The first data read operation;If first data read operation runs succeeded, the parameter of electric machine read is stored in MCU In internal dataflash, and terminate;If first data read operation executes failure, the second reading unit is triggered;
Second reading unit, for executing the second reading data for reading the parameter of electric machine from the dataflash inside MCU Operation;If second data read operation runs succeeded, terminate;If second data read operation executes failure, triggering Third reading unit;
The third reading unit, for reading the parameter of electric machine pre-configured in the header file inside MCU.
5. MCU according to claim 4, which is characterized in that
The MCU is communicated by I2C bus with the external EEPROM connected on the electric-controlled plate;
The memory space of dataflash inside the MCU is 4KB;
The header file for being provided with the parameter of electric machine in advance inside the MCU is user.h header file.
6. MCU according to claim 4, which is characterized in that
Further include: setting unit, for the state variable for being used for mark data source to be arranged, the state variable includes corresponding to The first variable of EEPROM, the second variable corresponding to dataflash, the third variable corresponding to header file;
First reading unit, it is for after first data read operation runs succeeded, first variable is defeated Out to external display to be shown;
Second reading unit, it is for after second data read operation runs succeeded, second variable is defeated Out to the display to be shown;
The third reading unit, after the parameter of electric machine pre-configured in the header file inside reading MCU, by institute Third variable is stated to export to the display to be shown.
7. according to the MCU any in claim 4 to 6, which is characterized in that
Each reading unit, is used to after reading the parameter of electric machine each time, by the unique of the parameter of electric machine read Ident value is exported to external display to be shown.
8. a kind of parameter of electric machine reads system characterized by comprising
Display and at least one electric-controlled plate;
Wherein, MCU as claimed in claims 6 or 7 is installed on the electric-controlled plate;
The display, for the unique identification information in conjunction with each electric-controlled plate pre-set, to each electricity The state variable that MCU on control plate is sent carries out corresponding displaying.
9. a kind of readable medium, which is characterized in that including executing instruction, refer to when the processor of storage control executes the execution When enabling, the storage control executes such as parameter of electric machine read method any one of claims 1 to 3.
10. a kind of storage control characterized by comprising processor, memory and bus;
The memory is executed instruction for storing, and the processor is connect with the memory by the bus, when described When storage control is run, the processor executes the described of memory storage and executes instruction, so that the storage controls Device executes such as parameter of electric machine read method any one of claims 1 to 3.
CN201910629459.0A 2019-07-12 2019-07-12 A kind of parameter of electric machine read method, apparatus and system Pending CN110347430A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910629459.0A CN110347430A (en) 2019-07-12 2019-07-12 A kind of parameter of electric machine read method, apparatus and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910629459.0A CN110347430A (en) 2019-07-12 2019-07-12 A kind of parameter of electric machine read method, apparatus and system

Publications (1)

Publication Number Publication Date
CN110347430A true CN110347430A (en) 2019-10-18

Family

ID=68175116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910629459.0A Pending CN110347430A (en) 2019-07-12 2019-07-12 A kind of parameter of electric machine read method, apparatus and system

Country Status (1)

Country Link
CN (1) CN110347430A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110865906A (en) * 2019-11-05 2020-03-06 中国第一汽车股份有限公司 Motor initial position angle storage method and device, vehicle and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102591752A (en) * 2011-01-10 2012-07-18 西安龙飞软件有限公司 On-line debugging method of peripheral equipment based on high pass platform
CN102890647A (en) * 2012-07-04 2013-01-23 漳州科能电器有限公司 Method and device for storing and updating data
CN103631611A (en) * 2012-08-23 2014-03-12 杭州海康威视数字技术股份有限公司 Method and equipment for updating optical transmitter and receiver
CN105677513A (en) * 2016-01-04 2016-06-15 北京小米移动软件有限公司 Method and device for restoring backup data
CN106503542A (en) * 2016-10-14 2017-03-15 青岛海尔空调器有限总公司 The anti-Improvement of device parameter, equipment and air-conditioner
CN109150993A (en) * 2018-07-30 2019-01-04 武汉斗鱼网络科技有限公司 A kind of method, terminal installation and storage medium obtaining network request section
CN109799995A (en) * 2018-12-14 2019-05-24 平安普惠企业管理有限公司 Dispose method, apparatus, computer equipment and the storage medium of IPA packet

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102591752A (en) * 2011-01-10 2012-07-18 西安龙飞软件有限公司 On-line debugging method of peripheral equipment based on high pass platform
CN102890647A (en) * 2012-07-04 2013-01-23 漳州科能电器有限公司 Method and device for storing and updating data
CN103631611A (en) * 2012-08-23 2014-03-12 杭州海康威视数字技术股份有限公司 Method and equipment for updating optical transmitter and receiver
CN105677513A (en) * 2016-01-04 2016-06-15 北京小米移动软件有限公司 Method and device for restoring backup data
CN106503542A (en) * 2016-10-14 2017-03-15 青岛海尔空调器有限总公司 The anti-Improvement of device parameter, equipment and air-conditioner
CN109150993A (en) * 2018-07-30 2019-01-04 武汉斗鱼网络科技有限公司 A kind of method, terminal installation and storage medium obtaining network request section
CN109799995A (en) * 2018-12-14 2019-05-24 平安普惠企业管理有限公司 Dispose method, apparatus, computer equipment and the storage medium of IPA packet

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110865906A (en) * 2019-11-05 2020-03-06 中国第一汽车股份有限公司 Motor initial position angle storage method and device, vehicle and storage medium

Similar Documents

Publication Publication Date Title
DE102012201206B4 (en) Electrical device, energy management device and method for the control thereof
EP1816531A2 (en) Editing apparatus and recording medium in which editing program is recorded
US9909776B2 (en) Air conditioner
CN105824388A (en) Power-on/off detection method, device and system
CN106708586B (en) A kind of handheld instrument and method for the update of embedded system program automatic on-line
JP2009104647A (en) Diagnosis method, power supply control device, electronic device, battery pack, program and storage medium
CN106403141A (en) Parameter adjustment setting method for various types of air conditioners
CN110347430A (en) A kind of parameter of electric machine read method, apparatus and system
CN109342867A (en) On-off electric test device
EP2651078A1 (en) Method and apparatus for managing electronic appliance
CN111367584B (en) Power supply adaptation method and device and computer readable storage medium
CN110173802B (en) Air conditioner, communication control method and device thereof and electronic equipment
CN108319529A (en) The method and system of the start-up course of monitoring CPU, CPLD
CN102135756A (en) Voltage application time period measuring circuit and power supply apparatus including the same
CN102680143A (en) Temperature sensing device for air conditioner commodity inspection
CN106034365A (en) Electromagnetic heating control method and apparatus thereof, and electromagnetic heating apparatus
CN104575601A (en) Apparatus for duplicating usage parameters written in memory of industrial tool
CN109282434A (en) Firmware installation method, system and air conditioner
JP2009290918A (en) Distributed power system
CN106201630A (en) A kind of hand-held programmer for LED drive power and programmed method thereof
CN111427304B (en) PLC program monitoring system and method
CN111274102B (en) PCBA state information indication method
CN110333828B (en) EEPROM data storage method, controller and system
US20220268473A1 (en) Apparatus management device and software generation method
JP6926703B2 (en) Electric energy management system, electric energy monitor recognition program and recording 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: 20191018