The present application claims priority under 35 U.S.C. ยง119 to Japanese Patent Application No. 2015-122869, filed Jun. 18, 2015. The contents of this application are incorporated herein by reference in their entirety.
1. Field of the Invention
The embodiments disclosed herein relate to a programmable controller.
2. Discussion of the Background
Japanese Unexamined Patent Application Publication No. 2003-167608 discloses a programmable controller that stores a sequence program prepared by the user in a program memory such as EEPROM.
According to one aspect of the present disclosure, a programmable controller to control a control machine includes an arithmetic processor, a non-volatile storage, a volatile storage, and a selection transferor. The non-volatile storage stores a plurality of control projects executable by the arithmetic processor to perform control processing of the control machine. The volatile storage is configured to store at least one control project among the plurality of control projects. The selection transferor is configured to select the at least one control project from among the plurality of control projects stored in the non-volatile storage and transfer the selected one control project to the volatile storage so that the arithmetic processor executes the at least one control project stored in the volatile storage.
A more complete appreciation of the present disclosure and many of the attendant advantages thereof will be readily obtained as the same becomes better understood by reference to the following detailed description when considered in connection with the accompanying drawings, wherein:
The embodiments will now be described with reference to the accompanying drawings, wherein like reference numerals designate corresponding or identical elements throughout the various drawings.
The programmable controller 1 is what is called an upper-level controller to control operation and information of control elements of the production machine 2 based on a control program and definition files stored in a memory, described later. In the illustrated example, the programmable controller 1 is provided with a power source 11, a CPU 13, a servo control unit 14, an I/O control unit 15, and a communication control unit 16, which correspond to slots S1 to S5 of the main body of the programmable controller 1 in ascending order. The CPU 13 includes the memory 12.
The power source 11 functions to convert three-phase AC power supplied from a commercial power source, not illustrated, into DC power and supply the converted power to each component of the programmable controller 1.
The CPU 13 (which is the arithmetic processor) functions to transmit and receive commands and information to and from each component of the programmable controller 1 based on a control program and a definition file (see
The production machine 2, described later, includes drive shafts (actuators) as the control elements. The servo control unit 14 is connected to each of the drive shafts and functions to output commands from the CPU 13 to the drive shafts.
The production machine 2, described later, includes auxiliary devices such as various sensors, lamps, and solenoids as the control elements. The I/O control unit 15 is connected to the auxiliary devices and functions to make commands and information input and output between the I/O control unit 15 and the CPU 13.
The communication control unit 16 is connected to programmable controllers of other machine control systems through suitable communication lines and functions to control transmission and reception of information to and from the CPU 13 so as to perform cooperation with the programmable controllers.
The servo control unit 14, the I/O control unit 15, and the communication control unit 16 each include a plurality of ports (which are the connectors), and are connected to a plurality of control elements of the production machine 2 and other programmable controllers through the ports. The plurality of ports are discriminated in advance as input and output ports of commands and information so as to specify the ports as hardware. In order to avoid complication of the illustration and facilitate description, assume that the servo control unit 14, for example, includes five ports P1, P2, P3, P4, and P5 in
One of a general-use personal computer 21 (abbreviated to general-use PC in FIG. 1; the same applies below), an engineering tool 22, and a touch panel 23 is connectable to the CPU 13. The general-use PC 21 is a tool for the developer and used for developing, for example, a control project, described later, including the control program (see
The production machine 2 is an assembly of mechanical elements to perform predetermined actions by driving movable portions by rotary or linear motors (actuators) incorporated in the production machine 2. Additionally, the production machine 2 performs cooperative control using auxiliary devices such as various sensors, lamps, and solenoids. Each of these motors and a servo amplifier (not illustrated) to control the motor will be referred to as drive shaft. The production machine 2 in the example illustrated in
As described above, the programmable controller 1 is connected to a plurality of control elements (drive shafts and auxiliary devices) of the production machine 2 through the ports. The CPU 13 performs the input and output of commands or information with respect to the control elements in accordance with the control program. Thus, the programmable controller 1 controls actions of the production machine 2. The plurality of ports of the programmable controller 1 itself are compatible with each other as hardware. Consequently, other than the control program, definition files are prepared in advance (see
A control program is prepared by, for example, the engineering tool and the general-use PC provided externally. A volatile RAM (see
In the development of the control program, generally, revision such as malfunction correction and addition of functions is repeatedly performed. In order to inspect malfunction of a new version, operation of the new version is often compared with operation of previous versions. When the programmable controller reads the control program from a component such as the engineering tool, however, reading is performed through, for example, communication interface and consequently takes time. When the control program is transferred from the engineering tool to the flash memory, transfer is performed through the RAM and consequently complicates work. Therefore, each time revision is repeated however slightly and comparison with operation of previous versions is performed, it is necessary to transfer the control program from the engineering tool to the flash memory. This transfer work takes time and labor and complicates the operation comparison.
In view of this, in this embodiment, the flash memory stores a plurality of control programs, and a selection transferor selects one of the plurality of control programs stored in the flash memory and transfers the selected control program to the RAM. Thus, the single programmable controller is capable of storing the plurality of control programs of different revised versions and executing each of the control programs case by case. Consequently, even when comparison of operation of the control programs is repeated, it is possible to reduce frequency of reading from the engineering tool and facilitate the operation comparison while saving time.
The flash memory 31 (which is the non-volatile storage) is what is called a non-volatile storage in which the stored contents are readable and rewritable when the power is supplied and from which the stored contents are not erased even when the power supply is interrupted. In this embodiment, the flash memory 31 stores a preserved project (control project) in each of two different storage areas. The preserved project is made up of a combination of one control program and one definition file. Basically, capacity allocation is set to uniformly allocate the overall storage capacity of the flash memory 31 to the number of the prepared storage areas (two in this embodiment). The control program describes a control procedure executable by the CPU 13 to perform the input and output of commands or information with respect to the control elements of the production machine 2 based on the definition file in the same control project. Detailed description will be made later on specific contents of the common control program and the definition files. The flash memory 31 may be replaced with a hard disk drive, which is also a non-volatile storage.
The RAM 32 (which is the volatile storage) is what is called a volatile storage in which the stored contents are readable and rewritable when the power is supplied and from which the stored contents are erased when the power supply is interrupted. The RAM 32 stores one execution project (control project) made up of the combination of the one control program and the one definition file transferred from the flash memory 31. The access speed of the RAM 32 is relatively high. The CPU 13 accesses and executes the execution project stored in the RAM 32 so as to increase the processing speed.
The ROM 33 is what is called a non-volatile storage in which the stored contents are only readable when the power is supplied and from which the stored contents are not erased even when the power supply is interrupted. In this embodiment, the ROM 33 stores a system program for, for example, transferring the control project from the flash memory 31 to the RAM 32 when the programmable controller 1 is powered (see
When the control project is transferred from the flash memory 31 to the RAM 32, the selection transferor 41 selects one of the plurality of storage areas in the flash memory 31 and transfers the control project (preserved project) stored in the selected storage area to the RAM 32. When the control project is transferred from the RAM 32 to the flash memory 31, an area designation transferor 42 selects one of the plurality of storage areas in the flash memory 31 and transfers the control project (execution project) stored in the RAM 32 to the selected storage area. In the example of this embodiment, the selection transferor 41 and the area designation transferor 42 each include a hardware switch such as a rotary switch. The operator manually operates the selection transferor 41 and the area designation transferor 42 so as to select the storage area in the flash memory 31 as an access target. It is noted that the selection transferor 41 and the area designation transferor 42 may be arranged to set the contents of a system register (not illustrated) in the CPU 13 so as to select the storage area by means of software. The selection transferor 41 and the area designation transferor 42 may be integral to each other.
It is noted that since the ports P1 to P5 are compatible with each other as hardware, as described above, the contents of the definition file may have various combinations other than the illustrated example. It suffices that the ports P1 to P5 and the drive shafts A to D are actually connected in accordance with combinations of definition files.
In a non-limiting embodiment, an exclusive control program that is executed in accordance with only the above-described standard +first option definition file illustrated in
With the storage configuration of the memory 12 illustrated in
Next, the operator sets by the selection transferor 41 the preserved project stored in which of the storage areas in the flash memory 31 is transferred and executed as an execution project, and in this state, the operator restarts the programmable controller 1. Thus, in accordance with the system program in the ROM 33, the CPU 13 transfers the preserved project from the selected storage area in the flash memory 31 to the RAM 32 and regards the preserved project as the execution project. Then, the CPU 13 executes the execution project stored in the RAM 32 so as to control the production machine 2.
When the operator (developer) alternately switches between the plurality of preserved projects including the control programs in different revised versions so as to repeatedly perform their operation comparison, switching and execution can be performed with the single programmable controller. That is, when the plurality of preserved projects in different revised versions are prepared in the storage areas in the flash memory 31 in advance, it is possible to reduce frequency of complicated transfer operation from the general-use PC 21 and the engineering tool 22 provided externally so as to improve development efficiency of the control projects.
A control procedure of the system program executed in the ROM 33 by the CPU 13 in order to implement the above-described functions will be described step by step by referring to
First, at step S105, the CPU 13 transfers the preserved project from the storage area in the flash memory 31 (abbreviated to F memory in
Next, the processing proceeds to step S110, and the CPU 13 executes the execution project in the RAM 32, which has been set at step S 105. Thus, the CPU 13 controls actions and information of the control elements of the production machine 2 through the ports. Then, this flow is ended.
As has been described heretofore, with the programmable controller 1 of this embodiment, the flash memory 31 stores the plurality of control projects, and the selection transferor 41 selects one of the plurality of control projects stored in the flash memory 31 and transfers the selected control project to the RAM 32. Thus, the operator (developer, in particular) is capable of storing and switching between the plurality of control projects in different revised versions so as to execute the control projects using the single programmable controller 1. Consequently, even when operation comparison of the control projects is repeated, it is possible to reduce reading frequency from the general-use PC 21 and the engineering tool 22 and to perform the operation comparison readily and quickly. This improves development efficiency of the control projects. Moreover, even when the power supply is interrupted, the plurality of control projects stored in the flash memory 31 are all kept stored without being erased. At a start-up, only the required control project is loaded into the RAM 32, which has a relatively high access speed, and executed. This improves the processing speed of control and memory efficiency.
In this embodiment, in particular, the programmable controller 1 includes the area designation transferor 42 to transfer the control project stored in the RAM 32 to a suitable storage area in the flash memory 31. Thus, it is possible to suitably and readily perform such management as to which of the plurality of control projects stored in the flash memory 31 is erased or overwritten.
In this embodiment, in particular, the selection transferor 41 substantially selects and transfers the control project only when the programmable controller 1 to execute the system program in
The present invention is not limited to the above-described embodiment. Various modifications are possible without departing from the subject matter. Such modifications will now be described.
1. When each Preserved Project Includes a Plurality of Definition Files
To a control machine such as the production machine 2, control elements such as drive shafts and auxiliary devices may be added optionally to change the connection configuration of the control machine in various manners. In this case, it is preferable to also prepare definition files corresponding to connection configurations of the control machine individually. Each time the connection configuration of the control machine is changed however slightly, however, a corresponding definition file is input to the programmable controller 1 anew, and this operation is complicated. In view of this, a plurality of definition files and a control program used for the definition files in common may be collected to constitute one preserved project, and a plurality of preserved projects having control programs in different versions may be stored in the flash memory 31.
The RAM 32 stores one execution project made up of a combination of one common control program and one definition file, which have been transferred from the flash memory 31.
When the control project is transferred from the flash memory 31 to the RAM 32, a selection transferor 41A selects one of a plurality of storage areas in the flash memory 31, and further selects one of the definition files in the preserved project in the selected storage area. Then, the common control program and the definition file in the selected preserved project are transferred to the RAM 32 and regarded as the execution project. When the control project is transferred from the RAM 32 to the flash memory 31, an area designation transferor 42A selects one of the plurality of storage areas in the flash memory 31, and the common control program and the definition file stored in the RAM 32 are transferred to overwrite the preserved project in the corresponding storage area. It is noted that to avoid complication of the illustration of
The standard definition file of
The standard+first option definition file of
The standard+second option definition file of
As described above, with the programmable controller 1 of this modification, the plurality of definition files and the control program used for the definition files in common are collected to constitute one preserved project. The version of the common control program is changed to store a plurality of control projects in the flash memory 31. The selection transferor 41A selects one of the plurality of definition files in the selected preserved project, and transfers the selected definition file and the common control program of the preserved project to the RAM 32 so as to set the execution project. Thus, even when the operator repeats revision of the common control program and change of the connection configuration of the control machine, the operator merely operates the selection transferor 41A to appropriately control the control machine of the connection configurations based on the corresponding definition files. This facilitates appropriate control in accordance with various changes in the connection configuration of the control machine.
In this modification, in particular, the control program in each preserved project is described as a common control program executable by the CPU 13 to perform the input and output of commands or information with respect to only the control elements that are connected in a manner defined by the definition file selected by the selection transferor 41A. Consequently, it suffices that only one common control program used for the plurality of definition files in common is prepared for each revised version. This facilitates input and output management with respect to the memory 12.
In the embodiment and the first modification, each control unit includes the plurality of ports P1 to P5 that can be individually specified, and the control unit is connected to the control elements of the production machine 2 through the ports P1 to P5. This, however, should not be construed in a limiting sense. For example, as illustrated in
In the example illustrated in
For the network connection having such a high freedom degree, it suffices that a definition file corresponding to the connection configuration is prepared, as illustrated in
As described above, the programmable controller 1 of this modification is connected through the network NW to the plurality of node terminals 51, which are respectively connected to the plurality of control elements. With the node addresses randomly and uniquely set respectively for the plurality of node terminals 51, it is specified the input-output ends of commands and/or information. Thus, the node addresses set with a high degree of freedom and randomly are used to specify the input-output ends of commands and/or information.
Otherwise, the above-described embodiments and modification may be combined in any manner deemed suitable.
Obviously, numerous modifications and variations of the present disclosure are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims, the present disclosure may be practiced otherwise than as specifically described herein.
Number | Date | Country | Kind |
---|---|---|---|
2015-122869 | Jun 2015 | JP | national |