CN116710858B - Data collation device, data collation system, and data collation method - Google Patents

Data collation device, data collation system, and data collation method Download PDF

Info

Publication number
CN116710858B
CN116710858B CN202180088713.6A CN202180088713A CN116710858B CN 116710858 B CN116710858 B CN 116710858B CN 202180088713 A CN202180088713 A CN 202180088713A CN 116710858 B CN116710858 B CN 116710858B
Authority
CN
China
Prior art keywords
data
collation
value information
output data
execution cycle
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202180088713.6A
Other languages
Chinese (zh)
Other versions
CN116710858A (en
Inventor
长谷川瞬也
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Publication of CN116710858A publication Critical patent/CN116710858A/en
Application granted granted Critical
Publication of CN116710858B publication Critical patent/CN116710858B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/28Error detection; Error correction; Monitoring by checking the correct order of processing

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Programmable Controllers (AREA)

Abstract

The data collation device includes: a desired value information generation unit (31) that generates desired value information including time data, input data, and output data corresponding to a timing chart defining the sequence control; an execution cycle setting unit (32) that sets an execution cycle of the sequence program; a control unit (2) that performs processing of the sequence program on virtual input data obtained based on the execution cycle of the sequence program and input data of the expected value information, and outputs virtual output data; a collation section setting unit (33) which sets a collation section having a time width with reference to the time of at least one of the output data in the collation of the virtual output data and the output data of the expected value information; and an expected value collation unit (4) for collating the virtual output data with the output data of the expected value information in the collation section set.

Description

Data collation device, data collation system, and data collation method
Technical Field
The present invention relates to a data collation apparatus, a data collation system, and a data collation method for a sequence program.
Background
A Programmable Logic Controller (PLC) is generally a controller used for controlling devices in a factory, and executes a sequence program for controlling the devices. When a new device is built, when a function of an existing device is added or a specification of the device is changed during operation, a sequence program is newly created or the content of the existing sequence program is changed.
After the sequenced program is created, it needs to be confirmed whether the program acts as desired. In operation confirmation, the sequencing program is executed in a state in which the input data and the state of the internal memory at the time of operation of the device are simulated, and it is verified whether the output data and the state of the internal memory obtained as a result thereof match the expectations. However, there is a problem in that such verification work takes man-hours.
As a method for reducing the load of verification work of such a sequence program, a method of storing expected value information, which is a combination of input data and output data expected by a PLC, reading out the input data and output data of the PLC in a system operation test, comparing the read-out data with the expected value information, and determining whether or not the operation test is acceptable based on the comparison result is disclosed in the prior art disclosed in patent document 1.
Patent document 1: japanese patent laid-open No. 2006-277624
Disclosure of Invention
A control device such as a PLC that performs control of peripheral devices by sequencing control repeatedly executes a sequencing program, processes for refreshing digital inputs and outputs, processes for communicating with peripheral devices, and the like. Therefore, the execution cycle of the sequence program varies according to the establishment condition of the branch condition in the sequence program, the load condition of the communication processing, and the like. For example, when a timer function is present in the sequence program, the timer is turned ON at the input contact point, and then the output is turned ON after the lapse of the set time, but since it is determined whether the set time has elapsed or not at the execution timing (timing) of the sequence program, the timing at which the output of the timer is turned ON also fluctuates with the fluctuation of the execution cycle.
The prior art disclosed in patent document 1 discloses a method for checking the operation of a sequence program using expected value information, which is a combination of input data and output data expected by a PLC, but does not disclose a checking method in the case where the execution cycle of the sequence program varies and the timing of the output data varies.
The present invention has been made to solve the above-described problems, and an object of the present invention is to verify data of a sequence program even when an execution cycle of the sequence program varies.
In order to solve the above-described problems, a data collation apparatus according to the present invention includes: a desired value information generation unit that generates desired value information including time data, input data, and output data corresponding to a timing chart defining the sequence control; an execution cycle setting unit that sets an execution cycle of the sequence program; a control unit that performs processing of the sequence program on virtual input data obtained based on the execution cycle of the sequence program and input data of the expected value information, and outputs virtual output data; a verification section setting unit that sets a verification section having a time width with reference to a time of at least one of output data in a verification pair of virtual output data and output data of expected value information; and an expected value collation unit that collates virtual output data with output data of expected value information in a collation section set.
ADVANTAGEOUS EFFECTS OF INVENTION
The data collation device according to the present invention can collate data of a sequence program even when the execution cycle of the sequence program varies.
Drawings
Fig. 1 is a block diagram showing the structure of a PLC according to embodiment 1.
Fig. 2 is a diagram showing an example of a timing chart according to embodiment 1.
Fig. 3 is a diagram showing an example of expected value information according to embodiment 1.
Fig. 4 is a diagram illustrating comparison between expected value information and virtual data according to embodiment 1.
Fig. 5 is a diagram illustrating comparison between expected value information and virtual data according to embodiment 1.
Fig. 6 is a diagram illustrating comparison between expected value information and virtual data according to embodiment 1.
Fig. 7 is a diagram illustrating comparison between expected value information and virtual data according to embodiment 1.
Fig. 8 is a block diagram showing the configuration of the data collation system according to embodiment 1.
Fig. 9 is a flowchart illustrating a data collation method according to embodiment 1.
Fig. 10 is a block diagram showing the structure of a PLC according to embodiment 2.
Fig. 11 is a diagram showing an example of a timing chart according to embodiment 2.
Fig. 12 is a diagram showing an example of the verification availability setting according to embodiment 2.
Fig. 13 is a flowchart illustrating a data collation method according to embodiment 2.
Fig. 14 is a block diagram showing the structure of a PLC according to embodiment 3.
Fig. 15 is a diagram showing an example of replacement data according to embodiment 3.
Fig. 16 is a diagram showing an example of replacement data setting according to embodiment 3.
Fig. 17 is a flowchart illustrating a data collation method according to embodiment 3.
Fig. 18 is a modification of the hardware configuration of the control unit according to embodiments 1 to 3.
Detailed Description
Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the drawings, the same or corresponding portions are denoted by the same reference numerals. Duplicate descriptions are appropriately simplified or omitted. The present invention is not limited to the embodiments described below.
Embodiment 1
Fig. 1 is a block diagram showing the structure of PLC 1 according to embodiment 1. The PLC 1 includes a control unit 2, an input setting unit 3, and a desired value collation unit 4. The PLC 1 is connected to peripheral devices such as PC (PersonalComputer), a programmable display, and a control target device, and inputs and outputs data between them. The data collation device of the present invention may include a PLC, a numerical control device incorporating a PLC function to perform sequencing control, and other control devices such as a programmable display. In the following embodiments, the functions of the PLC will be described as an example of the data collation device.
The control unit 2 is a microcomputer, and includes a processor 21, a storage unit 22, and an operation mode switching unit 23. The Processor 21 is, for example, CPU (Central Processing Unit), a microprocessor, a DSP (DIGITAL SIGNAL Processor). The storage unit 22 is, for example, RAM (Random Access Memory), ROM (Read Only Memory), HDD (Hard Disk Drive), and stores a user program including a sequence program, other software, firmware, log data, and the like. The processor 21 executes the sequencing program stored in the storage unit 22, thereby controlling peripheral devices connected to the PLC 1. The storage unit 22 is not limited to the form included in the control unit 2, and may be, for example, a recording medium that is detachable from the PLC 1.
The mode executed by the PLC 1 includes 2 types of normal operation modes in which normal processing by the sequence program is executed, and expected value check modes in which check jobs of the sequence program are executed. The operation mode switching unit 23 performs switching of these 2 modes. In the normal operation mode, the control unit 2 executes the processing of the sequence program based on actual input data input from the peripheral device and information (corresponding to devices described later) of the internal memory of the storage unit 22, as in the operation of the normal PLC. The actual output data obtained by the processing is output to the peripheral device or to the storage unit 22. On the other hand, in the expected value collation mode, the control unit 2 executes processing by the sequence program for virtual input data based on the execution cycle of the sequence program and input data of expected value information. The control unit 2 outputs virtual output data obtained by executing the processing of the sequence program to the outside or stores the virtual output data in the storage unit 22.
The actual input data is data actually input from the peripheral device to the PLC 1 in a state where the peripheral device connected to the PLC 1 is controlled by a sequencing program or the like. The actual output data is output data obtained by executing a sequencing program on the actual input data. The virtual input data is set by the input setting unit 3 based on the execution cycle of the sequence program and the input data of the expected value information. The virtual output data is output data obtained by performing processing of a sequence program on virtual input data. The term "virtual" as used herein refers to a representation added to distinguish it from actual input data and actual output data. The operation mode switching unit 23 is an additional configuration for switching between the normal operation mode and the expected value collation mode, and may be configured to perform switching based on an instruction from the peripheral device.
The input setting unit 3 sets input data for checking the sequence program. The input setting unit 3 includes a desired value information generating unit 31, an execution cycle setting unit 32, and a collation section setting unit 33. The expected value information generating unit 31 generates expected value information including time data, input data, and output data corresponding to a timing chart defining the sequence control. The execution cycle setting unit 32 sets the execution cycle of the sequence program. The collation section setting unit 33 sets a collation section having a time width with reference to the time of at least one of the output data in the pair of virtual output data and the output data of the expected value information.
The execution period setting unit 32 may set an arbitrary value by estimating the execution period by the user, may measure the execution period during execution of the sequence program, and may automatically set the execution period based on the measured value or set the execution period by the user. The execution cycle setting unit 32 may have a measurement unit that measures the execution cycle of the sequence program.
Engineering tools for sequencing are typically used when a sequencing program is newly created or when an existing program is changed. The engineering tool is installed on a PC, and can perform design, editing, and simulation of the operation of the sequence program. The user designs the actual input data, the actual output data, and the expected state of the internal memory of the PLC 1 into a time chart by an engineering tool, and creates a sequence program for executing control conforming to the time chart. The created sequence program is transmitted from the PC to the PLC 1 side and stored in the storage unit 22.
Fig. 2 is a diagram showing an example of a timing chart. The timing chart defines the sequencing control, and therefore is a chart showing input data and output data at each time point when the sequencing program is executed. The input data X0, X1 and the output data Y0, Y1, D0 illustrated in fig. 2 are devices indicating the areas of the internal memory in the memory unit 22 of the PLC 1, respectively. As devices, there are bit devices and word devices. The bit device is a device for processing 1-bit information, and X is a device symbol for receiving a signal from the outside, and Y is a device symbol for outputting a signal to the outside. The word device is a device that processes a numerical value, a character string, or the like, and D is a device symbol that indicates a data register that stores the numerical value and the character string as device values. Control of the PLC 1 can be described by these devices. The devices shown in the drawings are merely examples, and may include internal relays, counters, timers, and the like.
In the timing chart of fig. 2, assuming that the execution cycle of the sequence program is 1.00ms, the ON of the input X0 is detected at 10.00ms after 10 cycles, and the input X0 is turned OFF and the output Y1 is turned ON at 110.00ms after 100ms by the timer function. The input X1 and the output Y0 are repeatedly turned ON and OFF at a period of 20.00ms, and the output Y0 is turned OFF after the input X0 is turned OFF at 110.00 ms. D0 as a data register counts the number of times of switching thereof at the timing when the input X1 is turned ON from OFF under the condition that the input X0 is ON, and is stored as a device value.
Fig. 3 is a diagram showing an example of expected value information. The expected value information corresponds to the time chart of fig. 2, and includes time data, input data corresponding to the time data of each device, and output data. The expected value information generating unit 31 generates expected value information including time data, input data, and output data corresponding to the time chart. Fig. 3 is a schematic example, and may include input data and output data corresponding to shorter time data intervals. Further, information other than time data, input data, and output data may be included.
As an additional configuration, the expected value information generating unit 31 may execute the sequence program based on the input data of the expected value information on the sequence program before the change and the execution cycle of the sequence program, and generate the expected value information using the virtual output data and the input data of the expected value information. Even when the sequence program is changed, there are many parts of the expected value information that are the same as those in the conventional process, and if the expected value information can be generated based on the output data obtained by executing the sequence program before the change with respect to the input data of the same expected value information as before the change even if the expected value information is not newly designed, the man-hour for generating the expected value information in the collation of the sequence program after the change can be reduced. Similarly, the expected value information generating unit 31 executes a sequencing program based on the actual input data, and generates expected value information using the output actual output data and the actual input data. When there is a sequence program of a PLC installed in the apparatus and the sequence program is changed, if desired value information based on a new pattern (pattern) of input data is desired to be generated, the actual input data and the actual output data are used instead of the virtual input data, and the man-hour for generating the desired value information can be reduced.
In addition, as another additional configuration, when generating the desired value information using the actual input data and the actual output data, the desired value information generating unit 31 sets a start condition and an end condition for generating the desired value information so as to cut out a section used as the desired value information from the actual input data and the actual output data of the sequencing program before modification. For example, when x0=1 is set as a start trigger condition and x0=0 is set as an end trigger condition, the time at which X0 of the actual input data is turned ON is set as a start time, and a section in which X0 is ON is cut out to generate desired value information. As the start trigger condition, conditions such as a case where the state of the actual input is ON or OFF is a condition (level trigger), a case where the change from OFF to ON or from ON to OFF is a condition (edge trigger), a case where the value of the device becomes a specific value, a case where the value becomes within or outside the specific value range, a case where all of the plurality of conditions are satisfied, a case where any one of the conditions is satisfied, and a time before the time when the condition is satisfied (pre-trigger) can be set. As the end trigger, a predetermined time period from the start trigger may be used as a condition other than the same condition as the start trigger. This makes it possible to automatically create desired value information for collation of the changed sequence program, and to reduce man-hours for generating the desired value information.
In addition, as another additional configuration, the execution cycle setting unit 32 may set the execution cycle of the sequence program after the change based on the measurement value of the execution cycle measured by the sequence program before the change. The collation section setting unit 33 may set a collation section for data collation of the sequence program after the change based on the measured value of the execution period measured by the sequence program before the change.
Fig. 4 is a diagram illustrating comparison of expected value information and virtual data. X0 and Y1 of expected value information are shown at the upper layer, and X0 (virtual input data) and Y1 (virtual output data) of virtual data are shown at the lower layer. The expected value information is as described in the timing chart of fig. 2 and the explanation of fig. 3. On the other hand, virtual data deviates from expected value information due to variation in execution cycle of the sequence program. For example, the execution cycle is estimated to be 1.00ms when creating the sequence program, but may be 1.05ms when actually executing the sequence program, and may be 1.20ms in a certain cycle, but may be 1.50ms depending on the load condition.
The execution cycle setting unit 32 sets a fixed value (for example, a fixed value based on an average value of the variable execution cycle) corresponding to the variation of the execution cycle as the execution cycle of the sequence program, or dynamically sets the execution cycle of the sequence program based on a measured value of the execution cycle obtained when the sequence program is executed. In the dynamic setting, when the execution cycle varies, for example, as in 1.20ms or 1.50ms, the measurement value obtained when the sequence program is executed may be set, or a total value of a value calculated from the measurement value and an arbitrary fixed value may be used as the execution cycle.
Fig. 5 is a diagram illustrating comparison of expected value information and virtual data, and is a diagram obtained by extracting and amplifying the output data of the expected value information and Y1 of the virtual output data of fig. 4 from the vicinity of 110 ms. The case where the execution period is set to a fixed value of 1.00ms by the execution period setting unit 32, but the actual execution period varies by 1.05ms will be described as an example. In the virtual input data obtained based ON the execution cycle of the sequence program and the input data of the expected value information, the time when the ON of the input X0 is detected after 10 cycles is 10.50ms, and the input X0 is turned OFF when 111.30ms (i.e., 111.30-10.50= 100.80 ms) of the 106 th cycle of 100ms has elapsed from this time point. At the timing when the input X0 becomes OFF, Y1 as virtual output data becomes ON.
At time 110.25ms of the 105 th cycle, since 100ms has elapsed since 10.00ms in the output data Y1 of the desired value information, the virtual output data Y1 is in an ON state, but 100ms (i.e., 110.25-10.5=99.75 ms) has not elapsed since 10.5ms, and is still OFF. Therefore, even if the virtual output data at time 110.25ms is checked against the output data of the desired value information by the desired value checking unit 4, the virtual output data does not match.
The collation section setting section 33 sets a collation section having a time width with reference to the time of the virtual output data. The expected value collation unit 4 collates the virtual output data with output data (expected value information output data group) of expected value information included in the set section. For example, a collation section (109.25 ms to 111.25 ms) of total 2.00ms is set up before and after 1.00ms based on 110.25ms of the virtual output data Y1, and the virtual output data is collated with the set expected value information output data group in the collation section. When the output data of the expected value information is defined in units of 0.50ms, the output of the expected value information is turned OFF at 109.50ms, and the output data matches the OFF of the virtual output data. A collation section of 1.00ms before and after the virtual output data Y1 is set based on 111.30ms of the virtual output data Y1, and the virtual output data is collated with the set expected value information output data group included in the section. Since the virtual output data Y1 is ON and the expected value information output data group in the collation section is ON, the collation result is judged to be coincident. The expected value collation unit 4 collates the virtual output data with the expected value information output data group included in the collation section set, and determines that the collation result is identical when at least 1 data of the expected value information output data group is identical to the virtual output data.
The expected value collation unit 4 performs such collation on all the virtual output data. When all the virtual output data and the output data of the expected value information match, the collation result indicating that all the virtual output data and the expected value information match is output to the outside or stored in the storage unit 22. When there is a discrepancy in the result of the collation, the user is notified of the discrepancy, and the user confirms the relevant part, thereby correcting the sequence program, resetting the execution cycle and the time width of the collation section. As described above, even if the sequence program takes a desired action, there is a possibility that the timing is deviated by the execution cycle of the sequence program, the collation with the desired value information is not coincident, and the collation is performed by setting the collation section having a time width, so that such a problem is eliminated.
As an example of setting of the collation section, when the execution period varies from 1.20ms to 1.50ms, the collation section setting section 33 can dynamically set the collation section based on a measured value of the execution period of the sequence program and an arbitrary fixed value (for example, 0.50 ms). The measurement value, the fixed value, and the scaling factor are used for setting the collation interval, the scaling factor is set to 1.50, the collation interval is set to 2.30ms (1.50x1.20+0.50) for a period of 1.20ms of the measurement value, and the collation interval is set to 2.75ms (1.50x1.50+0.50) for a period of 1.50ms of the measurement value. The present invention is not limited to the collation section having a time width before and after the time of outputting the data, and the collation section may be provided before or after the time of outputting the data as a reference, or the time width before and after the time width may be provided independently according to the tendency of the deviation between the desired value information and the dummy data.
The fixed value and the scaling factor in the setting of the check section are determined so as to change the time width according to the environment in which the PLC 1 is operated, the use of the control, and the limitation. For example, in the case of a system in which an input from a control device is received, a process is performed by a sequencing program of the PLC 1, and a result of the process is output to the control device, if there is a time limit in time until the output is obtained after the control device inputs data to the PLC 1, the time width of the collation section is reduced to perform collation.
In the above description, the collation section setting section 33 sets the collation section having the time width with reference to the time of the virtual output data. In contrast, a collation section having a time width may be provided with reference to the time of the output data of the desired value information, and virtual output data included in the section may be collated with the desired value output data.
Fig. 6 is a diagram illustrating comparison between expected value information and virtual data, similarly to fig. 5. The collation section setting unit 33 sets a collation section having a time width of 1.50ms with reference to 110.00ms, which is the time of outputting data of the expected value information. The expected value collation unit 4 collates virtual output data (virtual output data group) in the set section with output data of expected value information, and determines that the collation result is identical when at least 1 data in the virtual output data group is identical with the output data of expected value information. Since the virtual output data group within the collation interval (108.50 ms to 111.50 ms) has data in which Y1 is turned ON at 111.30ms, the collation result is judged to be coincident. The expected value collation unit 4 performs such collation on the output data of all the expected value information, and determines whether the output data are identical or not. When the output data of all the desired value information matches the virtual output data, the desired value collation unit 4 outputs the collation result of all the matches to the outside or stores the collation result in the storage unit 22.
The collation section setting unit 33 may set a collation section having a time width based on the time of each of the virtual output data and the output data of the expected value information, and the expected value collation unit 4 may perform data collation based on the result of collating the output data of the expected value information included in the collation section based on the time of the virtual output data with the virtual output data and the result of collating the virtual output data included in the collation section based on the time of the output data of the expected value information with the output data of the expected value information.
Such data collation may improve collation accuracy as compared with a case where a collation section is provided with reference to one output data. For example, when the collation section is set based on the time of the virtual output data, the result of collating the desired value information output data group with the virtual output data, and the collation section is set based on the time of the desired value information output data, and the result of collating the output data of the desired value information with the virtual output data group are inconsistent, if the collation sections are appropriately adjusted so that the collation results of the two are consistent, the collation results are judged to be consistent, and if the inconsistency is not eliminated even if the collation section is adjusted, the collation results are judged to be inconsistent.
Fig. 7 is a diagram illustrating comparison of expected value information and virtual data. The output data of the expected value information is ON for 110.00ms to 111.00ms, and OFF for other sections. On the other hand, the virtual output data is OFF in the interval from 110.00ms to 111.00ms and other intervals. In this case, the output data of the expected value information and the virtual output data should be inconsistent.
However, if the collation section is set before and after the collation section of 1.00ms (fig. (a)) based on the time 110.25ms of the virtual output data and the expected value information output data group in the collation section is collated with the virtual output data (OFF at 110.25 ms), the expected value collation section 4 judges that the virtual output data matches the expected value information because the output data having the expected value information indicating OFF at 99.50 ms. ON the other hand, even if a collation section of 1.00ms (fig. (b)) is set before and after the time of outputting data of the desired value information with respect to 110.00ms, and the virtual output data group in the section is collated with the output data of the desired value information (ON at 110.00 ms), the virtual output data group side does not have ON data, and thus it is judged that there is no coincidence. In such a case, even if the collation section (b) is expanded, the expected value collation unit 4 determines that the two sections are not identical. In fig. 7, the time width of the collation sections is made the same for both, but may be adjusted appropriately.
In embodiment 1, the PLC 1 performs the generation of the desired value information, the setting of the execution cycle and the collation section of the sequence program, and the collation process of the output data of the desired value information and the virtual output data, but the present invention is not limited thereto. The functions described above may be executed in a data collation system in which a PC and a PLC 1 to which engineering tools are attached are combined. Fig. 8 is a block diagram showing a configuration example of the data collation system. A sequencing program is created on the PC 10 side where the engineering tool 11 is installed, and expected value information corresponding to the time chart is generated. The user program including the sequence program is stored in the PLC 1, virtual input data is written from the PC 10 to the PLC 1, and the sequence program is executed in the PLC 1. The virtual output data obtained by the execution of the sequence program may be read by the engineering tool 11, and a collation section corresponding to the execution cycle of the sequence program may be set, thereby performing data collation. In this example of the data collation system, the PC 10 to which the engineering tool 11 is attached realizes functions of the input setting section 3 and the expected value collation section 4 of the PLC 1. In the following embodiment, a part of functions may be implemented in addition to the PLC 1.
Next, a data collation method according to embodiment 1 will be described with reference to the flowchart of fig. 9. Desired value information including time data, input data, and output data corresponding to a timing chart defining the sequence control is generated (step S101). Next, an execution cycle of the sequence program is set, and a collation section is set based on the execution cycle (step S102). The processing by the sequence program is executed on virtual input data obtained based on the execution cycle of the sequence program and the input data of the expected value information (step S103). The obtained virtual output data and the output data of the expected value information are checked using the check section (step S104). When the result of the collation is that all the output data are identical (YES in step S105), the result is output (step S106). On the other hand, when the collation is inconsistent (NO in step S105), the user is notified of the result of the inconsistency (step S107). The user receives the notification, and considers correction of the sequence program, execution cycle, resetting of the check section, and the like. The order of the steps is not limited to the example shown in fig. 9, and the steps may be processed in parallel while changing the order. The same applies to the following embodiments.
As described above, the data collation device according to the present invention is configured to include: a desired value information generation unit 31 that generates desired value information including time data, input data, and output data corresponding to a timing chart defining the sequence control; an execution cycle setting unit 32 that sets an execution cycle of the sequence program; a control unit 2 that performs processing of the sequence program on virtual input data obtained based on the execution cycle of the sequence program and input data of the expected value information, and outputs virtual output data; a collation section setting unit 33 that sets a collation section having a time width with reference to the time of at least one of the output data in the collation of the virtual output data and the output data of the expected value information; and an expected value collation unit 4 collating the virtual output data with the output data of the expected value information in the set collation section.
With this configuration, even when the execution cycle of the sequence program varies, the data of the sequence program can be checked.
Embodiment 2
PLC 1 according to embodiment 2 will be described. In this embodiment, as shown in fig. 10, the PLC 1 has a verification availability setting section 5 in addition to the configuration disclosed in embodiment 1.
The verification availability setting unit 5 sets whether or not to verify the output data of the expected value information in the expected value verification unit 4 with the virtual output data. The expected value collation unit 4 does not perform the collation with respect to the output set to be not to perform the collation by the collation availability setting unit 5. On the other hand, the expected value collation unit 4 performs collation on the output set to be collated by the collation availability setting unit 5, and outputs a collation result.
When the content of the sequence program is changed due to a specification change of the control device or the like, there are a control portion and a changed control portion existing in the sequence program. The expected value information corresponding to the existing control section can be used as it is, but if the expected value information is used for the changed control section, the collation result becomes inconsistent. Therefore, the verification availability setting unit 5 sets the output data of the control section after the change to be non-verified by the change of the sequence program.
Even in the conventional control part of the sequence program, there are cases where problems such as mismatch and malfunction occur with the change of the sequence program. The degradation test can be performed on the changed sequence program, and the influence of the change of the sequence program can be verified for the existing control part.
Fig. 11 is a diagram showing an example of a timing chart. The case where the timing chart of fig. 2 is changed to the timing chart of fig. 11 will be described as an example. In fig. 11, after 130ms has elapsed since the input X0 was turned ON, the output Y1 is turned ON. D0 as a data register counts the number of times of switching between ON and OFF of the input X1 under the condition that the input X0 is ON, and stores the counted number as a device value.
Fig. 12 is a diagram showing an example of the verification availability setting. By changing the sequence program, the output Y0 is not changed from the existing control, but the outputs Y1 and D0 are changed from the existing control. The verification availability setting unit 5 sets the expected value verification unit 4 so as not to verify the virtual output data with the output data of the expected value information with respect to the outputs Y1 and D0. Thus, the verification of the virtual output data and the output data of the desired value information is performed only on the output Y0 corresponding to the existing control portion of the sequence program.
The outputs corresponding to the existing control portion and the changed control portion of the sequence program need to be determined in advance before the collation is performed. As an additional configuration, the verification availability setting section 5 may have a function of analyzing the existing control section and the control section after the modification from the sequencing program before and after the modification, and detecting the outputs corresponding to them. In this case, the workload of the user for determining the output to be the object can be reduced.
Next, a data collation method according to embodiment 2 will be described with reference to the flowchart of fig. 13. First, expected value information is generated (step S201). Then, with the change of the sequence program, a check is made as to whether or not the output is possible with respect to the existing control section and the changed control section (step S202). Specifically, the control unit is set to "check" for the existing control unit, and the control unit is set to "not check" for the changed control unit.
An execution cycle of the changed sequence program is set, and a collation section is set based on the execution cycle (step S203). The processing of the sequence program is executed on virtual input data obtained based on the execution cycle of the changed sequence program and the input data of the expected value information (step S204). The obtained virtual output data is collated with the output data set as the expected value information to be collated using the collation section (step S205). If the result of the collation is that all the output data are identical (YES in step S206), the result is output (step S207). On the other hand, when the collation is inconsistent (NO in step S206), the user is notified of the result of the collation that there is an inconsistency (step S208).
As described above, the data collation device in embodiment 2 has a collation availability setting section 5 for setting whether or not collation of output data of desired value information with virtual output data can be performed, in addition to the configuration of embodiment 1, and the desired value collation section 4 has a configuration for collating output data of desired value information with virtual output data based on whether or not collation can be performed which is set.
Thus, even if desired value information is not created for the changed control section, it is possible to verify the influence of the change of the sequence program by performing data collation for the existing control section.
Embodiment 3
PLC 1 according to embodiment 3 will be described. As shown in fig. 14, embodiment 3 includes a replacement data generating unit 34 and a replacement data setting unit 6 in addition to the configuration disclosed in embodiment 1.
When the content of the sequence program is changed by changing the specification of the control device, there are an existing control portion that is not changed and a control portion that is changed in the sequence program. The expected value information corresponding to the existing control section can be used as it is, but if the expected value information is used for the changed control section, the collation result becomes inconsistent. Therefore, when the sequence program is changed, the replacement data generating unit 34 generates replacement data including desired value information including time data and output data corresponding to a time chart defining the sequence control after the change. The replacement data setting unit 6 makes a setting to replace the desired value information generated by the desired value information generating unit 31 with the replacement data for the sequence program before the change. The expected value collation unit 4 collates the virtual output data, the replacement data, and the output data of the expected value information in the set collation section. The replacement data is not limited to the time data and the output data, and may include input data. In this case, the partial replacement of the expected value information based on the replacement data includes not only the replacement of the time data and the output data but also the replacement of the input data.
Fig. 15 is a diagram showing an example of replacement data. When the sequence program is changed from fig. 2 to the timing chart of fig. 11, the output Y0, which is a conventional control section, can directly use the desired value information generated by the desired value information generating unit 31 for the sequence program before the change. On the other hand, the outputs Y1 and D0 corresponding to the changed control portions use the replacement data by the change of the sequence program. The replacement data is created to replace a part of the output data of the expected value information, and the input data directly uses the expected value information.
Fig. 16 is a diagram showing an example of the setting of the replacement data. As described above, the output Y0 is set to "not replace". In this case, the expected value collation unit 4 directly reads the expected value information generated by the expected value information generation unit 31, and performs collation with the virtual output data. On the other hand, the outputs Y1, D0 are set to "replace". In this case, the expected value collation unit 4 reads the replacement data and performs collation with the virtual output data. The replacement of the desired value information with the replacement data may be performed by overlapping a part of the desired value information with the replacement data, or the desired value collation unit 4 may read a part necessary for collation according to the setting of the replacement data setting unit 6, instead of merging the replacement data with the desired value information.
Next, a data collation method according to embodiment 3 will be described with reference to the flowchart of fig. 17. First, desired value information and replacement data are generated in advance (step S301 and step S302). Next, a part of the desired value information is replaced with the replacement data according to the setting of the replacement data setting unit 6 (step S303). An execution cycle of the changed sequence program is set, and a collation section is set based on the execution cycle (step S304). The processing of the sequence program is executed on virtual input data obtained based on the execution cycle of the changed sequence program and the input data of the expected value information (step S305). The obtained virtual output data, replacement data, and output data of desired value information are checked within the range of the check section (step S306). When the collation of the virtual output data and the output data of the expected value information is all coincident (YES in step S307), the collation result is output (step S308). On the other hand, if there is an inconsistent collation result by collation (NO in step S307), the status is notified to the user (step S309), and the process ends.
As described above, the data collation device according to embodiment 3 has the structure of embodiment 1, and further includes: when the sequence program is changed, the replacement data generating unit 34 generates desired value information including time data and output data corresponding to a time chart defining the changed sequence control; and a replacement data setting unit 6 for setting, for the sequence program before modification, the replacement of the desired value information generated by the desired value information generating unit 31 by the replacement data, and the desired value collation unit 4 has a structure for collating the virtual output data, the replacement data, and the output data of the desired value information in the set collation section.
Thus, in the verification of the data of the changed sequence program, the data verification can be performed without newly creating the desired value information on the existing control section.
Fig. 18 is a diagram showing a modification of the hardware configuration of the control unit 2 according to embodiments 1 to 3. In fig. 1, 10, and 14, the control unit 2 has a processor 21 and a storage unit 22, and the processor 21 executes a user program, other software, and firmware including a sequence program stored in the storage unit 22. As a modification, the control unit 2 may be realized by dedicated hardware (processing circuit 20) as shown in fig. 18. Such as a single Circuit, a composite Circuit, a programmed processor, a parallel programmed processor, an ASIC (Application SPECIFIC INTEGRATED Circuit), an FPGA (Field-Programmable GATE ARRAY), or a combination thereof. The functions of the data collation device may be partly realized by the dedicated hardware described above, and partly realized by the configuration of the processor 21 and the storage unit 22 shown in fig. 1, 10, and 14.
The configuration shown in the above embodiment is an example of the content of the present invention, and may be combined with other known techniques, and a part of the configuration may be omitted or changed without departing from the scope of the present invention.
Description of the reference numerals
1Plc,2 control unit, 3 input setting unit, 4 expected value checking unit, 5 check availability setting unit, 6 replacement data setting unit, 21 processor, 22 storage unit, 23 operation mode switching unit, 31 expected value information generating unit, 32 execution cycle setting unit, 33 check section setting unit, 34 replacement data generating unit.

Claims (14)

1. A data collation apparatus, comprising:
A desired value information generation unit that generates desired value information including time data, input data, and output data corresponding to a timing chart defining sequencing control that operates in accordance with the 1 st execution cycle that is the execution cycle of the sequencing program;
An execution cycle setting unit that sets a2 nd execution cycle, which is a fixed value corresponding to a fluctuation of the execution cycle of the sequence program;
a control unit that performs processing of the sequence program on virtual input data obtained based on the 2 nd execution cycle and the input data of the expected value information, and outputs virtual output data;
A collation section setting section that sets a1 st collation section having a time width with reference to a1 st time point based on the 1 st execution cycle and sets a2 nd collation section having a time width with reference to a2 nd time point based on the 2 nd execution cycle; and
And a desired value collation unit that performs data collation based on a result of collating output data of the desired value information included in the 1 st collation section with the virtual output data and a result of collating the virtual output data included in the 2 nd collation section with the output data of the desired value information.
2. The data collation device according to claim 1, wherein,
The execution cycle setting unit sets the 2 nd execution cycle based on a measurement value of the execution cycle obtained at the time of execution of the sequence program.
3. The data collation device according to claim 1 or 2, wherein,
The collation section setting unit sets the 1 st collation section and the 2 nd collation section based on a measured value of the execution cycle of the sequence program and an arbitrary fixed value.
4. A data collation device according to any one of claims 1 to 3, wherein,
The expected value information generating unit generates the expected value information using the input data and the virtual output data of the expected value information of the sequence program before modification in order to perform data collation of the sequence program after modification when the sequence program is modified.
5. The data collation device according to any one of claims 1 to 4, wherein,
The expected value information generating unit generates the expected value information using actual input data and actual output data of the sequence program before modification in order to perform data collation of the sequence program after modification when the sequence program is modified.
6. The data collation device according to claim 5, wherein,
The expected value information generating unit sets a start condition and an end condition for generating the expected value information so as to cut out a section used as the expected value information from the actual input data and the actual output data of the sequence program before the change.
7. The data collation device according to any one of claims 1 to 6, wherein,
Further comprising a verification availability setting unit that sets whether or not verification of the output data of the desired value information and the virtual output data can be performed,
The expected value collation unit collates the output data of the expected value information with the virtual output data based on whether or not execution of collation is possible.
8. The data collation device according to claim 7, wherein,
The verification availability setting unit analyzes the existing control section and the control section after the modification from the sequencing program before and after the modification, and detects outputs corresponding to the control section and the control section after the modification.
9. The data collation device according to any one of claims 1 to 8, further comprising:
A replacement data generation unit that generates replacement data including the desired value information including the time data and the output data corresponding to the time chart defining the sequence control after the change when the sequence program is changed; and
A replacement data setting unit that sets, for the sequence program before modification, a replacement of the expected value information generated by the expected value information generating unit with the replacement data,
The expected value collation unit collates the virtual output data, the replacement data, and the output data of the expected value information in the 1 st collation section and the 2 nd collation section that are set.
10. A data collation system, comprising:
A desired value information generation unit that generates desired value information including time data, input data, and output data corresponding to a timing chart defining sequencing control that operates in accordance with the 1 st execution cycle that is the execution cycle of the sequencing program;
An execution cycle setting unit that sets a2 nd execution cycle, which is a fixed value corresponding to a fluctuation of the execution cycle of the sequence program;
a control unit that performs processing of the sequence program on virtual input data obtained based on the 2 nd execution cycle and the input data of the expected value information, and outputs virtual output data;
A collation section setting section that sets a1 st collation section having a time width with reference to a1 st time point based on the 1 st execution cycle and sets a2 nd collation section having a time width with reference to a2 nd time point based on the 2 nd execution cycle; and
And a desired value collation unit that performs data collation based on a result of collating output data of the desired value information included in the 1 st collation section with the virtual output data and a result of collating the virtual output data included in the 2 nd collation section with the output data of the desired value information.
11. A data collation method comprising the steps of:
generating expected value information including time data, input data, and output data corresponding to a timing chart defining sequencing control to operate in accordance with the 1 st execution cycle as an execution cycle of a sequencing program;
setting a2 nd execution period as a fixed value corresponding to a variation in the execution period of the sequence program;
Executing the processing of the sequence program on virtual input data obtained based on the 2 nd execution cycle and the input data of the expected value information to output virtual output data;
Setting a1 st collation section having a time width with reference to a1 st time based on the 1 st execution cycle, and setting a2 nd collation section having a time width with reference to a2 nd time based on the 2 nd execution cycle; and
And performing data collation based on a result of collating the output data of the expected value information included in the 1 st collation section with the virtual output data and a result of collating the virtual output data included in the 2 nd collation section with the output data of the expected value information.
12. A data collation apparatus, comprising:
A desired value information generation unit that generates desired value information including time data, input data, and output data corresponding to a timing chart defining sequencing control that operates in accordance with the 1 st execution cycle that is the execution cycle of the sequencing program;
An execution cycle setting unit that sets a2 nd execution cycle, which is a fixed value corresponding to a fluctuation of the execution cycle of the sequence program;
a control unit that performs processing of the sequence program on virtual input data obtained based on the 2 nd execution cycle and the input data of the expected value information, and outputs virtual output data;
A collation section setting section that sets a collation section having a time width with reference to at least one of a1 st time based on the 1 st execution cycle and a2 nd time based on the 2 nd execution cycle; and
A desired value collation unit that collates the virtual output data with the output data of the desired value information in a collation section set up,
The execution cycle setting unit sets the execution cycle of the sequence program based on a measurement value of the execution cycle obtained at the time of execution of the sequence program.
13. A data collation apparatus, comprising:
A desired value information generation unit that generates desired value information including time data, input data, and output data corresponding to a timing chart defining sequencing control that operates in accordance with the 1 st execution cycle that is the execution cycle of the sequencing program;
An execution cycle setting unit that sets a2 nd execution cycle, which is a fixed value corresponding to a fluctuation of the execution cycle of the sequence program;
a control unit that performs processing of the sequence program on virtual input data obtained based on the 2 nd execution cycle and the input data of the expected value information, and outputs virtual output data;
A collation section setting section that sets a collation section having a time width with reference to at least one of a1 st time based on the 1 st execution cycle and a2 nd time based on the 2 nd execution cycle; and
A desired value collation unit that collates the virtual output data with the output data of the desired value information in a collation section set up,
The expected value information generating unit generates the expected value information using the input data and the virtual output data of the expected value information of the sequence program before modification in order to perform data collation of the sequence program after modification when the sequence program is modified.
14. A data collation apparatus, comprising:
A desired value information generation unit that generates desired value information including time data, input data, and output data corresponding to a timing chart defining sequencing control that operates in accordance with the 1 st execution cycle that is the execution cycle of the sequencing program;
An execution cycle setting unit that sets a2 nd execution cycle, which is a fixed value corresponding to a fluctuation of the execution cycle of the sequence program;
a control unit that performs processing of the sequence program on virtual input data obtained based on the 2 nd execution cycle and the input data of the expected value information, and outputs virtual output data;
A collation section setting section that sets a collation section having a time width with reference to at least one of a1 st time based on the 1 st execution cycle and a2 nd time based on the 2 nd execution cycle; and
A desired value collation unit that collates the virtual output data with the output data of the desired value information in a collation section set up,
The expected value information generating unit generates the expected value information using actual input data and actual output data of the sequence program before modification in order to perform data collation of the sequence program after modification when the sequence program is modified.
CN202180088713.6A 2021-02-17 2021-02-17 Data collation device, data collation system, and data collation method Active CN116710858B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2021/005884 WO2022176054A1 (en) 2021-02-17 2021-02-17 Data comparison device, data comparison system, and data comparison method

Publications (2)

Publication Number Publication Date
CN116710858A CN116710858A (en) 2023-09-05
CN116710858B true CN116710858B (en) 2024-05-03

Family

ID=82740437

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202180088713.6A Active CN116710858B (en) 2021-02-17 2021-02-17 Data collation device, data collation system, and data collation method

Country Status (4)

Country Link
JP (1) JP7113988B1 (en)
CN (1) CN116710858B (en)
DE (1) DE112021005655T5 (en)
WO (1) WO2022176054A1 (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0511835A (en) * 1991-07-08 1993-01-22 Omron Corp Fault diagnostic device
JPH05189026A (en) * 1991-06-25 1993-07-30 Matsushita Electric Works Ltd Facility fault diagnostic method
JPH1097318A (en) * 1996-09-20 1998-04-14 Matsushita Electric Works Ltd Preparation of abnormality diagnostic reference pattern for automation equipment system and automatic diagnostic device using the reference pattern
JPH10254510A (en) * 1997-03-07 1998-09-25 Meidensha Corp Sequencer
CN1195776A (en) * 1997-02-19 1998-10-14 株式会社鼎新 Semiconductor test system
JP2002163020A (en) * 2000-11-27 2002-06-07 Matsushita Electric Works Ltd Method and device for detecting abnormality in programmable controller
CN103246596A (en) * 2012-02-06 2013-08-14 镇江灵芯软件实验室有限公司 Automatic testing method for PLC (Programmable Logic Controller) program based on time control
CN104881363A (en) * 2015-06-24 2015-09-02 中国航空工业集团公司西安飞机设计研究所 Test method for control law software
CN108475053A (en) * 2015-12-28 2018-08-31 川崎重工业株式会社 Complete set of equipments anomaly monitoring method and computer program for monitoring complete set of equipments exception
CN110471394A (en) * 2019-07-30 2019-11-19 中车青岛四方机车车辆股份有限公司 Task test method and device, system, storage medium and processor

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6368904A (en) * 1986-09-10 1988-03-28 Asahi Chem Ind Co Ltd Method and device for checking programmable controller
JP4550641B2 (en) 2005-03-30 2010-09-22 大陽日酸エンジニアリング株式会社 Data collation apparatus and method
JP5189026B2 (en) 2009-04-15 2013-04-24 株式会社テイエルブイ Lever float drain trap
JP6368904B2 (en) 2016-08-10 2018-08-08 株式会社大都技研 Game console

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05189026A (en) * 1991-06-25 1993-07-30 Matsushita Electric Works Ltd Facility fault diagnostic method
JPH0511835A (en) * 1991-07-08 1993-01-22 Omron Corp Fault diagnostic device
JPH1097318A (en) * 1996-09-20 1998-04-14 Matsushita Electric Works Ltd Preparation of abnormality diagnostic reference pattern for automation equipment system and automatic diagnostic device using the reference pattern
CN1195776A (en) * 1997-02-19 1998-10-14 株式会社鼎新 Semiconductor test system
JPH10254510A (en) * 1997-03-07 1998-09-25 Meidensha Corp Sequencer
JP2002163020A (en) * 2000-11-27 2002-06-07 Matsushita Electric Works Ltd Method and device for detecting abnormality in programmable controller
CN103246596A (en) * 2012-02-06 2013-08-14 镇江灵芯软件实验室有限公司 Automatic testing method for PLC (Programmable Logic Controller) program based on time control
CN104881363A (en) * 2015-06-24 2015-09-02 中国航空工业集团公司西安飞机设计研究所 Test method for control law software
CN108475053A (en) * 2015-12-28 2018-08-31 川崎重工业株式会社 Complete set of equipments anomaly monitoring method and computer program for monitoring complete set of equipments exception
CN110471394A (en) * 2019-07-30 2019-11-19 中车青岛四方机车车辆股份有限公司 Task test method and device, system, storage medium and processor

Also Published As

Publication number Publication date
WO2022176054A1 (en) 2022-08-25
DE112021005655T5 (en) 2023-08-10
CN116710858A (en) 2023-09-05
JPWO2022176054A1 (en) 2022-08-25
JP7113988B1 (en) 2022-08-05

Similar Documents

Publication Publication Date Title
US7983870B2 (en) Integrated circuit and method for determining the operating range of an integrated circuit
CN110069360B (en) Motor controller data storage and reading method and device
CN116710858B (en) Data collation device, data collation system, and data collation method
CN110568346A (en) Aging test method and system for smart card
EP2667307A1 (en) Validation of a system using a design of experiments processing technique
JPH06324914A (en) Runaway detecting method for computer
CN100489794C (en) System and method for detecting time of starting up computer system
US20050149806A1 (en) Failure detection simulation system
CN112783705A (en) Test method, device, system, chip and electronic equipment
JP4952317B2 (en) Saved data discrimination method, saved data discrimination program, and saved data discrimination device
KR100600303B1 (en) Method of page programming in a flash memory device
CN111104334A (en) Test method and device based on EEPROM module interface software and readable storage medium
US20110209006A1 (en) Microcomputer
US20210357285A1 (en) Program Generation Apparatus and Parallel Arithmetic Device
CN114221793B (en) Data information intrusion protection method and server in big data environment
JP4584235B2 (en) CPU unit, system processing execution method, and program for causing CPU unit to execute the method
EP4033313A1 (en) Control device and control method
JP2002244934A (en) Memory monitoring device and method
WO2015147829A1 (en) System and method of run-time continuous memory check for embedded systems
CN106815033B (en) Startup checking method and computer system
CN115080067A (en) Data programming method and device and air conditioner
JP2907114B2 (en) Method and apparatus for correcting 1-bit error in EEPROM
CN114860052A (en) Program execution judging method, device, equipment and readable storage medium
JP4219815B2 (en) How to calculate the working time of hydraulic components
JPH0962534A (en) Self-diagnostic method for electronic computer

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant