Abstract: This control device is provided with: a storage unit which stores source project data including the control program and information referred to at the time of execution of the control program, and binary project data obtained by compiling the source project data; memory for loading the binary project data at the time of execution of the control program; a binary rewriting unit which, on the basis of received data, rewrites the binary project data stored in the storage unit and the binary project data loaded in the memory; and a source rewriting unit which, on the basis of received data, rewrites the source project data stored in the storage unit.
FORM 2
THE PATENTS ACT, 1970 (39 of 1970)
& THE PATENTS RULES, 2003
COMPLETE SPECIFICATION [See section 10, Rule 13]
CONTROL DEVICE AND CONTROL SYSTEM;
MITSUBISHI ELECTRIC
CORPORATION, A CORPORATION ORGANISED AND EXISTING UNDER THE LAWS OF JAPAN, WHOSE ADDRESS IS 7-3, MARUNOUCHI 2-CHOME, CHIYODA-KU, TOKYO 100-8310, JAPAN
THE FOLLOWING SPECIFICATION PARTICULARLY DESCRIBES THE INVENTION AND THE MANNER IN WHICH IT IS TO BE PERFORMED.
DESCRIPTION
Field
[0001] The present invention relates to a control device
that controls an industrial machine, and a control system.'
Background
[0002] A control device is used to control an industrial machine. The control device is realized by, for example, a programmable controller (JIS B 3502:2011, programmable controllers (PLCs)), a C-language controller, a motion controller, or an inverter.
[0003] Data including a control program that is executed by the control device, and information to be referenced during execution of the control program are referred to as "project data". The information to be referenced during execution of the control program is realized by, for example, a parameter that is a numerical value to be used for control computation, a device memory defining a workspace within a memory of the control device, or connection information representing a connection state between the control device and an industrial machine. [0004] The project data have a source created by executing an engineering tool program on a personal computer, and the source is compiled into a binary, which is forwarded to the control device.
[0005] As a related technique, Patent Literature 1 describes the technique to create and compile an application source code on a programming device in order to generate a connection-information table, which is downloaded to an inverter (Abstract). [0006] In some cases, the information to be referenced
during execution of a control program cannot be determined when a source is created using the engineering tool program. For example, a proportional (P) gain, an integral (I) time, or a derivative (D) time, which is to be used for proportional integral derivative (PID) control computation, is determined while operating an industrial machine. For these parameters, temporary initial values are described at the time of creating a source of the project data. [0007] As mentioned above, the information to be referenced during execution of a control program is sometimes determined while operating an industrial machine. Therefore, the initial value described in the source of the project data within the personal computer may be different from the determined value rewritten within the control device. For this reason, when the source of the project data is edited later using the engineering tool program, the initial value has been described in the source of the project data within the personal computer, whereby the determined value rewritten within the control device is adversely lost.
[0008] Patent Literature 2 describes a PLC support device 20 that includes a tuning unit 205 that performs a tuning operation to finely adjust a parameter of a PLC 1 (Paragraphs 0026 to 0030), and a backup unit 206 that backs up the control data volume buffered in a memory space 203 (Paragraphs 0033 to 0037).
Citation List Patent Literatures [0009]
Patent Literature 1: International Publication No. WO2006/112324
Patent Literature 2: Japanese Patent Application Laid-
open No. 2004-178157
Summary
Technical Problem
[0010] Patent Literature 2 describes a feature of backing up the control data volume, but does not describe any features of backing up the parameter. Further, in the technique described in Patent Literature 2, when the PLC 1 is operated to tune a parameter, or when a device other than the PLC support device 20 tunes a parameter of the PLC 1, the parameter within the PLC 1 differs from the parameter within the PLC support device 20. That is, the parameter rewritten within the PLC 1 is lost. [0011] The present invention has been devised in view of the above circumstances, and an object of the present invention is to provide a control device by which loss of the rewritten data can be minimized.
Solution to Problem
[0012] The present invention comprises a storage unit to store therein source project data including a control program and information to be referenced during execution of the control program, and binary project data obtained by compiling the source project data. The present invention comprises: a memory into which the binary project data are loaded when the control program is executed; a binary rewriting unit to rewrite the binary project data stored in the storage unit and the binary project data loaded in the memory based on received data; and a source rewriting unit to rewrite the source project data stored in the storage unit based on the received data.
Advantageous Effects of Invention
[0013] The control device according to the present invention has an advantageous effect that loss of rewritten data can be minimized.
Brief Description of Drawings [0014]"
FIG. 1 is a diagram illustrating a configuration of a control system that uses a control device according to a first embodiment.
FIG. 2 is a diagram illustrating a hardware configuration of a control program creation device according to the first embodiment.
FIG. 3 is a functional block diagram of the control program creation device according to the first embodiment.
FIG. 4 is a diagram illustrating an example of a source control program according to the first embodiment.
FIG. 5 is a diagram illustrating an example of source control parameters according to the first embodiment.
FIG. 6 is a diagram illustrating an example of a source device memory according to the first embodiment.
FIG. 7 is a diagram illustrating an example of an equalization necessity list according to the first embodiment.
FIG. 8 is an illustration showing an example of a parameter setting screen according to the first embodiment.
FIG. 9 is a diagram illustrating a hardware configuration of the control device according to the first embodiment.
FIG. 10 is a functional block diagram of the control device according to the first embodiment.
FIG. 11 is a flowchart illustrating a binary rewriting process according to the first embodiment.
FIG. 12 is a flowchart illustrating a source writing
process in the control device according to the first embodiment.
FIG. 13 is a flowchart illustrating a source rewriting process according to the first embodiment.
FIG. 14 is a flowchart illustrating a project data editing process in the control program creation device according to the first embodiment.
FIG. 15 is a functional block diagram of a control device according to a second embodiment.
FIG. 16 is a flowchart illustrating a source rewriting process in the control device according to the second embodiment.
Description of Embodiments
[0015] In what follows, a control device and a control system according to embodiments of the present invention will be described in detail with reference to the drawings. The present invention is not limited to the embodiments.
[0016] First embodiment.
FIG. 1 is a diagram illustrating a configuration of a control system that uses a control device according to a first embodiment of the present invention. A control system 1 includes a control program creation device 2, a programmable display (JIS B 3551:2012, programmable display) 3, a higher control device 4, a control device 5, and machines 6 and 7.
[0017] The control program creation device 2, the programmable display 3, the higher control device 4, and the control device 5 are connected through a network N. The network N is realized by, for example, a local area network (LAN), or the Internet.
[0018] The control device 5 controls the machines 6 and 7. For example, the control device 5 is realized by a
programmable controller, a C-language controller, a motion controller, or an inverter.
[0019] The control program creation device 2 creates project data including a control program that is executed by the control device 5, and information to be referenced during execution of the control program. The information to be referenced during execution of the control program is realized by, for example, a parameter that is a numerical value to be used for control computation, a device memory defining a workspace within a memory of the control device, or connection information representing a connection state between the control device and an industrial machine.
[0020] The programmable display 3 monitors the data within the -control device 5, and also 'alters the information to be referenced during execution of the control program within the control device 5. [0021] The higher control device 4 is a computer that generally controls the entire production line or the entire factory, and controls the control device 5. [0022] FIG. 2 is a diagram illustrating a hardware configuration of the control program creation device according to the first embodiment. The control program creation device 2 according to the first embodiment is a computer. The control program creation device 2 includes a CPU (Central Processing Unit) 21, a RAM (Random Access Memory) 22, a ROM (Read Only Memory) 23, a storage unit 24, an input unit 25, a display unit 26, and a communication interface 27.
[0023] The CPU 21 executes a program stored in the ROM 23 and the storage unit 24 while using the RAM 22 as a workspace. For example, the program stored in the ROM 23 is realized by a BIOS (Basic Input/Output System) or a UEFI (Unified Extensible Firmware Interface. The program stored
in the storage unit 24 is realized by, for example, an operating system program, or an engineering tool program. For example, the storage unit 24 is realized by an SSD (Solid State Drive) or an HDD (Hard Disk Drive). [0024] The input unit 25 receives an operational input from an operator. The input unit 25 is realized by a keyboard or a mouse, for example. The display unit 26 displays characters and images. For example, the display unit 26 is realized by a liquid-crystal display device. The communication interface 27 communicates with the control device 5 through the network N. [0025] FIG. 3 is a functional block diagram of the control program creation device according to the first embodiment. The CPU 21 executes an engineering tool program stored in the storage unit 24. Upon this execution, an engineering tool unit 21a is implemented, which includes a source-project-data editing unit 21al that creates or edits source project data 24a based on a user's operational input, and a compiling unit 21a2 that compiles the source project data 24a to create binary project data 24b. [0026] The source project data 24a include a source control program 24al, a source control parameter 24a2, a source device memory 24a3, and an equalization necessity list 24a4.
[0027] It is noted that the source project data 24a may include other data. Examples of the other data include connection information representing a connection between the control device 5 and the machine 6, and a connection between the control device 5 and the machine 7. [0028] FIG. 4 is a diagram illustrating an example of the source control program according to the first embodiment. In the first embodiment, the source control program 24al is described in a function block diagram
language (IEC 61131-3, JIS B 3503).
[0029] The description language for the source control program 24al is not limited to the function block diagram language. For example, other description languages for the source control program 24al include a ladder language, a sequential function chart language, a structured text language, and an instruction list language (IEC 61131-3, JIS B 3503).
[0030] The source control program 24al includes function blocks 24ala and 24alb. The function block 24ala is a proportional integral derivative (PID) control block prepared in advance in the engineering tool program, in which the proportional (P), integral (I), and derivative (D) control is executed on an input XI to output an output Yl.
[0031] The function block 24alb is a control block created by a user, in which the following computation is performed on inputs X2 and X3 to output an output Y2.
Y2=A*X2+B»X3+C [0032] FIG. 5 is a diagram illustrating an example of source control parameters according to the first embodiment. The source control parameters 24a2 include an item of a control parameter name and another item of an initial value. [0033] A number of rows 24a2a of the source control parameters 24a2 show parameters to be referenced during control computation of the function block 24ala. A number of rows 24a2b of the source control parameters 24a2 show parameters to be referenced during control computation of the function block 24alb.
[0034] On the rows 24a2a, the initial value is set to "reverse operation" for the parameter name "reverse operation / normal operation", the initial value is set to "1.0" for the parameter name "control cycle", the initial
value is set to "1.2" for the parameter name "proportional gain", the initial value is set to "12.3" for the parameter name "integral time", the initial value is set to "3.2" for the parameter name "derivative time", the initial value is set to "100.0" for the parameter name "SV upper-limit value", and the initial value is set to "0.0" for the parameter name "SV lower-limit value".
[0035] On the rows 24a2b, the initial value is set to "0.9" for the parameter name "A", the initial value is set to "1.1" for the parameter name "B", and the initial value is set to "100" for the parameter name "C". [0036] FIG. 6 is a diagram illustrating an example of the source device memory according to the first embodiment. The source device memory 24a3 includes "an item of the device name and another item of the initial value. [0037] In the source device memory 24a3, the initial value is set to "200" for the device name "D000", and the initial value is set to "300" for the device name "D001". [0038] FIG. 7 is a diagram illustrating an example of the equalization necessity list according to the first embodiment. The equalization necessity list 24a4 includes an item of control parameter name or device name and an item of an immediate flag.
[0039] In the equalization necessity list 24a4, a control parameter or a device is described, for which when data of the binary control parameter or the binary device memory are rewritten in the control device 5, data of the source control parameter or the source device memory are also to be rewritten.
[0040] In the control system 1, when data of the binary control parameter or the binary device memory are rewritten in the control device 5, an action to rewrite data of the source control parameter or the source device memory in the
control device 5 is referred to as "equalization". [0041] On a plurality of rows 24a4a of the equalization necessity list 24a4, parameters are described, on which equalization should be performed, from among the parameters to be referenced during control computation of the function block 24ala.
[0042] On the plural rows 24a4a, parameter names of "proportional gain", "integral time", and "derivative time" are described. Therefore, when data of the parameter name "proportional gain", "integral time", or "derivative time" in the binary control parameters is rewritten in the control device 5, equalization is performed on data of the parameter name "proportional gain", "integral time", or "derivative time" of the source control parameters in the control device 5.
[0043] Among the parameters to be referenced during control computation of the function block 24ala, the parameter names "reverse operation / normal operation", "control cycle", "SV upper-limit value", and "SV lower-limit value" are not described in the equalization necessity list 24a4.
[0044] Therefore, even when data of the parameter name "reverse operation / normal operation", "control cycle", "SV upper-limit value", or "SV lower-limit value" of the binary control parameters are rewritten in the control device 5, equalization is not performed on data of the parameter name "reverse operation / normal operation", "control cycle", "SV upper-limit value", or "SV lower-limit value" of the source control parameters in the control device 5.
[0045] Some of the control parameters, such as a gain, has data gradually refined while operating the machines 6 and 7, and then determined finally. It is preferable to
perform equalization on data of such a control parameter, and accordingly rewrite data of the source control parameter. In contrast, some of the control parameters, such as a counter, has data temporarily changed for operation verification of the machines 6 and 7. It is preferable not to perform equalization on data of such a control parameter.
[0046] The control system 1 can rewrite only control parameters, which are preferable to be rewritten, from among the source control parameters by virtue of provision of the equalization necessity list 24a4.
[0047] In the item of immediate flag of the equalization necessity list 24a4, a flag is described, which represents whether equalization should be performed immediately on data of the source control parameter or the source device memory in the control device 5 when data of the binary control parameter or the binary device memory are rewritten in the control device 5.
[0048] In the case of the immediate flag being "1", when data of the binary control parameter or the binary device memory are rewritten in the control device 5, equalization is performed immediately on data of the source control parameter or the source device memory in the control device 5.
[0049] In the case of the immediate flag being "0", when data of the binary control parameter or the binary device memory are rewritten in the control device 5, the rewritten data is buffered in the control device 5, and when a condition determine in advance is satisfied, equalization is performed on data of the source control parameter or the source device memory in the control device 5. [0050] On a number of rows 24a4a, the immediate flag is set to "1" for the parameter names "proportional gain",
"integral time", and "derivative time". Therefore, when data of the parameter name "proportional gain", "integral time", or "derivative time" of the binary control parameters are rewritten in the control device 5, equalization is performed immediately on data of the parameter name "proportional gain", "integral time", or "derivative time" of the source control parameter in the control device 5.
[0051] Some of the control parameters, such as a gain, should have a maximally reduced likelihood of losing the rewritten data. It is preferable to immediately perform equalization on such a control parameter, and immediately rewrite data of the source control parameter accordingly. In contrast, some of the control parameters are considered to be given a higher priority on distribution of a load of the control device 5 than the likelihood of losing the rewritten data. It is preferable to perform equalization on data of such a control parameter based on whether an appropriate condition is satisfied.
[0052] The control system 1 can immediately rewrite only a control parameter, for which the likelihood of losing the rewritten data should be reduced as much as possible, of the source control parameters by virtue of provision of the equalization necessity list 24a4 including the item of immediate flag. Due to this configuration, the control device 5 can reduce the likelihood of losing the rewritten data, and also can achieve load distribution. [0053] On a plurality of rows 24a4b of the equalization necessity list 24a4, a parameter is described, on which equalization should be performed, among the parameters to be referenced during control computation of the function block 24alb. [0054] On the plural rows 24a4b, the parameter name "A"
and the parameter name "B" are described. Therefore, when data of the parameter name "A" or the parameter name "B" of the binary control parameters are rewritten in the control device 5, equalization is performed on data of the parameter name "A" or the parameter name "B" of the source control parameter in the control device 5.
[0055] On a number of rows 24a4b, the immediate flag is set to "0" for the parameter name "A" and the parameter name "B". Therefore, when data of the parameter name "A" "or the parameter name "B" of the binary control parameters are rewritten in the control device 5, the rewritten data are buffered in the control device 5, and when a condition determined in advance is satisfied, equalization is performed on data of the parameter name "A" or the parameter name "B" of the source control parameters in the control device 5.
[0056] It is noted that a parameter name "C" among the parameters that are referenced during control computation of the function block 24alb is not described in the equalization necessity list 24a4. Therefore, even when data of the parameter name "C" of the binary control parameters are rewritten in the control device 5, equalization is not performed on data of the parameter name "C" of the source control parameter in the control device 5. [0057] On a row 24a4c, a device name of "D000" is described. Therefore, when data of the device name "D000" of the binary device memory are rewritten in the control device 5, equalization is performed on data of the device name "D000" of the source device memory in the control device 5.
[0058] On the row 24a4c, the immediate flag is set to "0" for the device name "D000". Accordingly, when data of the device name "D000" of the binary device memory are
rewritten in the control device 5, the rewritten data are buffered in the control device 5, and when a condition determined in advance is satisfied, equalization is performed on data of the device name "D000" of the source -device memory in the control device 5. [0059] The device name "D001" of the device memory is not described in the equalization necessity list 24a4. Consequently, even when data of the device name "D001" of the binary device memory is rewritten in the control device 5, equalization is not performed on data of the device name "D001" of the source device memory in the control device 5. [0060] FIG. 8 is an illustration showing an example of a parameter setting screen according to the first embodiment. A parameter setting screen 31 is displayed on the display unit 26 by the source-project-data editing unit 21al. [0061] An entry field 31a is a field to input an initial value of the parameter name "reverse operation / normal operation". An entry field 31b is a field to input an initial value of the parameter name "control cycle". An entry field 31c is a field to input an initial value of the parameter name "proportional gain". An entry field' 31d is a field to input an initial value of the parameter name "integral time".
[0062] An entry field 31e is a field to input an initial value of the parameter name "derivative time". An entry field 31f is a field to input an initial value of the parameter name "SV upper-limit value". An entry field 31g is a field to input an initial value of the parameter name "SV lower-limit value".
[0063] An entry field 31h is a field to input a status of whether equalization is needed for the parameter name "reverse operation / normal operation". An entry field 31i is a field to input a status of whether equalization is
needed for the parameter name "control cycle". An entry field 31j is a field to input a status of whether equalization is needed for the parameter name "proportional gain". An entry field 31k is a field to input a status of whether equalization is needed for the parameter name "integral time".
[0064] An entry field 311 is a field to input a status of whether equalization is needed for the parameter name "derivative time". An entry field 31m is a field to input a status of whether equalization is needed for the parameter name "SV upper-limit value". An entry field 31n is a field to input a status of whether equalization is needed for the parameter name "SV lower-limit value". [0065] The source-project-data editing unit 21al describes, in the equalization necessity list 24a4, only a control parameter with its checkbox being checked among the entry fields 31h to 31n.
[0066] The function block 24ala is a control block prepared in advance in the engineering tool program. The parameter names "proportional gain", "integral time", and "derivative time" have been determined in advance to be of control parameters which are in greater need for equalization. To this end, the source-project-data editing unit 21al beforehand checks the checkboxes of the entry fields 31j, 31k, and 311 as default.
[0067] Due to this setting, the source-project-data editing unit 21al sets equalization to be performed on the parameter names "proportional gain", "integral time", and "derivative time" that are in much need for equalization, as default, and can make presentation to a user accordingly. [0068] An entry field 31o is a field to input a status of whether equalization is immediately needed for the parameter name "reverse operation / normal operation". An
entry field 31p is a field to input a status of whether equalization is immediately needed for the parameter name "control cycle". An entry field 31q is a field to input a status of whether equalization is immediately needed for the parameter name "proportional gain".
[0069] An entry field 31r is a field to input a status of whether equalization is immediately needed for the parameter name "integral time". An entry field 31s is a field to input a status of whether equalization is immediately needed for the parameter name "derivative time". An entry field 31t is a field to input a status of whether equalization is immediately needed for the parameter name "SV upper-limit value". An entry field 31u is a field to input a status of whether equalization is immediately needed for the parameter name "SV lower-limit value". [0070] The source-project-data editing unit 21al describes "1" in the item of immediate flag of the equalization necessity list 24a4 only for a control parameter with its checkbox being checked among the entry fields 31o to 31u.
[0071] The function block 24ala is a control block prepared in advance in the engineering tool program. The parameter names "proportional gain", "integral time", and "derivative time" have been determined in advance to be of control parameters which should have a maximally reduced likelihood of losing the rewritten value. Therefore, the source-project-data editing unit 21al beforehand checks the checkboxes of the entry fields 31q, 31r, and 31s as default. [0072] Due to this setting, the source-project-data editing unit 21al sets equalization to be performed immediately on the parameter names "proportional gain", "integral time", and "derivative time", for which the likelihood of losing the rewritten data should be reduced
as much as possible, as default, and can make presentation to a user accordingly.
[0073] Referring back to FIG. 3, the compiling unit 21a2 compiles the source control program 24al to create a binary control program 24bl, compiles the source control parameter 24a2 to create a binary control parameter 24b2, and compiles the source device memory 24a3 to create a binary device memory 24b3.
[0074] The binary control program 24bl, the binary control parameter 24b2, and the binary device memory 24b3 constitute the binary project data 24b. The source project data 24a and the binary project data 24b are transmitted to the control device 5 by the communication interface 27. [0075] FIG. 9 is a diagram illustrating a hardware configuration of the control device according to the first embodiment. The control device 5 includes a main substrate 5a, and sub-substrates 5b and 5c.
[0076] The main substrate 5a includes a CPU 5al, a memory 5a2 that is a RAM, a timer 5a3 that measures time, an external storage slot 5a4, a communication interface 5a5, a bus interface 5a6, and an internal storage unit 5a7. The CPU 5al, the memory 5a2, the timer 5a3, the external storage slot 5a4, the communication interface 5a5, the bus interface 5a6, and the internal storage unit 5a7 are connected to each other through an internal bus Bl. [0077] The main substrate 5a operates upon receiving a power supply from a UPS (Uninterruptible Power Supply) 10. The UPS 10 accumulates therein power supplied from a system power supply 9, and supplies the accumulated power to the main substrate 5a.
[0078] An external storage unit 8 is inserted into the external storage slot 5a4. For example, the external storage unit 8 is realized by an SD card (registered
trademark).
[0079] The communication interface 5a5 communicates with the control program creation device 2, the programmable display 3, and the higher control device 4 through the network N.
[0080] The bus interface 5a6 is a bus bridge circuit that connects between the internal bus Bl and an expansion bus B2. The sub-substrates 5b and 5c are connected to the main substrate 5a through the expansion bus B2. The sub-substrate 5b is connected to the machine 6. The sub-substrate 5c is connected to the machine 7. [0081] For example, the internal storage unit 5a7 is realized by an SSD or an HDD. The internal storage unit 5a7 and the external storage unit 8 constitute a storage unit.
[0082] FIG. 10 is a functional block diagram of the control device according to the first embodiment. The internal storage unit 5a7 stores therein binary project data 5a7a received from the control program creation device 2. The binary project data 5a7a includes a binary control program 5a7al, a binary control parameter 5a7a2, and a binary device memory 5a7a3.
[0083] The external storage unit 8 stores therein source project data 8a received from the control program creation device 2. The source project data 8a includes a source control program 8al, a source control parameter 8a2, a source device memory 8a3, and an equalization necessity list 8a4.
[0084] It is also possible that the source project data 8a are stored in the internal storage unit 5a7. The internal storage unit 5a7 reads and writes data at a higher speed than the external storage unit 8. Therefore, it is preferable to store the source project data 8a in the
internal storage unit 5a7.
[0085] However, in practice, the internal storage unit 5a7 may have a smaller storage capacity due to the requirement for reducing costs or a mounting area, and for this reason, the internal storage unit 5a7 may not. have enough free space to store the source project data 8a. In the first embodiment, a case is described in which the external storage unit 8 stores therein the source project data 8a.
[0086] When the control device 5 performs a control operation, the binary control program 5a7al, the binary control parameter 5a7a2, and the binary device memory 5a7a3 are loaded into the memory 5a2, and then become a binary control program 5a2a, a binary control parameter 5a2b, and a binary device memory 5a2c, respectively.
[0087] The CPU 5al executes a binary rewriting program and a source rewriting program that are stored in the internal storage unit 5a7. By executing these programs, a binary rewriting unit 5ala and a source rewriting unit 5alb are implemented. The binary rewriting unit 5ala rewrites the binary control parameters 5a7a2 and 5a2b or the binary device memories 5a7a3 and 5a2c based on the received data. When the binary control parameters 5a7a2 and 5a2b, or the binary device memories 5a7a3 and 5a2c are rewritten, the source rewriting unit 5alb rewrites the source control parameter 8a2 or the source device memory 8a3 based on the received data.
[0088] Although the binary rewriting program and the source rewriting program are also loaded into the memory 5a2, the illustrations of these programs are omitted. [0089] A buffer 5a2d is provided within the memory 5a2. The buffer 5a2d is an area in which rewritten data are buffered when data of a control parameter of the binary
control parameters 5a2b and 5a7a2, that is a control parameter for which the immediate flag is set to "0", is rewritten, or when data of a device of the binary device memories 5a2c and 5a7a3, that is a device for which the immediate flag is set to "0", is rewritten.
[0090] The size of the buffer 5a2d is set within a range such that the buffer 5a2d does not cause impediment to other programs and data.
[0091] FIG. 11 is a flowchart illustrating a binary rewriting process according to the first embodiment. Upon receiving a command to rewrite data of a control parameter or a device, and data to be rewritten from the programmable display 3, the binary rewriting unit 5ala executes a process illustrated in FIG. 11.
[0092] A case is described in which the control device 5 receives a command to rewrite data of a control parameter or a device, and data to be rewritten, from the programmable display 3, but the present invention is not limited to this case. It is also possible that the control device 5 receives a command to rewrite data of a control parameter or a device, and data to be rewritten, from the control program creation device 2, the higher control device 4, or a control program creation device other than the control program creation device 2.
[0093] At Step S100, the binary rewriting unit 5ala writes data of a control parameter or device received from the programmable display 3, in the binary control parameters 5a2b and 5a7a2, or the binary device memories 5a2c and 5a7a3.
[0094] Due to this operation, the control device 5 can immediately reflect the data received from the programmable display 3 in the control operation. [0095] FIG. 12 is a flowchart illustrating a source
writing process of the control device according to the first embodiment. The source rewriting unit 5alb executes a process illustrated in FIG. 12 after the binary rewriting unit 5ala executes the process illustrated in FIG. 11, that is, after the binary control parameters 5a2b and 5a7a2, or the binary device memories 5a2c and 5a7a3 are -rewritten. [0096] At Step S110, an equalization necessity determination unit 5albl refers to the equalization necessity list 8a4, and determines whether a control parameter or a device received from the programmable display 3 is described in the equalization necessity list 8a4, that is, whether or not equalization is needed for a control parameter or a device received from the programmable display 3.
[0097] When the equalization necessity determination unit 5albl determines that equalization is not needed for a control parameter or a device received from the programmable display 3 at Step S110 (NO), the unit 5albl ends the process.
[0098] On the other hand, when the equalization necessity determination unit 5albl determines that equalization is needed for a control parameter or a device received from the programmable display 3 at Step S110 (YES), the unit 5albl advances the process to Step S112. [0099] At Step S112, a buffer writing unit 5alb2 refers to the equalization necessity list 8a4, and determines whether the immediate flag is set to "1" for a control parameter or a device received from the programmable display 3, in the equalization necessity list 8a4, that is, whether or not equalization is immediately needed for a control parameter or a device received from the programmable display 3. [0100] When the buffer writing unit 5alb2 determines
that equalization is immediately needed for a control parameter or a device received from the programmable display 3 at Step S112 (YES),,the unit 5alb2 advances the process to Step S114.
[0101] At Step S114, a source writing unit 5alb3 writes data of a control parameter or a device received from the programmable display 3 in the source control parameter 8a2 or the source device memory 8a3, and then the unit 5alb3 ends the process.
[0102] Due to this operation, the control device 5 can promptly write the received data of the control parameter or the device, for which equalization is immediately needed, in the source control parameter 8a2 or the source device memory 8a3. Due to this configuration, the control device 5 can reduce the likelihood of losing the rewritten data. [0103] On the other hand, when the buffer writing unit 5alb2 determines that equalization is not immediately needed for a control parameter or a device received from the programmable display 3 at Step S112 (NO), the unit 5alb2 advances the process to Step S116. [0104] At Step S116, the buffer writing unit 5alb2 determines whether or not the control parameter or the device received from the programmable display 3 is already present in the buffer 5a2d.
[0105] When the buffer writing unit 5alb2 determines at Step S116 that the control parameter or the device received from the programmable display 3 is already present in the buffer 5a2d (YES), the unit 5alb2 advances the process to Step S118.
[0106] At Step S118, the buffer writing unit 5alb2 overwrites the buffer 5a2d to replace its data with data of the control parameter or the device received from the programmable display 3, and then ends the process.
[0107] Due to this operation, the control device 5 can reduce the number of times of writing data in the internal storage unit 5a7. Writing of data in the internal storage unit 5a7 requires an amount of time, and also imposes a load on the CPU 51. Therefore, by reducing the number of times of writing data in the internal storage unit 5a7, the control device 5 can reduce a processing load on the CPU 51. [0108] In the case where the internal storage unit 5a7 is an SSD, there is an upper limit of the number of times of writing data in the SSD. That is, the SSD has a service life in respect of the number of times of writing data therein. Therefore, the control device 5 reduces the number of times of writing data in the internal storage unit 5a7, thereby to make it possible to use the internal storage unit 5a7 for a longer period of time. [0109] On the other hand, when the buffer writing unit 5alb2 determines at Step S116 that the control parameter or the device received from the programmable display 3 is not present in the buffer 5a2d (NO), the unit 5alb2 advances the process to Step S120.
[0110] At Step S120, the buffer writing unit 5alb2 writes data of the control parameter or the device received from the programmable display 3 in the. buffer 5a2d, and then ends the process.
[0111] Due to this operation, the control device 5 can buffer data of the control parameter or the device that is considered to be given a higher priority for load distribution of the control device 5 than for the likelihood of losing the rewritten data. Writing of data in the internal storage unit 5a7 requires an amount of time, and also imposes a load on the CPU 5al. Therefore, the control device 5 can achieve load distribution. [0112] FIG. 13 is a flowchart illustrating a source
altering process according to the first embodiment. At Step S140, when a predetermined condition is not satisfied (NO), the source writing unit 5alb3 is on standby. When the predetermined condition is satisfied (YES), the source writing unit 5alb3 advances the process to Step S142. [0113] As examples of the predetermined condition, a number of conditions are described below. The first example is a condition that the utilization of the CPU 5al becomes equal to or lower than a predetermined threshold value. In this condition, because the CPU 5al has an enough processing available capacity, the source writing unit 5alb3 executes a process of Step S142. [0114] The second example is a condition that the free space of the buffer 5a2d becomes equal to or smaller than a predetermined threshold value. In this condition, because the subsequent data of a control parameter or a device may not be buffered, the source writing unit 5alb3 executes a process of Step S142.
[0115] The third example is a condition that the control device 5 receives a command to execute Step S142 from the control program creation device 2, the programmable display 3, or the higher control device 4. In this condition, the source writing unit 5alb3 executes a process of Step S142 according to the command from the control program creation device 2, the programmable display 3, or the higher control device 4. By operating the control program creation device 2 or the programmable display 3, a user can cause the source writing unit 5alb3 to execute a process of Step S142 at a desired timing.
[0116] The higher control device 4 transmits a command to execute Step S142 to the control device 5 at the timing of, for example, start-up of the production line, every hour on the hour, or stop of the production line.
[0117] The fourth example is a condition that the timer 5a3 measures a predetermined period of time. In this condition, the source writing unit 5alb3 executes a process of Step S142 when the predetermined period of time has elapsed since the control device 5 starts operation. Further, in the case where the timer 5a3 repeatedly ■ measures a predetermined period of time, the source writing unit 5alb3 executes a process of Step S142 every time that predetermined period of time has elapsed.
[0118] The fifth example is a condition that the control device 5 receives a notice of occurrence of abnormality in the system power supply 9 from the UPS 10. The abnormality in the system power supply 9 is, for example, power outage, instantaneous power failure, or voltage fluctuation. In this condition, the source writing unit 5alb3 executes a process of Step S142 in order to reduce the likelihood of losing the data within the buffer 5a2d.
[0119] The sixth example is a condition that the CPU 5al detects an abnormality in the control device 5 by executing a self-diagnostic process. In this condition, the source writing unit 5alb3 executes a process of Step S142 in order to reduce the likelihood of losing the data within the buffer 5a2d.
[0120] At Step S142, the source writing unit 5alb3 writes contents of the buffer 5a2d into the source control parameter 8a2, or the source device memory 8a3, and then ends the process.
[0121] Due to this operation, the control device 5 can reflect the altered data of a control parameter or a device in the source control parameter 8a2 or the source device memory 8a3. With this configuration, the control device 5 can minimize loss of the rewritten data within the binary control parameters 5a2b and 5a7a2, or within the binary
device memory 5a2c or 5a.7a3.
[0122] FIG. 14 is a flowchart illustrating a project data editing process of the control program creation device according to the first embodiment.
[0123] At Step S150, the source-project-data editing unit 21al receives the source project data 8a from the control device 5, and overwrites the source project data 24a in the storage unit 24 to replace the data 24a with the received source project data 8a.
[0124] Next, at Step S152, the source-project-data editing unit 21al receives an operational input from a user, and accordingly edits the source project data 24a. [0125] Subsequently, at Step S154, the compiling unit 21a2 compiles the source project data 24a to create the binary project data 24b and overwrite the existing data to replace them with the created binary project data 24b. [0126] Next, at Step S156, the compiling unit 21a2 transmits the source project data 24a and the binary project data 24b to the control device 5, and then ends the process.
[0127] As described above, the control program creation device 2 can edit the source project data 24a in which data have been rewritten in the control device 5. Due to this configuration, the control device 5 can minimize loss of the data rewritten within the control device 5. [0128] Even when the data are rewritten in the control device 5 based on a command from the programmable display 3, the control program creation device 2 can edit the source project data 24a in which the data have been rewritten. Due to this configuration, even when a device that has transmitted a data rewriting command is different from a device that edits the source project data 24a, the control device 5 can minimize loss of the data rewritten within the
control device 5.
[0129] The control device 5 writes only data of a control parameter or a .device, which is described in the equalization necessity list 24a4, in the source control parameter 8a2 or the source device memory 8a3. By so doing, the control device 5 can rewrite only data of a control parameter or a device, which is preferable to be rewritten, of the source control parameter 8a2 or the source device memory 8a3.
[0130] Further, the control device 5 can immediately rewrite only data of a control parameter or a device, for which "1" is set in the item of immediate flag in the equalization necessity list 24a4, of the source control parameter 8a2 or the source device memory 8a3. Due to this configuration, the control device 5 can reduce the likelihood of losing the rewritten data, and also can achieve load distribution.
[0131] Further, the control device 5 can buffer data of a control parameter or a device, for which "0" is set in the item of immediate flag in the equalization necessity list 24a4, of the source control parameter 8a2 or the source device memory 8a3. When a predetermined condition is satisfied, the control device 5 can write the buffered data of a control parameter or a device in the source control parameter 8a2 or the source device memory 8a3. Due to this operation, the control device 5 can reduce the number of times of writing data into the internal storage unit 5a7. Writing of data into the internal storage unit 5a7 requires an amount of time, and also imposes a load on the CPU 51. Therefore, by reducing the number of times of writing data in the internal storage unit 5a7, the control device 5 can reduce the processing load on the CPU 51. [0132] Second embodiment.
FIG. 15 is a functional block diagram of a control device according to a second embodiment. As described in the first embodiment, the reading speed and writing speed of the internal storage unit 5a7 are greater than the reading speed and writing speed of the external storage unit 8, respectively. Therefore, in the case where the internal storage unit 5a7 has enough free space to store the source project data 8a, it is preferable that the internal storage unit 5a7 stores therein the source project data 8a.
[0133] For that reason, in a control device 5A of the second embodiment, the internal storage unit 5a7 stores therein the source project data 8a.
[0134] The internal storage unit 5a7 reads and writes data at a higher speed than the external storage unit 8. Further, a processing load on the CPU 5al to write data to and read data from the internal storage unit 5a7 is lighter than a processing load on the CPU 5al to write data to and read data from the external storage unit 8. [0135] For that reason, in the second embodiment, data of a control parameter or a device that needs equalization are immediately written into the source control parameter 8a2 or the source device memory 8a3 without buffering the data.
[0136] Accordingly, the control device 5A of the second embodiment does not require the buffer writing unit 5alb2 and the buffer 5a2d in the control device 5 of the first embodiment. In addition, the equalization necessity list 8a4 does not require the item of immediate flag. [0137] FIG. 16 is a flowchart illustrating a source writing process of the control device according to the second embodiment. The source rewriting unit 5alb executes a process illustrated in FIG. 16 after the binary rewriting
unit 5ala executes the process illustrated in FIG. 10, that is, after the binary control parameters 5a2b and 5a7a2, or the binary device memories 5a2c and 5a7a3 are rewritten. [0138] At Step S160, the equalization necessity determination unit 5albl refers to the equalization necessity list 8a4, and determines whether a control parameter or a device received from the programmable display 3 is described in the equalization necessity list 8a4, that is, whether or not equalization is needed for a control parameter or a device received from the programmable display 3.
[0139] When the equalization necessity determination unit 5albl determines that equalization is not needed for a control parameter or a device received from the programmable display 3 at Step S160 (NO), the unit 5albl ends the process.
[0140] On the other hand, when the equalization necessity determination unit 5albl determines that equalization is needed for a control parameter or a device received from the programmable display 3 at Step S160 (YES), the unit 5albl advances the process to Step S162. [0141] At Step S162, the source writing unit 5alb3 writes data of a control parameter or a device received from the programmable display 3 into the source control parameter 8a2 or the source device memory 8a3, and then ends the process.
[0142] As described above, the control device 5A can immediately write the received data of the control parameter or the device into the source control parameter 8a2 or the source device memory 8a3. Due to this configuration, the control device 5A can minimize loss of the data rewritten within the control device 5A. [0143] The configurations described in the above
embodiments mean examples of the contents of the present invention. The configurations can be combined with other publicly known techniques, and can be partially omitted and/or modified without departing from the scope of the present invention.
Reference Signs List
[0144] 1 control system; 2 control program creation device; 3 programmable display; 4 higher control device; 5, 5A control device; 5al CPU; 5ala binary rewriting unit; 5alb source rewriting unit; 5albl equalization necessity determination'unit; 5alb2 buffer writing unit; 5alb3 source writing unit; 5a2 memory; 5a2a, 5a7al, 24bl binary control program; 5a2b, 5a7a2, 24b2 binary control parameter; 5a2c, 5a7a3, 24b3 binary device memory; 5a2d buffer; 5a7 internal storage unit; 5a7a, 24b binary project data; 8 external storage unit; 8a, 24a source project data; 8al, 24al source control program; 8a2, 24a2 source control parameter; 8a3, 24a3 source device memory; 8a4, 24a4 equalization necessity list.
We Claim :
1. A control device comprising:
a storage unit to store therein source project data including a control program and information to be referenced during execution of the control program, and binary project data obtained by compiling the source project data;
a memory into which the binary project data are loaded when the control program is executed;
a binary rewriting unit to rewrite the binary project data stored in the storage unit and the binary project data loaded in the memory based on received data; and
a source rewriting unit to rewrite the source project data stored in the storage unit based on the received data.
2. The control device according to claim 1, wherein
the storage unit further stores therein an
equalization necessity list that describes information to be referenced during execution of the control program of the source project data, the information being to be rewritten when the binary project data are rewritten, and
the source rewriting unit rewrites only information to be referenced during execution of the control program, which is described in the equalization necessity list.
3. The control device according to claim 2, wherein
the equalization necessity list includes an item of
immediate flag that describes whether the source project data should be rewritten immediately after the binary project data are rewritten, and
the source rewriting unit immediately rewrites information to be referenced during execution of the
control program, for which it is described in the item of immediate flag that rewriting should be immediately done.
4. The control device according to claim 3, wherein
the memory includes a buffer, and
the source rewriting unit writes information to be referenced during execution of the control program, for which it is described in the item of immediate flag that rewriting should not be immediately done, into the buffer, and thereafter when a predetermined condition is satisfied, the source rewriting unit writes data within the buffer into the source project data.
5. A control system comprising:
the control device according to any one of claims 1 to A; and
a control program creation device including a source-project-data editing unit to edit the source project data received from the control device, and a compiling unit to compile the source project data to create and transmit the binary project data to the control device.
| # | Name | Date |
|---|---|---|
| 1 | 201727028864-IntimationOfGrant31-07-2023.pdf | 2023-07-31 |
| 1 | 201727028864-TRANSLATIOIN OF PRIOIRTY DOCUMENTS ETC. [14-08-2017(online)].pdf | 2017-08-14 |
| 2 | 201727028864-PatentCertificate31-07-2023.pdf | 2023-07-31 |
| 2 | 201727028864-STATEMENT OF UNDERTAKING (FORM 3) [14-08-2017(online)].pdf | 2017-08-14 |
| 3 | 201727028864-Response to office action [19-09-2022(online)].pdf | 2022-09-19 |
| 3 | 201727028864-REQUEST FOR EXAMINATION (FORM-18) [14-08-2017(online)].pdf | 2017-08-14 |
| 4 | 201727028864-FORM 18 [14-08-2017(online)].pdf | 2017-08-14 |
| 4 | 201727028864-FER.pdf | 2021-10-18 |
| 5 | 201727028864-FORM 1 [14-08-2017(online)].pdf | 2017-08-14 |
| 5 | 201727028864-ABSTRACT [26-02-2021(online)].pdf | 2021-02-26 |
| 6 | 201727028864-FIGURE OF ABSTRACT [14-08-2017(online)].pdf | 2017-08-14 |
| 6 | 201727028864-CLAIMS [26-02-2021(online)].pdf | 2021-02-26 |
| 7 | 201727028864-DRAWINGS [14-08-2017(online)].pdf | 2017-08-14 |
| 7 | 201727028864-COMPLETE SPECIFICATION [26-02-2021(online)].pdf | 2021-02-26 |
| 8 | 201727028864-DRAWING [26-02-2021(online)].pdf | 2021-02-26 |
| 8 | 201727028864-DECLARATION OF INVENTORSHIP (FORM 5) [14-08-2017(online)].pdf | 2017-08-14 |
| 9 | 201727028864-COMPLETE SPECIFICATION [14-08-2017(online)].pdf | 2017-08-14 |
| 9 | 201727028864-FER_SER_REPLY [26-02-2021(online)].pdf | 2021-02-26 |
| 10 | 201727028864-MARKED COPIES OF AMENDEMENTS [21-08-2017(online)].pdf | 2017-08-21 |
| 10 | 201727028864-OTHERS [26-02-2021(online)].pdf | 2021-02-26 |
| 11 | 201727028864-AMMENDED DOCUMENTS [21-08-2017(online)].pdf | 2017-08-21 |
| 11 | 201727028864-FORM 3 [25-02-2021(online)].pdf | 2021-02-25 |
| 12 | 201727028864-Amendment Of Application Before Grant - Form 13 [21-08-2017(online)].pdf | 2017-08-21 |
| 12 | 201727028864-Information under section 8(2) [25-02-2021(online)].pdf | 2021-02-25 |
| 13 | 201727028864-FORM 3 [22-07-2019(online)].pdf | 2019-07-22 |
| 13 | 201727028864-Proof of Right (MANDATORY) [07-09-2017(online)].pdf | 2017-09-07 |
| 14 | 201727028864-FORM-26 [19-09-2017(online)].pdf | 2017-09-19 |
| 14 | 201727028864-ORIGINAL UNDER RULE 6 (1A)-200917.pdf | 2018-08-11 |
| 15 | 201727028864-FORM 3 [16-12-2017(online)].pdf | 2017-12-16 |
| 15 | 201727028864-ORIGINAL UNDER RULE 6(1A)-110917.pdf | 2018-08-11 |
| 16 | 201727028864.pdf | 2018-08-11 |
| 16 | ABSTRACT 1.jpg | 2018-08-11 |
| 17 | ABSTRACT 1.jpg | 2018-08-11 |
| 17 | 201727028864.pdf | 2018-08-11 |
| 18 | 201727028864-FORM 3 [16-12-2017(online)].pdf | 2017-12-16 |
| 18 | 201727028864-ORIGINAL UNDER RULE 6(1A)-110917.pdf | 2018-08-11 |
| 19 | 201727028864-FORM-26 [19-09-2017(online)].pdf | 2017-09-19 |
| 19 | 201727028864-ORIGINAL UNDER RULE 6 (1A)-200917.pdf | 2018-08-11 |
| 20 | 201727028864-FORM 3 [22-07-2019(online)].pdf | 2019-07-22 |
| 20 | 201727028864-Proof of Right (MANDATORY) [07-09-2017(online)].pdf | 2017-09-07 |
| 21 | 201727028864-Amendment Of Application Before Grant - Form 13 [21-08-2017(online)].pdf | 2017-08-21 |
| 21 | 201727028864-Information under section 8(2) [25-02-2021(online)].pdf | 2021-02-25 |
| 22 | 201727028864-AMMENDED DOCUMENTS [21-08-2017(online)].pdf | 2017-08-21 |
| 22 | 201727028864-FORM 3 [25-02-2021(online)].pdf | 2021-02-25 |
| 23 | 201727028864-MARKED COPIES OF AMENDEMENTS [21-08-2017(online)].pdf | 2017-08-21 |
| 23 | 201727028864-OTHERS [26-02-2021(online)].pdf | 2021-02-26 |
| 24 | 201727028864-FER_SER_REPLY [26-02-2021(online)].pdf | 2021-02-26 |
| 24 | 201727028864-COMPLETE SPECIFICATION [14-08-2017(online)].pdf | 2017-08-14 |
| 25 | 201727028864-DRAWING [26-02-2021(online)].pdf | 2021-02-26 |
| 25 | 201727028864-DECLARATION OF INVENTORSHIP (FORM 5) [14-08-2017(online)].pdf | 2017-08-14 |
| 26 | 201727028864-DRAWINGS [14-08-2017(online)].pdf | 2017-08-14 |
| 26 | 201727028864-COMPLETE SPECIFICATION [26-02-2021(online)].pdf | 2021-02-26 |
| 27 | 201727028864-FIGURE OF ABSTRACT [14-08-2017(online)].pdf | 2017-08-14 |
| 27 | 201727028864-CLAIMS [26-02-2021(online)].pdf | 2021-02-26 |
| 28 | 201727028864-FORM 1 [14-08-2017(online)].pdf | 2017-08-14 |
| 28 | 201727028864-ABSTRACT [26-02-2021(online)].pdf | 2021-02-26 |
| 29 | 201727028864-FORM 18 [14-08-2017(online)].pdf | 2017-08-14 |
| 29 | 201727028864-FER.pdf | 2021-10-18 |
| 30 | 201727028864-Response to office action [19-09-2022(online)].pdf | 2022-09-19 |
| 30 | 201727028864-REQUEST FOR EXAMINATION (FORM-18) [14-08-2017(online)].pdf | 2017-08-14 |
| 31 | 201727028864-PatentCertificate31-07-2023.pdf | 2023-07-31 |
| 31 | 201727028864-STATEMENT OF UNDERTAKING (FORM 3) [14-08-2017(online)].pdf | 2017-08-14 |
| 32 | 201727028864-IntimationOfGrant31-07-2023.pdf | 2023-07-31 |
| 32 | 201727028864-TRANSLATIOIN OF PRIOIRTY DOCUMENTS ETC. [14-08-2017(online)].pdf | 2017-08-14 |
| 1 | 201727028864E_25-08-2020.pdf |