Controller and data transmission method

By introducing a zero-crossing detection circuit and data transmission end into the controller, the automatic recovery of parameter configuration after the controller is replaced, solving the problems of configuration complexity and workload during the replacement process, and improving service efficiency and customer experience.

CN119847044APending Publication Date: 2025-04-18GUANGDONG WANHE THERMAL ENERGY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411994748.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

During the controller replacement process, how to quickly and accurately restore the configuration information and historical data of the original controller before replacement, avoiding the complexity of manual configuration parameters and the high workload of after-sales service personnel.

Method used

A controller is designed, including a control module, a transformer circuit, a power supply interface and a zero-crossing detection circuit. Through the zero-crossing detection circuit, it detects whether there is an electrical signal input from the power supply interface, determines that the controller is a new and old controller, and realizes automatic transmission of parameter data through the data transmission end.

Benefits of technology

The new controller quickly and accurately restores the parameter configuration of the old controller, reduces the workload and configuration complexity of after-sales service personnel, and improves after-sales service efficiency and customer experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119847044A_ABST
    Figure CN119847044A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of control, and discloses a controller and a data transmission method.The controller is provided with a control module, a voltage transformation circuit, a power interface and a zero-cross detection circuit, and the power interface is electrically connected with the input end of the zero-cross detection circuit. The control module is provided with a detection end, a data transmission end and a power end, the detection end is electrically connected with the output end of the zero-cross detection circuit, the input end of the transformation circuit is connected with the power interface, and the output end of the transformation circuit is connected with the power end. Therefore, the control module detects whether an electric signal is input into the power interface based on the zero-cross detection circuit to determine the control module as a data sender or a data receiver, if the controller is the data receiver, the control module receives parameter data through the data transmission end, and if the controller is the data sender, the control module sends the parameter data through the data transmission end. Rapid and accurate recovery of controller parameter data is realized, and operations such as manual parameter configuration in an after-sales service process of the controller are effectively avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of controllers, and in particular to a controller and a data transmission method. Background Art

[0002] With the continuous improvement of industrial automation and intelligence, multi-model compatibility has become one of the important evaluation indicators of modern controller design. In the currently widely used controller design scheme, the same controller usually supports the operation of multiple different models of machines, each of which has its own unique operating parameters and configuration requirements. In such a highly integrated control scheme, when a controller fails, it will affect the normal operation of the entire system. In this case, it is usually necessary to solve the problem by replacing the control.

[0003] However, after replacing the new controller, the after-sales service team needs to re-enter and calibrate all the specific setting parameters for the set system or model during use. The setting and configuration process is complicated, time-consuming and labor-intensive. And the after-sales service personnel are required to have a high level of technical skills and professional knowledge to ensure the accuracy of parameter configuration and the stability of the system. Even so, there are some parameters that are adjusted through self-learning during the operation of the equipment, which cannot be accurately restored by the after-sales service personnel. In addition, there is also the problem that the historical data information of the equipment operation cannot be restored. Therefore, how to enable the new controller to quickly and accurately restore the configuration information and historical data of the original controller before replacement has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] In view of this, the present invention provides a controller and a data transmission method to solve the technical problem of how to enable a new controller to quickly and accurately restore the configuration information and historical data of the original controller before replacement, which becomes an urgent problem to be solved.

[0005] In a first aspect, the present invention provides a controller, including a control module, a voltage conversion circuit, a power supply interface and a zero-crossing detection circuit;

[0006] The power interface is electrically connected to the input end of the zero-crossing detection circuit;

[0007] The control module is provided with a detection end, a data transmission end and a power supply end, the detection end is electrically connected to the output end of the zero-crossing detection circuit, the input end of the voltage conversion circuit is connected to the power supply interface, and the output end of the voltage conversion circuit is connected to the power supply end;

[0008] The control module determines whether it is a data sender or a data receiver by detecting whether there is an electrical signal input at the power interface based on the zero-crossing detection circuit. If the controller is a data receiver, the parameter data is received through the data transmission terminal. If the controller is a data sender, the parameter data is sent through the data transmission terminal.

[0009] The controller of the present invention has a control module, a power interface and a zero-crossing detection circuit, wherein the power interface is electrically connected to the input end of the zero-crossing detection circuit, and the control module includes a detection end, a data transmission end and a voltage transmission end, and the detection end is electrically connected to the output end of the zero-crossing detection circuit. The control module detects whether the power interface has an electric signal input based on the zero-crossing detection circuit, thereby determining whether the controller is a new controller or an old controller, if the controller is a new controller, the parameter data is received through the data transmission end, and if the controller is an old controller, the parameter data is sent through the data transmission end. Thus, if a certain controller needs to be replaced, the old controller to be replaced can be connected to the new controller that replaces the old controller, and the control module can detect whether the power interface has an electric signal input based on the zero-crossing detection circuit. The detection result signal and the predetermined target controller, determine the new controller and the old controller among the two controllers, realize the purpose of automatically sending the parameter data of the old controller to the new controller quickly and accurately, so that the new controller stores the parameter data, quickly and accurately restores the parameter configuration of the controller, effectively avoids the operation of manually configuring parameters and the like in the after-sales service process of the controller, significantly reduces the workload of the after-sales service personnel, and reduces the complexity of the parameter configuration.

[0010] In an optional embodiment, the controller also includes a transmission interface, and the voltage transmission end and the data transmission end are both electrically connected to the transmission interface; or the controller also includes a voltage transmission interface and a data transmission interface, the voltage transmission end is electrically connected to the voltage transmission interface, and the data transmission end is electrically connected to the data transmission interface.

[0011] In a second aspect, the present invention provides a data transmission method based on the controller of the above embodiment, the method comprising:

[0012] Connect the data transmission ends of the two controllers, connect the power supply interface of one of the two controllers to electricity, and connect the power supply end of the other controller to electricity;

[0013] The two controllers determine that they are the data sender and the data receiver respectively based on the detection result signal of the zero-crossing detection circuit;

[0014] The data sender sends its parameter data to the data receiver, and the data receiver stores the parameter data. The data transmission method of the present invention determines the new controller and the old controller among the two controllers based on the detection result signal of the zero-crossing detection circuit, and realizes the purpose of automatically and quickly and accurately sending the parameter data of the old controller to the new controller, so that the new controller stores the parameter data, and quickly and accurately restores the parameter configuration of the controller, effectively avoiding the manual configuration of parameters and other operations during the after-sales service of the controller, significantly reducing the workload of after-sales service personnel, and reducing the complexity of parameter configuration.

[0015] In an optional implementation, connecting power to a power interface of one of the two controllers and connecting power to a power terminal of the other controller includes:

[0016] Connecting power to the power interface of the controller that is the data sender among the two controllers, and connecting power to the power terminal of the controller that is the data receiver among the two controllers;

[0017] Based on the detection result signal of the zero-crossing detection circuit, determining that the device is a data sender and a data receiver respectively includes:

[0018] The zero-crossing detection circuit detects that there is an electrical signal input to the power interface and determines that it is the data receiver;

[0019] The zero-crossing detection circuit detects that there is no electric signal input to the power supply interface and determines that it is the data sender.

[0020] The data transmission method of the present invention connects power to the power interface of the controller that is the data sender among the two controllers, and connects power to the power terminal of the controller that is the data receiver among the two controllers. During the detection and data transmission process, the zero-crossing detection circuit detects that the power interface has an electrical signal input to determine that the controller is the data receiver, and the zero-crossing detection circuit detects that the power interface has no electrical signal input to determine that the controller is the data sender. Therefore, according to user needs, different connection methods can be used in combination with the detection results of the zero-crossing detection circuit to automatically realize the rapid and accurate determination of the new and old controls.

[0021] In an optional implementation manner, before the data sender sends its parameter data to the data receiver, the method further includes:

[0022] The data sender determines whether its own parameter data is empty;

[0023] When the parameter data is not empty, the data sender sends the parameter data to the data receiver, and the data receiver stores the parameter data.

[0024] In the data transmission method of the present invention, before sending the parameter data of the old controller to the new controller, the data sender determines whether its own parameter data is empty, and if the parameter data is not empty, the parameter data of the data sender is sent to the new controller. Therefore, before the data is transmitted, whether the parameter data is empty is timely judged, which effectively avoids the data transmission direction error caused by the judgment error of the data sender and the data receiver, and in the case where the parameter data is empty, a reminder message is issued to remind the user of the current power connection error, thereby fundamentally avoiding the problem caused by the error in the data transmission direction, and significantly improving the security of the data transmission process.

[0025] In an optional implementation manner, before the data sender sends its parameter data to the data receiver, the method further includes:

[0026] The data receiver determines whether the parameter data is empty;

[0027] When the parameter data is empty, the data sender sends its parameter data to the data receiver, and the data receiver stores the parameter data.

[0028] In an optional embodiment, the method further includes:

[0029] When the parameter data is not empty, a reminder message is issued to remind the user of the current power connection error.

[0030] The data transmission method of the present invention determines whether the parameter data of the data sender is empty before sending the parameter data of the data sender to the data receiver. If the parameter data is not empty, the parameter data of the data sender is sent to the data receiver. Therefore, before the data is transmitted, whether the parameter data is empty is timely judged, which effectively avoids the data transmission direction error caused by the judgment error of the new data sender and other problems. If the parameter data is not empty, a reminder message is issued to remind the user of the current power connection error, thereby fundamentally avoiding the problems caused by the error in the data transmission direction and significantly improving the security of the data transmission process.

[0031] In an optional implementation manner, the data sender sends its parameter data to the data receiver, including:

[0032] Use a safety verification mechanism to verify parameter data;

[0033] If the verification passes, the storage is determined to be successful.

[0034] The data transmission method of the present invention uses a security verification mechanism to verify parameter data, and determines that the storage is successful if the verification passes, thereby effectively ensuring the security of the data transmission process. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0036] Figure 1 This is a schematic diagram of the structure of the controller of the embodiment of the present application. Figure 1 ;

[0037] Figure 2 The structure diagram of the controller of the present invention is shown in FIG. Figure 2 ;

[0038] Figure 3 It is a circuit principle schematic diagram of a zero-crossing detection circuit;

[0039] Figure 4 The process of the data transmission method according to the embodiment of the present invention is as follows Figure 1 ;

[0040] Figure 5 The process of the data transmission method according to the embodiment of the present invention is as follows Figure 2 ;

[0041] Figure 6 The process of the data transmission method according to the embodiment of the present invention is as follows Figure 3 ;

[0042] Figure 7 is a schematic diagram of an implementation flow of a specific application example of a data transmission method according to an embodiment of the present invention;

[0043] Figure 8 Schematic diagram of the hardware structure of the controller according to the embodiment of the present invention. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0045] In order to solve the technical problem of how to enable a new controller to quickly and accurately restore the configuration information and historical data of the original controller before replacement, the present invention provides a controller and a data transmission method.

[0046] Figure 1 The structure diagram of the controller of the present invention is shown in FIG. Figure 1 ,like Figure 1 As shown, the present invention provides a controller, including a control module 101, a voltage conversion circuit 107, a power interface 102 and a zero-crossing detection circuit 103. The power interface 102 is electrically connected to the input end of the zero-crossing detection circuit 103. The control module 101 is provided with a detection end 1011, a data transmission end 1012 and a power end 1013, the detection end 1011 is electrically connected to the output end of the zero-crossing detection circuit 103, the input end of the voltage conversion circuit 107 is connected to the power interface 102, and the output end of the voltage conversion circuit 107 is connected to the power end 1013.

[0047] The control module 101 determines whether it is a data sender or a data receiver based on whether the zero-crossing detection circuit 103 detects whether there is an electrical signal input to the power interface 102. If the controller is a data receiver, the parameter data is received through the data transmission terminal 1012; if the controller is a data sender, the parameter data is sent through the data transmission terminal 1012.

[0048] The controller of the present invention comprises a control module, a voltage conversion circuit, a power interface and a zero-crossing detection circuit, wherein the power interface is electrically connected to the input end of the zero-crossing detection circuit, and the control module is provided with a detection end, a data transmission end and a voltage transmission end, the detection end is electrically connected to the output end of the zero-crossing detection circuit, the input end of the voltage conversion circuit is connected to the power interface, and the output end of the voltage conversion circuit is connected to the power end. The control module detects whether there is an electrical signal input to the power interface based on the zero-crossing detection circuit, thereby determining whether the controller is a data receiver or a data sender, and if the controller is a data receiver, the parameter data is received through the data transmission end, and if the controller is a data sender, the parameter data is sent through the data transmission end. Therefore, if a controller needs to be replaced, the data sender that needs to be replaced and the data receiver that replaces the data sender can be connected, and the control module can detect whether there is an electrical signal input at the power interface based on the detection result signal of the zero-crossing detection circuit and the predetermined target controller, and determine the data receiver and the data sender among the two controllers, so as to achieve the purpose of automatically sending the parameter data of the data sender to the data receiver quickly and accurately, so that the data receiver stores the parameter data and restores the parameter configuration of the controller quickly and accurately, effectively avoiding manual configuration of parameters and other operations during the after-sales service of the controller, significantly reducing the workload of after-sales service personnel, and reducing the complexity of parameter configuration.

[0049] It can be understood that the voltage conversion circuit converts the voltage input by the power interface into the voltage at which the control module operates. In an optional implementation, the voltage input by the power interface is strong electricity, and the voltage at which the control module operates is weak electricity.

[0050] In an optional implementation, the controller further includes a transmission interface 104 , and the power supply terminal 1013 and the data transmission terminal 1012 are electrically connected to the transmission interface 104 . Figure 2 The structure diagram of the controller of the present invention is shown in FIG. Figure 2 ,like Figure 2As shown, the present invention provides a controller, including a control module 101, a power interface 102 and a zero-crossing detection circuit 103. The power interface 102 is electrically connected to the input end of the zero-crossing detection circuit 103. The control module 101 includes a detection end 1011, a data transmission end 1012 and a power end 1013. The detection end 1011 is electrically connected to the output end of the zero-crossing detection circuit 103. The control module 101 detects whether the power interface 102 has an electrical signal input based on the zero-crossing detection circuit 103, and determines whether the controller is a data receiver or a data sender. If the controller is a data receiver, the parameter data is received through the data transmission end 1012. If the controller is a data sender, the parameter data is sent through the data transmission end 1012.

[0051] In an optional implementation, the controller further includes a voltage transmission interface 105 and a data transmission interface 106 , the power supply terminal 1013 is electrically connected to the voltage transmission interface 105 , and the data transmission terminal 1012 is electrically connected to the data transmission interface 106 .

[0052] Figure 3 It is the circuit principle diagram of the zero-crossing detection circuit, as shown in Figure 3 As shown, the zero-crossing detection circuit 103 includes a first resistor R1, a photocoupler U1, a second resistor R2, a third resistor R3 and a first capacitor C1, wherein one end of the first resistor R1 is connected to the neutral line or live line of the alternating current, and the other end is connected to the emitter positive electrode U11 of the photocoupler U1.

[0053] One end of the AC 220V power supply is connected to the first resistor R1 , and the other end is connected to the emitter cathode U12 of the photocoupler U1 .

[0054] One end of the second resistor R2 is connected to the power supply VCC of the main control board, and the other end is connected to the receiving terminal C pole U14 of the photoelectric coupler U1. The receiving terminal E pole U13 of the photoelectric coupler is grounded.

[0055] One end of the third resistor R3 is connected to the receiving terminal C pole U14 of the photocoupler U1, and the other end is connected to the signal output terminal zero of the zero-crossing detection circuit. One end of the first capacitor C1 is connected to the signal output terminal zero of the zero-crossing detection circuit, and the other end is grounded.

[0056] In view of the need to replace a certain controller, in order to quickly and accurately restore the original configuration of the controller, the present invention designs a data transmission method that can automatically transmit parameter data of a data sender to a data receiver.

[0057] Here, the application scenario of the data transmission method provided by the embodiment of the present invention is briefly described. For a data sender that fails or needs to be replaced after reaching the designed service life, a data receiver can be used to replace it. Here, the data transmission method provided by the embodiment of the present invention is used to quickly and accurately send the parameter data of the data sender to the data receiver. Specifically, the data receiver can be connected to the data sender first, for example: you can return to the reference Figure 1 , connect the transmission interface 104 of the data receiver to the transmission interface 104 of the data sender to implement the data transmission method provided by the embodiment of the present invention. Figure 2 , connect the voltage transmission interface 105 of the data receiver with the voltage transmission interface 105 of the data sender, and connect the data transmission interface 106 of the data receiver with the data transmission interface 106 of the data sender to implement the data transmission method provided in the embodiment of the present invention.

[0058] It should be noted that in actual applications, the specific connection relationship between the data receiver and the data sender can be designed as needed. For example: without disassembling the data sender, the data receiver 100 and the data sender 200 can be connected through the above-mentioned connection method, and the data transmission method provided by the embodiment of the present invention can be executed to quickly and accurately transmit the parameter data of the data sender 200 to the data receiver, and restore the controller parameter configuration. The data sender and the data receiver mentioned here and elsewhere in the text are both controllers, the data sender can also be called the old controller, and the data receiver can also be called the new controller, that is, during maintenance or upgrading, the new controller can be used to replace the old controller.

[0059] Furthermore, in order to avoid problems caused by power supply failures and other problems on the data sender, the present invention also provides another relatively preferred embodiment, in which the data receiver is connected to the original power supply circuit and communication line of the data sender. The specific implementation details are described below in conjunction with other drawings and will not be repeated here.

[0060] As a result, the workload and difficulty of after-sales service personnel are effectively reduced, the efficiency of after-sales service is significantly improved, and the customer experience is effectively improved.

[0061] According to an embodiment of the present invention, a data transmission method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0062] In this embodiment, a data transmission method is provided. Figure 4is a flow chart of a data transmission method according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0063] Step S401, connecting the data transmission ends of the two controllers, connecting power to the power interface of one of the two controllers, and connecting power to the power end of the other controller.

[0064] Here, this method can be applied to scenarios such as automatic generation of equipment, where the equipment may include multiple controllers. For details, please refer to Figure 1 or Figure 2 For example, a controller of the automated generation device fails and needs to be replaced. The controller that needs to be repaired or replaced is called the old controller or the data sender, and the controller used to replace the data sender is called the new controller or the data receiver. In some optional implementations, the power interface of one of the two controllers is connected to electricity, and the power terminal of the other controller is connected to electricity.

[0065] For example, during the replacement process, the data transmission method provided by the embodiment of the present invention is used to send the parameter data of the data sender to the data receiver. Here, there can be two connection methods. The first is to keep the connection method of the data sender unchanged and connect the data receiver to the data sender through the transmission interface for electrical connection and communication connection. Alternatively, electrical connection is made through the voltage transmission interface and communication connection is made through the data transmission interface.

[0066] The second method is to remove the data sender and directly connect the data receiver to the automatic generation device, and power the data receiver through the AC 220V of the automatic generation device. At this time, the data receiver is the target controller. Powering on the target controller in the automatic generation device means connecting the target controller to a power supply such as AC 220V, and directly providing AC 220V power to the data receiver.

[0067] Step S402 : The two controllers determine that they are the data sender and the data receiver respectively based on the detection result signal of the zero-crossing detection circuit.

[0068] Return to reference Figure 1 In the application scenario diagram of the embodiment of the present invention and the explanation of the target controller in step S401, the data receiver is directly connected to the AC 220V power supply. Therefore, if the two controllers are connected correctly and the power supply circuit of the controller works normally, the detection result signal of the zero-crossing detection circuit of the data receiver should be able to indicate that there is a power signal input. Therefore, the controller whose detection result signal of the zero-crossing detection circuit indicates that there is a power signal input can be used as the data receiver.

[0069] In some optional implementations, the power supply interface of the controller that is the data sender of the two controllers can be powered, and the power supply terminal of the controller that is the data receiver of the two controllers can be powered. Further, the zero-crossing detection circuit detects that the party with an electrical signal input to the power supply interface determines itself as the data receiver, and the zero-crossing detection circuit detects that the power supply interface has no electrical signal input and determines itself as the data sender.

[0070] In some other optional implementations, the power interface of the controller that serves as the data receiver of the two controllers may be powered, and the power terminal of the controller that serves as the data sender of the two controllers may be powered. Then, the zero-crossing detection circuit detects that the power interface has an electrical signal input and determines that the controller is the data sender, and the zero-crossing detection circuit detects that the power interface has no electrical signal input and determines that the controller is the data receiver.

[0071] Step S403: the data sender sends its parameter data to the data receiver, and the data receiver stores the parameter data.

[0072] After the new data sender is determined, the parameter data of the data sender may be sent to the data receiver so that the data receiver stores the parameter data.

[0073] The data transmission method of the present invention determines a data receiver and a data sender in two controllers based on a detection result signal of a zero-crossing detection circuit, and realizes the purpose of automatically and quickly and accurately sending parameter data of the data sender to the data receiver, so that the data receiver stores the parameter data and quickly and accurately restores the parameter configuration of the controller, effectively avoiding operations such as manual configuration of parameters during the after-sales service of the controller, significantly reducing the workload of after-sales service personnel, and reducing the complexity of parameter configuration.

[0074] In this embodiment, a data transmission method is provided. Figure 5 is a flow chart of a data transmission method according to an embodiment of the present invention. Figure 5 As shown, the process includes the following steps:

[0075] Step S501, connecting the data transmission ends of the two controllers, connecting power to the power interface of one of the two controllers, and connecting power to the power end of the other controller.

[0076] Both controllers are provided with a zero-crossing detection circuit, which is used to detect whether there is a strong electric signal input.

[0077] In this embodiment of the present invention, the data sender is used as the data receiver. For example, the data sender can be connected to the original power supply circuit and communication line, and the data receiver is communicatively and electrically connected to the data sender through a data transmission interface.

[0078] For details, please see Figure 4 Step S401 of the illustrated embodiment will not be described in detail here.

[0079] Step S502 : The two controllers determine that they are the data sender and the data receiver respectively based on the detection result signal of the zero-crossing detection circuit.

[0080] In this embodiment of the present invention, the data sender is used as the data receiver, so the detection result signal of the zero-crossing detection circuit represents that the controller with the power signal input is used as the data sender.

[0081] Step S503: The data sender determines whether its own parameter data is empty.

[0082] If the parameter data is not empty, execute step S504. If the parameter data is empty, execute step S505.

[0083] Therefore, before data transmission, whether the parameter data is empty is judged in time, which effectively avoids the wrong data transmission direction caused by problems such as wrong judgment of the sender of new data.

[0084] Step S504: When the parameter data is not empty, the data sender sends the parameter data to the data receiver, and the data receiver stores the parameter data.

[0085] Specifically, the above step S504 includes:

[0086] Step S5041, using a security verification mechanism to verify parameter data.

[0087] In order to ensure the accuracy of parameter recovery, the system will perform verification before and after parameter transmission to ensure that the data is complete and correct.

[0088] Here, the security verification mechanism is mainly used to determine whether the parameter data transmission is completed.

[0089] Step S5042: If the verification passes, determine that the storage is successful.

[0090] If the verification is passed, it indicates whether the parameter data has been transmitted. It can be determined that the parameter data is successfully stored in the data receiver.

[0091] The data transmission method of the present invention uses a security verification mechanism to verify parameter data, and determines that the storage is successful if the verification passes, thereby effectively ensuring the security of the data transmission process.

[0092] Step S505: When the parameter data is empty, a reminder message is issued to remind the user that the current power connection is wrong.

[0093] In order to avoid the data receiver and the data sender being connected in reverse, the parameter data of the data receiver is fully utilized to be empty, and the parameter data of the data sender is judged. If the parameter data is empty, the data receiver and the data sender may be connected in reverse. Therefore, when the parameter data is empty, a reminder message can be issued to remind the power connection error.

[0094] The data transmission method of the present invention determines whether the parameter data of the data sender is empty before sending the parameter data of the data sender to the data receiver. If the parameter data is not empty, the parameter data of the data sender is sent to the data receiver. Therefore, before the data is transmitted, whether the parameter data is empty is timely judged, which effectively avoids the data transmission direction error caused by the judgment error of the new data sender and other problems. If the parameter data is empty, a reminder message is issued to remind the user of the current power connection error, thereby fundamentally avoiding the problems caused by the error in the data transmission direction and significantly improving the security of the data transmission process.

[0095] If the data sender is used as the data receiver, the data sender is directly powered by AC 220V, the data receiver is connected to the data sender, and the data sender supplies power to the data receiver. If the failure of the data sender includes a power failure, it is impossible to determine the data receiver and the data sender between the two controllers based on the detection result signal of the zero-crossing detection circuit in the data transmission method of the present invention.

[0096] In order to avoid this situation, another embodiment is provided here, where the data receiver is used as the data receiver, as follows:

[0097] In this embodiment, a data transmission method is provided. Figure 6 is a flow chart of a data transmission method according to an embodiment of the present invention. Figure 6 As shown, the process includes the following steps:

[0098] Step S601, connecting the data transmission ends of the two controllers, connecting power to the power interface of one of the two controllers, and connecting power to the power end of the other controller.

[0099] Both controllers are provided with a zero-crossing detection circuit, which is used to detect whether there is a strong electric signal input.

[0100] In this embodiment of the present invention, the data receiver is used as the data receiver. For example, the data receiver can be connected to the original power supply circuit and communication line of the data sender. The data sender is communicatively and electrically connected to the data receiver through a data transmission interface.

[0101] Specifically, the data receiver can be connected to the original power supply circuit and communication line of the data sender to directly provide AC 220V power supply to the data receiver.

[0102] For other implementation details, see Figure 4 Step S401 of the illustrated embodiment will not be described in detail here.

[0103] Step S602 : The two controllers determine that they are the data sender and the data receiver respectively based on the detection result signal of the zero-crossing detection circuit.

[0104] In this embodiment of the present invention, the detection result signal of the zero-crossing detection circuit may be used to represent a controller having a power signal input as a data receiver.

[0105] For other implementation details, see Figure 4 Step S402 of the illustrated embodiment will not be described in detail here.

[0106] Step S603: The data receiver determines whether the parameter data is empty.

[0107] If the parameter data is determined to be empty, step S604 is executed. If the parameter data is determined to be not empty, step S605 is executed.

[0108] Here, the data receiving party determines whether the parameter data of the data sender is empty before sending the parameter data of the data sender to the data receiving party. At this time, the data sender has not sent the parameter data to the data receiving party. Therefore, at this time, if the new data sender is correctly connected according to the predetermined connection method, the parameter data of the data receiving party should be empty.

[0109] Therefore, when it is determined that the parameter data is empty, it can be determined that the new data sender is correctly connected according to the predetermined connection mode. Step S604 can be performed normally to send the parameter data of the data sender to the data receiver.

[0110] Step S604: When the parameter data is empty, the data sender sends the parameter data to the data receiver, and the data receiver stores the parameter data.

[0111] For details, please see Figure 5 Step S504 of the illustrated embodiment will not be described in detail here.

[0112] Step S605, when the parameter data is not empty, a reminder message is issued for power connection error.

[0113] When the parameter data is determined to be empty, there may be a situation where the new data sender is not correctly connected according to the predetermined connection method, for example: the data sender is mistakenly connected directly to the original power supply circuit and communication line of the data sender, and the AC 220V power supply is directly provided to the data sender. At this time, the identified data receiver is actually the data sender, which is inconsistent with the pre-configured data receiver. Therefore, at this time, a reminder message needs to be issued to remind the user that the current power connection is wrong.

[0114] The data transmission method of the present invention determines whether the parameter data of the data sender is empty before sending the parameter data of the data sender to the data receiver. If the parameter data is not empty, the parameter data of the data sender is sent to the data receiver. Therefore, before the data is transmitted, whether the parameter data is empty is timely judged, which effectively avoids the data transmission direction error caused by the judgment error of the new data sender and other problems. If the parameter data is not empty, a reminder message is issued to remind the user of the current power connection error, thereby fundamentally avoiding the problems caused by the error in the data transmission direction and significantly improving the security of the data transmission process.

[0115] In this embodiment, a data transmission method is provided. Figure 7 is a schematic diagram of an implementation flow of a specific application example of a data transmission method according to an embodiment of the present invention. Figure 7 As shown, the process includes the following steps:

[0116] Step S701, connecting the data transmission ends of the two controllers, connecting power to the power interface of one of the two controllers, and connecting power to the power end of the other controller.

[0117] Both controllers are provided with a zero-crossing detection circuit, which is used to detect whether there is a strong electric signal input.

[0118] In this embodiment of the present invention, the data receiver is used as the data receiver. For example, the data receiver can be connected to the original power supply circuit and communication line of the data sender. The data sender is communicatively and electrically connected to the data receiver through a data transmission interface.

[0119] Specifically, suppose that the core controller of an automated production line fails and needs to be replaced. Here, the controller that needs to be removed and replaced can be recorded as the data sender, and the controller used to replace the data sender can be recorded as the data receiver. After-sales service personnel can first disconnect the AC220V power supply of the old main controller and disconnect it from the automated production line. Then, connect the AC220V power supply to the data receiver and connect the data receiver and the data sender through the data transmission interface.

[0120] Step S702 : The two controllers determine that they are the data sender and the data receiver respectively based on the detection result signal of the zero-crossing detection circuit.

[0121] Specifically, after the data receiver is powered on, if the zero-crossing detection circuit of the data receiver fails to detect the 220V power supply signal, it is determined that the data receiver is in a non-powered state. Here, reasonable reminder information such as "confirming the location of the data receiver" or "confirming whether the data receiver is powered" can be sent to the user through LED lights, text, error reminder characters or other methods.

[0122] In other operations, a reminder message representing the current status may also be sent to the user through an LED light, text, error reminder characters or other means, such as indicative phrases such as "recovering data" or "data recovery completed".

[0123] If the zero-crossing detection circuit of the data receiving party can normally detect the 220V power supply signal, it is determined that the data receiving party is in a normal power supply state, and step S703 is continued.

[0124] Step S703: The data receiver determines whether the parameter data is empty.

[0125] If the parameter data is determined to be empty, step S704 is executed. If the parameter data is determined to be not empty, step S705 is executed.

[0126] For example, a parameter recovery algorithm can be configured in advance for the data receiver, and the parameter recovery algorithm is started to read parameter data from the data sender through the data transmission interface. The parameter data may include all setting parameters and historical records of the data sender.

[0127] Step S704: When the parameter data is empty, the data sender sends the parameter data to the data receiver, and the data receiver stores the parameter data.

[0128] Specifically, step S704 is an important step for restoring the parameter data of the data sender to the data receiver. During the transmission of the parameter data, a security verification mechanism can be used to ensure the integrity of the data.

[0129] Step S705: When the parameter data is not empty, a reminder message is issued to remind the user that the current power connection is wrong.

[0130] Step S706, confirming that parameter data recovery is complete.

[0131] After the parameter data recovery is completed, the data receiver can automatically apply these parameter data and prompt the after-sales service personnel through the user interface of the data receiver or the data sender that the parameter data recovery process has been completed. The after-sales service personnel check the operating status of the data receiver and indicate the maintenance work after confirming that everything is normal.

[0132] Figure 7 For other detailed implementation details of the illustrated embodiment, please refer to the above Figure 1-Figure 6 The embodiments shown will not be described in detail here.

[0133] In this way, after replacing the data receiver, the data sender and the data receiver are connected through the data transmission interface to automatically restore the setting information. The recovery process is simple and fast, and there is no need for after-sales service personnel to manually input and calibrate parameters. It effectively simplifies the operation process and reduces the technical requirements for after-sales service. This significantly reduces the probability of human input errors during parameter data recovery and effectively improves the accuracy and stability of parameter data such as the controller's parameter configuration. It significantly shortens maintenance time, effectively improves service response speed, and effectively reduces the risk of production interruption.

[0134] The controller in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0135] The present invention also provides another implementation of a controller for implementing the above data processing method.

[0136] Figure 8 This is a schematic diagram of the structure of a controller provided by an optional embodiment of the present invention. Figure 8 ,like Figure 8 As shown, the controller includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the controller, including instructions stored in or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple controllers can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 8 A processor 10 is taken as an example.

[0137] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0138] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0139] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required by at least one function; the data storage area may store data created according to the use of the controller, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the controller via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0140] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0141] The controller further comprises a communication interface 30 for the controller to communicate with other devices or a communication network.

[0142] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0143] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of computer program instructions in computer-readable media includes, but is not limited to, source files, executable files, installation package files, etc., and accordingly, the way in which computer program instructions are executed by a computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0144] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A controller, characterized in that: It includes a control module, a voltage conversion circuit, a power supply interface and a zero-crossing detection circuit; The power interface is electrically connected to the input end of the zero-crossing detection circuit; The control module is provided with a detection end, a data transmission end and a power supply end, the detection end is electrically connected to the output end of the zero-crossing detection circuit, the input end of the voltage conversion circuit is connected to the power supply interface, and the output end of the voltage conversion circuit is connected to the power supply end; The control module determines whether it is a data sender or a data receiver based on whether the zero-crossing detection circuit detects whether there is an electrical signal input to the power interface. If the controller is a data receiver, the parameter data is received through the data transmission end. If the controller is a data sender, the parameter data is sent through the data transmission end.

2. A controller according to claim 1, characterized in that: The controller further comprises a transmission interface, and the voltage transmission end and the data transmission end are both electrically connected to the transmission interface; or The controller further comprises a voltage transmission interface and a data transmission interface, the voltage transmission end is electrically connected to the voltage transmission interface, and the data transmission end is electrically connected to the data transmission interface.

3. A data transmission method based on two controllers as claimed in claim 1 or 2, characterized in that: The method comprises: Connect the data transmission ends of the two controllers, connect the power interface of one of the two controllers to electricity, and connect the power end of the other controller to electricity; The two controllers determine that they are the data sender and the data receiver respectively based on the detection result signal of the zero-crossing detection circuit; The data sender sends its parameter data to the data receiver, and the data receiver stores the parameter data.

4. The method according to claim 3, characterized in that The step of connecting power to a power interface of one of the two controllers and connecting power to a power terminal of the other controller comprises: Connecting power to the power interface of the controller that is the data sender among the two controllers, and connecting power to the power terminal of the controller that is the data receiver among the two controllers; The detection result signal based on the zero-crossing detection circuit determines that the party is a data sender and a data receiver, respectively, including: The zero-crossing detection circuit detects that there is an electrical signal input to the power interface and determines that it is the data receiver; The zero-crossing detection circuit detects that there is no electrical signal input to the power interface and determines that it is the data sender.

5. The method according to claim 3, characterized in that: The step of connecting power to a power interface of one of the two controllers and connecting power to a power terminal of the other controller comprises: Connecting power to the power interface of the controller that serves as the data receiver of the two controllers, and connecting power to the power terminal of the controller that serves as the data sender of the two controllers; The detection result signal based on the zero-crossing detection circuit determines that the party is a data sender and a data receiver, respectively, including: The zero-crossing detection circuit detects that there is an electrical signal input to the power interface and determines that it is the data sender; The zero-crossing detection circuit detects that there is no electrical signal input to the power interface and determines that it is the data receiver.

6. The method according to claim 3, characterized in that Before the data sender sends its parameter data to the data receiver, the method further includes: The data sender determines whether its own parameter data is empty; In the case that the parameter data is not empty, the data sender sends its parameter data to the data receiver, and the data receiver stores the parameter data.

7. The method according to claim 6, characterized in that The method further comprises: When the parameter data is empty, a reminder message is issued to remind the user that the current power connection is wrong.

8. The method according to claim 3, characterized in that Before the data sender sends its parameter data to the data receiver, the method further includes: The data receiving party determines whether the parameter data is empty; In the case that the parameter data is empty, the data sender sends its parameter data to the data receiver, and the data receiver stores the parameter data.

9. The method according to claim 8, characterized in that The method further comprises: When the parameter data is not empty, a reminder message is issued to remind the user that the current power connection is wrong.

10. The method according to claim 3, characterized in that: The data sender sends its parameter data to the data receiver, including: Using a safety verification mechanism to verify the parameter data; If the verification passes, the storage is determined to be successful.