Patent ID: 12222697

DESCRIPTION OF EMBODIMENTS

Embodiment

A programmable logic controller according to an embodiment of the present disclosure will now be described in detail with reference to the drawings.

A programmable logic controller100shown inFIG.1executes a control program in, for example, a control system or a production system to control a target device. For example, the programmable logic controller100(hereafter, PLC100) executes programmed computations using input values input from a detector such as a sensor or a switch. Each of the input values is a true or false logical value indicated by an input signal input from a detector as a sensor or a switch. The PLC100acquires output values through computations. Each of the output values is a true or false logical value. The PLC100outputs an output signal indicating the true or false logical value to a target device such as a contactor, a motor, or an indicator light. Thus, the PLC100controls turning on or off of the target device.

The PLC100sequentially executes commands in the control program from the first command to the last command. After executing an END command or the last command, the PLC100sequentially re-executes the commands from the first command. The execution of the control program by the PLC100from the first to last commands may be referred to as a scan. The time taken by the PLC100to execute the first to last commands, or in other words, the time taken by the PLC100to execute one cycle of commands in the control program may be referred to as a scan time. The scan time may also be referred to as an execution cycle. Although the PLC100cyclically executes the control program, the PLC100does not execute the control program in fixed periods.

The logical values indicated by the input signals input from the detector are stored in an area in a memory called a device memory110included in the PLC100. The logical values indicating the output signals acquired by the PLC100through computations are also stored in the device memory110. The control program executed by the PLC100is a program implementing the functions of a relay circuit. Thus, the device memory110also stores logical values indicating signals for turning on or off an internal relay that is a virtual relay on the program. Data stored in the device memory110are referred to as device values. The PLC100executes the programmed computations using the device values stored in the device memory110.

The PLC100collectively exchanges data in the device memory110with data from a detector or a target device at predetermined times. This data exchange is referred to as I/O refresh. For example, the PLC100performs I/O refresh before executing the first command in the control program. The PLC100stores, into the device memory110, the logical values indicating the input signals provided from the detector through the I/O refresh and provides the target device with the output signals acquired through the computation performed at the last scan time stored in the device memory110.

In the embodiment, the PLC100has the function of logging the device values. When the logging function is enabled, the PLC100collects device values stored in the device memory110and records the logs of the device values. In the embodiment, the PLC100has the structure described below. Before executing the control program, the PLC100collectively records logs of the device values as collection target stored in the device memory110into a predetermined area in the memory. At each of multiple separate scan times, the PLC100further acquires split logs of the collection target device values stored in the device memory110. Additionally, the PLC100logs, at each scan time, device values that have changed.

A setting tool500is used by a user to set the setting values for the logging process with the PLC100. For example, the setting tool500includes a personal computer installed in the same factory as the PLC100and incorporating a dedicated program.

The hardware structure of each apparatus will now be described. As shown inFIG.2, the PLC100includes, as hardware components, a memory11that stores various programs and data, a connection interface12that transmits and receives data to and from the setting tool500through a communication cable701, and a central processing unit (CPU)13that centrally controls the PLC100. The memory11and the connection interface12are connected to the CPU13with a bus19to communicate with the CPU13.

The memory11includes a volatile memory and a nonvolatile memory. The memory11stores programs for implementing various functions of the PLC100and data used to execute the programs. The programs stored in the memory11include firmware and control programs for controlling a control target device. In the embodiment, the firmware implements the logging function of the PLC100. The memory11is used as a work memory for the CPU13.

The connection interface12includes, for example, a universal serial bus (USB) controller. The connection interface12receives electric signals output from the setting tool500through the communication cable701and reconstructs the received electric signals into data to output to the CPU13. The communication cable701is, for example, a USB cable. The connection interface12converts data provided from the CPU13into electric signals and outputs the resultant signals to the setting tool500through the communication cable701.

The CPU13executes the programs stored in the memory11to implement various functions of the PLC100. For example, the CPU13executes the control programs stored in the memory11to perform computations using values indicated by the input signals provided from the detector.

The setting tool500includes, as hardware components, a memory51that stores various programs and data, a connection interface52that transmits and receives data to and from the PLC100through the communication cable701, an input device53that detects input operations of a user, a display device54that outputs images, and a CPU55that centrally controls the setting tool500. The memory51, the connection interface52, the input device53, and the display device54are connected to the CPU55with a bus59to communicate with the CPU55.

The memory51includes a volatile memory and a nonvolatile memory. The memory51stores programs for implementing various functions of the setting tool500and data used to execute the programs. The programs stored in the memory51include a setting program for implementing the function of setting data for the logging process with the PLC100. The memory51is also used as a work memory for the CPU55.

The connection interface52includes, for example, a USB controller. The connection interface52converts data provided from the CPU55into electric signals and outputs the resultant signals to the PLC100through the communication cable701. The connection interface52receives the electric signals output from the PLC100through the communication cable701and reconstructs the received electric signals into data to output to the CPU55.

The input device53includes, for example, a mouse and operation keys. The input device53receives operation inputs from the user and outputs signals indicating the operation inputs from the user to the CPU55. The display device54includes a display and displays an image based on the signal provided from the CPU55on the display.

The CPU55executes the programs stored in the memory51to implement various functions of the setting tool500. More specifically, the CPU55executes the setting program stored in the memory51to register setting information for the logging process with the PLC100.

The functional components of the PLC100will now be described with reference toFIG.1. The PLC100functionally includes the device memory110that stores device values, a setting information storage120that stores setting information on the logging process, a log storage130that stores logs of the device values, a collective logger140that collectively collects logs of the device values at a set time, a split logger150that splits and collects the logs of the device values during execution of the program, and a differential logger160that collects the logs of the device values that has changed.

The device memory110stores device values. The device values include logical values indicated by input signals provided from a detector, logical values indicating output signals acquired through computations, and logical values indicating signals for turning on or off the internal relay. The functions of the device memory110are implemented by the memory11shown inFIG.2. The device memory110is an example of device storage means in an aspect of the present disclosure.

The setting information storage120stores setting information for the logging process. The setting information storage120stores a value indicating whether the logging function is to be enabled or disabled. When this value indicates that the logging function is to be enabled, the PLC100performs logging. The setting information storage120stores information specifying the device values to be collected.

The log storage130stores the logs of the device values. The functions of the log storage130are implemented by the memory11shown inFIG.2.

As shown inFIG.3A, the log storage130includes a full data area1301and a differential data area1302. The full data area1301stores the logs of the collection target device values collectively collected before the control program is executed and split logs of the collection target device values recorded at multiple scan times. As shown inFIG.3B, the full data area1301stores the device name, the device value, and the scan count at the time. The scan count indicates the number of times the control program is scanned. The scan count for the data stored in the full data area1301is, for example, zero before the control program is executed. Once the execution of the control program is started, the scan count is incremented by one. Although the user can set the size of the full data area1301as appropriate, the set size is to be large enough to store the collection target device values. In the example described below, the size of the full data area1301is twice the size for storing all the collection target device values. Instead of twice the size for storing all the collection target device values, the size of the full data area1301may be three times or four or more times the size. Instead of a positive integral multiple of the size for storing all the collection target device values, the size of the full data area1301may be set to any size as appropriate. The full data area1301is an example of reference data storage means in an aspect of the present disclosure.

The differential data area1302stores differential logs of the collection target device values, or the logs of the device values that are changed. As shown inFIG.3C, the differential data area1302stores the device name, the device value, and the scan count at the time. Each device value is a device value that has changed. The differential data area1302is an example of differential log storage means in an aspect of the present disclosure.

In addition to logging, the collective logger140shown inFIG.1prepares for the logging. For example, the collective logger140performs a preparation process before starting the control program.

The preparation process will now be described. The collective logger140reads the setting values set by the user from the predetermined area in the memory11and stores the read setting values into the setting information storage120. The user prestores the setting values into the predetermined area in the memory11in the PLC100using the setting tool500. The setting values include the size of the full data area1301, the size of the differential data area1302, and the split count N indicating the number of times to acquire split logs. The split count N is a natural number greater than or equal to two.

The collective logger140allocates the set sizes to the full data area1301and the differential data area1302in the log storage130. The collective logger140calculates the number of device values to be collected by the split logger150(described later) at a time based on the split count N specified by the user and setting data about the device values prestored in the memory11, and stores the calculated values into the setting information storage120.

The collective logger140collects, at the set times, the collection target device values stored in the device memory110. In the example described below, the collective logger140collects the collection target device values stored in the device memory110before the control program starts being executed.

More specifically, the collective logger140collectively stores, into the full data area1301, data of all the collection target device values stored in the device memory110in an initial process executed after the PLC100is turned on. As shown inFIG.3B, the collective logger140stores the device name, the device value, and the scan count into the full data area1301. In this state, the PLC100has not started execution of the control program, and thus the collective logger140sets the scan counts at zero.

Data stored by the collective logger140into the full data area1301before the control program starts being executed is used as reference data for collecting the differential logs. The differential logger160(described later) uses the reference data to determine whether the device values are changed when collecting the differential logs.

As described above, in the embodiment, the size of the full data area1301is set to twice the size for storing all the collection target device values. When the collective logger140stores the collection target device values in the device memory110into the full data area1301in the initial process, half the full data area1301is used as shown inFIG.5A. InFIG.5A, the hatched area is a free area and is referred to as a collection target device storage area1301A. The functions of the collective logger140are implemented by the CPU13shown inFIG.2. The collective logger140is an example of collective logging means in an aspect of the present disclosure.

In the embodiment, the collective logger140collects the reference data before the control program starts being executed. The collective logger140collectively collects the collection target device values as the reference data. This collection process takes a certain amount of time. A longer time taken to collect the reference data increases the scan time. To avoid an increase in the scan time in the embodiment, the collective logger140collects the reference data before the control program starts being executed. However, the collective logger140may collect the reference data at times other than before the control program starts being executed. The collective logger140may collect the reference data after the control program starts being executed but before logging is started.

After the start of execution of the control program, the split logger150shown inFIG.1acquires the logs of the collection target device values stored in the device memory110at multiple scan times. More specifically, when the END command is executed at each scan time, the split logger150stores, into the full data area1301, the logs of one-Nth of the collection target device values stored in the device memory110. The logs stored into the full data area1301by the split logger150include the device name, the device value, and the scan count at the time. The logs collected by the split logger150and stored into the full data area1301may be referred to as split logs.

The number of device values collected by the split logger150at a time is determined in the manner described below. As described above, the collective logger140calculates the number of device values collected by the split logger150at a time in the preparation process. For example, as shown inFIG.4, the device memory110stores device values D1to D2000, and all the values D1to D2000are collection targets. In this case, the number of data pieces for device values is 2000. The split count N is set to 20, and the device values D1to D2000have the same data size. In this case, the split logger150may collect100device values in the device memory110at each scan time.

Thus, as shown inFIG.5B, the split logger150stores the logs of the device values D1to D100into the full data area1301in the first scan. In the first scan, the collection target device storage area1301A in the full data area1301is available, and thus the split logger150stores the logs of the device values into the collection target device storage area1301A. In second scan, the split logger150stores the logs of the device values D101to D200into the collection target device storage area1301A in the full data area1301. As shown inFIG.5C, when the collection target device storage area1301A is available, the split logger150stores the logs of one hundred device values into the collection target device storage area1301A in each scan. When storing the device values into the full data area1301, the split logger150is to store information specifying device values to be collected at the subsequent scan time and information specifying the location in the full data area1301into which data is to be written at the subsequent scan time. The functions of the split logger150are implemented by the CPU13shown inFIG.2. The split logger150is an example of split logging means in an aspect of the present disclosure.

When no free space is left in the collection target device storage area1301A, the split logger150stores split logs into the full data area1301by overwriting the oldest data stored in the full data area1301. For example, as shown inFIG.5D, after the split logger150stores the logs of the device values into the collection target device storage area1301A at the 20th scan time, no free space is left in the collection target device storage area1301A. In this case, as shown inFIG.5E, the split logger150stores logs into the full data area1301at the 21st scan time by overwriting the data written before the control program starts being executed.

As described above, the data stored by the collective logger140into the full data area1301before the control program started being executed is used as the reference data for collecting the differential logs. The data is overwritten after the scan count exceeds20. In this case, the logs of the device values stored by the split logger150into the full data area1301at the first to 20th scan times are used as new reference data.

After storing data at the 40th scan time as shown inFIG.5F, the split logger150overwrites the data stored at the first scan time in the full data area1301at the 41st scan time. Data stored in the full data area1301in the first and subsequent scans is thus overwritten. In this case, the logs of the device values stored by the split logger150into the full data area1301at the 21st to 40th scan times are used as new reference data.

As described above, the split logger150records the logs of the collection target device values used as the reference data at N separate times. The split logger150with this structure has the advantages described below. The logs recorded by the split logger150at one scan time are the logs of one-Nth of the collection target device values. Thus, the amount of data stored at one scan time is smaller than the amount of the logs of all the collection target device values recorded at a time. Thus, the process time taken to record the logs is shorter than the time taken to record the logs of all the collection target device values at a time. The time taken to record the logs are not long, and thus does not increase the scan time taken to record logs.

When, for example, the scan time increases due to the recording process of the logs beyond an allowable range, the process of the PLC100is delayed and adversely affects the operation of the entire system. Thus, the split logger150records the logs of the collection target device values at N separate times in the embodiment.

When the END command in the control program is executed, the differential logger160shown inFIG.1determines whether any of the collection target device values in the device memory110has changed, and stores the logs of resultant device values into the differential data area1302. The functions of the differential logger160are implemented by the CPU13shown inFIG.2. The differential logger160is an example of differential logging means in an aspect of the present disclosure.

The differential logger160first determines whether the differential logs of the collection target device values are stored in the differential data area1302. When determining that the differential logs of the collection target device values are stored in the differential data area1302, the differential logger160determines whether the latest device value stored in the differential data area1302matches the corresponding device value in the device memory110. When the two device values do not match, the differential logger160determines that the device value has changed.

When determining that no differential log of the collection target device value is stored in the differential data area1302, the differential logger160determines whether the device value included in the reference data stored in the full data area1301matches the corresponding device value in the device memory110. When the two device values do not match, the differential logger160determines that the device value has changed.

When determining that the device value has changed, the differential logger160stores, as differential logs, the device name, the device value stored in the device memory110, and the scan count at the time into the differential data area1302. In the example shown inFIG.3C, the differential logger160determines that the value for the device D1has changed at the third scan time, and stores the differential log for the device D1into the differential data area1302. The differential logger160determines that the value for the device D1has changed at the fifth scan time, and stores the differential log for the device D1into the differential data area1302.

In the embodiment, the differential logger160overwrites the old differential logs upon replacement of the reference data. As described above, the data in the full data area1301is overwritten in the (M×N)+1-th and subsequent scans (M is a natural number greater than or equal to 1). At this time, the reference data is replaced with new reference data. The differential logs collected before the new reference data is generated are not to be used.

The functional components of the setting tool500will now be described. As shown inFIG.1, the setting tool500functionally includes a setting registerer510that registers setting values for the logging process with the PLC100.

The setting registerer510causes the display device54to display, for example, a logging setting screen shown inFIG.6. The user sets, using the setting tool500, whether to enable the logging function, the split count for splitting the logs for collection, the size of the full data area1301, and the size of the differential data area1302with the PLC100. The split count indicates the split count N that is the number of times the split logger150in the PLC100splits the logs of the collection target device values for collection. The user operates the input device53to input whether to enable or disable the logging function, the split count, the size of the full data area1301, and the size of the differential data area1302, and presses a setup button. In response to this, the setting registerer510writes the values input by the user into the predetermined area in the memory11in the PLC100.

The entire sequence of the logging process in the PLC100will now be described. The CPU13in the PLC100executes the firmware to function as the collective logger140, the split logger150, and the differential logger160shown inFIG.1. In the example describe below, all the device values in the device memory110are set as collection targets.

The user operates a switch in the PLC100to start the operation of the PLC100. The PLC100thus starts the initial process.

As shown inFIG.7, the collective logger140prepares for the logging process in the initial process (step S11). More specifically, in the initial process, the collective logger140reads the split count N from the predetermined area in the memory11and stores the split count N into the setting information storage120. The collective logger140further reads a definition value of the size of the full data area1301and a definition value of the size of the differential data area1302from the predetermined area in the memory11, and allocates the set sizes to the full data area1301and the differential data area1302in the log storage130.

As shown inFIG.5A, in the initial process, the collective logger140stores the logs of all the collection target device values in the device memory110into the full data area1301as reference data (step S12). After the initial process, the PLC100starts execution of the control program.

The split logger150determines whether the logging time has come (step S13). When the END command is executed, the split logger150determines that the logging time has come (Yes in step S13) and stores the split logs or the logs of one-Nth of the collection target device values into the full data area1301(step S14). To store the split logs into the full data area1301, the split logger150overwrites the oldest split logs stored in the full data area1301in the (M×N)+1-th and subsequent scans (M is a natural number greater than or equal to 1).

Subsequently, the differential logger160determines whether any of the collection target device values has changed (step S15). When determining that at least one of the collection target device values has changed (Yes in step S15), the differential logger160records the differential log (step S16). After the reference data is replaced with new reference data, the differential logger160overwrites the differential log recorded before the new reference data is generated.

After the subsequent scan in the control program ends, the split logger150and the differential logger160perform the processing in step S13and the subsequent steps again.

As described above, in the structure in the embodiment, the PLC100collects the logs of the collection target device values in the device memory110at N separate times and stores the collected device values into the full data area1301. The logs collected at N separate times are used as reference data for collecting the differential data. When no free area is left in the full data area1301, the PLC100overwrites the oldest logs stored in the full data area1301. The amount of data stored in the full data area1301thus remains within the set size.

The PLC100collects the device values determined to have the values changed from the reference data as the differential logs. When new reference data is stored in the full data area1301, the PLC100overwrites the differential logs stored in the differential data area1302and collected before the new reference data is generated. The area size of the differential data area1302is to be set as appropriate based on the number of collection-target device values, the size of the device values, and the size of the split count N. Data in the differential data area1302is overwritten after the reference data stored in the full data area1301is replaced with new reference data. Thus, the amount of data stored in the differential data area1302remains within the set size.

The PLC100with the above structure stores the split logs without using the memory space larger than the set size. The memory space for storing the differential logs also remains within the set size. Thus, logging does not cause insufficient free space in the memory and reduces errors resulting from insufficient memory space.

The structure in the embodiment allows reproducing the history of the device values from the reference data and the differential logs. After replacement with new reference data, the history of the device values collected before replacement of the reference data is unreproducible. However, the user can acquire the history of the intended device values by appropriately setting the size of the full data area1301and the split count N based on the period intended by the user to acquire the history of the device values.

The PLC100collects the collection target device values in the device memory110at N separate times. For example, all the collection target device values have the same size. The number of device values for recording the split logs is one-Nth of the number of device values for recording the logs in a collective manner. This uses a shorter time for recording the logs than when all the logs of the collection target device values are recorded in a single scan. Thus, logging is less likely to increase the scan time. At each scan time, the logging process simply records the logs of one-Nth of the device values and the differential logs. The CPU13in the PLC100is thus less likely to increase the processing load.

Modifications

In the embodiment, the user sets the split count N. Instead, the setting registerer510in the setting tool500may calculate the split count N. The main structure in the modifications will be described below. For example, the setting registerer510causes the display device54to display a screen for condition setting shown inFIG.8. In this case, the user simply operates the input device53to set the scan count for logging and an allowable increase in the scan time.

The setting registerer510in the setting tool500calculates the split count N in the manner described below. The theoretical value of the split count N at which the log storage130uses a minimum space is indicated with Formula 1.

N=CD⁢(S-1),Formula⁢1
where N is the split count, C is the memory size for the collection target device values, D is a predictive memory size for the differential logs, and S is the scan count for logging.

The memory size C is the size of the memory space used to store the collection target device values set by the user. The memory size C for the collection target device values is calculated from the number of collection target device values specified by the user and the data size of each device value. The predictive memory size D for the differential logs is a predictive memory size used to store the differential logs collected in one scan. The predictive memory size D used to store the differential logs collected in one scan is calculated from, for example, statistical data based on past logging. The scan count S for logging is set by the user.

The scan time is longer when the PLC100executes the logging process than when the PLC100executes no logging process. This increase in the scan time is to be within the range allowable by the user. Thus, the split count N is determined to maintain the time taken to store the split logs and the differential logs collected in each scan into the log storage130within the allowable increase in the scan time set by the user.

The allowable increase in the scan time set by the user is T (sec), and the rate at which data is stored in the log storage130(data transfer rate) is A (bps). In this case, the size of data storable in the log storage130within the allowable increased scan time is TA (bit). The split logs and the differential logs are recorded in each scan. Thus, the split count N is to satisfy Formula 2 below.
N≥C/(TA−D)  Formula 2

In Formula 2, N is the split count, C is the memory size used by the collection target device values, D is the predictive memory size used by the differential logs, T is the allowable increase in the scan time, and A is the rate at which data is stored into the log storage130.

The allowable increased scan time T is set by the user. The rate at which data is stored into the log storage130is the data transfer rate of the storage device in the PLC100. For example, the data transfer rate is described in the specifications.

The allowable increased scan time T is to satisfy Formula 3 below.
T≥D/AFormula 3

The setting registerer510calculates the split count N at which the log storage130uses a minimum space based on Formula 1. More specifically, the setting registerer510first calculates the memory size C for the collection target device values based on the number of collection target device values and the data size of each device value. The predictive memory size D for the differential logs is prestored in the predetermined area in the memory51. The scan count S for logging is input by the user on the screen shown inFIG.8. The setting registerer510then calculates the split count N using Formula 1.

The setting registerer510determines the split count N calculated using Formula 1 to satisfy Formulas 2 and 3. The allowable increased scan time T is input by the user on the screen shown inFIG.8. The rate A at which data is stored into the log storage130is prestored in the predetermined area in the memory11. The setting registerer510stores the determined split count N into the predetermined area in the memory51.

Before calculating the split count N, the setting registerer510determines whether the allowable increase in the scan time input by the user on the screen shown inFIG.8satisfies Formula 3. When determining that the input allowable increase in the scan time does not satisfy Formula 3, the setting registerer510causes the display device54to display a message indicating that the user is to change the allowable scan time increase. In this case, the user is to change the allowable scan time increase by operating the input device53.

The setting registerer510calculates the memory size of the full data area1301from the calculated split count N. The memory size M of the full data area1301can be calculated with the formula below.

M=(CN+D)×(N+S-1)Formula⁢4

In Formula 4, N is the split count, C is the memory size for the collection target device values, D is the predictive memory size for the differential logs, and S is the scan count for logging.

The setting registerer510stores the calculated memory size M into the predetermined area in the memory51. For example, when the split count N is the same as the scan count S to be acquired, the memory size M is substantially twice the memory size C of the collection target device values.

The setting registerer510calculates the memory size of the differential data area1302from the predictive memory size D for the differential logs and the set scan count and stores the calculated memory size into the predetermined area in the memory51. The setting registerer510then displays the parameters indicating the calculated logging settings on the screen shown inFIG.9.

For example, when the user determines that the calculated split count N and the memory sizes of the full data area1301and the differential data area1302are acceptable, the user presses the setup button to provide the instruction to write the logging setting onto the PLC100, with the setting tool500connected to the PLC100with the communication cable701. The setting registerer510writes the parameters indicating the logging setting stored in the memory51into the predetermined area in the memory11in the PLC100. When the user intends to change the split count N and the memory sizes of the full data area1301and the differential data area1302appearing on the screen shown inFIG.9, the user presses a back button. In response to this, the setting registerer510displays the screen shown inFIG.8again. In this case, the user can change the scan count for logging and the allowable scan time increase on the screen shown inFIG.8.

In the structure in the modification, the user simply sets the scan count for acquiring the logs and the allowable scan time increase without determining the split count.

As in the embodiment, the structure in the modification also allows the memory size used for storing the split logs to remain within the set size. The memory size used for storing the differential logs also remains with the set size. Thus, the logging does not cause insufficient free space in the memory. This structure thus reduces errors resulting from insufficient memory space.

As in the embodiment, the time taken to record the logs is shorter than when all the logs of the collection target device values are recoded in one scan. Thus, logging is less likely to increase the scan time. The CPU13is less likely to increase the processing load in the logging process. In addition, time-series data of the device values can be generated from the collected data.

In the embodiment, the PLC100includes the log storage130, but the structure is not limited to this example. The PLC100may eliminate the log storage130and record the logs into a storage included in another device. For example, the PLC100transmits log data to another device through a network.

In the embodiment, the PLC100includes the device memory110, but the structure is not limited to this example. The PLC100may record the logs in a device memory included in another device. For example, the PLC100may receive device values from another device through a network. The PLC100may read the device values recorded in a memory shared with another device through a network.

In the embodiment, the PLC100records logs when the END command in the control program is executed, but the structure is not limited to this example. For example, the PLC100may record logs before the I/O refresh performed before the first command in the control program is executed.

In the embodiment, the collective logger140and the split logger150record the device name, the device value, and the scan count as the logs, but the logs are not limited to the examples. For example, the collective logger140and the split logger150may record time information at the scan time as a log in addition to the device name, the device value, and the scan count.

Examples of a non-transitory recording medium that records the above programs include a non-transitory computer-readable recording medium, such as a magnetic disk, an optical disk, a magneto-optical disk, a flash memory, a semiconductor memory, and magnetic tape.

The foregoing describes some example embodiments for explanatory purposes. Although the foregoing discussion has presented specific embodiments, persons skilled in the art will recognize that changes may be made in form and detail without departing from the broader spirit and scope of the invention. Accordingly, the specification and drawings are to be regarded in an illustrative rather than a restrictive sense. This detailed description, therefore, is not to be taken in a limiting sense, and the scope of the invention is defined only by the included claims, along with the full range of equivalents to which such claims are entitled.

REFERENCE SIGNS LIST

N Split count11,51Memory12,52Connection interface13,55CPU19,59Bus53Input device54Display device100Programmable logic controller (PLC)110Device memory120Setting information storage130Log storage140Collective logger150Split logger160Differential logger500Setting tool510Setting registerer701Communication cable1301Full data area1301A Collection target device storage area1302Differential data area