A safe downloading method for remote downloading program to prevent customers from making programming cards
By detecting the status bits of CTH200 and CTH300 series PLCs, and determining and prohibiting the programming card download mode or USB drive insertion, the problem of customer programming card usage in remote update of PLC is solved, and the protection measures for safe download are realized, avoiding program loss and economical loss.
Patent Information
- Application Number
- CN202110397266.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-13
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2041-04-13
AI Technical Summary
The existing PLC program remote update function cannot effectively prevent customers from inserting programming cards on the remote PLC, resulting in the risk of program loss and economic losses.
By detecting the different status bits of the CTH200 and CTH300 series PLCs, we can determine whether it is in the programming card download mode or a USB flash drive is inserted, and we can process it separately to prohibit the download operation and ensure that the PLC is in safe mode.
Effectively prevent customers from making programming cards on remote PLCs, avoiding programs being lost, and reducing the risk of economic losses.
Smart Images

Figure CN113094662B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of PLC, in particular to a safe downloading method for remotely downloading programs to prevent customers from making programming cards. Background Art
[0002] The existing PLC program remote update function only opens a remote channel, and other operations are no different from local downloads. However, since the PLC is at the remote end, during the download process, the program owner cannot effectively judge and prevent the customer from inserting a programming card into the remote PLC to make a programming card that can load the program. There is a risk of program loss, causing economic losses.
[0003] To solve this problem, we previously combined the mechanism of PLC programming card to solve it by writing corresponding values into SMB100 before downloading. However, this method has three defects:
[0004] 1. SMB100, the default value is 0, which means unlimited download times. It can be set to 1-255, which means the number of times it can be used. Therefore, the minimum setting number is 1, which cannot completely prohibit customers from downloading.
[0005] 2. The method of writing 1 to SMB100 during downloading has also been tested in practice. It was found that after the download is completed, if the PLC is not powered off, writing other values again can take effect, which means that the number of downloads can be changed to unlimited times.
[0006] 3. There are differences in the production methods of programming cards for CTH300 and CTH200. CTH300 uses a USB flash drive to produce programming cards, and the number of downloads is directly configured through the programming software, which is invalid for SMB100. Summary of the invention
[0007] To achieve the above object, the present invention provides the following technical solution: a safe downloading method for remotely downloading programs to prevent customers from making programming cards, comprising the following steps:
[0008] S1: Power off the PLC, turn the switch to STOP and insert the programming card. The system first determines whether the PLC enters the programming card mode or inserts the programming card;
[0009] S2: The system detects the types of remote PLCs, including CTH200 and CTH300, and processes them separately;
[0010] S3: When the type of the remote PLC is detected to be CTH200, check whether the SM0.3 status bit is "0". If it is not "0", it means that the PLC is in STOP or programming card download mode. At this time, the system prompts to prohibit downloading and prompts to let the PLC run. If it is "0", the PLC is in normal operation mode;
[0011] S4: When it is detected that the type of the remote PLC is CTH300, check whether SM7.7 is "1". If not, it means that a USB flash drive is inserted into the PLC. The system prompts that the download fails and the USB flash drive is prohibited. If SM7.7 is "1", it means that the USB flash drive does not exist.
[0012] Preferably, the S1 also includes if the system detects a programming card or a programming card download mode, immediately prompting to prohibit downloading and should be set in the correct mode.
[0013] Preferably, neither the CTH200 nor the CTH300 PLC has a dedicated programming card download mode identification bit to provide for system judgment, and the CTH300 series programming card uses a USB flash drive to make the programming card.
[0014] Compared with the prior art, the present invention relates to a safe download method for remotely downloading programs to prevent customers from making programming cards. The method judges by processing the programming cards of CTH200 and CTH300 respectively. In the CTH200 series programming card download mode, the method judges whether it is in the programming card download mode by judging the value in the SM0.3 state. For the CTH300 programming card, the method performs a U disk detection by judging the value in the SM7.7 state to detect whether the CTH300 programming card is inserted, and prohibits interception. The method effectively judges and prevents customers from inserting programming cards in remote PLCs to make programming cards that can load programs, thereby avoiding the risk of program loss and economic losses. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 It is a schematic diagram of the download process of the CTH200 series programming card under the prior art of the present invention;
[0016] Figure 2 It is a schematic diagram of the overall programming card downloading process of the present invention. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0018] Example
[0019] like Figure 2As shown, first power off the PLC, turn the switch to STOP and insert the programming card. The system first determines whether the PLC enters the programming card mode or inserts the programming card. When the system detects that there is no card, it enters the normal mode and the STL system. When the system detects that there is a card, it immediately prompts to prohibit downloading and should be set to the correct mode. When the remote PLC type is CTH200 and CTH300, there is no special programming card download mode identification bit available for the system to judge. The system processes CTH200 and CTH300 separately.
[0020] Among them, when the type of the remote PLC is detected to be CTH200, check whether the SM0.3 status bit is "0". If it is not "0", it means that the PLC is in STOP or programming card download mode. At this time, the system prompts to prohibit downloading and prompts to let the PLC run. If it is "0", the PLC is in normal operation mode.
[0021] Among them, when the type of the remote PLC is detected to be CTH300, the test judges whether SM7.7 is "1". If it is not "1", it means that a USB flash drive is inserted into the PLC, and the system prompts that the download fails and the USB flash drive is prohibited. If SM7.7 is "1", it means that the USB flash drive does not exist;
[0022] In summary, the present invention makes judgments by processing the programming cards of CTH200 and CTH300 separately. In the CTH200 series programming card download mode, it judges whether it is in the programming card download mode by judging the value in the SM0.3 state. For the programming card of CTH300, a USB disk detection is performed by judging the value in the SM7.7 state to detect whether the programming card of CTH300 is inserted, and interception is prohibited. It effectively judges and prevents customers from inserting programming cards in remote PLCs, making programming cards that can load programs, avoiding the risk of program loss, and avoiding economic losses.
[0023] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0024] Although the present invention has been described above with reference to the embodiments, various modifications may be made thereto and parts thereof may be replaced with equivalents without departing from the scope of the present invention. In particular, as long as there is no structural conflict, the various features in the embodiments disclosed by the present invention may be used in combination with each other in any manner, and the fact that these combinations are not exhaustively described in this specification is only for the sake of omitting space and saving resources. Therefore, the present invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A safe downloading method for remote downloading program to prevent customers from making programming cards, characterized by: The steps include: S1: Power off the PLC, turn the switch to STOP and insert the programming card. The system first determines whether the PLC enters the programming card mode or inserts the programming card; S2: The system detects the types of remote PLCs, including CTH200 and CTH300, and processes them separately; S3: When the type of the remote PLC is detected to be CTH200, check whether the SM0.3 status bit is "0". If it is not "0", it means that the PLC is in STOP or programming card download mode. At this time, the system prompts to prohibit downloading and prompts to let the PLC run. If it is "0", the PLC is in normal operation mode; S4: When it is detected that the type of the remote PLC is CTH300, check whether SM7.7 is "1". If not, it means that a USB flash drive is inserted into the PLC. The system prompts that the download fails and the USB flash drive is prohibited. If SM7.7 is "1", it means that the USB flash drive does not exist.
2. A safe downloading method for remote downloading program to prevent customers from making programming cards according to claim 1, characterized in that: The S1 also includes that if the system detects a programming card or a programming card download mode, it will immediately prompt to prohibit downloading and should be set in the correct mode.
3. A safe downloading method for remote downloading program to prevent customers from making programming cards according to claim 1, characterized in that: The CTH200 and CTH300 PLCs do not have a dedicated programming card download mode identification bit to provide for system judgment. The CTH300 series programming card uses a USB flash drive to make the programming card.
