Data processing unit and data processing program

The data processing device and program address incomplete data acquisition by detecting and compensating for non-execution abnormalities, ensuring consistent data collection and reducing data losses.

JP2025166306AActive Publication Date: 2025-11-06PACIFIC INDUSTRIAL CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2024070228
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-04-24
Publication Date
2025-11-06
Estimated Expiration
2044-04-24

AI Technical Summary

Technical Problem

Conventional data processing devices face issues where the target number of data items is not reached due to temporary communication failures or delays, leading to incomplete data acquisition.

Method used

A data processing device and program that includes a data acquisition unit, abnormality detection unit, and data acquisition completion unit to detect and compensate for non-execution abnormalities by executing the data acquisition process in subsequent cycles.

Benefits of technology

Reduces the number of missing data points and prevents the failure to reach the target data count by completing data acquisition processes that were not initiated or terminated abnormally, ensuring reliable data acquisition over time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025166306000001_ABST
    Figure 2025166306000001_ABST
Patent Text Reader

Abstract

To provide a data processing unit and a data processing program capable of suppressing a loss number of data to acquire and suppressing trouble of data target number non-arrival.SOLUTION: A data processing unit 10A according to the embodiment starts executing data acquisition processing that acquires data from outside at a normal start timing repeated in a first cycle, and may finish executing the data acquisition processing in less than a half of the first cycle. Thus, normally, half of each cycle or more (half-cycle or more) becomes a blank period when no data acquisition processing is executed. The data processing unit 10A detects non-execution abnormality that execution is not started at the normal start timing, and executes the data acquisition processing non-started due to non-executed abnormality during the blank period after the non-execution abnormality.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to a data processing device and a data processing program. [Background technology]

[0002] BACKGROUND ART Known conventional data processing devices are those that periodically acquire data from the outside (see, for example, Patent Document 1). [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Application Publication No. 11-202932 (Paragraph

[0030] ) Summary of the Invention [Problem to be solved by the invention]

[0004] However, in conventional data processing devices, even if data is acquired over a specified number of periods (e.g., 60 seconds) at a predetermined period (e.g., 1 second), a problem of "data target number not being reached" can occur, in which only a number of data items less than the target number (e.g., 60 items) for the specified number of periods can be acquired. This can be caused by a temporary communication failure between the data processing device and the data acquisition source, or a temporary delay in measurement processing by, for example, a measurement device that is the data acquisition source.

[0005] The present application has been made in consideration of the above circumstances, and provides a data processing device and a data processing program that can reduce the number of missing pieces of acquired data and prevent the occurrence of problems such as not reaching a target number of pieces of data. [Means for solving the problem]

[0006] A first aspect of the present disclosure made to solve the above problem is a data processing device comprising: a data acquisition unit that executes a data acquisition process for acquiring data from an external source every first cycle; an abnormality detection unit that detects non-execution abnormalities, either that the data acquisition process is not executed or that the process is forcibly terminated during execution; and a data acquisition completion unit that, when the non-execution abnormality is detected, starts execution of the data acquisition process that has not been started or terminated due to the non-execution abnormality during a period after the end of the data acquisition process in a subsequent cycle.

[0007] A second aspect of the present disclosure is a data processing program that causes a computer to function as a data acquisition unit that executes a data acquisition process for acquiring data from an external source every first cycle, an abnormality detection unit that detects non-execution abnormalities, such as the data acquisition process not being executed or being forcibly terminated during execution, or both, and a data acquisition completion unit that, when the non-execution abnormality is detected, starts execution of the data acquisition process that has not been started or terminated due to the non-execution abnormality during a period after the end of the data acquisition process in a subsequent cycle. [Effects of the Invention]

[0008] The data processing device and the computer executing the data processing program of the present disclosure execute a data acquisition process to acquire data from an external device for each first cycle. The data processing device and the computer executing the data processing program of the present disclosure then detect either or both of the non-execution abnormalities of the data acquisition process not being started or being forcibly terminated during execution, and execute the data acquisition process that has not been started or not completed due to the non-execution abnormality during a period following the non-execution abnormality after the completion of the data acquisition process. In this way, the data processing device and the data processing program of the present disclosure execute the data acquisition process that has not been started or not completed so as to compensate for the data acquisition process later, thereby reducing the number of missing data when data is acquired over a predetermined number of cycles and reducing the occurrence of a malfunction in which the target number of data is not reached. [Brief explanation of the drawings]

[0009] [Figure 1] FIG. 1 is a block diagram showing the electrical configuration of a data processing device according to a first embodiment of the present disclosure. [Figure 2] FIG. 2A is a time chart showing the execution timing of the acquisition command process, FIG. 2B is a time chart showing the execution timing of the supplementary command process, FIG. 2C is a time chart showing the execution timing of each process, and FIG. 2D is a time chart showing the execution timing of each process. [Figure 3] FIG. 3 is a flowchart of the program executed by the acquisition command process. [Figure 4] Figure 4 is a flowchart of the program executed by the command execution process. [Figure 5] FIG. 5 is a flowchart of the program executed by the abnormality detection process. [Figure 6] FIG. 6 is a flowchart of the program executed by the complement command processing. [Figure 7] Figure 7 shows the flowchart of the program executed by the statistical processing. [Figure 8] FIG. 8 is a flowchart of a program executed by the abnormality detection process according to the second embodiment. [Figure 9] FIG. 9 is a flowchart of the program executed by the complement command processing. [Figure 10] FIG. 10 is a flowchart of a program executed by the command execution process according to the third embodiment. [Figure 11] FIG. 11 is a time chart showing the execution timing of the supplementary command process according to the fourth embodiment. [Figure 12] FIG. 12 is a flowchart of a program executed by a supplementary command process according to the fifth embodiment. [Figure 13] FIG. 13 is a flowchart of a program executed by an acquisition command process according to the sixth embodiment. [Figure 14] FIG. 14 is a flowchart of the program executed by the command execution process. [Figure 15] FIG. 15 is a flowchart of a program executed by the abnormality detection process. [Figure 16]FIG. 16 is a flowchart of a program executed by the complement command processing. DETAILED DESCRIPTION OF THE INVENTION

[0010] [First embodiment] A data processing device 10A and a data processing program according to a first embodiment of the present disclosure will be described with reference to Figures 1 to 7. As shown in Figure 1, the data processing device 10A is connected to, for example, a power meter 81 in a factory via a communication network 100 including the Internet. The power meter 81 measures, for example, the power consumption of equipment 80 in the factory. The power meter 81 has a communication circuit, and in response to an external request via the communication network 100, transmits the power consumption of the equipment 80 measured at the time of the request as measurement data to the request source.

[0011] Although the data processing device 10A is connected to the power meter 81 via the communication network 100, it may be connected to the power meter 81 without via the communication network. Furthermore, the data processing device 10A is a terminal connected to the communication network 100, but it may also be a cloud server in the communication network 100.

[0012] The data processing device 10A includes, for example, an MCU 11, an auxiliary storage device 12, a communication circuit 13, an RTC 14, and an interrupt circuit 15.

[0013] The RTC 14 provides time information to an interrupt circuit 15 and a CPU (not shown) included in the MCU 11. The interrupt circuit 15 is connected to an interrupt terminal of the CPU, and provides an interrupt signal at a predetermined period, which is generated based on the time information from the RTC 14, to the CPU.

[0014] The auxiliary storage device 12 stores data processing programs including acquisition command processing PG1, command execution processing PG2, abnormality detection processing PG3, supplementary command processing PG4, and statistical processing PG5 (see FIGS. 3 to 7), which will be described later. The MCU 11 (more specifically, the CPU of the MCU 11) repeatedly executes each of the processes PG1 to PG5 at each set period, whereby the MCU 11 functions as a data acquisition unit 21, a data acquisition and supplementary unit 22, an abnormality detection unit 23, an abnormality counter 24, a data storage unit 25, a statistical processing unit 26, and the like, which are shown in the block diagram of FIG.

[0015] The data acquisition unit 21 and the data acquisition complement unit 22 share the data acquisition processing unit 20, and in addition thereto, the data acquisition unit 21 has a data acquisition command unit 21A, while the data acquisition complement unit 22 has a data acquisition complement command unit 22A.

[0016] The data acquisition processing unit 20 is connected to the data acquisition command unit 21A and the data acquisition supplement command unit 22A. When the data acquisition processing unit 20 receives a start command from the data acquisition command unit 21A or the data acquisition supplement command unit 22A, it starts executing a data acquisition process to acquire measurement data from the power meter 81.

[0017] Specifically, the start command received by the data acquisition processing unit 20 includes, for example, time data specifying the date and time. Upon receiving a start command from the data acquisition command unit 21A or the data acquisition supplement command unit 22A, the data acquisition processing unit 20 starts executing the data acquisition process and outputs a data request signal to the communication circuit 13, requesting the power meter 81 to transmit measurement data. The communication circuit 13 then transmits the data request signal to the power meter 81 in accordance with a communication protocol of a general communication network. In response to this, when the power meter 81 transmits measurement data, the data acquisition processing unit 20 buffers the measurement data in a buffer (not shown) provided in the data acquisition processing unit 20 itself to acquire the measurement data. Upon receiving an EOF (END OF FILE) code indicating the end of the transmitted data from the power meter 81, the data acquisition processing unit 20 associates the buffered measurement data with the time data included in the start command and stores the result in the data storage unit 25. The data acquisition processing unit 20 then deletes all data from the buffer and terminates the data acquisition process.

[0018] Here, under normal circumstances when no malfunctions such as communication failures occur, the data acquisition process is completed within an execution time (hereinafter referred to as the "normal execution time") that is, for example, equal to or shorter than half the first cycle described below. However, when a malfunction such as a communication failure occurs, the data acquisition processing unit 20 does not terminate the process until it acquires the EOF code, and allows the execution time of the data acquisition process to become longer than one cycle of the first cycle, which is a prolonged abnormality.

[0019] The data acquisition command unit 21A issues a start command to the data acquisition processing unit 20 in a first cycle based on the time information from the RTC 14. Specifically, the time information from the RTC 14 is updated in 1 / 100 second increments, for example. As shown in the conceptual diagram of FIG. 2A , the data acquisition command unit 21A outputs a start command to the data acquisition processing unit 20 at the timing when the value of the one-second unit of the time information from the RTC 14 changes (hereinafter referred to as "normal start timing"). As a result, in response to all start commands output by the data acquisition command unit 21A, the data acquisition processing unit 20 starts executing the data acquisition process. If the execution of the data acquisition process is completed within the normal execution time, the time data associated with the multiple measurement data stored in the data storage unit 25 will be consecutive, shifted by one second.

[0020] In this embodiment, if a prolonged abnormality occurs and the data acquisition processing unit 20 is executing data acquisition processing at the normal start timing when the data acquisition command unit 21A would output a start command, the data acquisition command unit 21A does not output a start command. As a result, the measurement data linked to the time data of the start command that was not output is not acquired, and therefore, missing parts with intervals of 2 seconds or more occur in the multiple time data stored in the data storage unit 25.

[0021] The abnormality detection unit 23 detects an abnormality where the execution of the data acquisition process does not start at the normal start timing due to the prolonged abnormality described above (hereinafter, this is referred to as a "non-execution abnormality").The abnormality detection unit 23 then increments the abnormality counter 24 every time it detects a non-execution abnormality.

[0022] The abnormality detection process by the abnormality detection unit 23 is performed during the time from the normal start timing when the data acquisition command unit 21A outputs a start command to the time when the data acquisition processing unit 20 starts executing the data acquisition process in response to the command. Specifically, the execution time of the abnormality detection process is shorter than the time obtained by subtracting the amount of variation in the data acquisition process from half the first period (specifically, for example, 4 / 5 or less of the half period of the first period).

[0023] The data acquisition complementary command unit 22A acquires time information from the RTC 14, acquires the value of the abnormality counter 24 at a timing delayed by half a first cycle from the timing at which the data acquisition command unit 21A outputs a start command (i.e., at a timing delayed by 0.5 seconds from the switching of the 1-second value of the time information from the RTC 14), and if the value of the abnormality counter 24 is not "0", acquires information as to whether or not data acquisition processing is being executed from the data acquisition processing unit 20. Then, if the value of the abnormality counter 24 is not "0" and data acquisition processing is not being executed, the data acquisition complementary command unit 22A outputs a start command to the data acquisition processing unit 20 and then decrements the abnormality counter 24.

[0024] As a result, as shown in the conceptual diagram of Figure 2B, when a non-execution abnormality occurs, one or more data acquisition processes for which a non-execution abnormality occurred are executed so as to be supplemented during a blank period in the latter half of the first cycle, which is normally not used for data acquisition processes (hereinafter, this is referred to as "supplementary execution") in each cycle of the first cycle.

[0025] Furthermore, the time taken for the data acquisition supplement command unit 22A to start the data acquisition process is shorter than the time obtained by subtracting the normal execution time of the data acquisition process from half the first cycle. More specifically, it is shorter than the time obtained by subtracting the amount of variation in the data acquisition process from half the first cycle (specifically, for example, 4 / 5 or less of the half cycle of the first cycle).

[0026] The statistical processing unit 26 acquires time information from the RTC 14, starts, for example, 0.5 seconds before the one-minute value of the time information changes (i.e., half a cycle before the first cycle), and stops before the one-minute value of the time information changes. When the statistical processing unit 26 starts, it issues a special command to the data acquisition processing unit 20 and the anomaly detection unit 23. When the data acquisition processing unit 20 receives the special command, if it is currently executing a data acquisition process, it forcibly terminates the execution and deletes all data from the buffer without outputting the measurement data to the data storage unit 25. Furthermore, if the data acquisition processing unit 20 receives the special command while it is not currently executing a data acquisition process, it does not react to the special command. When the anomaly detection unit 23 receives the special command, it does not detect the non-execution anomaly described above, and resets the anomaly counter 24 to 0.

[0027] After the special command is issued, the statistical processing unit 26 acquires all measurement data stored in the data storage unit 25 and deletes all data from the data storage unit 25. Then, it counts the number of acquired measurement data and calculates statistical data (e.g., average value) related to all acquired measurement data. It then generates log data that links the statistical data with time information on the start of the statistical processing unit 26 and the number of measurement data, and stores the log data in the auxiliary storage unit 12, while also transmitting the log data to a predetermined terminal 82 connected to the communication network 100 via the communication circuit 13.

[0028] The acquisition command processing PG1, command execution processing PG2, abnormality detection processing PG3, supplementary command processing PG4, and statistical processing PG5 included in the aforementioned data processing program are shown in Figures 3 to 7. In these processing PG1 to PG5, "FLG1, FLG2, FLG3" are flags, and "i" is an abnormality counter, all of which are set to "0" by default. Also, Figure 2C shows the execution timing of processing PG1 to PG5.

[0029] The acquisition command process PG1 is repeatedly executed for each first cycle, for example, at the timing when the value of the one-second unit of the time information from the RTC 14 changes (see FIG. 2C). As shown in FIG. 3, first, it is determined whether FLG1 is "1" (S10). FLG1 being "1" means that measurement data acquisition is being executed (step S24 of command execution process PG2, described later). If FLG1 is not "1" (YES in S10), a start command to execute measurement data acquisition is output (S11), FLG2 is set to "1," and the process exits from the acquisition command process PG1 (S12). On the other hand, if FLG1 is "1" (NO in S10), a start command is not output, FLG3 is set to "1," and the process exits from the acquisition command process PG1 (S13). Here, the MCU 11 when executing steps S10 to S13 corresponds to the aforementioned data acquisition command unit 21A, and setting FLG2 to "1" means that a start command has been output, while setting FLG3 to "1" means that the start command was not output at the normal start timing (a non-execution abnormality was detected).

[0030] The command execution process PG2 is repeatedly executed, for example, every 1 / 10 seconds, based on time information from the RTC 14 (see FIG. 2C). As shown in FIG. 4, when FLG2 is 1, that is, when a start command is output (NO in S20 and YES in S21), FLG1 is set to 1 (S22) and FLG2 is reset to 0 (S23). Then, acquisition of measurement data from the power meter 81 is started and the acquired measurement data is stored in a buffer (S24). The process of storing the measurement data in the buffer (S24) is repeatedly executed until an EOF code indicating the end of the transmission data is acquired from the power meter 81 (YES in S20, NO in S24 and S25). When the EOF code is acquired (YES in S25), the measurement data stored in the buffer is linked to the time data included in the start command and moved to the data storage unit 25 (S26). FLG1 is reset to 0, and the process exits from the command execution process PG2 (S27). On the other hand, if FLG2 is 0, that is, if the start command is not output (NO in S20 and NO in S21), the process of acquiring the measurement data is not executed. Here, the MCU 11 when executing steps S20 to S27 corresponds to the data acquisition processing unit 20 described above.

[0031] The abnormality detection process PG3 is repeatedly executed for each first cycle, for example, at the timing after execution of the acquisition command process PG1 (see FIG. 2C), and as shown in FIG. 5, determines whether FLG3 is 1, that is, whether a start command was output at the normal start timing (S30). If a start command was output at the normal start timing, the abnormality detection process PG3 is terminated (NO in S30). If a start command was not output at the normal start timing (YES in S30), the value of counter i is incremented by 1 and the abnormality detection process PG3 is terminated (S31). Here, the MCU 11 executing steps S30 and S31 corresponds to the abnormality detection unit 23 described above, and counter i corresponds to the abnormality counter 24 that counts the number of non-execution abnormalities in which a start command is not output at the normal start timing.

[0032] Complementary command processing PG4 is repeatedly executed for each first cycle, for example, 0.5 seconds after the time information from RTC 14 switches in the 1-second range (see FIG. 2C). As shown in FIG. 6, first, it determines whether counter i is equal to 0, i.e., whether an execution failure has occurred (S40). If no execution failure has occurred (YES in S40), it exits from complementary command processing PG4. If an execution failure has occurred (NO in S40), it further determines whether FLG1 is equal to 1, i.e., whether measurement data is being acquired (S41). If measurement data is not being acquired (NO in S41), it outputs a start command to execute a complementary measurement data acquisition process (S42), sets FLG2 to “1” (S43), decrements the value of counter i by one, and exits from complementary command processing PG4 (S43). Then, in response to FLG2 being set to “1,” the command execution processing PG2 described above executes the measurement data acquisition process. On the other hand, even if there is an inexecution abnormality (NO in S40), if measurement data is being acquired (YES in S41), a start command for complementary execution of the measurement data acquisition process is not output. In this case, when the subsequent complementary command process PG4 is executed, if measurement data is not being acquired (NO in S41), a start command is output (S42), and measurement data acquisition process is performed by command execution process PG2. Here, the MCU 11 when executing steps S40 to S44 corresponds to the above-mentioned data acquisition complementary command unit 22A.

[0033] The statistical processing PG5 is repeatedly executed 0.5 seconds before the value of the one-minute interval of the time information from the RTC 14 changes (see FIG. 2C). As shown in FIG. 7, first, in step S50, the execution of all the command execution processing PG2 and the complementary command processing PG4 is forcibly terminated, the value of the counter i is set to 0, and all the measurement data stored in the buffer is deleted (S51). Then, all the measurement data stored in the data storage unit 25 is acquired and statistical data is calculated (S52). Then, log data is generated by linking the statistical data with the time information of the start of the statistical processing PG5 and the number of measurement data, and the log data is stored in the auxiliary storage unit 12. At the same time, the log data is transmitted to a predetermined terminal 82 and the statistical processing PG5 is exited (S53). Here, the MCU 11 when executing steps S50 to S53 corresponds to the statistical processing unit 26 described above.

[0034] This completes the description of the configuration of this embodiment. Next, the effects of this embodiment will be described. The data processing device 10A of this embodiment starts executing a data acquisition process for acquiring data from an external device at the normal start timing, which is repeated in a first cycle, and is capable of completing the execution of the data acquisition process in less than half of the first cycle. As a result, typically, more than half of each cycle (more than half the cycle) is a blank period in which the data acquisition process is not being executed. The data processing device 10A of this embodiment then detects a non-execution abnormality in which the data acquisition process does not start at the normal start timing, and executes the data acquisition process that has not been started due to the non-execution abnormality during the blank period following the non-execution abnormality. In this way, the data processing device 10A of this embodiment executes the non-started data acquisition process later, thereby reducing the number of missing data when data is acquired over a predetermined number of cycles, and reducing the occurrence of a malfunction in which the target number of data is not reached.

[0035] Furthermore, even if multiple non-execution anomalies occur during one prolonged anomaly, for example, if the prolonged anomaly exceeds multiple periods of the first period as shown in Fig. 2D, in the data processing device 10A of this embodiment, the fact that a start command is not output at the normal start timing and execution of the data acquisition process is not started is counted as a non-execution anomaly by the anomaly counter, so that multiple non-execution anomalies can be counted without omission. Furthermore, with this configuration, a non-execution anomaly can be detected even if a prolonged anomaly occurs during complementary execution of the data acquisition process and the data acquisition process cannot be executed at the normal start timing.

[0036] In the data processing device 10A of this embodiment, the data acquisition process is complementarily executed until the abnormality counter reaches 0, so that it can also deal with cases where non-execution abnormalities occur consecutively and the number of occurrences of unstarted data acquisition processes is greater than the number of complement executions. Specifically, complement execution is normally performed during a blank period not used for data acquisition process, and if that blank period is during execution of data acquisition process due to a prolonged abnormality, it is shifted to a subsequent blank period, so that the number of missing data can be reduced by performing complement execution as needed while executing normal data acquisition process over multiple cycles.

[0037] Furthermore, since statistical data is calculated based on data for the specified number of cycles for each of the specified number of cycles of the first period, highly reliable statistical data can be obtained.

[0038] [Second embodiment] The data processing device 10B of the present disclosure is provided with a flag section instead of the abnormality counter 24 of Fig. 1 described in the first embodiment, and the flag section is set when an execution failure abnormality occurs and is reset when the data acquisition supplement command section 22A outputs a start command (i.e., when execution of the data acquisition process is started). Also, in this embodiment, an abnormality determination flag FLG4 is used as shown in Figs. 8 and 9 instead of the counter i (see Fig. 5) described in the first embodiment.

[0039] The data processing device 10B of this embodiment can also perform complementary execution of unstarted data acquisition processing at a later time, thereby reducing the number of data losses when data acquisition is performed over a predetermined number of cycles, and reducing the occurrence of problems such as not reaching the target number of data.

[0040] [Third embodiment] In the data processing device 10A of the first embodiment, even if the prolonged abnormality continues, the data acquisition processing unit 20 is configured not to terminate the data acquisition process until the EOF code is acquired. However, in the data processing device 10C of the present disclosure, the data acquisition processing unit 20 is configured to tolerate a prolonged abnormality in the data acquisition process that exceeds three first cycles, but to forcibly terminate the data acquisition process midway in the event of a prolonged abnormality that exceeds four first cycles.

[0041] Specifically, the command execution process PG2C shown in FIG. 10 is executed. "T1" is a counter for counting time. The command execution process PG2C is repeatedly executed every 1 / 10 [second], similar to the command execution process PG2 of the first embodiment. If FLG2 is 1 (YES in S61), that is, if a start command is output, in step S63, the counter T1 is incremented by one, and the measurement data is stored in the buffer (S64). This process is repeated until an EOF code is acquired (YES in S66). However, in this embodiment, these processes are repeated until the count number of the counter T1 does not exceed 30 (30 × 1 / 10 [second] = 3 [seconds]), that is, until a period equivalent to three first cycles has elapsed since the start of the data acquisition process (NO in S65). After the period equivalent to three cycles has elapsed (YES in S65), the measurement data stored in the buffer is deleted (S71), and the execution of measurement data acquisition is forcibly terminated (S68 and S69). Furthermore, whether the EOF code is acquired (YES in S66) and the execution of the data acquisition process is completed to the end (S67) or terminated midway (YES in S65), the counter T1 is reset to "0" and the command execution process PG2C is terminated (S70).

[0042] According to the data processing device 10C of this embodiment, it is possible to prevent a situation in which the number of occurrences of unstarted data acquisition processes increases due to the prolonged abnormality, while the corresponding complementary execution cannot be performed and the number of missing data cannot be reduced. Note that, although this embodiment allows a prolonged abnormality in the data acquisition process to exceed three first cycles, a configuration may be adopted in which a longer or shorter period is allowed, or a configuration may be adopted in which a prolonged abnormality exceeding the first cycle is not allowed.

[0043] [Fourth embodiment] In the data processing device 10A of the first embodiment, when a non-execution abnormality is detected, the complementary execution of the data acquisition process that has not been started due to the non-execution abnormality is performed during a subsequent blank period when the data acquisition process is not being executed. However, in the data processing device 10D of the present disclosure, the complementary execution is possible at any time during the period when the data acquisition process is not being executed after the non-execution abnormality.

[0044] In the data processing device 10D of this embodiment, the data acquisition supplemental command unit 22A acquires time information from the RTC 14 and operates every 1 / 10 seconds. When the abnormality detection unit 23 detects a non-execution abnormality, the data acquisition supplemental command unit 22A acquires information on whether the data acquisition process is currently being executed from the data acquisition processing unit 20. If the data acquisition process is not currently being executed, the data acquisition supplemental command unit 22A outputs a start command for the supplemental execution without waiting for the second half of the first cycle to arrive, and the data acquisition process is executed as a complement. Furthermore, this configuration makes it possible to output multiple start commands for the supplemental execution during the first cycle, thereby enabling multiple complementary executions of the data acquisition process.

[0045] [Fifth embodiment] In the data processing device 10D of the fourth embodiment, when an inexecution abnormality is detected, if the data acquisition process is not currently being executed, the data acquisition process is executed as a complement; however, in the data processing device 10E of the present disclosure, the data acquisition process is executed as a complement only if the data acquisition process is not currently being executed and the period until the next normal start timing is equal to or longer than the normal execution time of the data acquisition process.

[0046] In the data processing device 10E of this embodiment, the data acquisition supplement command unit 22A has a remaining time determination unit that calculates the remaining time from the current time until the next normal start timing and determines whether the remaining time is equal to or greater than the normal execution time. When the abnormality detection unit 23 detects a non-execution abnormality, the remaining time determination unit 27 of the data acquisition supplement command unit 22A obtains information on whether the data acquisition process is being executed from the data acquisition processing unit 20 and obtains the determination result by the remaining time determination unit (S45 in FIG. 12), and outputs a start command if the data acquisition process is not being executed and equal to or greater than the normal execution time of the data acquisition process remains until the next normal start timing.

[0047] According to the data processing device 10E of this embodiment, it is possible to prevent a new non-execution abnormality from occurring at the normal start timing due to complementary execution.

[0048] [Sixth embodiment] In the data processing device 10A of the first embodiment, the command execution process PG2 is repeatedly executed every 1 / 10 seconds. However, in the data processing device 10F of the present disclosure, the command execution process PG2F is started when a start command is output by the acquisition command process PG1F or the complement command process PG4F, and is not started when a start command is not output. When a start command is output, the command execution process PG2F is repeatedly executed until the EOF code is acquired. Below, with reference to FIGS. 13 to 16, differences from the first embodiment will be described, focusing on the configuration.

[0049] 13, the acquisition command processing PG1F is repeatedly executed for each first cycle at the timing when the value of the one-second unit of the time information from the RTC 14 switches, as in the first embodiment, and if FLG1, which indicates that measurement data is not being acquired, is not "1" (YES in S10), a start command is output and the acquisition command processing PG1F is terminated (S11). In this embodiment, the configuration is such that FLG2, which indicates that a start command has been output, and FLG3, which indicates that an execution failure has occurred, are not set.

[0050] Then, when a start command is output by the acquisition command processing PG1F, the command execution processing PG2F is started. As shown in Fig. 14, the command execution processing PG2F first sets FLG1, which indicates that measurement data is being acquired, to 1 (S22), and then repeatedly executes measurement data acquisition until an EOF code is acquired (NO in S22, S24, and S25). When the EOF code is acquired (YES in S25), the measurement data stored in the buffer is moved to the data storage unit 25 (S26). When the acquisition of the measurement data is completed in this way, FLG1 is reset to "0" and the processing exits from the command execution processing PG2F (S27).

[0051] Furthermore, as shown in FIG. 15, the abnormality detection processing PG3F of this embodiment is repeatedly executed every first cycle at the timing when the command execution processing PG2F is started after the execution of the acquisition command processing PG1F, and determines whether or not measurement data is being acquired (S30). If measurement data is being acquired (YES in S30), it determines that there is an non-execution abnormality, increments the value of counter i by 1, and exits from the abnormality detection processing PG3 (S31).

[0052] As in the first embodiment, the complementary command processing PG4F of this embodiment is repeatedly executed for each first cycle at a timing delayed by 0.5 seconds from the timing at which the value of the one-second unit of the time information from the RTC 14 switches, and as shown in Fig. 16, if an execution failure occurs (NO in S40) and measurement data is not being acquired (NO in S41), a start command for complementary execution of measurement data acquisition processing is output (S42), the value of counter i is decremented by 1, and the process exits from complementary command processing PG4 (S43). Then, in response to the output of the start command by complementary command processing PG4F, command execution processing PG2F is started to perform the measurement data acquisition processing, as described above.

[0053] [Other embodiments] In the above embodiment, if the data acquisition processing unit 20 is executing data acquisition processing at the normal start timing at which the data acquisition command unit 21A outputs a start command, the data acquisition command unit 21A is configured not to output a start command. However, even if the data acquisition processing unit 20 is executing data acquisition processing, the data acquisition command unit 21A may be configured to always output a start command at the above timing, and the data acquisition processing unit 20 may be configured not to receive a new start command while executing data acquisition processing.

[0054] In this case, for example, the data acquisition processing unit 20 is connected to the data acquisition command unit 21A and the data acquisition supplement command unit 22A via a switch, and the switch is normally in an on state. When the data acquisition processing unit 20 receives a start command via the switch from the data acquisition command unit 21A or the data acquisition supplement command unit 22A, it turns the switch off and then starts executing the data acquisition process. When the data acquisition process is completed, it turns the switch on, and while the data acquisition process is being executed, the switch is in an off state, so that the data acquisition processing unit 20 does not receive a start command.

[0055] In the data processing devices 10A to 10F of the above embodiments, the statistical processing unit 26 calculates the average value as statistical data for all the acquired measurement data, but this is not limited to this, and the statistical data may be, for example, a variance or multivariate analysis.

[0056] The data processing devices 10A to 10F in the above-described embodiments are connected to a power meter 81 of a facility 80 in a factory and are applied to acquire measurement data of the power consumption of the facility 80. However, the present invention is not limited to this and may be applied to acquire other measurement data. Furthermore, the data processing devices 10A to 10F may be applied to acquire not only measurement data but also simple communication data.

[0057] <Additional Notes> The following describes the features extracted from the above embodiment, while indicating, as necessary, the effects, etc. Note that, for ease of understanding, the corresponding configurations in the above embodiment are indicated in parentheses as appropriate below, but these features are not limited to the specific configurations indicated in parentheses.

[0058] [Feature 1] A data processing device (10A to 10F) comprising: a data acquisition unit (21) that executes a data acquisition process for acquiring data from an external device (81) every first cycle; an abnormality detection unit (23) that detects non-execution abnormalities, such as the data acquisition process not being executed or being forcibly terminated during execution; and a data acquisition completion unit (22) that, when the non-execution abnormality is detected, starts execution of the data acquisition process that has not been started or terminated due to the non-execution abnormality during a period after the end of the data acquisition process in a subsequent cycle.

[0059] [Feature 2] The data processing device (10A, 10C to 10F) according to Feature 1 further comprises an abnormality counter (24) that counts the number of data acquisition processes waiting to be executed by the data acquisition completion unit (22), and the data acquisition completion unit (22) starts executing the data acquisition processes until the abnormality counter (24) reaches 0.

[0060] [Feature 3] The data processing device (10B) according to feature 1 further comprises a flag unit that is set when the non-execution abnormality occurs and is reset when the data acquisition completion unit (22) starts to execute the data acquisition process, and the data acquisition completion unit (22) executes the data acquisition process on the condition that the flag unit is set.

[0061] [Feature 4] The data processing device (10A to 10F) according to any one of features 1 to 3, wherein the data acquisition unit (21) tolerates a prolonged abnormality in which the execution time of the data acquisition process is longer than one cycle of the first cycle, and the abnormality detection unit (23) detects a non-execution abnormality in which the data acquisition process is not executed in subsequent consecutive cycles due to the prolonged abnormality.

[0062] [Feature 5] A data processing device (10A to 10F) according to any one of features 1 to 4, comprising a statistical processing unit (26) that calculates statistical data based on the data for a predetermined number of cycles of the first cycle.

[0063] [Feature 6] A data processing program (PG1 to PG4, PG3B, PG4B, PG2C, PG4E) that causes a computer (10A to 10F) to function as a data acquisition unit (21) that executes a data acquisition process for acquiring data from the outside (81) every first cycle, an abnormality detection unit (23) that detects non-execution abnormalities, such as the data acquisition process not being executed or being forcibly terminated during execution, or both, and a data acquisition completion unit (22) that, when the non-execution abnormality is detected, starts execution of the data acquisition process that has not been started or terminated due to the non-execution abnormality during a period after the end of the data acquisition process in a subsequent cycle.

[0064] [Feature 7] The data processing program (PG3, PG4, PG4E) according to feature 6 causes the computer (10A) to function as an abnormality counter (24) that counts the number of data acquisition processes waiting to be executed by the data acquisition completion unit (22), and causes the computer (10A, 10C to 10F) to start executing the data acquisition process until the abnormality counter (24) reaches 0.

[0065] [Feature 8] The data processing program (PG3B, PG4B) described in feature 6 causes the computer (10A) to function as a flag unit that is set when the non-execution abnormality occurs and is reset when the data acquisition completion unit (22) starts executing the data acquisition process, and the data acquisition completion unit (22) causes the computer (10B) to execute the data acquisition process on the condition that the flag unit is set.

[0066] [Feature 9] The data processing program (PG1 to PG4, PG3B, PG4B, PG2C, PG4E) according to any one of features 6 to 8, wherein the data acquisition unit (21) allows a prolonged abnormality in which the execution time of the data acquisition process is longer than one cycle of the first cycle, and the abnormality detection unit (23) causes the computer (10A to 10F) to function to detect a non-execution abnormality in which the data acquisition process is not executed in subsequent consecutive cycles due to the prolonged abnormality.

[0067] [Feature 10] A data processing program (PG5) according to any one of features 6 to 9, which causes the computer (10A to 10F) to function as a statistical processing unit (26) that calculates statistical data based on the data for a predetermined number of cycles of the first cycle.

[0068] The data processing device of Feature 1 and the computer running the data processing program of Feature 6 execute a data acquisition process to acquire data from an external device for each first cycle. The data processing device of Feature 1 and the computer running the data processing program of Feature 6 then detect either or both of the non-execution abnormalities of the data acquisition process not being started or being forcibly terminated during execution, and execute the data acquisition process that has not been started or not completed due to the non-execution abnormality during the period after the non-execution abnormality, after the completion of the data acquisition process, in a cycle following the non-execution abnormality. In this way, the data processing device of Feature 1 and the data processing program of Feature 6 execute the data acquisition process that has not been started or not completed later to supplement it (hereinafter, this will be referred to as "supplementary execution"), thereby reducing the number of data losses when data is acquired over a predetermined number of cycles, and reducing the occurrence of a malfunction in which the target number of data is not reached.

[0069] In the data processing device of Feature 2 and the data processing program of Feature 7, an abnormality counter counts the number of data acquisition processes waiting for complementary execution, and complementary execution of data acquisition processes is performed until the abnormality counter reaches 0, so it is possible to deal with cases where non-execution abnormalities occur consecutively and the number of occurrences of unstarted or unfinished data acquisition processes is greater than the number of complementary executions. Also, when the number of occurrences of unstarted or unfinished data acquisition processes is not greater than the number of complementary executions, it is possible to deal with such cases by providing a flag unit that is set when a non-execution abnormality occurs and that is reset by complementary execution of a data acquisition process, as in Feature 3 and Feature 8, and the data acquisition process is complementary executed on the condition that the flag unit is set.

[0070] In addition, cases in which the number of unstarted or unfinished data acquisition processes can be greater than the number of complementary executions include cases such as Features 4 and 9, in which a prolonged abnormality in which the execution time of the data acquisition process is longer than one cycle of the first cycle is permitted, and a non-execution abnormality in which the execution of the data acquisition process does not start at the normal start timing is detected due to this prolonged abnormality.

[0071] Furthermore, in Features 5 and 10, statistical data is calculated for each of the predetermined number of cycles of the first cycle based on data for the predetermined number of cycles, so that highly reliable statistical data can be obtained.

[0072] Although the present specification and drawings disclose specific examples of the technology included in the scope of the claims, the technology described in the claims is not limited to these specific examples, but also includes various modifications and variations of the specific examples, and also includes parts of the specific examples taken out alone. [Explanation of symbols]

[0073] 10A~10F Data processing device (computer) 21 Data Acquisition Section 22 Data Acquisition Completion Unit 23 Abnormality detection unit 24 Abnormality Counter 26 Statistical Processing Unit 81 Power meter (external) PG1 Acquisition command processing program (data processing program) PG2, PG2C command execution processing program (data processing program) PG3,PG3B Anomaly detection processing program (data processing program) PG4, PG4B, PG4E Complementary command processing program (data processing program) PG5 Statistical Processing Program (Data Processing Program)

Claims

1. a data acquisition unit that executes a data acquisition process for acquiring data from an external device every first period; an abnormality detection unit that detects either or both of non-execution abnormalities, that is, the data acquisition process is not executed or is forcibly terminated during execution; a data acquisition complementing unit that, when the non-execution abnormality is detected, starts execution of the data acquisition process that has not been started or completed due to the non-execution abnormality during a period after completion of the data acquisition process in the subsequent period; A data processing device comprising:

2. an abnormality counter that counts the number of data acquisition processes waiting to be executed by the data acquisition complementing unit; The data processing device according to claim 1 , wherein the data acquisition complementing unit continues to execute the data acquisition process until the abnormality counter reaches zero.

3. a flag unit that is set when the non-execution abnormality occurs and that is reset when the data acquisition complement unit starts executing the data acquisition process; 2. The data processing apparatus according to claim 1, wherein the data acquisition complementing section executes the data acquisition process on the condition that the flag section is set.

4. the data acquisition unit tolerates a prolonged abnormality in which an execution time of the data acquisition process is longer than one cycle of the first cycle, 4. The data processing device according to claim 1, wherein the abnormality detection unit detects the non-execution abnormality in which the data acquisition process is not executed in the subsequent consecutive periods due to the prolonged abnormality.

5. 4. The data processing device according to claim 1, further comprising a statistical processing unit that calculates statistical data based on the data for a predetermined number of periods of the first period, for each of the predetermined number of periods.

6. Computer, a data acquisition unit that executes a data acquisition process for acquiring data from an external device every first period; an abnormality detection unit that detects either or both of non-execution abnormalities, that is, the data acquisition process is not executed or is forcibly terminated during execution; a data acquisition complementing unit that, when the non-execution abnormality is detected, starts execution of the data acquisition process that has not been started or completed due to the non-execution abnormality during a period after completion of the data acquisition process in the subsequent period; A data processing program that functions as a

7. causing the computer to function as an abnormality counter that counts the number of data acquisition processes waiting to be executed by the data acquisition complementing unit; The data processing program according to claim 6 , wherein the data acquisition complementing unit causes the computer to function in such a way that the execution of the data acquisition process continues until the abnormality counter reaches 0.

8. causing the computer to function as a flag unit that is set when the non-execution abnormality occurs and that is reset when the data acquisition complementing unit starts executing the data acquisition process; 7. The data processing program according to claim 6, wherein the data acquisition complementing section causes the computer to function so as to execute the data acquisition process on condition that the flag section is set.

9. the data acquisition unit tolerates a prolonged abnormality in which an execution time of the data acquisition process is longer than one cycle of the first cycle, The data processing program according to any one of claims 6 to 8, wherein the abnormality detection unit causes the computer to function to detect a non-execution abnormality in which the data acquisition process is not executed in successive subsequent periods due to the prolonged abnormality.

10. The data processing program according to any one of claims 6 to 8, which causes the computer to function as a statistical processing unit that calculates statistical data based on the data for a predetermined number of periods of the first period, for each predetermined number of periods of the first period.

Citation Information

Patent Citations

  • Plant information collecting and display device

    JP1999202932A