KR20130104453A - Cpu module of programmable logic controller system, method for program update of programmable logic controller system - Google Patents
Cpu module of programmable logic controller system, method for program update of programmable logic controller system Download PDFInfo
- Publication number
- KR20130104453A KR20130104453A KR1020120025954A KR20120025954A KR20130104453A KR 20130104453 A KR20130104453 A KR 20130104453A KR 1020120025954 A KR1020120025954 A KR 1020120025954A KR 20120025954 A KR20120025954 A KR 20120025954A KR 20130104453 A KR20130104453 A KR 20130104453A
- Authority
- KR
- South Korea
- Prior art keywords
- code
- instruction
- block
- program
- instruction code
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/06—Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/656—Updates while running
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
- G06F8/658—Incremental updates; Differential updates
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Automation & Control Theory (AREA)
- Stored Programmes (AREA)
Abstract
The present invention relates to a program update technology of a PLC system, wherein a program block for storing the currently executing executable code, a program block for storing a newly downloaded executable code, and the latest instruction are stored in a memory of the PL system. An instruction code block for storing code and an instruction address table for storing the addresses of the instruction codes stored in the instruction code block are respectively maintained. Branching from executable code to instruction code is done indirectly through the instruction address table. Since the memory copy for program block switching is skipped during 'correction during run' of the PSI system, the program switching time is shortened. It can increase the size of the executable code area.
Description
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a programmable logic controller (PLC) system. In particular, when a ladder program is compiled and updated in a running system, the memory can be used more efficiently and the program switching time can be shortened. To help.
The PL system is widely used as an industrial control system. After reading input data from the input module, the program is executed once from the beginning to the end, and the result of writing the result to the output module is called a scan. It is the PSI scan program that plays a role.
There are many functions or function blocks in the PI system, which are PI instructions for performing various operations or functions. The PI system can add, modify or delete instructions in the ladder program without stopping the currently running scan program. This is called 'modification during run'.
The PI system downloads the newly added instruction and executable code to update the new program block.
Downloading and switching to a new program are performed in several scan times. Because many scans are indefinitely longer at one time, the PSI system downloads by dividing the scan time into several scan times. When the download is complete, the program blocks are switched to execute a new program.
FIG. 1 shows a program block when a program is downloaded to a run state for the first time after a download to a stopped system.
When the user downloads the ladder program to the paused PSI system, one program block PB1 has the
FIG. 2 shows a program block when a ladder program is modified through a 'correction in run' function in the PFC system in the run state.
When the user updates the program through the 'modify during run' function, another program block PB2 becomes an executable program block, and the newly downloaded
The existing
That is, the conventional PSI system is composed of two or more program blocks, each of the execution code and the used instruction code is stored in each program block, if the 'modification during run' the entire previously used instruction code is a different program The process is copied to the block.
For this reason, the more instruction codes used, the longer the memory copy time, the longer the program block switching time. The more 'modification during run', the more wasted the memory, and as many new instructions are added and the number of 'modification during run' is increased, most of the program blocks are occupied by the instruction code. There is nothing else. In addition, when a user deletes an existing command, the command is copied as it is.
Accordingly, the present invention has been made to solve the above problems, and separates the block for storing the execution code and the block for storing the instruction code, and the instruction code is indirectly referred to through the instruction address table, Its purpose is to allow program modifications to be performed quickly and to use memory more efficiently by allowing modifications during run without copying the instruction codes.
In order to achieve the above object, the CPU module of the PL system according to the present invention, a memory for storing the execution code and instruction code of the program for operating the PID system, and the execution code and instruction code stored in the memory It comprises a control unit for sequentially processing.
In this case, a program block for storing the currently executing execution code, another program block for storing the newly downloaded execution code, an instruction code block for storing the latest instruction code, and an instruction code stored in the instruction code block. Each instruction address table is stored, which stores its address.
Each of the program block and the instruction code block is composed of different blocks, and branching from the execution code to the instruction code is indirectly made through the instruction address table.
When the command code is updated, the controller may modify only a portion that is changed in the command code block and the command address table.
The controller may perform an update on the execution code or the command code while the execution code is executed.
The size of the command address table may be set to designate all addresses of all commands of the PSI system.
According to the present invention, there is provided a method of processing a program update of a PID system, the method comprising: starting a program update while executing the execution code stored in the first program block; If the new update relates to executable code, downloading the executable code and storing the executable code in a second program block; If the new update relates to an instruction code, downloading the instruction code and updating the instruction code block; And updating the instruction address table for storing the addresses of the instruction codes when the instruction code block is updated.
Each of the program block and the instruction code block is composed of different blocks, and the execution code is configured such that branching to the instruction code is indirectly made through the instruction address table.
According to the present invention, since the memory copy for program block switching is omitted during the 'modification during run' of the PSI system, the program switching time is shortened.
Instruction code is indirectly referenced using a memory address table. Therefore, it is not necessary to modify the execution code every time according to the modification of the instruction code, so it is easy to apply the modified / modified existing instruction and apply the new instruction code immediately without stopping the PSI system when modifying or adding the function. have.
Since the block that stores the execution code and the block that stores the instruction code are separated, there is no need to have the instruction code double, which reduces the memory usage, and the entire program block can be used as the execution code area, which increases the program memory capacity. .
1 and 2 illustrate an example of a memory structure related to a 'correction during run' function of a conventional PFC system.
Figure 3 is an embodiment of a CPU module of the PI system according to the present invention,
4 is a specific example of a memory structure when 'modification in run' is made according to the present invention;
5 is an embodiment of a program update processing method of a PSI system according to the present invention;
6 illustrates an example in which branching to an instruction code is indirectly made through an instruction address table.
Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.
FIG. 3 shows an overview of the PIC system. The
The
The
In particular, a user writes a program to be applied to the
When the update starts, the control unit 31-1 of the
At this time, the controller 31-1 may update the execution code or the command code while the current program is being executed. As described above, this feature is called 'editing during run'.
Execution code refers to a ladder program is converted into a program code that is actually executed in the
On the other hand, in the memory 31-2 of the
Conventionally, execution code and instruction code exist together in a program block, but in the present invention, each program block and instruction code block are separated.
The
In the case where the instruction code is updated, the instruction code to be added is added to the
When the contents of the
The instruction code referred to by the execution code is indirectly referred to through the instruction address table, rather than referring to the instruction code as conventionally.
That is, when referring to the instruction code in the execution code, refer to the instruction address table 44 having the address of the instruction code, and branching from the execution code to the instruction code is indirectly made through the instruction address table 44.
The size of the instruction address table 44 can be set to specify all addresses for the entire instruction code of the PSI system. For example, if there are n total instruction codes of the PI system, and 32 bits are used for addressing each instruction code, the size of the instruction address table 44 is 'n × 32' bits.
This does not mean that the instruction address table 44 should always have an address value for the entire instruction code, but that it is always ready to respond as the number of instruction codes used in the executable code increases.
That is, the instruction address table 44 only needs to have an address for the instruction code used in the latest execution code.
3 is only an example schematically illustrated for explanation. That is, the
4 illustrates an example of a memory state in which a program is updated through a 'correction during run' function according to the present invention.
The newly downloaded execution code 42-1 is stored in the
Instruction address table 44 stores the actual address of each instruction code in
In the
Even if a new executable code is downloaded through the 'modification in run' function, the executable code refers to the instruction address table 44, so if the instruction code is not modified, there is no need to change the instruction address table 44.
In addition, even if a new instruction code is added, program block conversion can be completed quickly because it is not necessary to copy existing instruction codes to a program block as in the related art.
If the size or operation of the instruction code is changed due to the addition or modification of the function of the existing instruction code, the changed instruction code is added to the
Referring to FIG. 5, an embodiment of a program updating method of a PSI system according to the present invention will be described.
First, the PSI system starts program update while executing the execution code stored in the first program block (S211).
If the update relates to the execution code, the execution code is downloaded and stored in the second program block (S212, S213).
The first program block and the second program block are relative to each other. The block in which the currently executing executable code is stored is called a first program block, and the block in which the new executable code is updated is called a second program block.
If the new update relates to the command code (S214), the command code block is downloaded and the command code block is updated (S215). That is, the added command code is added to the command code block, the modified command code is modified in the command code block, and the deleted command code is deleted from the command code block.
When the command code block is updated, the command address table for storing the address of the command codes is updated together (S216).
That is, since the latest command code is maintained in the command code block, when the address of each command code in the command code block changes due to the update of the command code, the command address table must also be updated.
In this case, the contents of the instruction code block are changed so that only the item whose address for each instruction code is changed is changed.
When the update is completed, the newly downloaded executable code starts to be executed in the second program block (S217, S218).
The block where the execution code of the program is stored and the block where the instruction code is stored are separated from each other, and the branching from the execution code to the instruction code is indirectly made through the instruction address table.
Referring to FIG. 6, when an execution code of a program block is sequentially executed, when an instruction code is to be processed (61), a branch to a code block in which an actual instruction code is located must be performed.
In this case, an address having a corresponding command code is queried from the command address table (62), and branches to the corresponding command code using the queried address (63). The branching address here is one of the addresses assigned to the instruction code block.
It is to be understood that the present invention is not limited to the above-described embodiment, and various changes and modifications may be made by those skilled in the art without departing from the technical spirit of the present invention. to be.
20: management computer 30: Fielcy system
31: CPU module 31-1: control unit
31-2: Memory 41: First program block
42: second program block 43: instruction code block
44: instruction address table
Claims (6)
A program block in which the execution code currently executed is stored in the memory;
Another program block that stores the newly downloaded executable code,
The instruction code block in which the latest instruction code is stored,
Each instruction address table for storing the addresses of the instruction codes stored in the instruction code block is maintained.
Each of the program block and the instruction code block is composed of different blocks,
Branching from the execution code to the instruction code is CPU module of the system, characterized in that the indirect through the instruction address table.
The controller of the CPU system of the PSI system, characterized in that for modifying only the portion that is changed in the instruction code block and instruction address table when the instruction code is updated.
The control unit CPU module of the PSI system, characterized in that for performing the update to the execution code or instruction code while the execution code is executed.
The size of the instruction address table is CPU module of the PCI system, characterized in that configured to be able to specify all the addresses for the entire instruction of the PID system.
If the new update relates to executable code, downloading the executable code and storing the executable code in a second program block;
If the new update relates to an instruction code, downloading the instruction code and updating the instruction code block; And
If the instruction code block is updated, updating the instruction address table for storing the addresses of the instruction codes,
And each of the program block and the instruction code block comprises different blocks.
And the execution code is configured such that branching to the instruction code is indirectly made through the instruction address table.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020120025954A KR20130104453A (en) | 2012-03-14 | 2012-03-14 | Cpu module of programmable logic controller system, method for program update of programmable logic controller system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020120025954A KR20130104453A (en) | 2012-03-14 | 2012-03-14 | Cpu module of programmable logic controller system, method for program update of programmable logic controller system |
Publications (1)
Publication Number | Publication Date |
---|---|
KR20130104453A true KR20130104453A (en) | 2013-09-25 |
Family
ID=49453289
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020120025954A KR20130104453A (en) | 2012-03-14 | 2012-03-14 | Cpu module of programmable logic controller system, method for program update of programmable logic controller system |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR20130104453A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10824128B2 (en) | 2018-05-03 | 2020-11-03 | Lsis Co., Ltd. | Device for processing programmable logic controller program |
-
2012
- 2012-03-14 KR KR1020120025954A patent/KR20130104453A/en not_active Application Discontinuation
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10824128B2 (en) | 2018-05-03 | 2020-11-03 | Lsis Co., Ltd. | Device for processing programmable logic controller program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101558832B1 (en) | Sequence-program debugging assistance apparatus | |
US20100161085A1 (en) | Peripheral device of programmable controller, method of variable substitution, and computer program product thereof | |
CN102147743A (en) | Method for accelerating startup of embedded system application program | |
KR102280116B1 (en) | Engineering apparatus, control method of engineering apparatus, and program | |
CN101334737A (en) | Embedded equipment start-up or reset method | |
CN105814545A (en) | Electronic device | |
KR20130104453A (en) | Cpu module of programmable logic controller system, method for program update of programmable logic controller system | |
JP2013084112A (en) | Programmable controller system, programming device thereof, programmable controller, program and debug method | |
JP6205934B2 (en) | Programmable controller system, its support device, program | |
JP6119452B2 (en) | Programmable controller system, its support device, programmable controller, program | |
JP5906609B2 (en) | Debug support program, debug support method, and debug support system | |
JP5669652B2 (en) | Programmable controller system and memory organizing method | |
CN106126211A (en) | A kind of MCU In-circuit programming system supporting debugging interface | |
JP6455096B2 (en) | Control system, its support device, programmable control device | |
JPWO2019229845A1 (en) | Program management system, programming support device, program management method, and programming support program | |
CN110442074B (en) | Processing device for programmable logic controller program | |
CN108008981B (en) | Method and device for initializing program in system on chip (SoC) | |
JP6319200B2 (en) | Programmable controller | |
CN103941631B (en) | A kind of programmable controller runs the method for Program undisturbed reconstruct | |
CN115145228A (en) | Process control system, process control device, and program update method | |
JP5660386B2 (en) | Memory allocation management device, memory allocation management method, memory allocation management program, and program creation system | |
JP6295914B2 (en) | Programmable controller system, its support device, programmable controller | |
KR102231963B1 (en) | An allocating method for memory for plc variables | |
CN109200581B (en) | Method and electronic device for controlling game role through python code | |
US10768597B2 (en) | Method and controller for flexible process control |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
WITN | Withdrawal due to no request for examination |