Apparatus for program management of programmable logic controller
AssigneeLsis Co., Ltd.
InventorSang Hun Lee
Life of this patent
Estimating the term…
Abstract
An execution code of a user program applicable to a PLC is fitted and arranged to an adequate block among memory blocks of variable sizes, and execution order and position information of each execution code are downloaded to the PLC along with recorded execution table. A CPU module of PLC sequentially executes each execution code randomly arranged on a memory with reference to the execution table. Because an execution code is loaded on a memory block having respectively different sizes such as N, 2N and 4N, utilization of non-use space can be improved over a conventional allocation method of fixed size. An execution table is utilized to discontinuously configure a program execution area, whereby a user program can be easily modified or added during PLC operation.
Claims4
An apparatus having a processor, for program management of a PLC (Programmable Logic Controller) in order to provide a plurality of execution codes of a plurality of user programs using a CPU module managing the PLC by executing a main operation program of the PLC, the apparatus for program management of the PLC performing steps of:
- generating the plurality of execution codes of the plurality of user programs by compiling a plurality of source codes;
- allocating a memory block adequate to a size of each of the plurality of execution codes based on memory configuration information as to what memory blocks a memory is formed with;
- arranging each of the plurality of execution codes at a position of the memory block allocated;
- generating an execution table recorded with execution order and position information of each of the plurality of execution codes;
- and
- downloading the plurality of execution codes and the execution table to the CPU module of the PLC, wherein the execution table includes an area stored with the execution order of each of the plurality of execution codes and the position information of each of the plurality of execution codes, wherein the execution table further includes a preservation area to a non-used memory, and wherein when a new user program is added during an execution of the plurality of user programs, the new user program is added to the preservation area to regenerate a modified execution table, and
- wherein the size of the memory block is formed with an integer of preset basic size (N),
- where the apparatus searches an effective memory block, starting from a first size obtained by:
- calculating ‘CELL (modified size of execution code÷N), which outputs a first value, and
- multiplying the first value with N, which outputs the first size,
- wherein CEIL (modified size of execution code÷N) is a function representing a minimum integer number larger than a second value obtained dividing the modified size of the execution code by N, and
- wherein responsive to determining that the effective memory block is not available at the first size,
- the effective memory block is increased by the preset basic size (N) until the size of the effective memory block becomes greater than a regulated maximum block size.
Dependencies are inferred from the claim text.