# US 2014/0207254 A1 · Cpu unit for plc, plc-use system program, recording medium in which plc-use system program is stored, plc system, plc support device, plc support program, and recording medium in which plc support program is stored

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2014/0207254 A1
- Document ID: US20140207254A1
- Status: Published application
- Kind: A1
- Application number: 14/125,997
- Filed: 2012-03-12
- Published: 2014-07-24
- Earliest claimed: 2011-07-15
- Assignees: OMRON Corporation
- Inventors: Yoshihide Nishiyama; Shigeyuki Eguchi; Osamu Hamasaki
- Web page: https://patentgrep.com/patent/US20140207254A1

## CPC

- G05B 19/04: Program control other than numerical control, i.e. in sequence controllers or logic controllers (G05B19/418 takes precedence)
- G05B 19/056: {Programming the PLC}
- G06F 9/4887: {involving deadlines, e.g. rate based, periodic}
- G05B 19/0421: {Multiprocessor system}
- G05B 19/05: Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
- G05B 2219/15079: Multitasking, real time multitasking
- G05B: CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS (systems for controlling or regulating non-electric variables G05D; systems for regulating electric or magnetic variables G05F; control devices or systems insofar as characterised by mechanical features only G05G)
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system program includes a procedure library in which at least a procedure for controlling execution of a control program and a procedure for controlling output of output data and input of input data are included. If schedule-building data including execution order specifications for the procedures included in the procedure library is stored in a storage section, the system program causes a microprocessor to execute the procedures included in the procedure library in accordance with the procedure execution order specifications included in schedule-building data.

## Claims

### Claim 1

A CPU unit in a PLC configured to control a control target, the CPU unit comprising:
a microprocessor;
a storage section; and
a communication circuit, wherein:
the storage section is used to store a system program, a control program, and schedule-building data;
the microprocessor executes the system program and the control program stored in the storage section;
the communication circuit transmits output data generated through execution of the control program and receives input data to be used in execution of the control program;
the system program includes a procedure library in which at least a procedure for controlling execution of the control program and a procedure for controlling output of the output data and input of the input data are included; and
if the schedule-building data including execution order specifications for the procedures included in the procedure library is stored in the storage section, the system program causes the microprocessor to execute the procedures included in the procedure library in accordance with the procedure execution order specifications included in schedule-building data.

### Claim 2 (depends on 1)

The PLC's CPU unit according to claim 1, wherein:
the schedule-building data includes specifications necessary to generate a thread by using the procedures included in the procedure library; and
the system program includes processing configured to generate the thread in accordance with specifications for generating the thread included in the schedule-building data, as preparatory processing for performance of control actions by the PLC.

### Claim 3 (depends on 2)

The PLC's CPU unit according to claim 2, wherein the schedule-building data includes, as data about the thread, specifications necessary to activate any other threads when the thread is being executed.

### Claim 4 (depends on 2)

The PLC's CPU unit according to claim 2, wherein:
the schedule-building data includes specifications necessary to set a task which includes one or a plurality of the threads and provides a unit for repetitive execution; and
the system program includes processing configured to set the task in accordance with specifications necessary to set the task included in the schedule-building data, as the preparatory processing for the control actions by the PLC.

### Claim 5 (depends on 1)

The PLC's CPU unit according to claim 1, further comprising a schedule-building data acquisition section configured to acquire the schedule-building data.

### Claim 6 (depends on 1)

The PLC's CPU unit according to claim 1, wherein the schedule-building data including the procedure execution order specifications necessary to repeat transmission of the output data, reception of the input data, and execution of the control program configured to generate the output data by using the input data is stored in the storage section.

### Claim 7 (depends on 6)

The PLC's CPU unit according to claim 6, further comprising a section configured to set a period of a control cycle, wherein:
the communication circuit transmits the output data and receives the input data for each control cycle; and
the schedule-building data includes specifications of the procedure execution order necessary to cause the microprocessor to start execution of the control program after transmission of the output data and reception of the input data by the communication circuit in the control cycle next to that in which execution of the control program is finished and execute an unexecuted portion of the control program in the control cycle next to that in which execution of the control program is not finished.

### Claim 8 (depends on 6)

The PLC's CPU unit according to claim 6, wherein:
the system program includes, as the preparatory processing for performance of the control actions by the PLC:
processing configured to generate in the storage section a reception buffer in which the received input data is stored; and
processing configured to generate in the storage section an input synchronization buffer to be used as a reference destination when the control program references the input data for each of the input data pieces; and
the schedule-building data includes specifications of the procedure execution order necessary to cause the microprocessor to execute:
input copy processing configured to copy the received input data from the reception buffer to the input synchronization buffer compatible with this input data; and
control program initiation processing configured to start execution of the control program.

### Claim 9 (depends on 8)

The PLC's CPU unit according to claim 8, wherein:
the input data is received for each of the control cycles; and
the schedule-building data includes specifications of the procedure execution order necessary to cause the microprocessor to start the control program initiation processing for each execution cycle which includes an integral multiple of the control cycle and execute the input copy processing on the input data received in the control cycle in which the execution cycle of the control program is started.

### Claim 10 (depends on 8)

The PLC's CPU unit according to claim 8, wherein:
the system program further includes, as the preparatory processing for performance of the control actions by the PLC:
processing configured to generate in the storage section a transmission buffer configured to store output data to be transmitted; and
processing configured to generate in the storage section an output synchronization buffer in which the output data to be copied to the transmission buffer is stored for each of the output data pieces; and
the schedule-building data further includes specifications of the procedure execution order necessary to cause the microprocessor to execute output copy processing configured to copy the output data from the output synchronization buffer to the transmission buffer.

### Claim 11 (depends on 10)

The PLC's CPU unit according to claim 10, wherein the schedule-building data includes specifications of the procedure execution order necessary to cause the microprocessor to execute the control program initiation processing in each execution cycle which includes an integral multiple of the control cycle and execute the output copy processing at timing when the output data generated through execution of the control program in the previous execution cycle is transmitted from the transmission buffer in the first control cycle of the execution cycle of the control program.

### Claim 12 (depends on 6)

The PLC's CPU unit according to claim 6, wherein:
the storage section is further used to store attribute data about a variable to be used by the control program;
the attribute data can include specifications of one owner side control program that can rewrite a variable if the variable is a global variable referenced by a plurality of the control programs and specifications of one or a plurality of referrer side control programs that can reference only this variable;
the system program includes, as the preparatory processing for performance of the control actions by the PLC:
processing configured to generate in the storage section a global variable region in which the global variables are stored; and
processing configured to generate in the storage section a variable synchronization buffer to be used as a reference destination in place of the global variable region by each of the referrer side control programs when the referrer side control program references the global variables for each of the global variables referenced by the referrer side control program; and
the schedule-building data includes specifications of the procedure execution order necessary to cause the microprocessor to execute:
owner side initiation processing configured to start execution of an owner side control program;
variable copy processing configured to copy the global variable to be rewritten by the owner side control program from the global variable region to the variable synchronization buffer compatible with this global variable if execution of the owner side control program ends; and
referrer side initiation processing configured to start execution of the referrer side control program.

### Claim 13 (depends on 6)

The PLC's CPU unit according to claim 6, wherein:
the control program includes a motion computing program configured to calculate a motion command value used to control motion of a motor and a user program which is created in compliance with a user's control purpose and includes processing configured to supply the motion computing program with directives necessary for its execution; and
the schedule-building data includes specifications of the procedure execution order necessary to cause the PLC's CPU unit to repeatedly perform transmission of the output data as well as reception of the input data by use of the communication circuit, execution of the user program, and execution of the motion computing program in this order.

### Claim 14 (depends on 6)

The PLC's CPU unit according to claim 6, wherein:
the communication circuit transmits the output data and receives the input data in a period of the control cycle;
the control program includes a first control program and a second control program;
the first control program includes a first motion computing program configured to generate first motion command value data necessary to control motion of a motor;
the second control program includes a second motion computing program configured to generate second motion command value data necessary to control motion of the motor;
at least one of the first control program and the second control program includes a user program which is created in compliance with a user's control purpose and supplies the first motion computing program and the second motion computing program with directives necessary for their execution; and
the schedule-building data includes specifications of the procedure execution order necessary to cause the microprocessor to:
start execution of the first control program for each first execution cycle having the same period as that of the control cycle and execution of the second control program for each second execution cycle having twice or a larger integral multiple of the period of the control cycle; and
start execution of the second control program after execution of the first control program ends in the control cycle in which the second execution cycle starts and, if the second control program fails to end before this control cycle ends, start execution of an unexecuted portion of the second control program in the next control cycle after execution of the first control program ends.

### Claim 15 (depends on 6)

The PLC's CPU unit according to claim 6, wherein:
the microprocessor includes at least a first core and a second core;
the control program includes a first control program and a second control program; and
the schedule-building data includes specifications of the procedure execution order necessary to cause the first core to execute the first control program after transmission of the output data and reception of the input data end and the second core to execute the second control program concurrently with execution of the first control program.

### Claim 16

A PLC-use system program configured to be executed by a microprocessor after being stored in a storage section in a CPU unit in the PLC, the CPU unit comprising the microprocessor, the storage section, and a communication circuit to control a control target, wherein:
the storage section is used to store the system program, a control program, and schedule-building data;
the microprocessor is configured to execute the system program and the control program stored in the storage section;
the communication circuit is configured to transmit output data generated through execution of the control program and receive input data to be used in execution of the control program;
the system program includes a procedure library in which at least a procedure for controlling execution of the control program and a procedure for controlling output of the output data and input of the input data are included; and
if the schedule-building data including execution order specifications for the procedures included in the procedure library is stored in the storage section, the system program causes the microprocessor to execute the procedures included in the procedure library in accordance with the procedure execution order specifications included in schedule-building data.

### Claim 17 (depends on 16)

The PLC-use system program according to claim 16, wherein:
the schedule-building data includes specifications necessary to generate a thread by using the procedures included in the procedure library; and
the system program includes processing for generating the thread in accordance with specifications for generating the thread included in the schedule-building data, as preparatory processing for performance of control actions by the PLC.

### Claim 18 (depends on 17)

The PLC-use system program according to claim 17, wherein the schedule-building data includes, as data about the thread, specifications necessary to activate any other threads when the thread is being executed.

### Claim 19

A recording medium recording a PLC-use system program, the program configured to be executed by a microprocessor after being stored in a storage section in a CPU unit in the PLC, the CPU unit comprising the microprocessor, the storage section, and a communication circuit to control a control target, wherein:
the storage section is used to store the system program, a control program, and schedule-building data;
the microprocessor is configured to execute the system program and the control program stored in the storage section;
the communication circuit is configured to transmit output data generated through execution of the control program and receive input data to be used in execution of the control program;
the system program includes a procedure library in which at least a procedure for controlling execution of the control program and a procedure for controlling output of the output data and input of the input data are included; and
if the schedule-building data including execution order specifications for the procedures included in the procedure library is stored in the storage section, the system program causes the microprocessor to execute the procedures included in the procedure library in accordance with the procedure execution order specifications included in schedule-building data.

### Claim 20 (depends on 19)

The recording medium recording the PLC-use system program according to claim 19, wherein:
the schedule-building data includes specifications necessary to generate a thread by using the procedures included in the procedure library; and
the system program includes processing configured to generate the thread in accordance with the thread generating specifications included in the schedule-building data, as preparatory processing for performance of control actions by the PLC.

### Claim 21 (depends on 20)

The recording medium recording the PLC-use system program according to claim 20, wherein the schedule-building data includes, as data about the thread, specifications necessary to activate any other threads when the thread is being executed.

### Claim 22 (depends on 5)

A PLC system comprising the PLC's CPU unit according to claim 5 and a PLC support device configured to support use of the PLC, wherein:
the PLC support device comprises a storage section and a computing unit;
the storage section is used to store a PLC support program and the schedule-building data; and
the PLC support program causes the computing unit to execute output processing necessary to output the schedule-building data in a manner such that the CPU unit in the PLC can acquire the schedule-building data.

### Claim 23

A PLC support device configured to support use of a CPU unit in a PLC configured to control a control target, the PLC's CPU unit comprising:
a procedure library in which at least a procedure for controlling execution of a control program and a procedure for controlling output of output data generated through execution of the control program and input of input data to be used in execution of the control program are included; and
a schedule-building data acquisition section configured to acquire schedule-building data that includes specifications of execution order of the procedures included in the procedure library, wherein:
the PLC support device comprises a storage section and a computing unit;
the storage section is used to store a PLC support program and the schedule-building data; and
the PLC support program causes the computing unit to execute output processing necessary to output the schedule-building data in a manner such that the CPU unit in the PLC can acquire the schedule-building data.

### Claim 24

A PLC support program configured to be executed in a PLC support device necessary to support use of a CPU unit in a PLC configured to control a control target, wherein
the PLC's CPU unit comprises:
a procedure library in which at least a procedure for controlling execution of a control program and a procedure for controlling output of output data generated through execution of the control program and input of input data to be used in execution of the control program are included; and
a schedule-building data acquisition section configured to acquire schedule-building data that includes specifications of execution order of the procedures included in the procedure library;
the PLC support device comprises a storage section and a computing unit;
the storage section is used to store a PLC support program and the schedule-building data; and
the PLC support program causes the computing unit to execute output processing necessary to output the schedule-building data in a manner such that the CPU unit in the PLC can acquire the schedule-building data.

### Claim 25

A recording medium recording a PLC support program, the PLC support program configured to be executed in a PLC support device necessary to support use of a CPU unit in a PLC configured to control a control target, wherein:
the PLC's CPU unit comprises:
a procedure library in which at least a procedure for controlling execution of a control program and a procedure for controlling output of output data generated through execution of the control program and input of input data to be used in execution of the control program are included; and
a schedule-building data acquisition section configured to acquire schedule-building data that includes specifications of execution order of the procedures included in the procedure library;
the PLC support device comprises a storage section and a computing unit;
the storage section is used to store a PLC support program and the schedule-building data; and
the PLC support program causes the computing unit to execute output processing necessary to output the schedule-building data in a manner such that the CPU unit in the PLC can acquire the schedule-building data.
