Control system, control device and control program
The control system addresses inefficiencies in data writing within control devices by incorporating adjustable digit processing and user interface settings, enhancing data management and reliability through cyclic execution and heartbeat monitoring.
Patent Information
- Application Number
- JP2022061542
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-04-01
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-04-01
AI Technical Summary
Existing data transfer techniques fail to provide an efficient mechanism for appropriately writing data within control devices that cyclically execute control calculations, leading to inefficiencies in data management and processing.
A control system comprising a first processing unit for cyclically executing control calculations and a second processing unit for executing application programs independently, with a providing unit that adjusts the number of digits for acquired values and allows user interface settings to manage data writing, including heartbeat units for monitoring operation reliability.
Enables efficient and reliable data writing within control devices by allowing users to adjust settings for data frequency and precision, thereby optimizing data management and reducing processing time.
Smart Images

Figure 0007760953000001 
Figure 0007760953000002 
Figure 0007760953000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to a control system, a control device, and a control program. [Background technology]
[0002] As a data transfer technique, a technique for transmitting only the difference in order to reduce the amount of data to be transferred is known.
[0003] For example, Patent Publication No. 2020-173689 (Patent Document 1) discloses a control device that includes a generation unit that, when updating inverted data at a predetermined processing cycle, compares safety data with the inverted value of the inverted data before the update and generates change data from one cycle before the safety data.
[0004] Furthermore, Japanese Patent Laid-Open Publication No. 2000-165965 (Patent Document 2) discloses a configuration in which a request is made to transmit input data to a central control unit only when the input data from an information input means has changed from the previously transmitted data. [Prior art documents] [Patent documents]
[0005] [Patent Document 1] Japanese Patent Application Publication No. 2020-173689 [Patent Document 2] Japanese Patent Application Laid-Open No. 2000-165965 Summary of the Invention [Problem to be solved by the invention]
[0006] While the above-mentioned prior art merely aims to reduce the amount of data, the present invention provides a configuration for appropriately writing data within a control device that cyclically executes control calculations. [Means for solving the problem]
[0007] A control system according to one embodiment of the present invention includes a first processing unit that cyclically executes control calculations, a second processing unit that executes an application program independently of the first processing unit, and a providing unit that provides a user interface screen. The first processing unit includes a write area that stores data written from the second processing unit. The second processing unit includes an acquisition unit that acquires one or more values, a preprocessing unit that adjusts the number of digits for the acquired one or more values according to a predetermined setting, a current data area that stores the value with the adjusted number of digits, a previous data area that stores data that the current data area held in the previous cycle, and a write execution unit that writes data that has changed in value from the previous data area to the write area. The providing unit displays the content of the setting and the time required to write the setting to the write area, and accepts changes to the setting.
[0008] According to this configuration, the user can check the time required to write to the write area and change and correct the settings as appropriate so that the time required falls within a predetermined time.
[0009] The providing unit may be configured to accept, as the setting content, a setting for the number of digits to be output by the pre-processing unit. With this configuration, the number of digits to be output by the pre-processing unit can be adjusted, and thereby the frequency (probability) of writing in the write area can be adjusted.
[0010] The providing unit may be configured to accept, as the setting content, a setting of a method for rounding a value to adjust the number of digits by the preprocessing unit. With this configuration, the preprocessing unit can adjust the method for rounding a value to adjust the number of digits, thereby enabling a method to be set according to the characteristics of the value to be written.
[0011] The providing unit may accept setting of variables corresponding to one or more values acquired by the acquiring unit. With this configuration, any variable required by the first processing unit can be set.
[0012] The providing unit may display the ratio of the number of values included in the data written by the writing unit to the number of values acquired by the acquiring unit. With this configuration, it is possible to grasp what percentage of the values set to be acquired are actually written.
[0013] The first processing unit may include a monitoring unit that outputs a write completion signal to the second processing unit when the write execution unit completes writing to the write area. The second processing unit may further include a measurement unit that measures the time required for writing to the write area based on the write completion signal. With this configuration, the time required for writing to the write area can be measured with a simplified configuration through communication between the first processing unit and the second processing unit.
[0014] The first processing unit may further include a first heartbeat unit. The second processing unit may further include a second heartbeat unit. The first heartbeat unit and the second heartbeat unit may be configured to periodically transmit an alive signal to each other, thereby monitoring the normal operation of the first processing unit and the second processing unit. With this configuration, the first processing unit and the second processing unit communicate with each other, thereby further improving reliability.
[0015] A control device according to another example of the present invention includes a first processing unit that cyclically executes control calculations and a second processing unit that executes an application program independently of the first processing unit. The first processing unit includes a write area that stores data written from the second processing unit. The second processing unit includes an acquisition unit that acquires one or more values, a preprocessing unit that adjusts the number of digits for the acquired one or more values according to a predetermined setting, a current data area that stores the value with the adjusted number of digits, a previous data area that stores data that the current data area held in the previous cycle, and a write execution unit that writes data that has changed in value from the previous data area to the write area. The control device displays the content of the setting and the time required to write the setting to the write area, and provides a user interface screen that accepts changes to the setting.
[0016] A control program according to yet another example of the present invention causes a computer to function as a first processing unit that cyclically executes control calculations and a second processing unit that executes an application program independently of the first processing unit. The first processing unit includes a write area that stores data written from the second processing unit. The second processing unit includes an acquisition unit that acquires one or more values, a preprocessing unit that adjusts the number of digits for the acquired one or more values according to a predetermined setting, a current data area that stores the value with the adjusted number of digits, a previous data area that stores data that the current data area held in the previous cycle, and a write execution unit that writes data that has changed in value from the previous data area to the write area. The control program causes the computer to execute a process that displays the content of the setting and the time required to write the setting to the write area and provides a user interface screen that accepts changes to the setting. [Effects of the Invention]
[0017] According to the present invention, data can be appropriately written into a control device that cyclically executes control calculations. [Brief explanation of the drawings]
[0018] [Figure 1] 1 is a schematic diagram showing an example of the overall configuration of a control system according to the present embodiment; [Figure 2] FIG. 2 is a block diagram showing an example of a hardware configuration of a control device in the control system according to the present embodiment. [Figure 3] FIG. 2 is a block diagram showing an example of a hardware configuration of a support device of the control system according to the present embodiment. [Figure 4] FIG. 2 is a schematic diagram illustrating an example of a functional configuration of a control device according to the present embodiment. [Figure 5] FIG. 2 is a schematic diagram showing an example of a functional configuration related to a data writing process of the control device according to the present embodiment. [Figure 6] FIG. 4 is a diagram for explaining an example of pre-processing of the control device according to the present embodiment. [Figure 7] This is an example of a user interface screen for setting data writing provided by the control system according to this embodiment. [Figure 8] This is a schematic diagram showing a configuration example for the control system according to this embodiment to provide a user interface screen. [Figure 9] This is a flowchart showing an example of a processing procedure regarding data writing of the control device according to this embodiment. [Figure 10] This is a sequence chart showing an example of a processing procedure for setting data writing of the control system according to this embodiment.
Embodiment for Carrying out the Invention
[0019] Embodiments of the present invention will be described in detail while referring to the drawings. For the same or corresponding parts in the drawings, the same reference numerals are given and the description thereof will not be repeated.
[0020] <A. Overall Configuration Example> Next, an overall configuration example of the control system 1 including the control device 100 according to this embodiment will be described.
[0021] FIG. 1 is a schematic diagram showing an overall configuration example of the control system 1 according to this embodiment. Referring to FIG. 1, the control system 1 according to this embodiment includes, as main components, a control device 100, a support device 200, an HMI (Human Machine Interface) 300, and a server device 400.
[0022] The control device 100 may be embodied as a type of computer, such as a programmable logic controller (PLC). The control device 100 is connected to the field device group 10 via a field bus 2. The field bus 2 preferably employs an industrial communication protocol. Known examples of such communication protocols include EtherCAT (registered trademark), EtherNet / IP (registered trademark), DeviceNet (registered trademark), and CompoNet (registered trademark).
[0023] The field device group 10 includes devices that collect input data from a field such as a production site, and devices that perform some kind of action on the field based on a command (output data) generated by the control device 100.
[0024] In the configuration example shown in FIG. 1, the field device group 10 includes a remote I / O (Input / Output) device 12, a relay group 14, a servo driver 18, and a servo motor 20.
[0025] The control device 100 holds input data from the field device group 10, output data to the field device group 10, internal data managed within the control device 100, and the like.
[0026] The support device 200 is capable of making various settings for the control device 100, as will be described later.
[0027] The HMI 300 is connected to the control device 100 via the higher-level network 4, and displays information from the control device 100 and transmits commands in response to user operations to the control device 100. Furthermore, the HMI 300 is capable of making various settings for the control device 100, as will be described later.
[0028] The server device 400 is connected to the control device 100 via the higher-level network 4, and functions as a database for storing data, an MES (Manufacturing Execution System), and the like.
[0029] <B. Hardware Configuration Example> Next, a hardware configuration example of the main devices of the control system 1 according to this embodiment will be described.
[0030] (b1: Control Device 100) FIG. 2 is a block diagram showing a hardware configuration example of the control device 100 of the control system 1 according to this embodiment. Referring to FIG. 2, the control device 100 includes a processor 102 such as a CPU (Central Processing Unit) or an MPU (Micro-Processing Unit), a chipset 104, a main storage device 106, a secondary storage device 108, an upper network controller 110, a USB (Universal Serial Bus) controller 112, a memory card interface 114, an internal bus controller 122, a field bus controller 120, and I / O units 124-1, 124-2,....
[0031] The processor 102 reads various programs stored in the secondary storage device 108, expands them in the main storage device 106, and executes them to realize the processes required for the control device 100. The chipset 104 controls data transmission between the processor 102 and each component.
[0032] In the secondary storage device 108, a system program 131, a user program 132 describing the content of control operations, an application execution environment program 133 that provides an environment for executing arbitrary applications as described later, and an application program 134 describing arbitrary one or more applications are stored.
[0033] By executing the programs stored in the secondary storage device 108, the control device 100, which is a computer, is caused to execute the processes described in this specification, and the functional configurations described in this specification are realized in the control device 100, which is a computer.
[0034] The upper network controller 110 controls the exchange of data with other devices via the upper network 4. The USB controller 112 controls the exchange of data with the support device 200 via a USB connection.
[0035] The memory card interface 114 is configured to allow a memory card 116 to be attached and detached, and is capable of writing data to the memory card 116 and reading various data (user programs, trace data, etc.) from the memory card 116.
[0036] The internal bus controller 122 is an interface for exchanging data with the I / O units 124-1, 124-2, . . . mounted on the control device 100.
[0037] The fieldbus controller 120 controls the exchange of data with other devices via the fieldbus 2 .
[0038] FIG. 2 shows an example of a configuration in which the processor 102 executes a program to provide the required functions, but some or all of these provided functions may be implemented using dedicated hardware circuits (e.g., an ASIC (Application Specific Integrated Circuit) or an FPGA (Field-Programmable Gate Array)). Alternatively, the main part of the control device 100 may be realized using hardware that conforms to a general-purpose architecture (e.g., an industrial PC based on a general-purpose PC). In this case, virtualization technology may be used to run multiple operating systems (OSs) for different purposes in parallel, and required applications may be executed on each OS.
[0039] (b2: Support device 200) 3 is a block diagram showing an example of a hardware configuration of support device 200 in control system 1 according to the present embodiment. Support device 200 according to the present embodiment is, for example, configured by a general-purpose computer having hardware that complies with a general-purpose architecture.
[0040] 3, the support device 200 includes a processor 202 such as a CPU or a GPU (Graphics Processing Unit), an optical drive 204, a main storage device 206, a secondary storage device 208, a USB controller 212, a network controller 214, an input unit 216, and a display unit 218. These components are connected via a bus 220.
[0041] The processor 202 reads out various programs stored in the secondary storage device 208, expands them in the main storage device 206, and executes them to realize any processing.
[0042] The secondary storage device 208 typically stores an OS 222 and a user interface screen providing program 224 for performing setting processing as described below. The secondary storage device 208 may also store necessary programs other than the programs shown in FIG.
[0043] The support device 200 has an optical drive 204, and the program stored in a recording medium 205 (e.g., an optical recording medium such as a DVD (Digital Versatile Disc)) that non-transiently stores a computer-readable program is read and installed in a secondary storage device 208, etc.
[0044] The various programs executed by the support device 200 may be installed via a computer-readable recording medium 205, or may be installed by downloading from a server device on a network, etc. In addition, the functions provided by the support device 200 according to this embodiment may be realized by using some of the modules provided by the OS 222.
[0045] The USB controller 212 controls the data exchange with the control device 100 via the USB connection. The network controller 214 controls the data exchange with other devices via an arbitrary network.
[0046] The input unit 216 is composed of a keyboard, a mouse, etc., and receives user operations. The display unit 218 is composed of a display, various indicators, a printer, etc., and outputs the processing results from the processor 202, etc.
[0047] Although FIG. 3 shows a configuration example in which the functions necessary for the processor 202 to execute a program are provided, some or all of these provided functions may be implemented using a dedicated hardware circuit (for example, an ASIC or an FPGA, etc.).
[0048] (b3: HMI300) The HMI 300 according to the present embodiment is configured, for example, by a general-purpose computer having hardware according to a general-purpose architecture. Since the basic hardware configuration is the same as that of the support device 200 shown in FIG. 3, a detailed description will not be repeated.
[0049] <C. Functional Configuration Example of Control Device> Next, a functional configuration example of the control device 100 according to the present embodiment will be described.
[0050] FIG. 4 is a schematic diagram showing a functional configuration example of the control device 100 according to the present embodiment. Referring to FIG. 4, the control device 100 includes a PLC engine 150 and an application execution environment 160.
[0051] The PLC engine 150 corresponds to the first processing unit and cyclically executes control calculations. Typically, the PLC engine 150 executes the user program 132 to realize the control calculation 151.
[0052] The application execution environment 160 executes the application program 134 to realize an arbitrary application process 166. The application execution environment 160 corresponds to a second processing unit, and executes the application program 134 independently of the PLC engine 150.
[0053] The control device 100 further includes an IO interface 140 , a communication interface 142 , and a variable manager 144 .
[0054] The IO interface 140 periodically communicates with the field devices 10 to obtain input data and transmit output data.
[0055] The communication interface 142 exchanges data with the server device 400 and the like.
[0056] The variable manager 144 holds and updates variables that can be referenced in the control device 100. More specifically, the variable manager 144 updates the values of corresponding variables with input data acquired by the IO interface 140, and also updates the values of corresponding variables with data acquired by the communication interface 142. The variable manager 144 also updates the values of corresponding variables in accordance with access from the PLC engine 150 and the application execution environment 160. Note that the IO interface 140, the communication interface 142, the PLC engine 150, and the application execution environment 160 can reference the variables held by the variable manager 144. Therefore, the variables held and updated by the variable manager 144 may be global variables.
[0057] PLC engine 150 includes a local memory area 152 and a data exchange management unit 156. Local memory area 152 includes a global data area 153 for holding the values of variables held by variable manager 144, an internal data area 154 for holding the values of variables necessary for executing control operation 151, and an application data area 155 for holding the values of variables written from application execution environment 160. Application data area 155 corresponds to a write area for holding data written from application execution environment 160.
[0058] The data exchange management unit 156 monitors the writing of variable values from the application execution environment 160 to the PLC engine 150. The function and processing of the data exchange management unit 156 will be described later.
[0059] The application execution environment 160 includes a local memory area 162 and a data writing unit 170 .
[0060] The local memory area 162 includes a global data area 163 for holding the values of variables held by the variable manager 144 and an internal data area 164 for holding the values of variables required to execute the application process 166 .
[0061] The data writing unit 170 writes the values of variables calculated by the application processing 166 or the like into the PLC engine 150 (application data area 155).
[0062] In the following description, the value of one or more variables written from the application execution environment 160 to the PLC engine 150 will also be referred to as "data."
[0063] As an example of writing data from the application execution environment 160 to the PLC engine 150, first, (1) the application process 166 executes an arbitrary process using the values of one or more variables held in the local memory area 162, and writes the process result calculated by the execution to the internal data area 154. Subsequently, (2) the data writing unit 170 acquires the values of one or more variables held in the internal data area 154. (3) The data writing unit 170 performs preprocessing as described later on the acquired values of one or more variables, and identifies variables whose values have changed since the previous data writing. Then, (4) the data writing unit 170 writes the latest values to the application data area 155 of the PLC engine 150 for the variables whose values have changed since the previous data writing.
[0064] <D. Data Writing Process> Next, the data writing from the application execution environment 160 to the PLC engine 150 will be described in detail.
[0065] FIG. 5 is a schematic diagram showing a functional configuration example related to the data writing process of the control device 100 according to the present embodiment. Referring to FIG. 5, the data writing unit 170 of the application execution environment 160 includes a data acquisition unit 171, a preprocessing unit 172, a current data area 173, a previous data area 174, a comparison unit 175, a writing execution unit 176, a setting unit 177, a writing time measurement unit 178, and a heartbeat unit 179. On the other hand, the data exchange management unit 156 of the PLC engine 150 includes a writing monitoring unit 157 and a heartbeat unit 158.
[0066] The data acquisition unit 171 acquires the specified one or more values (variable values) according to the setting 1770. The timing at which the data acquisition unit 171 acquires the values of one or more variables may be synchronized with the execution cycle (control cycle) of the control operation 151 in the PLC engine 150, or may be an arbitrary timing independent of the PLC engine 150.
[0067] The preprocessing unit 172 performs preprocessing on the value of one or more variables acquired by the data acquisition unit 171 in accordance with the setting 1770, and then writes the preprocessed value to the current data area 173. More specifically, the preprocessing unit 172 adjusts the number of digits for the acquired value or values in accordance with the predetermined setting 1770.
[0068] The current data area 173 holds data (current values of one or more variables) to be written to the PLC engine 150. More specifically, the current data area 173 holds values whose number of digits has been adjusted by the preprocessing unit 172.
[0069] Previous data area 174 holds the previous data (previous values of one or more variables) to be written to PLC engine 150. When write execution unit 176 writes data to PLC engine 150, the data held in current data area 173 is copied to previous data area 174.
[0070] As a result, every time data is written to PLC engine 150, previous data area 174 is updated with the data held in current data area 173. That is, previous data area 174 holds the data that current data area 173 held in the previous cycle. The area sizes of current data area 173 and previous data area 174 may be set to be the same.
[0071] The comparison unit 175 compares the data stored in the current data area 173 with the data stored in the previous data area 174 for each variable to be written to the PLC engine 150. The comparison unit 175 determines the variable whose value is different as the current target variable, and outputs the value of the current target variable stored in the current data area 173 (current value) to the write execution unit 176.
[0072] The write execution unit 176 generates a data set 1760 from one or more values output from the comparison unit 175, and writes the data set 1760 to the application data area 155 of the PLC engine 150. Note that if no value is output from the comparison unit 175 (i.e., if the value held in the current data area 173 and the value held in the previous data area 174 are exactly the same), the write execution unit 176 does not need to generate the data set 1760.
[0073] In this way, the write execution unit 176 writes data held in the current data area 173 whose value has changed since the previous data area 174 into the application data area 155 (write area).
[0074] The setting unit 177 generates the setting 1770 in accordance with a user operation via the support device 200 and / or the HMI 300. Then, the setting unit 177 reflects the setting 1770 in the data acquisition unit 171 and the preprocessing unit 172.
[0075] The write time measurement unit 178 measures the time (write time 1780) required for the write execution unit 176 to write data. More specifically, when the write execution unit 176 starts writing data, the write time measurement unit 178 transmits a write start signal to the write monitoring unit 157 of the PLC engine 150. The write monitoring unit 157 monitors changes in the values of the write target variables in the application data area 155 in accordance with the write target variable names 1570. Then, when the values (data) of the write target variables are written to the application data area 155, the write monitoring unit 157 transmits a write end signal to the write time measurement unit 178. In this way, when the write execution unit 176 completes writing to the application data area 155 (write area), the write monitoring unit 157 outputs the write end signal to the application execution environment 160.
[0076] The write time measurement unit 178 calculates the length of time from sending the write start signal to receiving the write end signal as the write time 1780. That is, the write time measurement unit 178 measures the time (write time 1780) required for writing to the application data area 155 (write area) based on the write end signal.
[0077] The write time measurement unit 178 and / or the write monitoring unit 157 may hold a predetermined number of data write histories for calculating statistical information (write ratio and total variable write ratio) as described later.
[0078] The heartbeat unit 158 and the heartbeat unit 179 confirm that the PLC engine 150 and the application execution environment 160 are running normally. More specifically, the heartbeat unit 158 and the heartbeat unit 179 periodically transmit an alive signal to each other. If the period during which the alive signal cannot be received exceeds a threshold, the heartbeat unit 158 and the heartbeat unit 179 output a warning that the data write process is not running normally.
[0079] In this way, the heartbeat unit 158 and the heartbeat unit 179 are configured to monitor the normal operation of the PLC engine 150 and the application execution environment 160 by periodically transmitting an alive signal to each other.
[0080] As an example, Figure 5 shows a state in which only the value of variable B has changed. That is, for variables A and C, the current value and previous value are A' and C', respectively, while for variable B, the current value is B and the previous value is B'.
[0081] In such a case, since only the value of variable B has changed, only the current value of variable B, value B, is stored in data set 1760. As a result, in application data area 155 of PLC engine 150, only the value of variable B is updated.
[0082] <E. Pretreatment> Next, the pretreatment executed by the pretreatment unit 172 of the data writing unit 170 will be described.
[0083] In the application execution environment 160 of the control device 100 according to the present embodiment, if the value acquired this time is different from the value acquired last time (if it has changed), the different value is written into the PLC engine 150. Here, by performing a process of rounding the value rather than the acquired value itself, the probability that the value acquired this time and the value acquired last time can be regarded as the same can be increased.
[0084] Therefore, the pretreatment unit 172 executes adjustment of the number of digits as pretreatment on the acquired value according to the setting 1770.
[0085] FIG. 6 is a diagram for explaining an example of the pretreatment of the control device 100 according to the present embodiment. FIG. 6(A) shows an example of the value of the variable acquired by the data acquisition unit 171 (referred to as "raw data"). The raw data shown in FIG. 6(A) has two decimal places. For the raw data shown in FIG. 6(A), since there is no same one between adjacent values, all of them will be written.
[0086] FIG. 6(B) shows the result of rounding the raw data shown in FIG. 6(A) to one decimal place. Regarding the method of rounding the value, any of rounding up, rounding down, and truncation may be used, or another method may be adopted. FIG. 6(B) shows an example of rounding the value by rounding up as an example.
[0087] In the data shown in FIG. 6(B), since the third value and the fourth value are the same, it is not the target of data writing. That is, originally, data writing is performed four times, but only three times of data writing are performed.
[0088] FIG. 6(C) shows the result of rounding the raw data shown in FIG. 6(A) to only the integer part. FIG. 6(C) shows an example of rounding the value by rounding up as an example.
[0089] In the data shown in FIG. 6(C), since the first to fourth values are all the same, only the first value is the target for data writing, and the other data is not the target for data writing. That is, although data writing is originally performed four times, only one data writing is actually performed.
[0090] Thus, by adopting digit adjustment (value rounding process) as a preprocessing, the frequency of data writing can be adjusted.
[0091] <F. Settings related to data writing> As described above, by appropriately setting the preprocessing, the frequency of data writing from the application execution environment 160 to the PLC engine 150 can be adjusted. The control system 1 according to the present embodiment provides a function that allows a user to arbitrarily set settings (setting 1770) related to data writing.
[0092] FIG. 7 is an example of a user interface screen for setting data writing provided by the control system 1 according to the present embodiment. The user interface screen 250 displays the content of the setting 1770 and the time required for writing to the application data area 155 (writing area) (the total variable writing time and / or the average total variable writing time shown in FIG. 7), and accepts changes to the setting 1770.
[0093] More specifically, referring to FIG. 7, the user interface screen 250 includes a target variable setting unit 260 and a status display unit 270.
[0094] The target variable setting unit 260 accepts settings of one or more variables to be written from the application execution environment 160 to the PLC engine 150. More specifically, the target variable setting unit 260 includes one or more variable setting rows 261. The number of variable setting rows 261 can be arbitrarily changed by user operation.
[0095] Each variable setting row 261 includes a variable name setting section 262, a current value display section 263, and, as a digit number setting section, a significant digit setting section 264, a rounding processing setting section 265, a write ratio display section 266, and a ratio calculation sample number setting section 267.
[0096] A variable name arbitrarily selected by the user is input to the variable name setting unit 262. The variable name setting unit 262 accepts the setting of a variable corresponding to one or more values acquired by the data acquisition unit 171. For example, when the user selects an area of the variable name setting unit 262, a list of selectable variables may be displayed as a pull-down menu. The user may select a desired variable from the pull-down menu. Alternatively, the user may directly input an arbitrary variable name.
[0097] The current value display unit 263 displays the current value of the variable selected in the variable name setting unit 262. The current value to be displayed may be obtained by the device that provides the user interface screen 250 accessing the control device 100.
[0098] The significant digits setting unit 264 and the rounding process setting unit 265 accept settings related to preprocessing. That is, the significant digits setting unit 264 accepts a setting for the number of digits to be output by the preprocessing unit 172 as the content of the setting 1770. The rounding process setting unit 265 accepts a setting for a method for the preprocessing unit 172 to round a value to adjust the number of digits as the content of the setting 1770.
[0099] More specifically, the number of digits of the value of the variable held by the application execution environment 160 is input to the significant digits setting unit 264. An integer value indicating the number of decimal points may be input to the significant digits setting unit 264. For example, when "0" is specified, it means an integer value (no decimal point), when "1" is specified, it means an integer value with one decimal point, and when "2" is specified, it means an integer value with two decimal points. When "-1" is specified, it means an integer value with the first digit fixed to "0" (i.e., a multiple of 10).
[0100] A rounding method is input to the rounding setting unit 265. For example, "round off," "round up," "round down," etc. are input to the rounding setting unit 265.
[0101] The write ratio display unit 266 displays the ratio at which the variable selected in the variable name setting unit 262 is written from the application execution environment 160 to the PLC engine 150. The ratio calculation sample number setting unit 267 receives as input the number of samples used to calculate the ratio to be displayed in the write ratio display unit 266. The device providing the user interface screen 250 accesses the control device 100, acquires the history of data writes for the most recent N times (the number input to the ratio calculation sample number setting unit 267), and calculates and displays the write ratio from the number of times the target variable was actually written to the PLC engine 150.
[0102] The status display section 270 includes a total variable write time display section 271 , a total variable write average time display section 272 , an average time calculation sample number setting section 273 , a total variable write ratio display section 274 , and a write cycle display section 275 .
[0103] The total variable write time display section 271 displays the time required for the most recent data write from the application execution environment 160 to the PLC engine 150 (total variable write time).
[0104] The all variable write average time display unit 272 displays the average value of the time (all variable write average time) required to write data from the application execution environment 160 to the PLC engine 150. At this time, the device providing the user interface screen 250 accesses the control device 100, acquires the history of data writes for the most recent N times (average time calculation sample number setting unit 273), and calculates and displays the average value of the time required to write data.
[0105] The total variable write ratio display unit 274 displays the ratio of variables whose data has been written from the application execution environment 160 to the PLC engine 150 (total variable write ratio). That is, the total variable write ratio display unit 274 displays the ratio of the number of values included in the data written by the write execution unit 176 to the number of values acquired by the data acquisition unit 171. Alternatively, the total variable write ratio display unit 274 displays the ratio of the number of variables whose data has actually been written to the total number of write target variables that are targets for data writing.
[0106] The write cycle display unit 275 displays the cycle (write cycle) at which data is written from the application execution environment 160 to the PLC engine 150. The cycle at which data is written corresponds to the cycle at which the application process 166 is executed in the application execution environment 160.
[0107] The current value (current value display unit 263), the total variable write time (total variable write time display unit 271), and the write cycle (write cycle display unit 275) are acquired from the control device 100. On the other hand, the write ratio (write ratio display unit 266), the average total variable write time (average total variable write time display unit 272), and the total variable write ratio (total variable write ratio display unit 274) may be calculated each time by a device that provides the user interface screen 250 based on information acquired from the control device 100.
[0108] The setting contents input by the user on the user interface screen 250 shown in FIG. 7 are reflected in the setting 1770 at any timing.
[0109] The user interface screen 250 includes a CSV output button 252. When the CSV output button 252 is selected, time-series data of the values displayed in the total variable write time display section 271 and the values displayed in the total variable write ratio display section 274 may be output.
[0110] Typically, the user will refer to the user interface screen 250 and adjust the number of variables to be written, the contents of pre-processing, etc. so that the time displayed in the all variable write time display section 271 and / or the time displayed in the all variable write average time display section 272 falls within the time displayed in the write cycle display section 275.
[0111] 7 may be provided by any of the control device 100, the support device 200, and the HMI 300. When the control device 100 provides the user interface screen 250, a configuration example is assumed in which the control device 100 has a web server module and a browser application running on any computer accesses the control device 100.
[0112] FIG. 8 is a schematic diagram showing an example of a configuration for providing a user interface screen 250 by control system 1 according to the present embodiment.
[0113] 8(A) shows an example in which the support device 200 has a user interface screen providing module 230 that provides a user interface screen 250. The user interface screen providing module 230 may be provided by a user interface screen providing program 224 of the support device 200. In the configuration example shown in FIG. 8(A), the support device 200 exchanges data with the control device 100, thereby providing the user interface screen 250.
[0114] 8(B) shows an example in which the HMI 300 has a user interface screen providing module 230 that provides a user interface screen 250. The user interface screen providing module 230 may be provided by a program stored in the HMI 300. In the configuration example shown in FIG. 8(B), the HMI 300 exchanges data with the control device 100 to provide the user interface screen 250.
[0115] FIG. 8(C) shows an example in which the control device 100 has a user interface screen providing module 230 that provides a user interface screen 250. In this configuration example, the control device 100 has a Web server module 130, and the support device 200 and / or HMI 300 that the user actually operates have a browser 240. That is, the user interface screen 250 is provided to the user via the browser 240 executed on the support device 200 or HMI 300.
[0116] Note that, not limited to the configuration example shown in FIG. 8, any configuration may be adopted as long as it is possible to provide a user interface screen.
[0117] <G. Processing procedure> Next, an example of the processing procedure executed in the control system 1 according to the present embodiment will be described.
[0118] (g1: Data writing) FIG. 9 is a flowchart showing an example of the processing procedure related to data writing of the control device 100 according to the present embodiment. Each step shown in FIG. 9 is typically realized by the processor 102 of the control device 100 executing the application execution environment program 133 and / or the application program 134.
[0119] Referring to FIG. 9, the control device 100 determines whether the data writing cycle has arrived (step S100). If the data writing cycle has not arrived (NO in step S100), the process of step S100 is repeated.
[0120] If the data write period has arrived (YES in step S100), the control device 100 copies the data held in the current data area 173 to the previous data area 174 (step S102). Then, the control device 100 acquires the values of one or more specified variables in accordance with the setting 1770 (step S104), performs preprocessing on the acquired values (step S106), and writes the preprocessed values to the current data area 173 (step S108).
[0121] The control device 100 determines whether valid data is stored in the previous data area 174 (step S110). For example, at the time of the first execution when one or more values are acquired for the first time, no valid data is stored in the previous data area 174.
[0122] If no valid data is held in the previous data area 174 (NO in step S110), the control device 100 generates all the data held in the current data area 173 as a data set 1760 (step S112).
[0123] If valid data is held in the previous data area 174 (YES in step S110), the control device 100 compares the data held in the current data area 173 with the data held in the previous data area 174 (step S114), determines the variable whose value is different as the current target variable (step S116), and generates the value of the current target variable (current value) held in the current data area 173 as data set 1760 (step S118).
[0124] Next, the control device 100 generates a write start signal (step S120) and writes the generated data set 1760 from the application execution environment 160 to the PLC engine 150 (step S122). When the data writing is completed, the control device 100 generates a write end signal (step S124). Then, the control device 100 calculates the time from the generation of the write start signal to the generation of the write end signal as the write time (step S126). The control device 100 also stores the calculated write time and information on the written variables (step S128). Then, the processing from step S100 onwards is repeated.
[0125] (g2:Settings) 10 is a sequence chart showing an example of a setting processing procedure for writing data in the control system 1 according to this embodiment. For convenience of explanation, FIG. 10 shows an example of a configuration in which the support device 200 provides the user interface screen 250 (see FIG. 7), but the user interface screen 250 can be provided by any device that can communicate with the control device 100.
[0126] 10 is typically realized by the processor 102 of the control device 100 executing the application execution environment program 133 and / or the application program 134. Also, each step of the support device 200 shown in FIG. 10 is typically realized by the processor 202 of the support device 200 executing the user interface screen providing program 224.
[0127] 10, the support device 200 acquires the write ratio, total variable write time, total variable write average time, total variable write ratio, and write cycle for the currently set variables from the control device 100 (step S200). All of this information may be generated by the control device 100, or part of this information may be calculated and generated by the support device 200. Then, the support device 200 displays a user interface screen 250 (step S202).
[0128] Subsequently, the support device 200 determines whether a new variable name has been input to the variable name setting unit 262 of the user interface screen 250 (step S204). When a new variable name is input (YES in step S204), the support device 200 transmits the setting content including the input new variable to the control device 100 (step S206). Then, the control device 100 reflects the setting content from the support device 200 in the setting 1770 (step S208). If a new variable name is not input (NO in step S204), the processes of step S206 and step S208 are skipped.
[0129] Subsequently, the support device 200 determines whether a new value has been input to the significant digit setting unit 264 and / or the rounding processing setting unit 265 of the user interface screen 250 (step S210). When a new value is input (YES in step S210), the support device 200 transmits the setting content including the input new value to the control device 100 (step S212). Then, the control device 100 reflects the setting content from the support device 200 in the setting 1770 (step S214). If a new value is not input (NO in step S210), the processes of step S212 and step S214 are skipped.
[0130] The support device 200 determines whether the refresh cycle of the user interface screen 250 has arrived (step S216). If the refresh cycle has not arrived (NO in step S216), the process of step S216 is repeated. If the refresh cycle has arrived (YES in step S216), the processes below step S200 are repeated.
[0131] <H. Appendix> The present embodiment as described above includes the following technical ideas.
[0132] [Configuration 1] A first processing unit (150) that cyclically executes control operations (151), a second processing unit (160) that executes an application program (134) independently of the first processing unit; a providing unit (230) that provides a user interface screen (250); the first processing unit includes a write area (155) for holding data (1760) written from the second processing unit; The second processing unit is an acquisition unit (171) for acquiring one or more values; a pre-processing unit (172) for adjusting the number of digits for the one or more acquired values according to a predetermined setting (1770); a current data area (173) for storing the value whose number of digits has been adjusted; a previous data area (174) for storing data that the current data area stored in the previous period; a write execution unit (176) that writes data held in the current data area, whose value has changed since the previous data area, into the write area; The providing unit displays the content of the setting and the time (1780; 271, 272) required to write the setting to the write area, and accepts changes to the setting.
[0133] [Configuration 2] 2. The control system according to configuration 1, wherein the providing unit accepts, as the content of the setting, a setting (264) of the number of digits to be output by the preprocessing unit.
[0134] [Configuration 3] 3. The control system according to configuration 1 or 2, wherein the providing unit accepts, as the content of the setting, a setting (265) of a method for rounding a value to adjust the number of digits by the preprocessing unit.
[0135] [Configuration 4] 4. The control system according to any one of configurations 1 to 3, wherein the providing unit accepts variable settings (262) corresponding to one or more values acquired by the acquiring unit.
[0136] [Configuration 5] 5. The control system according to any one of configurations 1 to 4, wherein the providing unit displays a ratio (274) of the number of values included in the data written by the writing unit to the number of values acquired by the acquiring unit.
[0137] [Configuration 6] the first processing unit includes a monitoring unit (157) that outputs a write completion signal to the second processing unit when the writing execution unit completes writing to the write area; 6. The control system according to any one of configurations 1 to 5, wherein the second processing unit further includes a measurement unit (178) that measures the time required for writing to the write area based on the write end signal.
[0138] [Configuration 7] The first processing unit further includes a first heartbeat unit (156), The second processing unit further includes a second heartbeat unit (179), The control system according to any one of configurations 1 to 6, wherein the first heartbeat unit and the second heartbeat unit are configured to monitor the normal operation of the first processing unit and the second processing unit by periodically transmitting a live signal to each other.
[0139] [Configuration 8] A control device (100), a first processing unit (150) that cyclically executes a control calculation (151); a second processing unit (160) that executes an application program (134) independently of the first processing unit; the first processing unit includes a write area (155) for holding data (1760) written from the second processing unit; The second processing unit is an acquisition unit (171) for acquiring one or more values; a pre-processing unit (172) for adjusting the number of digits for the one or more acquired values according to a predetermined setting (1770); a current data area (173) for storing the value whose number of digits has been adjusted; a previous data area (174) for storing data that the current data area stored in the previous period; a write execution unit (176) that writes data held in the current data area, whose value has changed since the previous data area, into the write area; The control device displays the content of the setting and the time required to write the setting to the write area (1780; 271, 272), and provides a user interface screen (250) for accepting changes to the setting.
[0140] [Configuration 9] A control program (131, 132, 133, 134) for controlling the computer (100) to: a first processing unit (150) that cyclically executes a control calculation (151); functioning as a second processing unit (160) that executes an application program (134) independently of the first processing unit; the first processing unit includes a write area (155) for holding data (1760) written from the second processing unit; The second processing unit is an acquisition unit (171) for acquiring one or more values; a pre-processing unit (172) for adjusting the number of digits for the one or more acquired values according to a predetermined setting (1770); a current data area (173) for storing the value whose number of digits has been adjusted; a previous data area (174) for storing data that the current data area stored in the previous period; a write execution unit (176) that writes data held in the current data area, whose value has changed since the previous data area, into the write area; The control program causes the computer to execute a process of displaying the contents of the settings and the time required to write them to the write area (1780; 271, 272), and providing a user interface screen (250) that accepts changes to the settings.
[0141] The embodiments disclosed herein should be considered to be illustrative in all respects and not restrictive. The scope of the present invention is defined by the claims, not by the above description, and is intended to include all modifications within the meaning and scope of the claims. [Explanation of symbols]
[0142] 1 control system, 2 field bus, 4 upper network, 10 field device group, 12 remote I / O device, 14 relay group, 18 servo driver, 20 servo motor, 100 control device, 102, 202 processor, 104 chip set, 106, 206 main memory device, 108, 208 secondary memory device, 110 upper network controller, 112, 212 USB controller, 114 memory card interface, 116 memory card, 120 field bus controller, 122 internal bus controller, 124 I / O unit, 130 web server module, 131 system program, 132 user program, 133 application execution environment program, 134 application program, 140 IO interface, 142 communication interface, 144 variable manager, 150 PLC engine, 151 control operation, 152, 162 local memory area, 153, 163 Global data area, 154, 164 Internal data area, 155 Application data area, 156 Data exchange management unit, 157 Write monitoring unit, 158,179 Heartbeat section, 160 Application execution environment, 166 Application processing, 170 Data writing section, 171 Data acquisition section, 172 Preprocessing section, 173 Current data area, 174 Previous data area, 175 Comparison section, 176 Write execution section, 177 Setting section, 178 Write time measurement section, 200 Support device, 204 Optical drive, 205 Recording medium, 214 Network controller, 216 Input section, 218 Display section, 220 Bus, 222 OS, 224 User interface screen providing program, 230 User interface screen providing module, 240 Browser, 250 User interface screen, 252 Output button, 260 Target variable setting section, 261 Variable setting row, 262 Variable name setting section, 263 Current value display section, 264 Significant digits setting section, 265 Processing setting section, 266 Write ratio display section, 267 Percentage calculation sample number setting section, 270 status display section, 271 all variable write time display section, 272 all variable write average time display section, 273 average time calculation sample number setting section, 274 all variable write percentage display section, 275 write cycle display section, 300 HMI, 400 server device, 1570 write target variable name, 1760 dataset, 1770 setting, 1780 write time.
Claims
1. a first processing unit that cyclically executes control calculations; a second processing unit that executes an application program independently of the first processing unit; a providing unit that provides a user interface screen, the first processing unit includes a write area for holding data written by the second processing unit; The second processing unit is an acquisition unit for acquiring one or more values; a pre-processing unit that adjusts the number of digits for the one or more acquired values according to a predetermined setting; a current data area for storing the value whose number of digits has been adjusted; a previous data area for storing data that the current data area stored in the previous cycle; a write execution unit that writes data held in the current data area, the value of which has changed since the previous data area, into the write area; The providing unit displays the content of the setting and the time required to write the setting into the write area, and accepts changes to the setting.
2. The control system according to claim 1 , wherein the providing unit accepts, as the setting content, a setting of the number of digits to be output by the preprocessing unit.
3. The control system according to claim 1 , wherein the providing unit accepts, as the content of the setting, a setting of a method for rounding a value to adjust the number of digits by the preprocessing unit.
4. 4. The control system according to claim 1, wherein the providing unit accepts setting of a variable corresponding to one or more values acquired by the acquiring unit.
5. 4. The control system according to claim 1, wherein the providing unit displays a ratio of the number of values included in the data written by the writing unit to the number of values acquired by the acquiring unit.
6. the first processing unit includes a monitoring unit that outputs a write completion signal to the second processing unit when the writing execution unit completes writing to the write area; 4. The control system according to claim 1, wherein the second processing unit further comprises a measurement unit that measures the time required for writing to the write area based on the write end signal.
7. the first processing unit further includes a first heartbeat unit; the second processing unit further includes a second heartbeat unit, The control system according to any one of claims 1 to 3, wherein the first heartbeat unit and the second heartbeat unit are configured to monitor the normal operation of the first processing unit and the second processing unit by periodically sending a survival signal to each other.
8. A control device, a first processing unit that cyclically executes control calculations; a second processing unit that executes an application program independently of the first processing unit; the first processing unit includes a write area for holding data written by the second processing unit; The second processing unit is an acquisition unit for acquiring one or more values; a pre-processing unit that adjusts the number of digits for the one or more acquired values according to a predetermined setting; a current data area for storing the value whose number of digits has been adjusted; a previous data area for storing data that the current data area stored in the previous cycle; a write execution unit that writes data held in the current data area, the value of which has changed since the previous data area, into the write area; The control device displays the content of the setting and the time required to write the setting into the write area, and provides a user interface screen for accepting changes to the setting.
9. A control program for causing a computer to: a first processing unit that cyclically executes control calculations; functioning as a second processing unit that executes an application program independently of the first processing unit; the first processing unit includes a write area for holding data written by the second processing unit; The second processing unit is an acquisition unit for acquiring one or more values; a pre-processing unit that adjusts the number of digits for the one or more acquired values according to a predetermined setting; a current data area for storing the value whose number of digits has been adjusted; a previous data area for storing data that the current data area stored in the previous cycle; a write execution unit that writes data held in the current data area, the value of which has changed since the previous data area, into the write area; The control program causes the computer to execute a process of displaying the content of the setting and the time required to write the setting to the write area, and providing a user interface screen that accepts changes to the setting.
Citation Information
Patent Citations
Data detection method and device, electronic equipment and storage medium
CN114416418A
Controller for mobile vehicle
JP2000165965A
Slave and monitoring system
JP2005259077A
Control device, control method and control program
JP2020173689A