Data collection apparatus and data collection program

10055477 ยท 2018-08-21

Assignee

Inventors

Cpc classification

International classification

Abstract

Provided are a first storage unit 411b configured to store the data which are transmitted among the control apparatuses 21 to 24; a group selector 414a configured to divide the memory area in the first storage unit 411b into multiple groups, to further divide the memory area in each group into multiple subgroups, and to select at least one divided subgroups as a collection group, which is a unit to continuously read data in the group; a schedule generator 414b configured to generate the schedule, on the basis of the number of subgroups selected as each collection group and the collection cycle for the data collection; and a data reader 414e configured to read the data on the basis of the generated schedule.

Claims

1. A data collection apparatus comprising: a common memory configured to store data which are sent among multiple control apparatuses by scan transmission; a group selector configured to divide a memory area in the common memory into multiple groups, to further divide a memory area in each group into multiple subgroups, and to select one or more of the subgroups, as collection groups from which data is continuously read, in order to avoid decrease in a readout speed of the data on the basis of a data transfer rate characteristic corresponding to a size of the data; a schedule generator configured to generate a schedule for reading the data from the common memory in allotted time intervals by determining a number of collection groups in the allotted time intervals for each of a high-speed collection, a middle-speed collection, and a low-speed collection, the number of collection groups being determined as an integer value on the basis of a division value obtained by dividing a number of subgroups selected as collection groups by collection cycles for collecting the data, the high-speed collection being faster than the middle-speed collection, the middle-speed collection being faster than the low-speed collection; a time calculator configured to calculate as a needed readout time, a value based on a data transfer rate and the number of collection groups per allotted time interval in the schedule generated by the schedule generator; a judgment circuit configured to judge whether or not the readout of the data can be completed within a corresponding allotted time interval, on the basis of the needed readout time calculated by the time calculator; and a data reader configured to read the data from the common memory, only if the judgement circuit judges that the readout of the data can be completed within the allotted time interval.

2. The data collection apparatus of claim 1, wherein if the needed readout time calculated by the time calculator is equal to or greater than a threshold length of time obtained by subtracting a predetermined time allowance from the allotted time interval, the judgment circuit judges that the readout of the data cannot be completed within the allotted time interval, and issues a warning.

3. The data collection apparatus of claim 1, wherein if data requested to be read are not included in the selected subgroups, the schedule generator once again generates the schedule in order to read the requested data from the common memory in a time period when the number of collection groups per allotted time interval is the smallest.

4. The data collection apparatus of claim 1 wherein the group selector divides the memory area in the common memory into multiple hierarchical groups in order of size.

5. A non-transitory computer-readable medium encoded with computer-readable instructions that, when executed by a computer, cause the computer to perform a method comprising: storing data, which are sent among multiple control apparatuses by scan transmission, in a common memory; dividing a memory area in the common memory into multiple groups, further dividing a memory area in each group into multiple subgroups, and selecting one or more of the subgroups, as collection groups from which data is continuously read, in order to avoid decrease in a readout speed of the data on the basis of a data transfer rate characteristic corresponding to a size of the data; generating a schedule for reading the data from the common memory in allotted time intervals by determining a number of collection groups in the allotted time intervals for each of a high-speed collection, a middle-speed collection, and a low-speed collection, the number of collection groups being determined as an integer value on the basis of a division value obtained by dividing a number of subgroups selected as collection groups by collection cycles for collecting the data, the high-speed collection being faster than the middle-speed collection, the middle-speed collection being faster than the low-speed collection; calculating as a needed readout time, a value based on a data transfer rate and the number of collection groups per allotted time interval in the schedule generated in the generating step; judging whether or not the readout of the data can be completed within a corresponding allotted time interval, on the basis of the needed readout time calculated in the calculating step; reading the data from the common memory, only if the readout of the data is judged to be able to be completed within the allotted time interval.

6. The non-transitory computer-readable medium of claim 5, wherein if the needed readout time calculated is equal to or greater than a threshold length of time obtained by subtracting a predetermined time allowance from the allotted time interval, judgment is made that the readout of the data cannot be completed within the allotted time interval and a warning is issued.

7. The non-transitory computer-readable medium of claim 5, wherein if data requested to be read are not included in the selected subgroups, the schedule is generated once again in order to read the requested data from the common memory in a time period when the number of collection groups per allotted time interval is the smallest.

Description

(1) FIG. 1 is a diagram showing connecting relationships in a data collection system of a first embodiment of the present invention.

(2) FIG. 2 is a diagram schematically showing a concept of a scan transmission among common memories included, respectively, in control apparatuses and data collection apparatuses in the data collection system of the first embodiment of the present invention.

(3) FIG. 3 is a diagram showing configurations of respective data collection apparatuses included in the data collection system of the first embodiment of the present invention.

(4) FIG. 4 is a diagram showing a memory area in a first storage unit included in one of the data collection apparatuses in the data collection system of the first embodiment of the present invention.

(5) FIG. 5 is a flowchart showing process procedures of processing to be performed by the data collection apparatus included in the data collection system of the first embodiment of the present invention.

(6) FIG. 6 is a diagram for explaining collection group patterns to be selected by a group selector included in the data collection apparatus in the data collection system of the first embodiment of the present invention.

(7) FIG. 7 is a diagram showing examples of a schedule generated by a schedule generator included in the data collection apparatus in the data collection system of the first embodiment of the present invention.

(8) FIG. 8 is a flowchart showing process procedures of processing to be performed by the data collection apparatus included in the data collection system of the first embodiment of the present invention when a new data item to be collected is added.

(9) Referring to the drawings, descriptions will be hereinbelow provided for the best mode for carrying out the invention.

(10) <First Embodiment>

(11) FIG. 1 is a diagram showing connecting relationships in a data collection system of a first embodiment of the present invention.

(12) As shown in FIG. 1, a data collection system 1 of the first embodiment of the present invention includes control apparatuses 21, 22 and data collection apparatuses 41 to 43, which are connected together via a control network 52. The data collection system 1 further includes a monitoring apparatus 62, which is connected to the data collection apparatuses 41 to 43 via a host network 51.

(13) Each of the control apparatuses 21, 22 is formed from a control controller whose typical example is a PLC (Programmable Logic Controller).

(14) The data collection apparatuses 41 to 43 collect data supplied from the control apparatuses 21 to 22. In this respect, when the control target is plant equipment in a hot rolling plant, for example, the data include various kinds of data on the plant control apparatuses needed to operate the hot rolling plant. Examples of the data are production instruction data, production result data, alarm data, roll data, model calculation data, model learning data, invariable data and parameter data.

(15) Furthermore, the data collection apparatuses 41 to 43 and the control apparatuses 21, 22 connected to the control network 52 include their respective common memories. The common memories collectively play a function as a network apparatus by scan transmission (cyclic transmission) which transmits control data among the apparatuses.

(16) To this end, each common memory is provided with transmission data areas and reception data areas assigned to the apparatuses. Thereby, data in the transmission data area in the control apparatus 21, for example, are transferred to the common memories in all of the other apparatuses connected to the control network 52 by one round of data transmission. Descriptions will be provided later for the concept of the scan transmission among the common memories.

(17) A display apparatus 61 includes an image output unit such as an organic EL (electroluminescence) display or a liquid crystal display, and is connected to the monitoring apparatus 62. The display apparatus 61 displays graphs and the like on the basis of output signals supplied from the monitoring apparatus 62.

(18) On the basis of process data supplied from the data collection apparatuses 41 to 43, the monitoring apparatus 62 causes the display apparatus 61 to display multiple data with their time axes aligned with each other.

(19) FIG. 2 is a diagram schematically showing the concept of the scan transmission among the common memories included, respectively, in the control apparatuses 21, 22 and the data collection apparatuses 41 to 43 in the data collection system 1 of the first embodiment of the present invention.

(20) As shown in the line C1 in FIG. 2, for each control cycle, data in the transmission data area in the control apparatus 21 are transferred to the common memories in all of the other apparatuses (the control apparatuses 22, 23 and the data collection apparatuses 41 to 43) connected to the same transmission line in one round of the data transmission. As shown in the line C2, for each control cycle, data in a transmission data area in the control apparatus 22 are similarly transferred to the common memories in all of the other apparatuses (the control apparatuses 21, 23 and the data collection apparatuses 41 to 43).

(21) As described above, each common memory is provided with the transmission data area assigned to the apparatus of its own, and the transmission data areas assigned respectively to the other apparatuses; and data are sent to the common memories in all of the other apparatuses by scan transmission. For this reason, all the apparatuses can share the same data.

(22) FIG. 3 is a diagram showing a configuration of the data collection apparatus 41 included in the data collection system 1 of the first embodiment of the present invention. The data correction apparatuses 41 to 43 have the same configuration, and the following descriptions will therefore be provided for the data collection apparatus 41 on their behalf.

(23) As shown in FIG. 3, the data collection apparatus 41 includes a first network card 411, a second storage unit 412, a second network card 413 and a CPU 414, which are connected together via a bus 417.

(24) The first network card 411 is an interface card configured to connect with the control network 52. The first network card 411 includes a self-operating timer 411a for measuring time, a first storage unit 411b, and a first storage controller 411c.

(25) The first storage unit 411b is the above-mentioned common memory, and stores data supplied from the control apparatuses 21, 22.

(26) Once data in the transmission data area in the first storage unit 411b is rewritten with new data, the first storage controller 411c sends the new data to the other apparatuses by scan transmission. In addition, upon reception of new data by scan transmission, the first storage controller 411c rewrites old data in the reception data area in the first storage unit 411b with the new data.

(27) The second storage unit 412 associates the time measured by the timer 411a with the data stored in the first storage unit 411b on the basis of an instruction from the CPU 414, and stores the time and the data thus associated as process data. In addition, the second storage unit 412 stores a predetermined collection group pattern on the basis of a transfer rate characteristic corresponding to the size of the data.

(28) The second network card 413 is an interface card configured to connect with the host network 51.

(29) The CPU 414 centrally controls the data collection apparatus 41. In addition, the CPU 414 includes a group selector 414a, a schedule generator 414b, a time calculator 414c, a judgment unit 414d and a data reader 414e.

(30) The group selector 414a divides a memory area in the first storage unit 411b into multiple groups, and further divides the memory area in each group into multiple subgroups.

(31) FIG. 4 is a diagram showing the memory area in the first storage unit 411b included in the data collection apparatus 41 in the data collection system 1 of the first embodiment of the present invention.

(32) As shown in FIG. 4, the group selector 414a divides the memory area in a way that: beginning at the top of the memory area in the first storage unit 411b, each collection of 128 bytes is treated as one block; and 8 blocks, such as blocks 101 to 108, are treated as one subgroup.

(33) Furthermore, the group selector 414a treats four subgroups, for example subgroups 201 to 204, as a group 301.

(34) Since the group selector 414a thus divides the memory area hierarchically, data stored in the memory area can be read efficiently when the reading is performed on a subgroup-to-subgroup basis as will be described later.

(35) Moreover, the group selector 414a selects at least one divided subgroup as a collection group, which is a unit to continuously read data in a group, in order to avoid decrease in the data readout speed on the basis of the data transfer rate characteristic corresponding to the size of the data. In this respect, the data size is more likely to affect the data transfer rate to a large extent, depending on the telecommunications standard, the network setting, or the like. For example, the use of the DMA method in data transfer enables high-speed transfer of large amounts of data. However, in the case of transferring a small amount of data stored in a distributed manner in the storage unit, the data may be transferred faster if the data transfer is carried out without using the DMA method. As described above, the data transfer rate characteristic may vary depending on the transferred data size. With this taken into consideration, the group selector 414a selects the collection group, which is the unit for the continuous reading, in order to avoid decrease in the data readout speed, namely, the speed at which to read from the first storage unit 411b.

(36) The schedule generator 414b generates a schedule for reading data from the first storage unit 411b every unit time on the basis of: the number of subgroups selected as the collection groups; and collection cycles for the data collection.

(37) In addition, if data requested to be read is not included in a selected subgroup, the schedule generator 414b once again generates the schedule in order to read the requested data from the first storage unit 411b in a time period when the number of collection groups per unit time is the smallest.

(38) The time calculator 414c calculates the amount of time it takes to read the data every unit time, as a needed readout time, on the basis of the schedule generated by the schedule generator 414b. To put it specifically, the time calculator 414c calculates, as the needed readout time, a value obtained by multiplying together the data transfer rate and the number of collection groups per unit time in accordance with the schedule generated by the schedule generator 414b.

(39) On the basis of the needed readout time calculated by the time calculator 414c, the judgment unit 414d judges whether or not the data readout can be completed within the unit time. To put it specifically, if the needed readout time calculated by the time calculator 414c is equal to or greater than a threshold length of time obtained by subtracting a predetermined time allowance from the unit time, the judgment unit 414d judges that the data readout cannot be completed within the unit time, and issues a warning.

(40) If the judgment unit 414d judges that the data readout can be completed within the unit time, the data reader 414e reads the data from the storage unit.

(41) FIG. 5 is a flowchart showing process procedures of processing to be performed by the data collection apparatus 41 included in the data collection system 1 of the first embodiment of the present invention.

(42) As shown in FIG. 5, once the data collection is requested (step S101), the group selector 414a in the CPU 414 selects the collection group (step S103). To put it specifically, the group selector 414a divides the memory area in the first storage unit 411b into multiple groups, and further divides the memory area in each group into multiple subgroups. Subsequently, the group selector 414a selects at least one divided subgroups as the collection group, which is the unit to continuously read the data in the group, in order to avoid decrease in the data readout speed on the basis of the transfer rate characteristic corresponding to the size of the data.

(43) FIG. 6 is a diagram for explaining patterns of the collection group to be selected by the group selector 414a included in the data collection apparatus 41 in the data collection system 1 of the first embodiment of the present invention. The patterns of the collection group are predetermined on the basis of the transfer rate characteristics corresponding to the respective data sizes, and are stored in the second storage unit 412 as the collection group patterns.

(44) The group selector 414a selects the collection group on the basis of the corresponding collection group pattern stored in the second storage unit 412.

(45) As shown in FIG. 6, each group pattern 501 indicates a pattern of the subgroup arrangement. .square-solid. denotes a subgroup where data are registered in the first storage unit 411b, and denotes a subgroup where no data are registered in the first storage unit 411b.

(46) For example, a group pattern 501a is indicated with .square-solid. . This means that data are registered in a subgroup 502a at the top while no data are registered in subgroups 502b to 502d.

(47) In the case of the group pattern 501a, a collection group pattern 503a is indicated as .square-solid..

(48) This shows that, judging from the transfer rate characteristic, the transfer rate, namely the readout speed is faster when only the subgroup 502a is read than when all the subgroups 502a to 502d are read.

(49) A group pattern 501b is indicated with .square-solid. .square-solid. . This means that data are registered in the subgroups 502a, 502b at the top while no data are registered in the subgroups 502c, 502d.

(50) In the case of the group pattern 501b, a collection group pattern 503b is indicated as .square-solid. .square-solid..

(51) This shows that, judging from the transfer rate characteristic, the transfer rate, namely the readout speed is faster when only the subgroups 502a, 502b are read than when all the subgroups 502a to 502d are read.

(52) A group pattern 501c is indicated with .square-solid. .square-solid. . This means that data are registered in the subgroups 502a, 502c while no data are registered in the subgroups 502b, 502c.

(53) In the case of the group pattern 501c, a collection group pattern 503c is indicated as .square-solid. .square-solid..

(54) This shows that, judging from the transfer rate characteristic, the transfer rate, namely the readout speed is faster when only the subgroups 502a to 502c, which include the subgroup 502b intervening between the subgroups 502a, 502c, are read than when the subgroups 502a, 502c are read one by one.

(55) A group pattern 501d is indicated with .square-solid. .square-solid.. This means that data are registered in the subgroups 502a, 502d while no data are registered in the subgroups 502b, 502c.

(56) In the case of the group pattern 501d, a collection group pattern 503d is indicated as .square-solid. .square-solid..

(57) This shows that, judging from the transfer rate characteristic, the transfer rate, namely the readout speed is faster when only the subgroups 502a to 502d, which include the subgroups 502b, 502c intervening between the subgroups 502a, 502d, are read than when the subgroups 502a, 502d are read one by one.

(58) A group pattern 501e is indicated with .square-solid. .square-solid. .square-solid. . This means that data are registered in the subgroups 502a to 502C at the top while no data are registered in the subgroup 502d.

(59) In the case of the group pattern 501e, a collection group pattern 503e is indicated as .square-solid. .square-solid. .square-solid..

(60) This shows that, judging from the transfer rate characteristic, the transfer rate, namely the readout speed is faster when only the subgroups 502a to 502c are read than when all the subgroups 502a to 502d are read.

(61) A group pattern 501f is indicated with .square-solid. .square-solid. .square-solid.. This means that data are registered in the subgroups 502a, 502b, 502d while no data are registered in the subgroup 502c.

(62) In the case of the group pattern 501f, a collection group pattern 503f is indicated as .square-solid. .square-solid. .square-solid..

(63) This shows that, judging from the transfer rate characteristic, the transfer rate, namely the readout speed is faster when all the subgroups 502a to 502d, which includes the subgroup 502c, are read than when the subgroups 502a, 502b, 502d are read one by one.

(64) A group pattern 501g is indicated with .square-solid. .square-solid. .square-solid. .square-solid.. This means that data are registered in all the subgroups 502a to 502d.

(65) In the case of the group pattern 501g, a collection group pattern 503g is indicated as .square-solid. .square-solid. .square-solid. .square-solid. as a matter of course.

(66) As described above, the collection group patterns predetermined on the basis of the transfer rate characteristics corresponding to the respective data sizes are stored in the second storage unit 412. The group selector 414a is capable of selecting one from the collection group patterns as the collection group. Thereby, the group selector 414a is capable of selecting at least one divided subgroups as the collection group, which is the unit to continuously read data in the group, in order to avoid decrease in the data readout speed on the basis of the transfer rate characteristic corresponding to the size of the data.

(67) Returning to FIG. 5, the schedule generator 414b in the CPU 414 calculates an optimal schedule (step S105). To put it specifically, the schedule generator 414b generates a schedule for reading data from the first storage unit 411b every unit time (1 millisecond in this case) on the basis of: the number of subgroups selected as the collection group by the group selector 414a; and collection cycles for the data collection.

(68) For example, the schedule generator 414b determines the number of collection groups per unit time in the collection cycle, in the form of an integer value, on the basis of a value obtained by dividing the number of collection groups, which are selected by the group selector 414a, by the number of collection cycles for the data collection. Thereafter, the schedule generator 414b generates the schedule by arranging the determined value for each unit time.

(69) FIG. 7 is a diagram showing examples of the schedule to be generated by the schedule generator 414b included in the data collection apparatus 41 in the data collection system 1 of the first embodiment of the present invention. In this respect, let us assume that: there are three collection cycles for high, middle and low speeds; the collection cycle for the high-speed collection is a 2-millisecond cycle; the collection cycle for the middle-speed collection is s 25-millisecond cycle; and the collection cycle for the low-speed collection is a 200-millisecond cycle. Furthermore, in this respect, let us assume that: the number of collection groups selected by the group selector 414a is 114; the number of collection groups for the high-speed collection is 19; the number of collection groups for the middle-speed collection is 55; and the number of collection groups for the low-speed collection is 40.

(70) In the case of the high-speed collection, the schedule generator 414b determines that the numbers of collection groups per unit time in the collection cycle are 10 or 9 in the form of an integer value, because 9.5 is obtained when the number (=19) of collection groups selected by the group selector 414a is divided by the number (=2) of collection cycles for the data collection.

(71) In the corresponding example shown in FIG. 7, the schedule generator 414b sets the number of collection groups per unit time at 10 for time 1, and at 9 for time 2 which is the subsequent unit time. After that, similarly, the schedule generator 414b sets the number of collection groups per unit time at 10 for time 3, and at 9 for time 4 which is the ensuing unit time.

(72) In the case of the middle-speed collection, the schedule generator 414b determines that the numbers of collection groups per unit time in the collection cycle are 2 or 3 in the form of an integer value, because 2.2 is obtained when the number (=55) of collection groups selected by the group selector 414a is divided by the number (=25) of collection cycles for the data collection.

(73) For example, the schedule generator 414b determines that the numbers of collection groups per unit time are 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 and 2 by setting the number of collection groups per unit time at 3 for the first 5 unit times, and at 2 for the next 20 unit times.

(74) In the corresponding example shown in FIG. 7, the schedule generator 414b sets the number of collection groups per unit time at 3 for each of times 1 to 5, and at 2 for each of times 6 to 25 which are the subsequent unit times. After that, similarly, the schedule generator 414b sets the number of collection groups per unit time at 3 for each of times 26 to 30, and at 2 for each of times 31 to 50 which are the ensuing unit times.

(75) What is more, in the case of the low-speed collection, the schedule generator 414b determines that the numbers of collection groups per unit time in the collection cycle are 1 or 0 in the form of an integer value, because 0.2 is obtained when the number (=40) of collection groups selected by the group selector 414a is divided by the number (=200) of collection cycles for the data collection.

(76) For example, the schedule generator 414b determines: the number of collection groups per unit time is 1 for each of the first 40 unit times; and the number of collection groups per unit time is 0 for each of the next 160 unit times.

(77) In the corresponding example shown in FIG. 7, the schedule generator 414b sets the number of collection groups per unit time at 1 for each of times 1 to 40, and at 0 for each of times 41 to 200 which are the subsequent unit times. After that, similarly, the schedule generator 414b sets the number of collection groups per unit time at 1 for each of times 201 to 240, and at 0 for each of times 241 to 400 which are the ensuing unit times.

(78) As described above, the schedule generator 414b generates a schedule for reading data from the first storage unit 411b every unit time on the basis of: the number of subgroups selected as the collection groups by the group selector 414a; and collection cycles for the data collection.

(79) Returning to FIG. 5, the time calculator 414c in the CPU 414 calculates the amount of time it takes to read data every unit time, as the needed readout time, on the basis of the schedule generated by the schedule generator 414b (step S107). To put it specifically, the time calculator 414c calculates the needed readout time Tt corresponding to the amount of data to be transferred, by use of Equation 1 given below, where: Cg denotes the number of collection groups per unit time in the schedule generated by the schedule generator 414b; and Vt denotes the data transfer rate corresponding to the amount of data to be transferred.
Tt=CgVt(Equation 1)

(80) In this respect, the data transfer rate Vt differs from one network card to another in terms of the transfer rate characteristic and the like. For this reason, the time calculator 414c measures the data transfer rate Vt for each of the numbers of collection groups by reading dummy data. For example, if the data transfer rate for readout of 4096-byte data is 25 microseconds, the time calculator 414c sets 25 microseconds as the data transfer rate Vt for four collection groups. If the data transfer rate for readout of 3072-byte data is 24 microseconds, the time calculator 414c sets 24 microseconds as the data transfer rate Vt for three collection groups. If the data transfer rate for readout of 2048-byte data is 22 microseconds, the time calculator 414c sets 22 microseconds as the data transfer rate Vt for two collection groups. If the data transfer rate for readout of 1024-byte data is 20 microseconds, the time calculator 414c sets 20 microseconds as the data transfer rate Vt for one collection group.

(81) In the corresponding example shown in FIG. 7, let us assume that: the number of collection groups to be read for time 1 in the case of the high-speed collection is 10; and as for its breakdown, the number of collection groups from which to read the 4096-byte data is 4, the number of collection groups from which to read the 3072-byte data is 3, the number of collection groups from which to read the 2048-byte data is 2, and the number of collection groups from which to read the 1028-byte data is 1. In this example, the time calculator 414c calculates that the a needed readout time Th is 236 microseconds (=254+243+222+201) by use of (Equation 1).

(82) Furthermore, in the corresponding example shown in FIG. 7, the time calculator 414c calculates that a need readout time Tm for the middle-speed collection is 75 microseconds (=253) by use of (Equation 1), if the number of collection groups to be read for time 1 in the case of middle-speed collection is 3, and if all of the three collection groups are those from which to read the 4096-byte data. What is more, in the corresponding example shown in FIG. 7, the time calculator 414c calculates that a needed readout time T1 for the low-speed collection is 25 microseconds (=251) by use of (Equation 1), if the number of collection groups to be read for time 1 or in the case of the low-speed collection is 3, and if all of the 3 collection groups are those from which to read the 4096-byte data.

(83) Thereafter, the time calculator 414c calculates that the needed readout time T is 336 microseconds (=236+75+25) by aggregating the needed readout times Tt (Th, Tm, T1 which respectively correspond to the amounts of data to be transferred in the high-, middle- and low-speed collections.

(84) Returning to FIG. 5, the judgment unit 414d in the CPU 414 subsequently judges whether or not the data readout can be completed within the unit time on the basis of the needed readout time T calculated by the time calculator 414c (step S109). To put it specifically, the judgment unit 414d judges whether or not the needed readout time T calculated by the time calculator 414c is equal to or greater than a threshold length of time (step S109). In this respect, the threshold length of time Tb is defined as a time obtained by subtracting a predetermined time allowance Tc from the unit time. In this case, if the unit time and the time allowance Tc are respectively 1 millisecond and 100 microseconds, the threshold length of time Tb is 900 microseconds.

(85) In the corresponding example shown in FIG. 7, the needed readout time T at time 1 is 336 microseconds and accordingly less than 900 microseconds which is the threshold length of time Tb. For this reason, the judgment unit 414d judges that the data readout can be completed within the unit time.

(86) If it is judged in step S109 that the data readout cannot be completed within the unit time (if NO), the judgment unit 414d issues a warning message indicating that the data collection will be infeasible (step S111). To put it specifically, the judgment unit 414d sends the monitoring apparatus 62 a warning signal indicating the infeasibility of the data collection. The monitoring apparatus 62 causes the display apparatus 61 to display the warning message and output alarm sounds.

(87) On the other hand, if it is judged in step S109 that the data readout can be completed within the unit time (if YES), the judgment unit 414d performs load calculation (step S113). To put it specifically, the judgment unit 414d calculates a surplus capacity by subtracting the needed readout time from the threshold length of time. For example, in the corresponding example shown in FIG. 7, since the threshold length of time Tb is 900 microseconds and the needed readout time is 336 microseconds, the judgment unit 414d calculates that the surplus capacity is 564 microseconds.

(88) Thereafter, the judgment unit 414d judges whether or not the load falls within a tolerable range (step S115). To put it specifically, if the surplus capacity calculated in step S113 takes on a positive value, the judgment unit 414d judges that the load is within the tolerable range. If the surplus capacity calculated in step S113 is equal to or less than 0 microseconds, the judgment unit 414d judges that the load exceeds the tolerable range.

(89) If it is judged in step S115 that the load exceeds the tolerable range (if NO), the judgment unit 414d issues a warning message indicating an overload (step S117). To put it specifically, the judgment unit 414d sends the monitoring apparatus 62 a warning signal indicating the overload. The monitoring apparatus 62 causes the display apparatus 61 to display the warning message and output alarm sounds.

(90) On the other hand, if it is judged in step S115 that the load is within the tolerable range (if YES), the data reader 414e starts the data collection (step S119). To put it specifically, the data reader 414e reads the data from the first storage unit 411b on the basis of the schedule generated by the schedule generator 414b, associates the read data with the time measured by the timer 411a, and causes the second storage unit 412 to store the data associated with the time as the process data.

(91) As described above, the data collection apparatus 41 provided in the data collection system 1 of the first embodiment of the present invention includes: the first storage unit 411b configured to store the data which are transmitted among the control apparatuses 21 to 23; the group selector 414a configured to divide the memory area in the first storage unit 411b into multiple groups, to further divide the memory area in each group into multiple subgroups, and to select at least one divided subgroups as a collection group, which is a unit to continuously read data in the group, in order to avoid decrease in the readout speed of the data on the basis of the data transfer rate characteristic corresponding to the size of the data; the schedule generator 414b configured to generate the schedule for reading the data from the first storage unit 411b every unit time, on the basis of the number of subgroups selected as each collection group and the collection cycle for the data collection; and the data reader 414e configured to read the data from the first storage unit 411b on the basis of the generated schedule. For these reasons, the data collection apparatus 41 is capable of collecting the data quickly regardless of the amount of data by using a simple configuration.

(92) FIG. 8 is a flowchart showing process procedures of processing to be performed by the data collection apparatus 41 included in the data collection system 1 of the first embodiment of the present invention when a new data item to be collected is added.

(93) As shown in FIG. 8, if the new data item to be collected is added by a user's operation (step S201), the schedule generator 414b judges whether or not the added data item is included in the collection groups (step S203).

(94) If it is judged in step S201 that the added data item is included in the collection groups (if YES), the schedule generator 414b adds the data item to the collection groups (step S205) since the added data item has already been one of the data collection targets.

(95) On the other hand, if it is judged in step S201 that the added data item is not included in the collection groups (if NO), a new schedule needs to be generated since the added data item is not a data collection target yet.

(96) To this end, the schedule generator 414b adds the data item to the time when the number of collection groups is the smallest (step S207). In the corresponding example shown in FIG. 7, if data not included in the collection groups for the high-speed collection is added, the schedule generator 414b adds the collection groups including the added data item to time 2 when the number of collection groups is the smaller of time 1 and time 2, and thereby changes the number of collection groups from 9 to 10. Similarly, the schedule generator 414b changes the number of collection groups from 9 to 10 during times 4, 6, 8, and so forth.

(97) In this manner, the schedule generator 414b once again generates the schedule in order to read the requested data from the first storage unit 411b in a time period when the number of collection groups is the smallest. This makes it possible to collect the data quickly regardless of the amount of data by using a simple configuration, even if the data item to be collected is added in the middle of the data collection.

(98) In the first embodiment of the present invention, the data collection apparatus 41 selects collection groups on the basis of the collection group patterns shown in FIG. 6. However, the collection group patterns are not limited to what have been shown in FIG. 6.

(99) For example, in the first embodiment of the present invention, the group pattern 501c is indicated as .square-solid. .square-solid. . In this case, the collection group pattern 503c is indicated as .square-solid. .square-solid.. If the transfer rate characteristics make the transfer rate, namely the readout speed, become higher when the subgroups 502a, 502c are read one by one than when the subgroups 502a to 502c which includes the subgroup 502b intervening between the subgroups 502a, 502c are read, then the collection group pattern 503c may be set as .square-solid. .square-solid. In other words, only the subgroups 502a, 502c may be read.

(100) Furthermore, when the data collection is started, a transfer rate at which to perform the readout from the subgroups 502a to 502c and a transfer rate at which to perform the readout from the subgroups 502a, 502c one by one may be measured. Then, the mode with the faster transfer rate may be employed.

(101) What is more, the foregoing embodiment may be realized by causing a computer to execute a data collection program installed therein. To put it specifically, the data collection apparatuses may be constructed in a way that: the data collection program is read from a storage medium in which the data collection program is stored, and is executed by the CPU 414. Alternatively, the data collection apparatuses may be constructed in a way that: the data collection program is transmitted via a communications network, installed, and executed by the CPU 414. 1 data collection system 21 to 23 control apparatus 41 to 43 data collection apparatus 51 host network 52 control network 61 display apparatus 62 monitoring apparatus 411 first network card 411a timer 411b first storage unit 411c first storage controller 412 second storage unit 413 second network card 414 CPU 414a group selector 414b schedule generator 414c time calculator 414d judgment unit 414e data reader

INDUSTRIAL APPLICABILITY

(102) The present invention is applicable to a data collection system for collecting plant data, and the like.