KR101767723B1 - Method for verifying plc instruction using ld program - Google Patents
Method for verifying plc instruction using ld program Download PDFInfo
- Publication number
- KR101767723B1 KR101767723B1 KR1020150067458A KR20150067458A KR101767723B1 KR 101767723 B1 KR101767723 B1 KR 101767723B1 KR 1020150067458 A KR1020150067458 A KR 1020150067458A KR 20150067458 A KR20150067458 A KR 20150067458A KR 101767723 B1 KR101767723 B1 KR 101767723B1
- Authority
- KR
- South Korea
- Prior art keywords
- program
- plc
- information
- command
- verifying
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/04—Programme control other than numerical control, i.e. in sequence controllers or logic controllers
- G05B19/05—Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Automation & Control Theory (AREA)
- Programmable Controllers (AREA)
Abstract
The present invention relates to a method for verifying PLC commands executed in a PLC system. The present invention includes a PLC system selecting step, a step of extracting input data and prediction data of a PLC command from a test case, a step of loading an LD program into a PLC system, a step of inputting input data into an LD program, Extracting a result as output data, and verifying the PLC command by comparing the predicted data and the output data. According to the present invention, it is possible to reduce the inconvenience of writing an LD program for each PLC command by verifying the PLC command by using the LD program, and it is advantageous to cope with the verification environment flexibly.
Description
The present invention relates to a method of verifying a PLC command executed in a PLC system, and more particularly, to a method of verifying a PLC command using an LD program.
The industrial automation equipment consists of mechanical equipment using relays and so on. In order to change an automation equipment composed of mechanical equipment, it is difficult to change the internal circuit wiring of the equipment. In order to overcome such difficulties, PLC (Programmable Logic Controller) system is used.
The PLC is a programmable logical controller, and the CPU module of the PLC system can execute various tasks by executing PLC commands. Therefore, in order to accurately control the PLC system applied to the automation equipment, it is important to verify the reliability of the PLC command, that is, to verify whether the PLC system performs the proper function according to the PLC command.
1 is a schematic diagram of a system for verifying conventional PLC commands. Referring to FIG. 1, the process of verifying a conventional PLC command is as follows. An automatic verification program for the PLC command verification is installed in the PC 101 and the PC 101 is connected to the
As described above, conventionally, most of the PLC command verification process is automatically performed through the automatic verification program, but the LD program for verifying the PLC command is generally manually generated by the programming of the manager.
2 is a flowchart of a conventional LD program creation process. First, the LD program creator executes a program editing tool (S202). The program editing tool may be provided with a library for generating the LD program. When the program creator selects (S204) and inserts (S206) a command to be verified, the program editing tool allocates a memory to the input / output operand (S208). Finally, the LD program created by the program editing tool is inspected (S210), and the LD program is created by repeating steps S204 to S208 for each PLC command.
However, considering that the number of PLC commands to be verified in the PLC system is several thousand, the process of manually generating the LD program for verifying the PLC commands is not a simple task, and there is a problem that it takes a lot of time and manpower do.
In addition, the conventional LD program includes dozens of instructions in the LD program in order to reduce the number of files. In this case, if an error occurs in the instruction or the peripheral logic, it is difficult to identify the exact cause. Particularly, when the size of the LD program exceeds the standard defined by the CPU module, the size of the LD program must be adjusted, and thus there is a problem that the LD program must be re-edited.
According to the present invention, an LD program is automatically generated according to a verification target to verify PLC commands, thereby reducing the inconvenience of manually creating an LD program for each verification target, and using an LD program capable of flexibly coping with the verification environment And to provide a PLC command verification method.
The objects of the present invention are not limited to the above-mentioned objects, and other objects and advantages of the present invention which are not mentioned can be understood by the following description and more clearly understood by the embodiments of the present invention. It will also be readily apparent that the objects and advantages of the invention may be realized and attained by means of the instrumentalities and combinations particularly pointed out in the appended claims.
According to an aspect of the present invention, there is provided a method of controlling a PLC system, the method comprising: selecting a PLC system to be tested for a PLC command; extracting input data and prediction data of a PLC command from a test case; loading an LD program into the PLC system; Inputting the input data into a program to execute the PLC command and extracting an execution result as output data; and verifying the PLC command by comparing the predicted data and the output data.
According to the present invention as described above, it is possible to reduce the inconvenience of manually creating an LD program for each verification target by automatically generating an LD program and verifying the PLC command according to the verification target, and coping with the verification environment flexibly There are advantages to be able to.
1 is a schematic diagram of a system for verifying conventional PLC commands;
2 is a flowchart of a conventional LD program creation process.
3 is a configuration diagram of a PLC command verification system using an LD program according to an embodiment of the present invention.
4 is a flowchart of a method of generating an LD program according to an embodiment of the present invention.
5 is a schematic diagram of a process of generating an LD program according to an embodiment of the present invention.
6 is a schematic diagram of an LD program according to an embodiment of the present invention.
The above and other objects, features, and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings, which are not intended to limit the scope of the present invention. In the following description, well-known functions or constructions are not described in detail since they would obscure the invention in unnecessary detail. Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the drawings, the same reference numerals are used to denote the same or similar elements.
The present invention aims to shorten the time required for manually generating an LD program for PLC command verification for use in a system or apparatus for automatically verifying a conventional PLC command.
Particularly, according to an embodiment of the present invention, by creating an LD program based on a script language, it is possible to greatly shorten the creation time compared to a process of creating an LD program using a conventional PLC program editing tool, Various related logic can be designed.
In addition, according to the present invention, it is possible to solve the problem that it is difficult to identify the cause of the instruction error by including a plurality of instructions in one LD program and the problem that the program size is limited for verifying the new CPU module.
3 is a configuration diagram of a PLC command verification system using an LD program according to an embodiment of the present invention. Referring to FIG. 3, the PLC command verification system of the present invention includes a
The
The
More specifically, the
The
The test
The test case may be recorded in the
The
The
On the other hand, an LD program corresponding to the PLC system may not exist. In this case, a new LD program can be generated through the LD
In one embodiment of the present invention, the LD
Test case information may be recorded in the
When the LD program is written in a script language, the
4 is a flowchart of a method of generating an LD program according to an embodiment of the present invention. As described above, in the case where a PLC command is automatically verified by executing an LD program generated in advance through the
Referring to FIG. 4, PLC command information to be verified is first extracted from the command database 352 (S402). Here, the PLC command information may include the number information of the input operand, the number information of the output operand, the type information of the input operand, the type information of the output operand, and the command identification information.
Then, the CPU module information is extracted from the parameter database 354 (S404). Specifically, the CPU module information may include basic parameter information, input / output parameter information, program size information, and device information of a CPU module to be subjected to PLC command verification.
Then, test case information is extracted from the test case database 350 (S406). Here, the test case information may include an input operand value included in the input data, an output operand value included in the output data, and a flag value.
That is, the information necessary for creating the LD program, that is, the PLC command information, the CPU module information, and the test case information can be extracted through steps S402 to S406. When the specifications of the PLC command information, the CPU module information, and the test case information are changed, the contents of the
Finally, an LD program is generated (S408). As described above, the LD program can be generated using the PLC command information, the CPU module information, and the test case information extracted through the steps S402 to S406.
In the embodiment of the present invention, a PLC command verification method using an LD program can be performed as follows.
First, the
The test
Then, the
Finally, the
5 is a schematic diagram of an LD program generation process according to an embodiment of the present invention. Referring to FIG. 5, parameters of CPU type of the PLC system can be stored in an automatic verification program as a separate file. The information related to the CPU module includes basic parameter information, input / output parameter information, and device size information.
5, the verification target instruction word information is retrieved from the
In addition, an XML file, that is, an LD program, can be generated for each instruction using instruction information, CPU module information, and test case information retrieved from a database.
On the other hand, since the LD program of the present invention includes only one command verification logic in one file, the LD program of the present invention is not limited by the program size required by the CPU module. This means that it is possible to generate an LD program that has more logic than the conventional one in verifying PLC commands.
As a result, since the conventional LD program structure includes a plurality of logic and instructions in one file, if an error occurs in the PLC command, it is determined whether the cause is caused by the PLC command or by the surrounding logic Can not be judged. However, since the LD program of the present invention has a simple logic form for verifying one PLC command in the project, the cause of the error can be limited to the PLC command, which facilitates debugging.
In addition, although it has a logic structure for verifying one PLC command in one project, since it is a structure that creates a project in real time referring to information of a database and deletes the project when verification is completed, it requires a separate file management Do not.
6 is a structural diagram of an LD program according to an embodiment of the present invention. Specifically, the LD program related table structure is shown in Fig. Specifically, the LD program of the present invention can have the following structure.
In FIG. 6, < CPU PARAMETER > is parameter information of the CPU module to be verified. Here, the parameter may include a basic parameter and an input / output parameter.
<GlobalTags> defines a global variable and a global variable, and can be accessed or changed by accessing from a function in the program. In <UDF>, a user-defined function is declared, and variables related to the user-defined function are defined. However, <UDF> has a structure that can declare a large number of user-defined functions. However, since it is aimed to generate one logic in one project file for automatic verification, several user-defined functions may not be used.
In <SCAN PROGRAM>, program name, language, and variables can be defined. In the 'Rung Tag', command types such as contact point, coil, and FU / FB can be defined. In 'Coordinate', lines such as horizontal line and vertical line can be defined. In addition, 'Name' may define the identification information of the command, and 'Param' may define the input and output operands of the PLC command.
While the present invention has been described in connection with what is presently considered to be practical exemplary embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, but, on the contrary, But the present invention is not limited thereto.
Claims (6)
Selecting a PLC system to be a verification target of the PLC command;
Extracting input data and predictive data of a PLC command from a test case;
Loading an LD program;
Inputting the input data to the LD program to execute the PLC instruction, and extracting an execution result as output data; And
Comparing the predicted data and the output data to verify a PLC command,
The LD program
Generated by using previously stored PLC command information, CPU module information, and test case information
A Method of Verifying PLC Commands Using LD Program.
The step of loading the LD program into the PLC system
And generating a new LD program when there is no LD program corresponding to the PLC system
A Method of Verifying PLC Commands Using LD Program.
The step of generating the LD program
Extracting the PLC instruction information from an instruction database;
Extracting the CPU module information from a CPU database;
Extracting the test case information from a test case database; And
Generating an LD program using the PLC command information, the CPU module information, and the test case information
A method of verifying a PLC command using an LD program.
The PLC command information
Including at least one of information on the number of input operands of the PLC instruction to be verified, the number of output operands, type information of the input operand, type information of the output operand,
A Method of Verifying PLC Commands Using LD Program.
The CPU module information
Information including at least one of basic parameter information of the CPU module, input / output parameter information, program size information, and device information
A Method of Verifying PLC Commands Using LD Program.
The test case information
An input operand value, an output operand value, and a flag value
A Method of Verifying PLC Commands Using LD Program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150067458A KR101767723B1 (en) | 2015-05-14 | 2015-05-14 | Method for verifying plc instruction using ld program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020150067458A KR101767723B1 (en) | 2015-05-14 | 2015-05-14 | Method for verifying plc instruction using ld program |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20160134996A KR20160134996A (en) | 2016-11-24 |
KR101767723B1 true KR101767723B1 (en) | 2017-08-14 |
Family
ID=57705714
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020150067458A KR101767723B1 (en) | 2015-05-14 | 2015-05-14 | Method for verifying plc instruction using ld program |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101767723B1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3822799A4 (en) * | 2018-08-17 | 2022-02-16 | Siemens Ltd. China | Address identification method, apparatus and system, and storage medium, processor and terminal |
-
2015
- 2015-05-14 KR KR1020150067458A patent/KR101767723B1/en active IP Right Grant
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3822799A4 (en) * | 2018-08-17 | 2022-02-16 | Siemens Ltd. China | Address identification method, apparatus and system, and storage medium, processor and terminal |
Also Published As
Publication number | Publication date |
---|---|
KR20160134996A (en) | 2016-11-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103279418B (en) | A kind of method of testing of configuration control information and device | |
US11068379B2 (en) | Software quality determination apparatus, software quality determination method, and software quality determination program | |
CN111552475B (en) | Method, method and system for compiling work load test file for aging test of semiconductor memory | |
CN103049374B (en) | Automatic testing method and device | |
CN111625434A (en) | Database OLTP benchmark performance test method, system and related components | |
CN111124870A (en) | Interface testing method and device | |
CN116245074A (en) | Chip verification method, device and storage medium | |
CN111367890A (en) | Data migration method and device, computer equipment and readable storage medium | |
CN114924737A (en) | Battery management system source code integration test method and device and electronic equipment | |
KR101767723B1 (en) | Method for verifying plc instruction using ld program | |
KR20190094779A (en) | Automatically Generate Device for PLC Instruction Compiler Test-Case | |
KR102271857B1 (en) | Test automation system | |
JP4488227B2 (en) | Debugging method of control component having variability and debugging support apparatus | |
JP2012181666A (en) | Information processing device, information processing method and information processing program | |
CN111831554A (en) | Code checking method and device | |
CN113094251A (en) | Embedded system testing method and device, computer equipment and storage medium | |
CN114578210B (en) | Mainboard testing method, device, equipment and storage medium | |
CN108132799B (en) | Inter-process static program analysis information extraction method, device and equipment | |
US20190286453A1 (en) | System construction assisting apparatus, method, and program | |
KR101534493B1 (en) | Source code security weakness detection apparatus and method based on structure conversion | |
JP4488231B2 (en) | Program management device | |
KR101716480B1 (en) | Apparatus for inputting test-case using gui | |
CN110704318B (en) | Map data automatic testing method, terminal device and storage medium | |
JP4609655B2 (en) | Attached data generator for program parts | |
US8141039B2 (en) | Method and system for consolidating machine readable code |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |