CN111324193A - Method and system for preventing electric control of sewing machine from failing to store data in power-down state caused by lightning strike - Google Patents
Method and system for preventing electric control of sewing machine from failing to store data in power-down state caused by lightning strike Download PDFInfo
- Publication number
- CN111324193A CN111324193A CN202010098447.2A CN202010098447A CN111324193A CN 111324193 A CN111324193 A CN 111324193A CN 202010098447 A CN202010098447 A CN 202010098447A CN 111324193 A CN111324193 A CN 111324193A
- Authority
- CN
- China
- Prior art keywords
- data
- module
- eeprom
- control module
- sewing machine
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/30—Means for acting in the event of power-supply failure or interruption, e.g. power-supply fluctuations
-
- D—TEXTILES; PAPER
- D05—SEWING; EMBROIDERING; TUFTING
- D05B—SEWING
- D05B19/00—Programme-controlled sewing machines
- D05B19/02—Sewing machines having electronic memory or microprocessor control unit
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/24—Resetting means
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0793—Remedial or corrective actions
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Textile Engineering (AREA)
- Quality & Reliability (AREA)
- Sewing Machines And Sewing (AREA)
Abstract
The invention provides a method for avoiding failure of electric control of a sewing machine to store data due to lightning stroke, and belongs to the technical field of electric control of sewing machines. The problem that the existing sewing electric control cannot write data to modify parameters due to the influence of lightning stroke and the like is solved. The method comprises the following steps: s1, if the data to be modified is different from the current stored data in the EEPROM module, transmitting the data to the EEPROM module, and then executing the step S2; s2, if the current storage data is different from the data to be modified or the writing time is over, the data writing fails, and the step S3 is executed; s3, the control module resets the IIC module; s4, the control module writes data to the EEPROM module again through the IIC module; s5, if the current storage data is different from the data to be modified or the writing time is over, the data writing fails, and the step S6 is executed; and S6, outputting an error signal and ending the data writing program. The method has the advantages of high success rate of writing data and good immunity.
Description
Technical Field
The invention belongs to the technical field of sewing machine electric control, and relates to a method and a system for preventing the sewing machine electric control from being out of power and storing data due to lightning stroke.
Background
Along with the increasing intellectualization of sewing machines, the interaction with the outside and the mutual influence are more and more. For example, when the sewing machine works in an environment with thunderstorm weather, the thunder and lightning signal generated in the thunderstorm weather can interfere with an electric control system on the sewing machine to a certain extent, and the normal work of the sewing machine can be influenced if the thunder and lightning signal is serious. The existing sewing machine has some problems: when the lightning signal greatly interferes the sewing machine, for example, the generated surge phenomenon is caused, because the electric control anti-surge interference capability of the existing sewing machine is poor, the IIC module in the singlechip module may be halted, so that the electric control parameters cannot be stored, the parameter values in the EEPROM module are restored to the values before interference after the electric control is restarted, a user needs to manually modify the parameter values again until the data of the parameter values are successfully stored, and the operation is very troublesome and low in efficiency.
Disclosure of Invention
The invention aims to solve the technical problems and provides a method and a system for preventing the electric control of a sewing machine from failing to store data due to lightning stroke.
The purpose of the invention can be realized by the following technical scheme: a method for avoiding the failure of electric control of a sewing machine to save data due to lightning stroke is characterized by comprising the following steps:
s1, inputting data to be modified to the control module through the man-machine interaction module, comparing and analyzing the received data to be modified with the current stored data in the EEPROM module by the control module, if the data are different, controlling the IIC module to transmit the data to be modified to the EEPROM module by the control module, and then executing the step S2; if the two data are the same, no processing is performed, if other data are to be written, the step S1 is continuously executed, otherwise, the data writing program is ended;
s2, feeding back the current storage data to the control module by the EEPROM module, judging by the control module according to the current storage data fed back by the EEPROM module and the previously received data to be modified input by the man-machine interaction module, and simultaneously judging whether the data writing into the EEPROM module is overtime, if the two data are different or the writing is overtime, the data writing of the EEPROM module fails, executing step S3; if the data of the EEPROM module and the data of the sewing machine are the same, the data writing of the EEPROM module is successful, the sewing machine works normally, if other data are written, the step S1 is continuously executed, otherwise, the data writing program is ended;
s3, the control module resets the IIC module;
s4, the control module writes data to the EEPROM module again through the IIC module;
s5, feeding back the current storage data to the control module by the EEPROM module, judging by the control module according to the current storage data fed back by the EEPROM module and the previously received data to be modified input by the man-machine interaction module, and if the current storage data and the previously received data are different or the writing time is over, the data writing of the EEPROM module fails, executing the step S6; if the data of the EEPROM module and the data of the sewing machine are the same, the data writing of the EEPROM module is successful, the sewing machine works normally, if other data are written, the step S1 is continuously executed, otherwise, the data writing program is ended;
and S6, the control module controls to output an error signal and ends the data writing program.
In the above method for preventing the failure of the electric control of the sewing machine to store data due to lightning stroke, the step S6 of controlling the output of the error signal by the control module is specifically as follows: the control module outputs an error display E14 through the man-machine interaction module.
In the method for preventing the power failure of the electric control of the sewing machine caused by lightning stroke to store the data, the data comprises the sewing parameters and the control parameters, and the sewing parameters comprise sewing mode selection, upper and lower needle stop selection, sewing speed and a thread cutting action switch.
In the above method for saving data in case of failure of electric control of a sewing machine due to lightning strike, the resetting of the IIC module by the control module in step S3 is specifically as follows: and the control module writes an IIC reset signal to reset the IIC module.
Compared with the prior art, the method can reset the IIC module to enable the IIC module to reset to the normal starting operation when the parameters of the write data of the EEPROM module are modified and cannot be stored, so that the success rate of writing the data of the EEPROM module through the IIC module and further modifying the parameters is improved, and the noise immunity of the sewing electric control equipment is improved.
Drawings
FIG. 1 is a flow chart of the method.
Detailed Description
The following are specific embodiments of the present invention and are further described with reference to the drawings, but the present invention is not limited to these embodiments.
As shown in figure 1, the method for preventing the electric control of the sewing machine from failing to store data due to lightning stroke comprises the following steps:
s1, inputting data to be modified to the control module through the man-machine interaction module, comparing and analyzing the received data to be modified with the current stored data in the EEPROM module by the control module, if the data are different, controlling the IIC module to transmit the data to be modified to the EEPROM module by the control module, and then executing the step S2; if the two data are the same, no processing is performed, if other data are to be written, the step S1 is continuously executed, otherwise, the data writing program is ended;
data can be input and transmitted to the control module through the man-machine interaction module by an operator, or can be directly input to the control module through a program, and then the control module is written into the EEPROM module through the IIC module.
The IIC is an Inter-Integrated Circuit (IICBus) which is a short name, so chinese should be called an Integrated Circuit bus, which is a serial communication bus using a multi-master-slave architecture, and developed by philips in the 1980 s to allow a motherboard, an embedded system, or a mobile phone to be connected to a low-speed peripheral device.
The EEPROM is EEPROM (electrically Erasable Programmable read only memory) and refers to a charged Erasable Programmable read only memory. The memory chip is a memory chip with no data loss after power failure. The EEPROM can be erased and reprogrammed on a computer or a special device. Typically for plug and play.
S2, feeding back the current storage data to the control module by the EEPROM module, judging by the control module according to the current storage data fed back by the EEPROM module and the previously received data to be modified input through the human-computer interaction module, and simultaneously judging whether the data written into the EEPROM module is overtime, if the two data are different or the data are overtime, the data written by the EEPROM module fails, executing step S3; if the data of the EEPROM module and the data of the sewing machine are the same, the data writing of the EEPROM module is successful, the sewing machine works normally, if other data are written, the step S1 is continuously executed, otherwise, the data writing program is ended;
the EEPROM module is used for storing data, and the current stored data originally stored in the EEPROM module can be fed back to the control module; when data needs to be modified, the control module writes data modification parameters to the EEPROM module through the IIC module, after the data is modified, the EEPROM module feeds back current storage data to the control module, the control module indicates that the current storage data of the EEPROM module is different from the data to be modified input through the man-machine interaction module according to the comparison between the current storage data fed back by the EEPROM module and the previously received data to be modified input through the man-machine interaction module or the writing time is overtime, that is, the current storage data of the EEPROM module is the original data and the data to be modified are not successfully stored, that is, the data are not successfully modified, the reason for the success of the non-modification may be thunderstorm weather, the sewing machine is influenced by lightning signals, the IIC module is halted, and the data to be modified through the IIC module cannot be written into the EEPROM module, or a write timeout, resulting in the IIC module not successfully transferring the IIC module to the EEPROM module, thereby causing the EEPROM module to fail to save the data to be modified. If the control module determines that the data writing of the EEPROM module fails, step S3 is executed, i.e., the control module resets the IIC module. If the current storage data is the same as the data to be modified, the current storage data of the EEPROM module is the same as the data to be modified input by the man-machine interaction module, so that the data in the EEPROM module is successfully modified and stored, namely the data is successfully modified, which indicates that the IIC module works normally and the writing is not overtime, and the sewing machine works normally and works with the modified parameters; if the data is to be written continuously, step S1 is executed again until all the data to be modified is written.
S3, the control module resets the IIC module;
the specific resetting mode is as follows: and the control module writes an IIC reset signal to reset the IIC module.
S4, the control module writes data to the EEPROM module again through the IIC module;
the step is that the IIC module writes the data to be modified input by the man-machine interaction module into the EEPROM module again.
S5, feeding back the current storage data to the control module by the EEPROM module, judging by the control module according to the current storage data fed back by the EEPROM module and the previously received data to be modified input by the man-machine interaction module, if the current storage data and the previously received data are different or the writing time is over, the data writing of the EEPROM module fails, and executing the step S6; if the data of the EEPROM module and the data of the sewing machine are the same, the data writing of the EEPROM module is successful, the sewing machine works normally, if other data are written, the step S1 is continuously executed, otherwise, the data writing program is ended;
and S6, the control module controls to output an error signal and ends the data writing program.
Specifically, the error signal is an error display E14, and the error signal is output through the human-computer interaction module.
The data includes sewing parameters and control parameters, and the sewing parameters include more than 100 parameters such as sewing mode selection, upper and lower needle stop selection, sewing speed and thread cutting action switch.
In case of thunderstorm weather, the lightning signal of the controller generates surge interference on the sewing machine electric control, possibly causing a crash to the IIC module, and in this way, the control module cannot successfully transmit data to the EEPROM module through the IIC module, so that the EEPROM module cannot successfully store newly modified data. When the data written by the EEPROM module is modified and cannot be stored, the IIC module can be reset to enable the IIC module to be reset to be started normally, so that the success rate of writing data to the EEPROM module through the IIC module and then storing parameters is improved, and the immunity of the sewing electric control equipment is improved.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.
Claims (4)
1. A method for avoiding the failure of electric control of a sewing machine to save data due to lightning stroke is characterized by comprising the following steps:
s1, inputting data to be modified to the control module through the man-machine interaction module, comparing and analyzing the received data to be modified with the current stored data in the EEPROM module by the control module, if the data are different, controlling the IIC module to transmit the data to be modified to the EEPROM module by the control module, and then executing the step S2; if the two data are the same, no processing is performed, if other data are to be written, the step S1 is continuously executed, otherwise, the data writing program is ended;
s2, feeding back the current storage data to the control module by the EEPROM module, judging by the control module according to the current storage data fed back by the EEPROM module and the previously received data to be modified input by the man-machine interaction module, and simultaneously judging whether the data writing into the EEPROM module is overtime, if the two data are different or the writing is overtime, the data writing of the EEPROM module fails, executing step S3; if the data of the EEPROM module and the data of the sewing machine are the same, the data writing of the EEPROM module is successful, the sewing machine works normally, if other data are written, the step S1 is continuously executed, otherwise, the data writing program is ended;
s3, the control module resets the IIC module;
s4, the control module writes data to the EEPROM module again through the IIC module;
s5, feeding back the current storage data to the control module by the EEPROM module, judging by the control module according to the current storage data fed back by the EEPROM module and the previously received data to be modified input by the man-machine interaction module, and if the current storage data and the previously received data are different or the writing time is over, the data writing of the EEPROM module fails, executing the step S6; if the data of the EEPROM module and the data of the sewing machine are the same, the data writing of the EEPROM module is successful, the sewing machine works normally, if other data are written, the step S1 is continuously executed, otherwise, the data writing program is ended;
and S6, the control module controls to output an error signal and ends the data writing program.
2. The method for saving data in the absence of power failure in the electrical control of the sewing machine caused by lightning strike according to claim 1, wherein the step S6 is executed by the control module to output an error signal specifically as follows: the control module outputs an error display E14 through the man-machine interaction module.
3. The method for saving data in case of failure of electric control of a sewing machine due to lightning stroke according to claim 2, wherein the data comprises sewing parameters and control parameters, and the sewing parameters comprise sewing mode selection, upper and lower needle stop selection, sewing speed and a thread cutting action switch.
4. The method for saving data in the event of failure to save power of electric control of a sewing machine due to lightning strike as claimed in claim 2 or 3, wherein the step S3 of resetting the IIC module by the control module is specifically as follows: and the control module writes an IIC reset signal to reset the IIC module.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010098447.2A CN111324193B (en) | 2020-02-18 | 2020-02-18 | Method and system for preventing electric control of sewing machine from failing to store data in power-down state caused by lightning strike |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010098447.2A CN111324193B (en) | 2020-02-18 | 2020-02-18 | Method and system for preventing electric control of sewing machine from failing to store data in power-down state caused by lightning strike |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111324193A true CN111324193A (en) | 2020-06-23 |
| CN111324193B CN111324193B (en) | 2022-06-07 |
Family
ID=71168850
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010098447.2A Active CN111324193B (en) | 2020-02-18 | 2020-02-18 | Method and system for preventing electric control of sewing machine from failing to store data in power-down state caused by lightning strike |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111324193B (en) |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5295258A (en) * | 1989-12-22 | 1994-03-15 | Tandem Computers Incorporated | Fault-tolerant computer system with online recovery and reintegration of redundant components |
| CN103558574A (en) * | 2013-10-24 | 2014-02-05 | 国家电网公司 | Method for testing software fault-tolerant capability of intelligent ammeter based on EEPROM data reading and writing |
| CN103809147A (en) * | 2012-11-12 | 2014-05-21 | 苏州工业园区新宏博通讯科技有限公司 | AC ammeter fault self diagnosis method |
| CN104598285A (en) * | 2015-02-11 | 2015-05-06 | 北京京东方多媒体科技有限公司 | Burning method and burning system |
| CN105759679A (en) * | 2015-12-12 | 2016-07-13 | 重庆川仪自动化股份有限公司 | Power-failure protection controller and power-failure protection method thereof |
| CN110021333A (en) * | 2017-11-23 | 2019-07-16 | 三星电子株式会社 | Memory device and storage system |
| CN110047538A (en) * | 2018-01-15 | 2019-07-23 | 爱思开海力士有限公司 | Storage system and its operating method |
-
2020
- 2020-02-18 CN CN202010098447.2A patent/CN111324193B/en active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5295258A (en) * | 1989-12-22 | 1994-03-15 | Tandem Computers Incorporated | Fault-tolerant computer system with online recovery and reintegration of redundant components |
| CN103809147A (en) * | 2012-11-12 | 2014-05-21 | 苏州工业园区新宏博通讯科技有限公司 | AC ammeter fault self diagnosis method |
| CN103558574A (en) * | 2013-10-24 | 2014-02-05 | 国家电网公司 | Method for testing software fault-tolerant capability of intelligent ammeter based on EEPROM data reading and writing |
| CN104598285A (en) * | 2015-02-11 | 2015-05-06 | 北京京东方多媒体科技有限公司 | Burning method and burning system |
| CN105759679A (en) * | 2015-12-12 | 2016-07-13 | 重庆川仪自动化股份有限公司 | Power-failure protection controller and power-failure protection method thereof |
| CN110021333A (en) * | 2017-11-23 | 2019-07-16 | 三星电子株式会社 | Memory device and storage system |
| CN110047538A (en) * | 2018-01-15 | 2019-07-23 | 爱思开海力士有限公司 | Storage system and its operating method |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111324193B (en) | 2022-06-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN107886997B (en) | An EMMC testing device and method | |
| CN109407991B (en) | Non-volatile flash memory execution command suspending and recovering method, non-volatile flash memory and electronic equipment | |
| CN113127285B (en) | Error data debugging method, device, chip and computer equipment | |
| CN102915209A (en) | Storage control chip, storage equipment and system data writing method | |
| CN111324193B (en) | Method and system for preventing electric control of sewing machine from failing to store data in power-down state caused by lightning strike | |
| CN103890713A (en) | Apparatus and method for managing register information in processing system | |
| CN119180011A (en) | Method and equipment for testing unauthorized writing of key configuration parameters of ECU | |
| CN102486757B (en) | Memory storage device, its memory controller and method for responding to host commands | |
| CN208752958U (en) | The under-voltage protecting circuit and embedded system of storage chip | |
| KR102747429B1 (en) | Memory control system with sequence processing unit | |
| US20120185713A1 (en) | Server, storage medium, and method for controlling sleep and wakeup function of the server | |
| CN108121434B (en) | Clock control method of display interface, mobile terminal and storage medium | |
| CN103389802A (en) | Multichip compatible method and device based on capacitive touch press keys as well as electrical equipment | |
| EP4170538A1 (en) | Chip simulation method, apparatus and system, and device and storage medium | |
| CN108231131B (en) | eMMC test method and device | |
| CN106326049B (en) | A fault location method and terminal | |
| CN116540933A (en) | Data read-write method and device for charging chip | |
| CN111427719B (en) | Method and device for improving reliability and abnormal restarting performance of SOC (system on chip) system | |
| CN117792881A (en) | RTU fault log generation and storage method | |
| CN113377404A (en) | New energy domain controller safety monitoring chip program updating method and system | |
| CN101950160B (en) | Anti-jamming method of electrical appliance, control system and corresponding electrical appliance | |
| CN207182913U (en) | NAND Flash data protection circuits | |
| CN107168897B (en) | Device for realizing I2C repeated read-write control | |
| CN114625388A (en) | Internet of things MCU (microprogrammed control Unit) air firmware upgrading system and method | |
| CN106569861B (en) | Chip IAP data updating control method and system |
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 |