WO2008012919A1 - Programmable logic controller peripheral device - Google Patents

Programmable logic controller peripheral device Download PDF

Info

Publication number
WO2008012919A1
WO2008012919A1 PCT/JP2006/315054 JP2006315054W WO2008012919A1 WO 2008012919 A1 WO2008012919 A1 WO 2008012919A1 JP 2006315054 W JP2006315054 W JP 2006315054W WO 2008012919 A1 WO2008012919 A1 WO 2008012919A1
Authority
WO
WIPO (PCT)
Prior art keywords
sequence program
peripheral device
test
program
plc
Prior art date
Application number
PCT/JP2006/315054
Other languages
French (fr)
Japanese (ja)
Inventor
Masae Okuzaki
Hiroyuki Furushima
Original Assignee
Mitsubishi Electric Corporation
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 Corporation filed Critical Mitsubishi Electric Corporation
Priority to PCT/JP2006/315054 priority Critical patent/WO2008012919A1/en
Publication of WO2008012919A1 publication Critical patent/WO2008012919A1/en

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
    • G05B19/056Programming the PLC
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management

Definitions

  • the present invention relates to a peripheral device of a programmable logic controller that creates, edits, and tests a sequence program of a programmable logic controller (hereinafter referred to as “PLC” as appropriate).
  • PLC programmable logic controller
  • the user uses the input device to indicate instruction information for pasting the selected portion of the sequence program portion to be diverted to a portion to be inserted in a sequence program (diversion destination sequence program) that is newly created.
  • Input to the peripheral device of PLC The peripheral device of the PLC inserts the selected sequence program portion to be diverted into the location specified by the user of the sequence program according to the instruction information.
  • a part of a sequence program created in the past can be used to create a new sequence program (see, for example, Patent Document 1).
  • Patent Document 1 Japanese Patent Laid-Open No. 5-100718
  • the present invention has been made in view of the above, and an object of the present invention is to obtain a peripheral device of a PLC capable of reliably correcting a sequence program with little effort.
  • the present invention is a PLC peripheral device that can create a part of a sequence program by using a part of a sequence program.
  • a program block table that associates an identifier characterizing the sequence program portion with a use location of the sequence program portion from the sequence program portion and the diversion destination sequence program portion created by diverting the diversion source sequence program portion.
  • the identifier that characterizes the sequence program portion and the use location of the sequence program portion are matched.
  • An associated program block table is created, and when a part of the sequence program part is modified, it is determined whether the modified part is a part of the sequence program part registered in the program block table. If registered, the affected part data indicating the affected part affected by the modification is created based on the program block table, so that the necessary part of the modification is surely overlooked and the work efficiency is improved.
  • the sequence program can be modified.
  • FIG. 1-1 is a configuration diagram showing a configuration of a peripheral device system of a PLC that is useful for an embodiment of the present invention.
  • FIG. 12 is a block diagram showing an example of the configuration of the control unit shown in FIG.
  • FIG. 2 is a block diagram showing an example of the configuration of the data memory shown in FIG. 1-1.
  • FIG. 3 is a diagram showing a circuit display example of a diversion source sequence program before diversion of the sequence program in the peripheral device of the PLC, which is effective in the embodiment of the present invention.
  • FIG. 4 is a diagram showing a display example of a list of diversion source sequence program data before diverting a sequence program in a PLC peripheral device according to an embodiment of the present invention.
  • FIG. 5 is a diagram showing a circuit display example of a diversion-destination sequence program in which a sequence program is diverted in a peripheral device of a PLC that is useful for an embodiment of the present invention.
  • FIG. 6 is a view showing a display example of a list of sequence program data after diversion in which a sequence program is diverted in a peripheral device of a PLC that is useful for an embodiment of the present invention.
  • FIG. 7 is a flowchart for explaining the flow of processing for creating a loop table of a program when a sequence program is diverted in a peripheral device of the PLC which is effective in the present embodiment.
  • Fig. 8-1 shows a sequence diagram of a peripheral device of the PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of data at the time of implementing the diversion process of a maintenance program
  • FIG. 8-2 is a diagram for explaining a change in data when the diversion processing of the sequence program is performed in the peripheral device of the PLC that is useful for the embodiment of the present invention.
  • FIG. 8-3 is a diagram for explaining a change in data when the diversion processing of the sequence program is performed in the peripheral device of the PLC that is useful for the embodiment of the present invention.
  • FIG. 8-4 is a diagram for explaining a change in data when the diversion processing of the sequence program is performed in the peripheral device of the PLC that is useful for the embodiment of the present invention.
  • FIG. 8-5 is a diagram for explaining changes in data when the diversion processing of the sequence program is performed in the peripheral device of the PLC, which is useful for the embodiment of the present invention.
  • FIG. 8-6 is a diagram for explaining changes in data when the diversion processing of the sequence program is performed in the peripheral device of the PLC, which is useful for the embodiment of the present invention.
  • FIG. 9-1 is a flow chart for explaining the flow of processing when correcting a diverted sequence program block in the peripheral device of the PLC that is effective in the embodiment of the present invention.
  • FIG. 9-2 is a flow chart for explaining the flow of processing when the diverted sequence program block is corrected in the peripheral device of the PLC that is effective in the embodiment of the present invention.
  • FIG. 10-1 is a diagram for explaining the change of data when the sequence program block used in the peripheral device of the PLC, which is useful for the embodiment of the present invention, is corrected.
  • FIG. 10-2 is a diagram for explaining a change in data when the sequence program block used in the peripheral device of the PLC, which is useful for the embodiment of the present invention, is corrected.
  • FIG. 10-2 is a diagram for explaining a change in data when the sequence program block used in the peripheral device of the PLC, which is useful for the embodiment of the present invention, is corrected.
  • FIG. 10-3 is a diagram for explaining the data change when the sequence program block used in the peripheral device of the PLC, which is useful for the embodiment of the present invention, is corrected.
  • FIG. 10-4 is a diagram for explaining a change in data when the sequence program block used in the peripheral device of the PLC, which is useful for the embodiment of the present invention, is corrected.
  • FIG. 10-5 is a diagram for explaining the data change when the sequence program block used in the peripheral device of the PLC, which is useful for the embodiment of the present invention, is corrected.
  • FIG. 10-6 is a diagram for explaining the data change when the sequence program block used in the peripheral device of the PLC, which is useful for the embodiment of the present invention, is corrected.
  • FIG. 10-7 is a diagram for explaining the data change when the sequence program block used in the peripheral device of the PLC, which is useful for the embodiment of the present invention, is corrected.
  • FIG. 11 is a flowchart for explaining the flow of processing for creating a test matrix table when a sequence program block test is performed in the peripheral device of the PLC according to the embodiment of the present invention.
  • Fig. 12-1 shows changes in data when creating a test matrix table when a sequence program block test is performed in a peripheral device of a PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating.
  • Fig. 12-2 shows changes in data when creating a test matrix table when a sequence program block test is performed in a peripheral device of the PLC, which is effective in the embodiment of the present invention. It is a figure for demonstrating.
  • Fig. 12-3 shows changes in data when creating a test matrix table when a sequence program block test is performed on a peripheral device of a PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating.
  • Fig. 12-4 shows changes in data when creating a test matrix table when a sequence program block test is performed in a PLC peripheral device that is effective in the embodiment of the present invention. It is a figure for demonstrating.
  • Fig. 12-5 shows changes in data when creating a test matrix table when testing a sequence program block in a peripheral device of a PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating.
  • Fig. 12-6 shows changes in data when creating a test matrix table when a sequence program block test is performed in a peripheral device of a PLC that is effective in the embodiment of the present invention. It is a figure for demonstrating.
  • FIG. 13 is a diagram showing a test matrix table created in the peripheral device of the PLC according to the embodiment of the present invention.
  • FIG. 14 is a diagram showing an instruction table used when creating a test matrix in the peripheral device of the PLC that is relevant to the embodiment of the present invention.
  • Fig. 15-1 shows the process of creating the test procedure table when the user manually executes the sequence program block test in the peripheral device of the PLC, which is useful for the embodiment of the present invention. It is a flowchart explaining a flow.
  • FIG. 15-2 is a flowchart for explaining the flow of processing for applying the test procedure table created by the peripheral device of the PLC, which is useful for the embodiment of the present invention, to other test matrix tables. is there.
  • Fig. 16-1 shows a case where the test is manually performed by the user and the test matrix belonging to the same group is similar in the peripheral device of the PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of the data at the time of applying the test procedure and a test result to it.
  • Fig. 16-2 shows a case where the test is manually performed by the user and the test matrix belonging to the same group is similar in the peripheral device of the PLC that is effective in the embodiment of the present invention. It is a figure for demonstrating the change of the data at the time of applying the test procedure and a test result to it.
  • Fig. 16-3 shows a test of a peripheral device of PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of the data when a user implements an experiment manually and the test procedure and test result are applied to what is similar in the test matrix which belongs to the same group.
  • Fig. 16-4 shows a case where the test is manually performed by the user and the test matrix belonging to the same group is similar in the peripheral device of the PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of the data at the time of applying the test procedure and a test result to it.
  • Fig. 16-5 shows a case where the test is manually performed by the user in the peripheral device of the PLC, which is useful for the embodiment of the present invention, and the test matrix belonging to the same group is similar. It is a figure for demonstrating the change of the data at the time of applying the test procedure and a test result to it.
  • Fig. 16-6 shows a case where the test is manually performed by the user and the test matrix belonging to the same group is similar in the peripheral device of the PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of the data at the time of applying the test procedure and a test result to it.
  • Fig. 16-7 shows a case where the test is manually performed by the user and the test matrix belonging to the same group is similar in the peripheral device of the PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of the data at the time of applying the test procedure and a test result to it.
  • Fig. 16-8 shows a case in which the test is manually performed by the user and the test matrix belonging to the same group is similar in the peripheral device of the PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of the data at the time of applying the test procedure and a test result to it.
  • Fig. 16-9 shows a case where the test is manually performed by the user and the test matrix belonging to the same group is similar in the peripheral device of the PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of the data at the time of applying the test procedure and a test result to it.
  • Fig. 16-10 shows the peripheral device of the PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of the data when a user performs a test manually and applies the test procedure and a test result with respect to what the test matrix which belongs to the same group becomes similar.
  • FIG. 17 is a diagram showing a circuit display example of a sequence program that has already been created.
  • FIG. 18 is a diagram showing the sequence program of FIG. 17 displayed in a list format.
  • FIG. 19 is a flowchart for explaining the flow of processing for creating a program block table in the peripheral device of the PLC according to the embodiment of the present invention.
  • FIG. 20-1 is a diagram for explaining changes in data when creating a program block table in the peripheral device of the PLC, which is useful in the embodiment of the present invention.
  • FIG. 20-2 is a diagram for explaining a change in data when a program block table is created in the peripheral device of the PLC, which is useful for the embodiment of the present invention.
  • FIG. 20-3 is a diagram for explaining a change in data when creating a program block table in the peripheral device of the PLC, which is useful for the embodiment of the present invention.
  • FIG. 20-4 is a diagram for explaining a change in data when a program block table is created in the peripheral device of the PLC, which is useful for the embodiment of the present invention. Explanation of symbols
  • FIG. 1-1 is a configuration diagram showing a configuration of a PLC peripheral device system according to an embodiment of the present invention.
  • the peripheral device system of the PLC that is relevant to the embodiment is connected to the peripheral device 1 of the PLC (hereinafter referred to as peripheral device 1) and the peripheral device 1 of the PLC.
  • an input device 2 such as a keyboard, a display device 3 such as a CRT, a printing device 4 such as a printer, and an external storage device 5 such as a hard disk.
  • the PLC peripheral device 1 is a PLC peripheral device capable of creating another sequence program part by diverting a part of the sequence program, and stores programs such as a sequence program. It consists of a program memory 6, a data memory 7 that stores data such as variable data, a control unit 8 that controls the processing of system programs such as a CPU (Central Processing Unit) and the entire processing in the peripheral device 1 of the PLC. ing.
  • a program memory 6 a data memory 7 that stores data such as variable data
  • a control unit 8 that controls the processing of system programs such as a CPU (Central Processing Unit) and the entire processing in the peripheral device 1 of the PLC. ing.
  • control unit 8 has a program block table creation function, an affected part data creation function, a modification application function, an existing program block table creation function, and a test matrix creation function.
  • the program block table creation function is executed by the program block table creation unit 8a of the control unit 8 as shown in Fig. 1-2, and uses the diversion source sequence program portion and the diversion source sequence program portion.
  • This is a function that creates a program block table in which the identifier that characterizes the sequence program part and the use location of the sequence program part are associated from the created sequence program part of the diversion destination.
  • the affected part data creation function is executed by the affected part data creation unit 8b of the control unit 8 as shown in Fig. 12 and is registered in the program block table. This is a function that creates affected area data indicating the affected area affected by the modification based on the program block table when a part of the gram part is modified.
  • the correction application function is executed by the correction application unit 8c of the control unit 8 as shown in FIG. 12, and based on the correction application information indicating that the correction is applied to the affected part included in the affected part data.
  • This is a function that automatically applies corrections to the sequence program part of the diversion destination corresponding to the affected part included in the affected part data.
  • the existing program block table creation function is executed by the existing program block table creation unit 8d of the control unit 8 as shown in Fig. 12 and creates a program block table corresponding to all or part of the existing sequence program. This function creates a program block table for an existing program in accordance with the program block table creation instruction.
  • test matrix creation function is executed by the test matrix creation unit 8e of the control unit 8 as shown in Fig. 1-2, and the test matrix for performing the test on the corrected part and the affected part is a program block. This function also creates table power.
  • control unit 8 has the above-described functions, but the function units having the respective functions may be provided independently.
  • FIG. 2 is a block diagram showing an example of the configuration of the data memory 7 shown in FIG. 1-1.
  • the data memory 7 includes sequence program data 21, diversion data 22, program block table 23, test matrix table 24, instruction table 25, test procedure table 26, The location data 27 is stored.
  • the sequence program data 21 is data of a sequence program that is being edited and created.
  • the diversion data 22 is diversion data that is temporarily stored in order to divert the sequence program data portion when editing the sequence program.
  • the program block table 23 is a program block table for creating the sequence program data described by the user.
  • the test matrix table 24 is a test matrix table for testing the generated sequence program data.
  • the instruction table contains sequence program data. This is an instruction table for creating a test matrix table with reference to the data.
  • the test procedure table 26 is a test procedure table for storing test procedures manually performed from the test matrix by the user.
  • FIG. 3 is a circuit display example of the diversion source sequence program before diversion of the sequence program in the peripheral device 1 of the PLC, which is useful for the present embodiment, displayed on the display device 3.
  • FIG. 3 shows a screen image 30 in which a sequence program is displayed as a ladder, and a sequence program block 31 is described as a block of the sequence program that the user wants to divert.
  • FIG. 4 is a display example of the list 40 of diversion source sequence program data before diverting the sequence program in the peripheral device of the PLC that is relevant to the present embodiment.
  • the list 40 includes step No. 41 and code 42.
  • Code 42 is the code in the diversion source sequence program data.
  • Step No. 41 is a step number provided corresponding to the code 42 of the sequence program data.
  • the code 42 is composed of a combination of the instruction part 43 and the address part 44.
  • the sequence program block 45 is a sequence program block that the user wants to divert, and corresponds to the sequence program block 31 in FIG.
  • FIG. 5 is a circuit display example of a diversion destination sequence program that is displayed on the display device 3 and used for the sequence program in the peripheral device 1 of the PLC that is effective in the present embodiment.
  • Fig. 5 shows a screen image 50 in which a sequence program is displayed in a ladder form.
  • the sequence program block 51 is a copy source for diversion, and the address is created after the sequence program block 51 is diverted.
  • Sequence program Ram block 52 is described.
  • FIG. 6 is a display example of a list 60 of post- diversion sequence program data in which the sequence program is diverted in the peripheral device 1 of the PLC that is relevant to the present embodiment.
  • step No. 61 and code 62 are described.
  • Code 62 is the code in the sequence program data after diversion.
  • Step No. 61 is a step number provided corresponding to the code 42 of the sequence program data.
  • the code 62 is composed of a combination of the instruction part 63 and the address part 64.
  • the sequence program block 65 is a sequence program block diverted by the user, and corresponds to the sequence program block 51 in FIG. Further, the sequence program block 66 is a sequence program block created by editing the address after diverting the sequence program block 65, and corresponds to the sequence program block 52 in FIG.
  • FIG. 7 is a flowchart for explaining the flow of processing for creating a program loop table when a sequence program is diverted in the peripheral device 1 of the PLC, which is effective in the present embodiment.
  • FIGS. 8-1 to FIGS. 8-6 are diagrams for explaining the change of data when the diversion processing of the sequence program is performed in the peripheral device 1 of the PLC which is useful for the present embodiment.
  • sequence program data 70 is applied to the sequence program data 70 being created as shown in FIG. 8-1.
  • sequence program data 70 before the diversion of the sequence program data is selected by the user using the input device 2 in order to select and copy the sequence program portion 71 to be diverted.
  • step S 1 When the peripheral device 1 of the PLC receives the above data selection instruction information 'copy instruction information (step S 1), the diverted sequence selected according to the instruction information as shown in FIG. 8-2.
  • the copy program portion 71 is copied to the data memory 7 as the diverted data 73 (step S2).
  • the peripheral device 1 of the PLC uses the instruction part 81 obtained by removing the address part 82 from the code 80 of the diversion data 73, and uses the new identifier 76 and the management number as shown in FIG. 8-3.
  • a record 83 having 75 is created and registered in the program block table 74 (step S3).
  • the program block table 74 as shown in FIG. 8-3, the number of steps used 77 and the start step number 78 are described. These are created from the step number 79 of the diversion data 73.
  • the user uses the input device 2 to send paste instruction information for pasting the sequence program portion 71 selected and copied to a desired portion in the sequence program data being created.
  • the peripheral device 1 of the PLC receives this pasting instruction information (step S4), the sequence program portion 71 that is selected and copied according to the pasting instruction information as shown in FIG. 8-4 is used as the sequence program 72.
  • Paste (insert) in the specified place in the middle step S5).
  • the sequence program part 84 of steps No. 6 to 9 is pasted.
  • FIG. 8-4 shows the sequence program data before address correction.
  • the peripheral device 1 of the PLC starts the sequence program portion 84 assigned to the shell from (step No.) 85 of the sequence program portion 84 pasted to the sequence program data 72.
  • the step number (here “6”) is additionally registered in (start step number) 78 of the program block table 74 (step S6).
  • Figure 8-5 shows the program block table 87 after registration.
  • the user uses the input device 2 to correct the address correction instruction information for correcting the address portion 89 of the sequence program portion 84 pasted and pasted according to the application. Input to device 1.
  • the peripheral device 1 of the PLC receives this address correction instruction information (step S7), it corrects the address part 89 of the sequence program part 84 according to the address correction instruction information (step S8).
  • the program editing process using the sequence program data is completed. Sequence completed The program data 90 is shown in Figure 8-6.
  • FIG. 9A and FIG. 92 are flowcharts for explaining the flow of processing when the used sequence program block is corrected in the peripheral device 1 of the PLC that is effective in the present embodiment.
  • FIGS. 10-1 to 10-6 are diagrams for explaining data changes when the sequence program block used in the peripheral device 1 of the PLC, which is useful for the present embodiment, is corrected. is there. Here, it is chosen to apply the correction to the affected area, and the explanation will be made up to the point where the correction is applied.
  • the sequence program data 100 (corresponding to Fig. 8-6) and the program block table 101 (corresponding to Fig. 8-5) in the state where the above-described diversion and editing processing is completed are shown in Figs. 10 1 and 10-2, respectively. Shown in The sequence program data 100 shown in FIG. 10-1 includes a diversion source sequence program portion 102 and a diversion destination sequence program portion 103.
  • the user inputs correction instruction information for adding the code "ANI X4" to the peripheral device 1 of the PLC using the input device 2.
  • the peripheral device 1 of the PLC receives the correction instruction information (step S11)
  • the peripheral device 1 of the PLC performs correction by adding (code “ANI X4”) to the diversion source sequence program portion 102 according to the correction instruction information (step S12).
  • the modified sequence program data 104 is shown in Figure 10-3.
  • modified data 106 (code “ANI X4”) is added to the modified sequence program portion 105. Also, by assigning “3” as step No. 113 to the modified data 106, the subsequent step No. 113 is added one by one.
  • the peripheral device 1 of the PLC refers to the number of used steps 110 and the start step number Ill of the program block table 101 shown in FIG. It is determined whether or not the record 101 contains a record that includes the sequence program part before correction (corresponding to the diversion source sequence program part 102 in Fig. 10-2) of the corrected sequence program part 105 (step 10). S13). Here, when the record including the sequence program part before the correction of the corrected sequence program part 105 is not registered in the program block table 101 (No at Step S13), the process is ended.
  • Peripheral device 1 of PLC performs the correction to delete the step number (0 in this case) of the corrected part from the start step number Ill in record 107 and updates it as record 116.
  • the peripheral device 1 of the PLC has a new identifier 119 (here, “LD—OR—AND—ANI—OUTJ”) from the instruction portion 112 in the code 114 of the modified sequence program portion 105.
  • Record 117 is created and added to program block table 101 (step S14).
  • the peripheral device 1 of the PLC corrects and updates all the start step numbers 121 affected by the correction location in the program block table 101.
  • the value of the start step No. 121 of the record 116 is corrected to “7” and updated.
  • the program block table 115 updated in this way is shown in Fig. 10-4.
  • the peripheral device 1 of the PLC determines that the sequence program part belonging to the same group has the power from the start step No. 121 of the record 116 to which the correction point belongs, that is, the record 116. It is checked whether there is a sequence program part that belongs (including the sequence program part before modification) (step S15).
  • step S15 if there is no other sequence program part belonging to the record 116 (No in step S15), if the start step number of the record to which the correction point belongs is blank, the record Is discarded (step S19), and the process is terminated.
  • step S15 if there is another sequence program part belonging to the record 116 (Yes at step S15), the program part which is the first correction candidate is displayed on the display device 3. By highlighting at step S16, the user is notified of the location affected by the correction, and the user is requested to indicate whether the location needs to be corrected ("Z to correct, do not correct") (step S16). .
  • the sequence program part starting at step “7” belongs to the start step No. 121 of record 116.
  • a correction candidate list screen 123 as shown in FIG. 10-5 is displayed on the display device 3, and is registered in the start step No. 124 of the corrected portion of the corrected sequence program and in the record 116.
  • Start step No. 125 is displayed.
  • the sequence program portion 122 which is the first modification candidate is highlighted.
  • the peripheral device 1 of the PLC notifies the user of the location affected by the correction, and requests the user whether or not the location needs to be corrected (“Z to correct, do not correct”).
  • a plurality of correction candidates 125 are displayed on the correction candidate list screen 123 as shown in FIG. 10-5, and the sequence program portion selected by the user is highlighted. The Then, the peripheral device 1 of the PLC determines whether or not the correction application instruction information has been input (step S17).
  • the user determines whether or not to apply the correction by looking at the correction candidate list screen 123 and the sequence program portion 122 highlighted as the correction candidate portion in the corrected sequence program 104. be able to. As a result, the user can reliably correct the sequence program with good work efficiency without overlooking the necessary portions.
  • the user uses the input device 2 to display correction application instruction information for applying the correction to the correction candidate. Used to input to the peripheral device 1 of the PLC.
  • the correction candidate list screen 123 is prepared for each correction candidate 125!
  • Check box 126 is selected for each correction candidate, and the selected correction button 127 is selected to select the correction candidate.
  • the correction application instruction information for applying the correction is input.
  • the user inputs correction application instruction information to that effect to the peripheral device 1 of the PLC using the input device 2. For example, The user selects the all correction button 128 on the correction candidate list screen 123. If the correction is not applied to the correction candidate, the correction non-application instruction information to that effect is input to the peripheral device 1 of the PLC using the input device 2. For example, the user selects the cancel button 129 on the correction candidate list screen 123.
  • step S17 When the user selects to apply the correction to the correction candidate, that is, when the peripheral device 1 of the PLC receives the correction application instruction information (Yes in step S17), the peripheral device 1 of the PLC The start step No. 121 (here “7”) from the record 116 shown in FIG. 10-4 is moved to the start step No. 121 of the record 117 (step S20).
  • the program block table 130 after moving the start step No. is shown in Figure 10-6.
  • record 116 is updated as record 131 whose start step number is blank.
  • the record 117 is updated as the record 132 in which the start step number (here “7”) is moved from the record 116. Then, the process proceeds to step S18.
  • step S17 if the user selects not to apply the correction to the correction candidate, that is, if the peripheral device 1 of the PLC does not receive the correction application instruction information (the correction non-application instruction information is displayed). If received (No at step S17), the peripheral device 1 of the PLC refers to the start step No. 136 of the record 131 and checks whether there are other correction candidates (step S18).
  • the peripheral device 1 of the PLC refers to the start step No. 136 of the program block table 130, and the start step No. is blank. Is deleted (step S19). In this example, record 131 is deleted. FIG. 10-7 shows the program block table 137 after the record 131 is deleted in this way.
  • the peripheral device 1 of the PLC receives the modification application instruction information (when the modification non-application instruction information is received) (No at step S17), the program block table remains records 116 and 117.
  • step S18 If another correction candidate exists in step S18 (Yes in step S18), the next correction candidate is highlighted to prompt the user to determine whether or not to correct. Is requested to make a correction (“Z to correct, do not correct”) (step S21), and the process returns to step S17.
  • step S21 If a part of a sequence program specified by the user is diverted, the diversion source location and the diversion destination location are managed as a group (collective), This section describes the procedure for applying corrections to affected locations after displaying and notifying the affected locations on the diversion source location or all diversion destination locations to the user when a part of the diversion source or diversion destination sequence program is modified. It was.
  • FIG. 11 is a flowchart for explaining the flow of processing for creating a test matrix table when a sequence program block test is performed in the peripheral device 1 of the PLC, which is useful for the present embodiment.
  • Fig. 12-1 to Fig. 12-6 show changes in data when creating a test matrix table when a sequence program block test is performed in the peripheral device 1 of the PLC that is useful in this embodiment. It is a figure for demonstrating.
  • test matrix of the modification part of the sequence program is displayed in the peripheral device system of the PLC, and a screen for selecting whether or not to perform tests in a range that becomes a similar test matrix is displayed.
  • a screen for selecting whether or not to perform tests in a range that becomes a similar test matrix is displayed. The procedure up to displaying the test matrix of the test execution range selected by the user will be described.
  • FIG. 13 shows a test matrix table 150 created in the peripheral device 1 of the PLC in the present embodiment.
  • This is a test matrix table that also creates the sequence program block force selected by the user in the sequence program created by the user.
  • combination data (instruction part Z address) 151 of an instruction part and an address part is stored in association with (Management No.) 154.
  • FIG. 14 shows an instruction table 160 used when creating the test matrix.
  • the instruction table 160 includes an instruction part 162 and a (management No.) 161 corresponding thereto.
  • Sequence program data in a state where the diversion process described above is completed 17 0 (corresponding to Fig. 8-6) and program block table 175 (corresponding to Fig. 8-5) are shown in Fig. 12-1 and Fig. 12-2, respectively.
  • the sequence program data 170 shown in 012-1 includes a diversion source sequence program portion 171 and a diversion sequence program portion 172.
  • the diverted sequence program part 172 is a state where the diversion source sequence program part 171 is copied and pasted, and the change of the device number is completed.
  • the diversion source sequence program portion 171 and the diversion sequence program portion 172 are assigned to the identifier 176 of the program block table 175.
  • the user uses the input device 2 to select data selection instruction information for selecting the program data portion 171.
  • Input to the peripheral device 1 of the PLC When the peripheral device 1 of the PLC receives the data selection instruction information (step S41), the PLC peripheral device 1 selects the sequence program part 171 in accordance with the data selection instruction information, and selects the instruction part 173 of the selected sequence program part 171 as shown in FIG.
  • a test matrix is created by searching the instruction table 160 (step S42).
  • the sequence program portion 171 is entered in the (instruction Z address) input field 179 of the test matrix 178 as shown in FIG. 12-3.
  • the instruction part 173 and the address part 174 are copied.
  • the instruction part 173 of the sequence program part 171 is displayed in the column of the output result 196 of the test matrix 178 as shown in FIG. 12-3.
  • the address part 174 is copied, and the test pattern according to the address state is displayed in the test address state 195 column of the test matrix 178.
  • the peripheral device 1 of the PLC searches the (start step number) 193 of the sequence program portion 171 with the (start step number) 177 of the program block table 175.
  • “0” is searched for (start step number) 177 in the program block table 175 as the start step number (step S43).
  • the peripheral device 1 of the PLC determines whether or not the next start step number is included in (start step number) 177. In this case, Since the start step number “0” exists in the (start step number) 177 of the program block table 175, the peripheral device 1 of the PLC determines whether or not there is a next start step number. In this case, “Start Step No.” 177 includes “6” as the start step number.
  • the peripheral device 1 of the PLC is used as shown in FIG. 12-2 from the start step number “6” that is a candidate for the next start step number as shown in FIG. 12-2.
  • the test execution or non-execution is shown to the user.
  • Prompt decision step S44).
  • step S45 the sequence program portion 185 is highlighted. Then, the peripheral device 1 of the PLC determines whether there is a next start step (step S45). If there is a next start step (Yes at step S45), the process returns to step S43 and the same processing is repeated until the next candidate for the start step of the program block table is completed.
  • step S45 the user determines whether or not to execute the test matrix creation and selects it. As a result, the user can determine whether or not to create the test matrix by looking at the sequence program portion 185 highlighted on the test matrix creation selection screen 184. As a result, the user can easily determine whether the test is performed or not, and if the test is similar, it can be omitted, and the test can be performed efficiently.
  • the user inputs designation instruction information for designating a desired test candidate to the peripheral device 1 of the PLC using the input device 2.
  • the peripheral device 1 of the PLC receives this designated instruction information (step S46), it starts to create a test matrix for the designated test candidate according to the designated instruction information.
  • test matrix creation selection screen 184 the user checks a desired one of the check boxes 186 prepared for each test candidate and selects the execution button 1 87.
  • the peripheral device 1 of the PLC copies the test matrix 178 and creates the same new as the test matrix 178.
  • a new test matrix 191 is created (step S47).
  • the copied test matrix device is calculated and replaced by the start and use steps of the sequence program table. That is, copy the address part 190 of the sequence program part shown in Fig. 12-5 to the column 192 (command / do, less) 192 of the test matrix 191 (shown in step S48). .
  • step S 49 the peripheral device 1 of the PLC determines whether there is a next test candidate (step S 49). If there is a next test candidate (Yes in step S49), the process returns to step S47, and the PLC peripheral device 1 includes all of the sequence program test candidates previously selected on the test matrix creation selection screen 184 by the user. On the other hand, the same processing is repeated, and when there are no more test candidates (No at step S49), the creation of the test matrix is terminated.
  • test items for the correction part and the affected part of the correction are automatically generated from the program block table, and the test items created by the program block table are similar test items. By determining the execution, similar tests can be omitted and the tests can be made more efficient.
  • FIG. 15-1 is a flowchart for explaining the flow of processing for creating the test procedure table when the user manually executes the test of the sequence program block in the peripheral device 1 of the PLC.
  • FIG. 15-2 is a flowchart for explaining the flow of processing for applying the test procedure table created by the peripheral device 1 of the PLC to other test matrix tables.
  • FIG. 16-1 shows the sequence program data 250 in a state where the creation of the test matrix described above is completed.
  • the sequence program data 250 shown in FIG. 16-1 includes a diversion source sequence program portion 251 and a diverted sequence program portion 252 used when the sequence program data 250 is created.
  • Figure 16-2 shows the test matrix 253 created by the method described above.
  • the user uses the input device 2 to start the test start instruction information and data selection. Input the instruction information to the peripheral device 1 of the PLC.
  • the peripheral device 1 of the PLC receives the above-mentioned test start instruction information 'data selection instruction information (step S61), it executes test processing and test recording start according to the instruction information (step S62).
  • the user switches the operation of the device under test (turns on or off).
  • the switching instruction information is input to the peripheral device 1 of the PLC using the input device 2.
  • the sequence program part 251 to be tested is switched to the address part 264 represented by the ladder program 263 as shown in Fig. 16-3.
  • the peripheral device 1 of the PLC receives the switching instruction information (step S63) and turns on the address portion 264 (“X2”) according to the instruction information (step S64).
  • the peripheral device 1 of the PLC is a device instructed to switch operation by the user.
  • step S65 Acquire information on the corresponding No. (address part) and device status (address status) (step S65). Then, the peripheral device 1 of the PLC inputs the address number 274 in the test procedure table 256 as shown in Fig. 16-4, with the address portion 264 "X2" corresponding to the address 276 in the test matrix 253. Add a value in column 260. Here, you Since the address “X2” instructed by the user is in the column of the address number “3” of the test matrix 253, “3” is added to the address number input field 260 of the test procedure table 256. Since the device “X2” is turned ON !, “1” is added to the address status input field 261.
  • the peripheral device 1 of the PLC searches for and determines whether or not the force exists in the address portion 275 of the sequence force test matrix 253 that is the same as the state of the address portion 271 of the sequence program portion 263 (step S66). If the same state as the address 271 in the sequence program part 263 is found in the address part 275 of the test matrix 253 (Yes in step S66), 254 (in this case the address is shown) as shown in Figure 16-5. In the state of “Y1” of 254), the value of the address part 266 of the sequence program part 263 is set in the input field 268 of the output result of the test matrix 267 (step S67), and the process proceeds to the next step, step S68.
  • Step S68 the process proceeds to the next step, Step S68.
  • the peripheral device 1 of the PLC determines whether or not there is a next test candidate, that is, whether or not the next switching instruction information has been received (step S68). If there is the next test candidate, that is, if the next switching instruction information is received (Yes at step S68), the process returns to step S63.
  • the peripheral device 1 of the PLC displays the test matrix 267 on the display device 3. The user can visually check the output result 268 of the test matrix 267 for which the test has been completed, and determine whether or not there is a problem with the test result.
  • the user uses the input device 2 to send the test end instruction information to the periphery of the PLC. Input to device 1.
  • the peripheral device 1 of the PLC checks whether it has received the end instruction information (step S69). When the peripheral device 1 of the PLC receives the end instruction information (Yes at step S69), the series of processing ends according to the end instruction information.
  • FIG. 16-1 shows the peripheral device 1 of the PLC.
  • the peripheral device 1 of the PLC reads the data 281 of the address number and address state of the test procedure table 280 for the sequence program part 251 as shown in Fig. 16-7 one column at a time. Next, the peripheral device 1 of the PLC also reads the field corresponding to the instruction Z address in the test matrix 285 shown in Figure 16-6 for the address corresponding to the address number of the read data 281.
  • the peripheral device 1 of the PLC reads from the test procedure table 280 first to the address read from the test matrix 285 in the ladder display 282 of the sequence program part 252 shown in FIG. 16-8. Set the value of the address status of the data 281 (Step S70).
  • the peripheral device 1 of the PLC first reads the address number “3” and the address state “1” as the data 28 1 of the address number and the address state.
  • the peripheral device 1 of the PLC reads the address number “X200” corresponding to the address number “3” of the read data 281 and reads the command Z address field of the test matrix 285.
  • the peripheral device 1 of the PLC reads the data previously read from the test procedure table 280 into the address “X200” 298 corresponding to the address number “3” read from the test matrix 285 in the ladder program display 282.
  • the peripheral device 1 of the PLC searches the address state 299 of the test matrix 285 shown in FIG. 16-6, and the same address state as the state of the address 289 in the sequence program part 282 exists in the test matrix 285. It is determined whether or not the force is to be applied (step S71).
  • step S71 if the same address state is found in the address state 299 of the test matrix 285 (in this case, the address state result 286 is the same state) (Yes in step S71), the output Obtain the value of the address part 284 in the ladder display 282 that becomes the corresponding address of the result address 283 (in this case, Y100 of the address 283), set 287 [step S72], and proceed to step S73.
  • the peripheral device 1 of the PLC determines whether or not the test procedure table 280 has a record of candidates for application of the test result (step S73). If there is a record of candidates for application of test results (Yes at step S73), the process returns to step S70 and the same processing is repeated until there are no records of candidates for application of test results in the test procedure table 280. Thereby, a test matrix to which the test procedure is applied is created.
  • step S73 If there is no record of candidate application of the test result in step S73 (No in step S73), the process proceeds to step S74, and the peripheral device 1 of the PLC is manually tested by the user. Read the first record of the test result 292 in the test matrix 290 of the test procedure application source shown in 16-9. Then, the peripheral device 1 of the PLC compares this read record with the first record in the test result 294 of the test matrix 291 to which the test procedure is applied as shown in Fig. 16-10. It is determined whether or not there is a certain force (step S74).
  • test matrix 290 to which the test procedure is applied corresponds to the completed test matrix 267 shown in Fig. 16-5.
  • the test matrix 291 to which the test procedure is applied corresponds to the test matrix 285 of the sequence program part 252 shown in FIG. 16-6.
  • step S74 if the first record value of test result 292 of test matrix 290 is the same as the first record value of test result 294 of test matrix 291 (step S74) (Yes), the peripheral device 1 of the PLC sets a result indicating that the test result is correct in the first record of the test result input field 296 (step S75), and proceeds to the next step S76.
  • “ ⁇ ” is entered when the test result is correct.
  • step S74 if the first record value of test result 292 of test matrix 290 is the same as the first record value of test result 294 of test matrix 291 (step S74) (No), proceed directly to the next step S76.
  • the peripheral device 1 of the PLC determines whether or not there is a candidate for comparison of the next test result (step S76). If the next record of the test result of the test matrix 290 exists (Yes at step S76), the process returns to step S74 and the same processing is repeated until the next record of the test result is completed.
  • test procedure application process is terminated.
  • the test items for the correction location and the location affected by the correction are stored in the program block table.
  • the test procedure and test results are automatically applied to tests that are similar to those in the same group when the user manually performs a test on one of the automatically generated tests. And the test can be shortened.
  • the present invention is characterized in that a diversion source sequence program and a diversion destination sequence program are managed in a group (collectively), and an influence location is displayed and notified to a user for a certain correction. Yes.
  • the group can be created not only when the sequence program is diverted as shown in the above example, but also for the entire sequence program already created or the sequence program part selected by the user. I'll do it.
  • FIG. 17 is a circuit display example of a sequence program that has already been created.
  • Figure 18 is a circuit display example of a sequence program that has already been created.
  • FIG. 19 is a flowchart for explaining the flow of processing for creating a program block table in the peripheral device 1 of the PLC.
  • the user uses the input device 2 to call the program data of the sequence program 300 (310) already created and stored in the program memory 6 in the peripheral device 1 of the PLC and display it on the display device 3.
  • the user creates a group creation instruction for instructing creation of a group for the entire program.
  • the display information is input to the peripheral device 1 of the PLC using the input device 2 (step S81).
  • the user by selecting a part of the sequence program opened by the user, it is possible to instruct a part of the sequence program to create a group.
  • the peripheral device 1 of the PLC receives the group creation instruction information (step S81)
  • the peripheral device 1 of the PLC reads the first line of the program (when a part of the sequence program is selected and grouped)
  • the search is started in units of program blocks from the first line of the program selected by the user (step S82).
  • the program block table 220 is empty because no data is inputted.
  • the peripheral device 1 of the PLC creates a program block table identifier from the first program block 211 as shown in FIG. 18 (step S83).
  • the identifier “LD—OR-AND-OUT J” is created.
  • the peripheral device 1 of the PLC scans the program block table 220 and searches whether the created identifier is registered (step S84).
  • the PLC peripheral device 1 creates a new record and registers it in the program block table 220 (step S85).
  • the peripheral device 1 of the PLC creates a new record 222 and registers it in the program block table 220.
  • New record Figure 20-2 shows the program block table 221 with 222 registered.
  • step S84 If the created identifier has already been created in the program block table in step S84 (Yes in step S84), the peripheral device 1 of the PLC records the record having the corresponding identifier in the program block table. A step number is additionally registered in the start step number (step S86).
  • the peripheral device 1 of the PLC checks whether the next program block exists (step S87). If the next program block exists (Yes at step S87), the peripheral device 1 of the PLC returns to step S83 to perform processing.
  • step S83 the process returns to step S83 to create the program block identifier “LD-OUT”.
  • identifier “LD—OU Since TJ does not exist in the program block table a new record 224 is created and registered in the program block table 222.
  • the program block table 223 with the new record 224 registered is shown in Figure 20-3.
  • the peripheral device 1 of the PLC scans all the program blocks and repeats the same processing until there are no new program blocks.
  • the same processing is repeated for the next program blocks 213, 214, 215 and 216.
  • a step number is additionally registered in the start step number of the record having the corresponding identifier in the program block table.
  • a new record is created and registered in the program block table.
  • step S87 if the next program block does not exist (No at step S87), the grouping is completed and the process ends. That is, when all the program blocks are scanned and the next program block does not exist, the program block table in which the sequence programs are grouped is completed. In this example,
  • a program block table 225 as shown in 020-4 is completed.
  • the whole (or part) of the sequence program can be grouped and stored in a simple program block table. Then, when the program block table created in this way is copied as a part of the sequence program and used in multiple places as described above, the peripheral device 1 of the PLC can display it on the display device 3. .
  • the affected part can be easily determined by this program block table, and the user can be prompted to confirm the modification. Therefore, the correction can be easily applied to all or some of the affected areas belonging to the same group.
  • the programmable logic controller peripheral device is useful when creating, editing, and testing a sequence program.

Landscapes

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

Abstract

Provided is a PLC peripheral device capable of creating other sequence program portion by using a part of a sequence program. The PLC peripheral device includes: program block table creation means which creates a program block table correlating an identifier characterizing a sequence program portion to a used a part of a sequence program portion from a sequence program portion of use origin and a sequence program portion of use destination created by using the sequence program portion of the use origin; and affected portion data creation means which judges whether a part of the sequence program portion corrected is the part of the sequence program registered in the program block table and if yes, creates affected portion data indicating an affected portion which is affected by the correction according to the program block table.

Description

明 細 書  Specification
プログラマブルロジックコントローラの周辺装置  Peripheral device of programmable logic controller
技術分野  Technical field
[0001] 本発明は、プログラマブルロジックコントローラ(Programmable Logic Controller, 以下適宜、 PLCと記す)のシーケンスプログラムの作成、編集、試験を行うプログラマ ブルロジックコントローラの周辺装置に関するものである。  The present invention relates to a peripheral device of a programmable logic controller that creates, edits, and tests a sequence program of a programmable logic controller (hereinafter referred to as “PLC” as appropriate).
背景技術  Background art
[0002] 従来のプログラマブルロジックコントローラ(PLC)の周辺装置では、過去に作成し たシーケンスプログラムの一部を複製して単数または複数箇所に流用して新たなシ 一ケンスプログラムを作成する手法が広く用いられて 、る。このように過去に作成した シーケンスプログラムの一部を複製して新たなシーケンスプログラムを作製した場合 には、複数のシーケンスプログラムにおいて同一プログラム部分が存在する。  [0002] With conventional programmable logic controller (PLC) peripheral devices, there is a wide range of techniques for creating a new sequence program by duplicating a part of a sequence program created in the past and diverting it to one or more locations. Used. Thus, when a part of a sequence program created in the past is duplicated to create a new sequence program, the same program portion exists in a plurality of sequence programs.
[0003] このような手法により新たなシーケンスプログラムを作成する場合にっ 、て簡単に説 明する。まずシーケンスプログラムのユーザは、入力装置を使用して、過去に作成し たシーケンスプログラム(流用元シーケンスプログラム)にお 、て流用するシーケンス プログラム部分を選択し、コピーを行う旨の指示情報を PLCの周辺装置に入力する。 PLCの周辺装置は該指示情報に従って、選択された流用するシーケンスプログラム 部分をコピーする処理を実行する。  [0003] When a new sequence program is created by such a method, it will be briefly described. First, the user of the sequence program uses the input device to select the sequence program part to be diverted from the sequence program (diversion source sequence program) created in the past, and to send the instruction information for copying to the PLC. Input to the peripheral device. The peripheral device of the PLC executes a process of copying the selected sequence program portion to be diverted according to the instruction information.
[0004] つぎにユーザは、入力装置を使用して、選択した流用するシーケンスプログラム部 分を新たに作成するシーケンスプログラム (流用先シーケンスプログラム)中の挿入し たい部分に貼り付ける旨の指示情報を PLCの周辺装置に入力する。 PLCの周辺装 置は該指示情報に従って、選択した流用するシーケンスプログラム部分を、シーケン スプログラムのユーザによって指定された場所に挿入する。このような処理を行うこと により、過去に作成したシーケンスプログラムの一部を流用して新たなシーケンスプロ グラムを作成することができる(たとえば、特許文献 1参照)。  [0004] Next, the user uses the input device to indicate instruction information for pasting the selected portion of the sequence program portion to be diverted to a portion to be inserted in a sequence program (diversion destination sequence program) that is newly created. Input to the peripheral device of PLC. The peripheral device of the PLC inserts the selected sequence program portion to be diverted into the location specified by the user of the sequence program according to the instruction information. By performing such processing, a part of a sequence program created in the past can be used to create a new sequence program (see, for example, Patent Document 1).
[0005] 特許文献 1 :特開平 5— 100718号公報 Patent Document 1: Japanese Patent Laid-Open No. 5-100718
発明の開示 発明が解決しょうとする課題 Disclosure of the invention Problems to be solved by the invention
[0006] し力しながら、ユーザが上記の流用元箇所または流用先箇所のシーケンスプロダラ ムの一部を修正した場合、ユーザは影響を受けるシーケンスプログラム中を検索また は目視して、上記流用元箇所、流用先箇所の全てに対して同じ修正を行う必要があ るかどうかを検討する必要があった。  [0006] However, when the user corrects a part of the sequence program at the diversion source location or the diversion destination location, the user searches or visually checks the affected sequence program and uses the diversion. It was necessary to consider whether it was necessary to make the same correction to all of the original location and the diversion destination location.
[0007] また、修正完了後に、修正した箇所全ての試験マトリクスを作成し、すべての修正 箇所のテストを実施する必要があった。従来の PLCの周辺装置においては、新たな シーケンスプログラムを作成する場合には、上記のような操作が必要であるため、ュ 一ザの作業負荷が大きぐ作業効率が良くない、という問題があった。また、上述した ように同じ修正を行う必要があるかどうかを検索する際に見落としが発生する虞があ る、という問題があった。  [0007] In addition, after the correction is completed, it is necessary to create a test matrix for all the corrected portions and to test all the corrected portions. In conventional PLC peripheral devices, when creating a new sequence program, the above operations are necessary, and there is a problem that the work load of the user is large and the work efficiency is not good. It was. In addition, as described above, there is a problem that an oversight may occur when searching whether the same correction is necessary.
[0008] 本発明は、上記に鑑みてなされたものであって、少ない労力で確実にシーケンスプ ログラムの修正を行うことが可能な PLCの周辺装置を得ることを目的とする。  [0008] The present invention has been made in view of the above, and an object of the present invention is to obtain a peripheral device of a PLC capable of reliably correcting a sequence program with little effort.
課題を解決するための手段  Means for solving the problem
[0009] 上述した課題を解決し、 目的を達成するために、本発明は、シーケンスプログラム の一部を流用して他のシーケンスプログラム部分を作成可能な PLCの周辺装置であ つて、流用元のシーケンスプログラム部分と該流用元のシーケンスプログラム部分を 流用して作成した流用先のシーケンスプログラム部分とから、シーケンスプログラム部 分を特徴付ける識別子とシーケンスプログラム部分の使用箇所とを対応付けたプログ ラムブロックテーブルを作成するプログラムブロックテーブル作成手段と、シーケンス プログラム部分の一部が修正された際に、当該修正された箇所が前記プログラムプロ ックテーブルに登録されているシーケンスプログラム部分の一部であるかを判定し、 登録されて!、る場合には、修正が影響を及ぼす影響箇所を示す影響箇所データを プログラムブロックテーブルに基づ 、て作成する影響箇所データ作成手段と、を備え ることを特徴とする。  [0009] In order to solve the above-described problems and achieve the object, the present invention is a PLC peripheral device that can create a part of a sequence program by using a part of a sequence program. A program block table that associates an identifier characterizing the sequence program portion with a use location of the sequence program portion from the sequence program portion and the diversion destination sequence program portion created by diverting the diversion source sequence program portion. When the program block table creation means to be created and a part of the sequence program part are modified, it is determined whether the modified part is a part of the sequence program part registered in the program block table, If you are registered! Based effects location data indicating the program block table, the impact point data generating means for generating Te with a characterized Rukoto.
発明の効果  The invention's effect
[0010] 本発明に力かるプログラマブルロジックコントローラの周辺装置によれば、シーケン スプログラム部分を特徴付ける識別子とシーケンスプログラム部分の使用箇所とを対 応付けたプログラムブロックテーブルを作成し、シーケンスプログラム部分の一部が 修正された際に、当該修正された箇所が前記プログラムブロックテーブルに登録され ているシーケンスプログラム部分の一部であるかを判定し、登録されている場合には 、修正が影響を及ぼす影響箇所を示す影響箇所データをプログラムブロックテープ ルに基づいて作成することにより、修正の必要箇所を見落とすことなく確実に且つ作 業効率良ぐシーケンスプログラムの修正を行うことが可能となる、という効果を奏する[0010] According to the peripheral device of the programmable logic controller that is useful in the present invention, the identifier that characterizes the sequence program portion and the use location of the sequence program portion are matched. An associated program block table is created, and when a part of the sequence program part is modified, it is determined whether the modified part is a part of the sequence program part registered in the program block table. If registered, the affected part data indicating the affected part affected by the modification is created based on the program block table, so that the necessary part of the modification is surely overlooked and the work efficiency is improved. The sequence program can be modified.
。したがって、少ない労力で確実にシーケンスプログラムの修正を行うことが可能な P LCの周辺装置を得ることができる。 . Therefore, it is possible to obtain a PLC peripheral device that can correct the sequence program reliably with little effort.
図面の簡単な説明 Brief Description of Drawings
[図 1-1]図 1—1は、本発明の実施の形態に力かる PLCの周辺装置システムの構成を 示す構成図である。  [FIG. 1-1] FIG. 1-1 is a configuration diagram showing a configuration of a peripheral device system of a PLC that is useful for an embodiment of the present invention.
[図 1-2]図 1 2は、図 1 1に示した制御部の構成の一例を示す構成図である。  [FIG. 1-2] FIG. 12 is a block diagram showing an example of the configuration of the control unit shown in FIG.
[図 2]図 2は、図 1—1に示したデータメモリの構成の一例を示す構成図である。 FIG. 2 is a block diagram showing an example of the configuration of the data memory shown in FIG. 1-1.
[図 3]図 3は、本発明の実施の形態に力かる PLCの周辺装置においてシーケンスプ ログラムの流用を行う前の流用元シーケンスプログラムの回路表示例を示す図である FIG. 3 is a diagram showing a circuit display example of a diversion source sequence program before diversion of the sequence program in the peripheral device of the PLC, which is effective in the embodiment of the present invention.
[図 4]図 4は、本発明の実施の形態に力かる PLCの周辺装置においてシーケンスプ ログラムの流用を行う前の流用元シーケンスプログラムデータのリストの表示例を示す 図である。 FIG. 4 is a diagram showing a display example of a list of diversion source sequence program data before diverting a sequence program in a PLC peripheral device according to an embodiment of the present invention.
[図 5]図 5は、本発明の実施の形態に力かる PLCの周辺装置においてシーケンスプ ログラムの流用を行った流用先シーケンスプログラムの回路表示例を示す図である。  FIG. 5 is a diagram showing a circuit display example of a diversion-destination sequence program in which a sequence program is diverted in a peripheral device of a PLC that is useful for an embodiment of the present invention.
[図 6]図 6は、本発明の実施の形態に力かる PLCの周辺装置においてシーケンスプ ログラムの流用を行った流用後シーケンスプログラムデータのリストの表示例を示す 図である。 FIG. 6 is a view showing a display example of a list of sequence program data after diversion in which a sequence program is diverted in a peripheral device of a PLC that is useful for an embodiment of the present invention.
[図 7]図 7は、本実施の形態に力かる PLCの周辺装置においてシーケンスプログラム の流用を実施する際の、プログラムグのループテーブルを作成する処理の流れを説 明するフローチャートである。  [FIG. 7] FIG. 7 is a flowchart for explaining the flow of processing for creating a loop table of a program when a sequence program is diverted in a peripheral device of the PLC which is effective in the present embodiment.
[図 8-1]図 8—1は、本発明の実施の形態に力かる PLCの周辺装置においてシーケ ンスプログラムの流用処理を実施する際の、データの変化を説明するための図である [Fig. 8-1] Fig. 8-1 shows a sequence diagram of a peripheral device of the PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of data at the time of implementing the diversion process of a maintenance program
[図 8-2]図 8— 2は、本発明の実施の形態に力かる PLCの周辺装置においてシーケ ンスプログラムの流用処理を実施する際の、データの変化を説明するための図である [FIG. 8-2] FIG. 8-2 is a diagram for explaining a change in data when the diversion processing of the sequence program is performed in the peripheral device of the PLC that is useful for the embodiment of the present invention.
[図 8-3]図 8— 3は、本発明の実施の形態に力かる PLCの周辺装置においてシーケ ンスプログラムの流用処理を実施する際の、データの変化を説明するための図である [FIG. 8-3] FIG. 8-3 is a diagram for explaining a change in data when the diversion processing of the sequence program is performed in the peripheral device of the PLC that is useful for the embodiment of the present invention.
[図 8-4]図 8—4は、本発明の実施の形態に力かる PLCの周辺装置においてシーケ ンスプログラムの流用処理を実施する際の、データの変化を説明するための図である [FIG. 8-4] FIG. 8-4 is a diagram for explaining a change in data when the diversion processing of the sequence program is performed in the peripheral device of the PLC that is useful for the embodiment of the present invention.
[図 8-5]図 8— 5は、本発明の実施の形態に力かる PLCの周辺装置においてシーケ ンスプログラムの流用処理を実施する際の、データの変化を説明するための図である [FIG. 8-5] FIG. 8-5 is a diagram for explaining changes in data when the diversion processing of the sequence program is performed in the peripheral device of the PLC, which is useful for the embodiment of the present invention.
[図 8-6]図 8— 6は、本発明の実施の形態に力かる PLCの周辺装置においてシーケ ンスプログラムの流用処理を実施する際の、データの変化を説明するための図である [FIG. 8-6] FIG. 8-6 is a diagram for explaining changes in data when the diversion processing of the sequence program is performed in the peripheral device of the PLC, which is useful for the embodiment of the present invention.
[図 9-1]図 9—1は、本発明の実施の形態に力かる PLCの周辺装置において、流用し たシーケンスプログラムブロックを修正する場合の処理の流れを説明するフローチヤ ートである。 [FIG. 9-1] FIG. 9-1 is a flow chart for explaining the flow of processing when correcting a diverted sequence program block in the peripheral device of the PLC that is effective in the embodiment of the present invention.
[図 9-2]図 9— 2は、本発明の実施の形態に力かる PLCの周辺装置において、流用し たシーケンスプログラムブロックを修正する場合の処理の流れを説明するフローチヤ ートである。  [FIG. 9-2] FIG. 9-2 is a flow chart for explaining the flow of processing when the diverted sequence program block is corrected in the peripheral device of the PLC that is effective in the embodiment of the present invention.
[図 10- 1]図 10— 1は、本発明の実施の形態に力かる PLCの周辺装置において流用 したシーケンスプログラムブロックを修正する場合の、データの変化を説明するため の図である。  [FIG. 10-1] FIG. 10-1 is a diagram for explaining the change of data when the sequence program block used in the peripheral device of the PLC, which is useful for the embodiment of the present invention, is corrected.
[図 10-2]図 10— 2は、本発明の実施の形態に力かる PLCの周辺装置において流用 したシーケンスプログラムブロックを修正する場合の、データの変化を説明するため の図である。 [FIG. 10-2] FIG. 10-2 is a diagram for explaining a change in data when the sequence program block used in the peripheral device of the PLC, which is useful for the embodiment of the present invention, is corrected. FIG.
[図 10-3]図 10— 3は、本発明の実施の形態に力かる PLCの周辺装置において流用 したシーケンスプログラムブロックを修正する場合の、データの変化を説明するため の図である。  [FIG. 10-3] FIG. 10-3 is a diagram for explaining the data change when the sequence program block used in the peripheral device of the PLC, which is useful for the embodiment of the present invention, is corrected.
[図 10-4]図 10— 4は、本発明の実施の形態に力かる PLCの周辺装置において流用 したシーケンスプログラムブロックを修正する場合の、データの変化を説明するため の図である。  [FIG. 10-4] FIG. 10-4 is a diagram for explaining a change in data when the sequence program block used in the peripheral device of the PLC, which is useful for the embodiment of the present invention, is corrected.
[図 10-5]図 10— 5は、本発明の実施の形態に力かる PLCの周辺装置において流用 したシーケンスプログラムブロックを修正する場合の、データの変化を説明するため の図である。  [FIG. 10-5] FIG. 10-5 is a diagram for explaining the data change when the sequence program block used in the peripheral device of the PLC, which is useful for the embodiment of the present invention, is corrected.
[図 10-6]図 10— 6は、本発明の実施の形態に力かる PLCの周辺装置において流用 したシーケンスプログラムブロックを修正する場合の、データの変化を説明するため の図である。  [FIG. 10-6] FIG. 10-6 is a diagram for explaining the data change when the sequence program block used in the peripheral device of the PLC, which is useful for the embodiment of the present invention, is corrected.
[図 10- 7]図 10— 7は、本発明の実施の形態に力かる PLCの周辺装置において流用 したシーケンスプログラムブロックを修正する場合の、データの変化を説明するため の図である。  [FIG. 10-7] FIG. 10-7 is a diagram for explaining the data change when the sequence program block used in the peripheral device of the PLC, which is useful for the embodiment of the present invention, is corrected.
[図 11]図 11は、本発明の実施の形態に力かる PLCの周辺装置においてシーケンス プログラムブロックの試験を実施する際に試験マトリクステーブルを作成する処理の 流れを説明するフローチャートである。  [FIG. 11] FIG. 11 is a flowchart for explaining the flow of processing for creating a test matrix table when a sequence program block test is performed in the peripheral device of the PLC according to the embodiment of the present invention.
[図 12- 1]図 12— 1は、本発明の実施の形態に力かる PLCの周辺装置においてシー ケンスプログラムブロックの試験を実施する際に試験マトリクステーブルを作成する場 合のデータの変化を説明するための図である。  [Fig. 12-1] Fig. 12-1 shows changes in data when creating a test matrix table when a sequence program block test is performed in a peripheral device of a PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating.
[図 12-2]図 12— 2は、本発明の実施の形態に力かる PLCの周辺装置においてシー ケンスプログラムブロックの試験を実施する際に試験マトリクステーブルを作成する場 合のデータの変化を説明するための図である。  [Fig. 12-2] Fig. 12-2 shows changes in data when creating a test matrix table when a sequence program block test is performed in a peripheral device of the PLC, which is effective in the embodiment of the present invention. It is a figure for demonstrating.
[図 12-3]図 12— 3は、本発明の実施の形態に力かる PLCの周辺装置においてシー ケンスプログラムブロックの試験を実施する際に試験マトリクステーブルを作成する場 合のデータの変化を説明するための図である。 [図 12- 4]図 12— 4は、本発明の実施の形態に力かる PLCの周辺装置においてシー ケンスプログラムブロックの試験を実施する際に試験マトリクステーブルを作成する場 合のデータの変化を説明するための図である。 [Fig. 12-3] Fig. 12-3 shows changes in data when creating a test matrix table when a sequence program block test is performed on a peripheral device of a PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating. [Fig. 12-4] Fig. 12-4 shows changes in data when creating a test matrix table when a sequence program block test is performed in a PLC peripheral device that is effective in the embodiment of the present invention. It is a figure for demonstrating.
[図 12-5]図 12— 5は、本発明の実施の形態に力かる PLCの周辺装置においてシー ケンスプログラムブロックの試験を実施する際に試験マトリクステーブルを作成する場 合のデータの変化を説明するための図である。  [Fig. 12-5] Fig. 12-5 shows changes in data when creating a test matrix table when testing a sequence program block in a peripheral device of a PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating.
[図 12-6]図 12— 6は、本発明の実施の形態に力かる PLCの周辺装置においてシー ケンスプログラムブロックの試験を実施する際に試験マトリクステーブルを作成する場 合のデータの変化を説明するための図である。  [Fig. 12-6] Fig. 12-6 shows changes in data when creating a test matrix table when a sequence program block test is performed in a peripheral device of a PLC that is effective in the embodiment of the present invention. It is a figure for demonstrating.
[図 13]図 13は、本発明の実施の形態にカゝかる PLCの周辺装置において作成される 試験マトリクステーブルを示す図である。  FIG. 13 is a diagram showing a test matrix table created in the peripheral device of the PLC according to the embodiment of the present invention.
[図 14]図 14は、本発明の実施の形態に力かる PLCの周辺装置において試験マトリク スの作成時に使用する命令テーブルを示す図である。  FIG. 14 is a diagram showing an instruction table used when creating a test matrix in the peripheral device of the PLC that is relevant to the embodiment of the present invention.
[図 15- 1]図 15— 1は、本発明の実施の形態に力かる PLCの周辺装置においてシー ケンスプログラムブロックの試験をユーザが手動で実施する際に、試験手順テーブル を作成する処理の流れを説明するフローチャートである。  [Fig. 15-1] Fig. 15-1 shows the process of creating the test procedure table when the user manually executes the sequence program block test in the peripheral device of the PLC, which is useful for the embodiment of the present invention. It is a flowchart explaining a flow.
[図 15- 2]図 15— 2は、本発明の実施の形態に力かる PLCの周辺装置により作成した 試験手順テーブルを、他の試験マトリクステーブルに適用する処理の流れを説明す るフローチャートである。  [FIG. 15-2] FIG. 15-2 is a flowchart for explaining the flow of processing for applying the test procedure table created by the peripheral device of the PLC, which is useful for the embodiment of the present invention, to other test matrix tables. is there.
[図 16-1]図 16— 1は、本発明の実施の形態に力かる PLCの周辺装置において、試 験をユーザが手動により実施し、同じグループに属する試験マトリクスが類似となるも のに対してその試験手順と試験結果とを適用する場合のデータの変化を説明するた めの図である。  [Fig. 16-1] Fig. 16-1 shows a case where the test is manually performed by the user and the test matrix belonging to the same group is similar in the peripheral device of the PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of the data at the time of applying the test procedure and a test result to it.
[図 16-2]図 16— 2は、本発明の実施の形態に力かる PLCの周辺装置において、試 験をユーザが手動により実施し、同じグループに属する試験マトリクスが類似となるも のに対してその試験手順と試験結果とを適用する場合のデータの変化を説明するた めの図である。  [Fig. 16-2] Fig. 16-2 shows a case where the test is manually performed by the user and the test matrix belonging to the same group is similar in the peripheral device of the PLC that is effective in the embodiment of the present invention. It is a figure for demonstrating the change of the data at the time of applying the test procedure and a test result to it.
[図 16-3]図 16— 3は、本発明の実施の形態に力かる PLCの周辺装置において、試 験をユーザが手動により実施し、同じグループに属する試験マトリクスが類似となるも のに対してその試験手順と試験結果とを適用する場合のデータの変化を説明するた めの図である。 [Fig. 16-3] Fig. 16-3 shows a test of a peripheral device of PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of the data when a user implements an experiment manually and the test procedure and test result are applied to what is similar in the test matrix which belongs to the same group.
[図 16-4]図 16— 4は、本発明の実施の形態に力かる PLCの周辺装置において、試 験をユーザが手動により実施し、同じグループに属する試験マトリクスが類似となるも のに対してその試験手順と試験結果とを適用する場合のデータの変化を説明するた めの図である。  [Fig. 16-4] Fig. 16-4 shows a case where the test is manually performed by the user and the test matrix belonging to the same group is similar in the peripheral device of the PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of the data at the time of applying the test procedure and a test result to it.
[図 16-5]図 16— 5は、本発明の実施の形態に力かる PLCの周辺装置において、試 験をユーザが手動により実施し、同じグループに属する試験マトリクスが類似となるも のに対してその試験手順と試験結果とを適用する場合のデータの変化を説明するた めの図である。  [Fig. 16-5] Fig. 16-5 shows a case where the test is manually performed by the user in the peripheral device of the PLC, which is useful for the embodiment of the present invention, and the test matrix belonging to the same group is similar. It is a figure for demonstrating the change of the data at the time of applying the test procedure and a test result to it.
[図 16-6]図 16— 6は、本発明の実施の形態に力かる PLCの周辺装置において、試 験をユーザが手動により実施し、同じグループに属する試験マトリクスが類似となるも のに対してその試験手順と試験結果とを適用する場合のデータの変化を説明するた めの図である。  [Fig. 16-6] Fig. 16-6 shows a case where the test is manually performed by the user and the test matrix belonging to the same group is similar in the peripheral device of the PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of the data at the time of applying the test procedure and a test result to it.
[図 16-7]図 16— 7は、本発明の実施の形態に力かる PLCの周辺装置において、試 験をユーザが手動により実施し、同じグループに属する試験マトリクスが類似となるも のに対してその試験手順と試験結果とを適用する場合のデータの変化を説明するた めの図である。  [Fig. 16-7] Fig. 16-7 shows a case where the test is manually performed by the user and the test matrix belonging to the same group is similar in the peripheral device of the PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of the data at the time of applying the test procedure and a test result to it.
[図 16-8]図 16— 8は、本発明の実施の形態に力かる PLCの周辺装置において、試 験をユーザが手動により実施し、同じグループに属する試験マトリクスが類似となるも のに対してその試験手順と試験結果とを適用する場合のデータの変化を説明するた めの図である。  [Fig. 16-8] Fig. 16-8 shows a case in which the test is manually performed by the user and the test matrix belonging to the same group is similar in the peripheral device of the PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of the data at the time of applying the test procedure and a test result to it.
[図 16-9]図 16— 9は、本発明の実施の形態に力かる PLCの周辺装置において、試 験をユーザが手動により実施し、同じグループに属する試験マトリクスが類似となるも のに対してその試験手順と試験結果とを適用する場合のデータの変化を説明するた めの図である。  [Fig. 16-9] Fig. 16-9 shows a case where the test is manually performed by the user and the test matrix belonging to the same group is similar in the peripheral device of the PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of the data at the time of applying the test procedure and a test result to it.
[図 16-10]図 16— 10は、本発明の実施の形態に力かる PLCの周辺装置において、 試験をユーザが手動により実施し、同じグループに属する試験マトリクスが類似となる ものに対してその試験手順と試験結果とを適用する場合のデータの変化を説明する ための図である。 [Fig. 16-10] Fig. 16-10 shows the peripheral device of the PLC that is useful for the embodiment of the present invention. It is a figure for demonstrating the change of the data when a user performs a test manually and applies the test procedure and a test result with respect to what the test matrix which belongs to the same group becomes similar.
[図 17]図 17は、すでに作成されているシーケンスプログラムの回路表示例を示す図 である。  FIG. 17 is a diagram showing a circuit display example of a sequence program that has already been created.
[図 18]図 18は、図 17のシーケンスプログラムをリスト形式で表示した図である。  FIG. 18 is a diagram showing the sequence program of FIG. 17 displayed in a list format.
[図 19]図 19は、本発明の実施の形態に力かる PLCの周辺装置においてプログラム ブロックテーブルを作成する処理の流れを説明するフローチャートである。  FIG. 19 is a flowchart for explaining the flow of processing for creating a program block table in the peripheral device of the PLC according to the embodiment of the present invention.
[図 20-1]図 20— 1は、本発明の実施の形態に力かる PLCの周辺装置においてプロ グラムブロックテーブルを作成する場合のデータの変化を説明するための図である。  [FIG. 20-1] FIG. 20-1 is a diagram for explaining changes in data when creating a program block table in the peripheral device of the PLC, which is useful in the embodiment of the present invention.
[図 20-2]図 20— 2は、本発明の実施の形態に力かる PLCの周辺装置においてプロ グラムブロックテーブルを作成する場合のデータの変化を説明するための図である。  [FIG. 20-2] FIG. 20-2 is a diagram for explaining a change in data when a program block table is created in the peripheral device of the PLC, which is useful for the embodiment of the present invention.
[図 20-3]図 20— 3は、本発明の実施の形態に力かる PLCの周辺装置においてプロ グラムブロックテーブルを作成する場合のデータの変化を説明するための図である。  [FIG. 20-3] FIG. 20-3 is a diagram for explaining a change in data when creating a program block table in the peripheral device of the PLC, which is useful for the embodiment of the present invention.
[図 20-4]図 20— 4は、本発明の実施の形態に力かる PLCの周辺装置においてプロ グラムブロックテーブルを作成する場合のデータの変化を説明するための図である。 符号の説明  [FIG. 20-4] FIG. 20-4 is a diagram for explaining a change in data when a program block table is created in the peripheral device of the PLC, which is useful for the embodiment of the present invention. Explanation of symbols
1 周辺装置  1 Peripheral device
2 入力装置  2 Input device
3 表示装置  3 Display device
4 印刷装置  4 Printing device
5 外部記憶装置  5 External storage device
6 プログラムメモリ  6 Program memory
7 データメモリ  7 Data memory
8 制御部  8 Control unit
8a プログラムブロックテーブル作成部  8a Program block table creation part
8b 影響箇所データ作成部  8b Affected location data creation part
8c 修正適用部 d 既存プログラムブロックテーブル作成部e 試験マトリクス作成部8c Modification application section d Existing program block table creation section e Test matrix creation section
1 シーケンスプログラムデータ1 Sequence program data
2 流用データ2 Diversion data
3 プログラムブロックテープノレ3 Program block tape
4 試験マトリクステーブル4 Test matrix table
5 命令テーブル5 Instruction table
6 試験手順テーブル6 Test procedure table
7 影響箇所データ7 Affected location data
0 画面イメージ0 Screen image
1 シーケンスプログラムブロック 1 Sequence program block
流用元シーケンスプログラムデータの2 コード 2 codes of source sequence program data
3 命令部分 3 Instruction part
アドレス部分  Address part
シーケンスプログラムブロック  Sequence program block
画面イメージ screen image
1 シーケンスプログラムブロック 1 Sequence program block
シーケンスプログラムブロック  Sequence program block
流用後シーケンスプログラムデータのリスト コード  List of sequence program data after diversion
命令部分  Instruction part
アドレス部分  Address part
シーケンスプログラムブロック  Sequence program block
シーケンスプログラムブロック  Sequence program block
シーケンスプログラムデータ  Sequence program data
シーケンスプログラム部分  Sequence program part
シーケンスプログラム 72 シーケンスプログラムデータSequence program 72 Sequence program data
73 流用データ 73 Diversion data
74 プログラムブロックテーブル 74 Program block table
76 識別子 76 identifier
77 使用ステップ数  77 Number of steps used
80 コード  80 codes
81 命令部分  81 Instruction part
82 アドレス部分  82 Address part
83 レコード  83 records
84 シーケンスプログラム部分  84 Sequence program part
87 プログラムブロックテーブル 87 Program block table
89 アドレス部分 89 Address part
90 シーケンスプログラムデータ 90 Sequence program data
100 シーケンスプログラムデータ100 Sequence program data
101 プログラムブロックテーブル101 program block table
102 流用元シーケンスプログラム部分102 Diversion source sequence program part
103 シーケンスプログラム部分103 Sequence program part
104 シーケンスプログラム 104 Sequence program
104 シーケンスプログラムデータ 104 Sequence program data
105 シーケンスプログラム部分105 Sequence program part
106 修正データ 106 Correction data
107 レコード  107 records
110 使用ステップ数  110 Number of steps used
112 命令部分  112 Instruction part
114 コード  114 code
115 プログラムブロックテープノレ 116 レコード  115 program block tape 116 records
117 レコード 122 シーケンスプログラム部分117 records 122 Sequence program part
123 修正候補一覧画面 123 Correction candidate list screen
125 修正候補  125 Candidate for correction
126 チェックボックス  126 Check box
127 選択修正ボタン  127 Selection correction button
128 全修正ボタン  128 All correction buttons
129 キャンセルボタン  129 Cancel button
130 プログラムブロックテーブル 130 Program block table
131 レコード 131 records
132 レコード  132 records
137 プログラムブロックテープノレ 137 Program block tape
150 試験マトリクステーブル150 test matrix table
156 数値データ 156 Numerical data
160 命令テーブル  160 instruction table
162 命令部分  162 Instruction part
170 シーケンスプログラムデータ 170 Sequence program data
171 シーケンスプログラム部分171 Sequence program part
172 シーケンスプログラム部分172 Sequence program part
173 命令部分 173 Instruction part
174 アドレス部分  174 Address part
175 プログラムブロックテープノレ 175 Program block tape
176 識別子 176 identifier
178 試験マトリクス  178 test matrix
179 命令 Zアドレスの入力欄 179 Instruction Z address input field
182 使用ステップ数 182 Number of steps used
184 試験マトリクス作成選択画面 184 Test matrix creation selection screen
185 シーケンスプログラム部分 186 チ mックボックス 185 Sequence program part 186 check box
187 行ボタン  187 line button
190 アドレス部分  190 Address part
191 試験マトリクス  191 test matrix
195 試験アドレス状態  195 Test address status
196 出力結果  196 Output result
211 プログラムブロック  211 program blocks
212 プログラムブロック  212 program blocks
213 プログラムブロック  213 program blocks
215 プログラムブロック  215 program blocks
220 プログラムブロックテープノレ 220 Program block tape
221 プログラムブロックテープノレ221 Program block tape
222 プログラムブロックテープノレ222 Program block tape
222 レコード 222 records
222 新規レコード  222 New record
223 プログラムブロックテープノレ 223 Program block tape
224 レコード 224 records
225 プログラムブロックテープノレ 225 Program block tape
250 シーケンスプログラムデータ250 Sequence program data
251 シーケンスプログラム部分251 Sequence program part
251 プログラムブロック 251 program blocks
252 シーケンスプログラム部分 252 Sequence program part
252 プログラムブロック 252 program blocks
253 試験マトリクス  253 test matrix
254 出力結果アドレス  254 Output result address
256 験手順テーブル  256 test procedure table
260 アドレス番号の入力欄 260 Address number input field
261 アドレス状態の入力欄 263 シーケンスプログラム部分261 Address status input field 263 Sequence program part
263 ラダープログラム 263 Ladder program
264 アドレス部分  264 address part
266 ドレス部分  266 dress part
267 試験マトリク  267 Test Matrix
267 試験マトリクス  267 test matrix
268 出力結果  268 Output result
268 出力結果の入力欄 268 Output result input field
270 試験結果の入力欄270 Test result input field
271 アドレス部分 271 Address part
274 番号  274 number
275 アドレス部分  275 address part
276 アドレス  276 address
280 試験手順テーブル 280 Test Procedure Table
281 データ 281 data
282 シーケンスプログラム部分 282 Sequence program part
282 ラダー表示 282 Ladder display
283 出力結果アドレス 283 Output result address
283 場合アドレス 283 case address
284 アドレス部分  284 Address part
285 試験マトリクス  285 test matrix
286 アドレス状態結果 286 Address status result
289 アドレス 289 address
290 試験マトリクス  290 test matrix
291 試験マトリクス  291 test matrix
292 試験結果  292 test results
294 試験結果  294 test results
296 試験結果の入力欄 299 アドレス状態 296 Test result input field 299 Address state
300 シーケンスプログラム  300 sequence program
発明を実施するための最良の形態  BEST MODE FOR CARRYING OUT THE INVENTION
[0013] 以下に、本発明に力かるプログラマブルロジックコントローラの周辺装置システムの 実施の形態を図面に基づいて詳細に説明する。なお、本発明は以下の記述により限 定されるものではなぐ本発明の要旨を逸脱しない範囲において適宜変更可能であ る。 Hereinafter, embodiments of a programmable logic controller peripheral device system according to the present invention will be described in detail with reference to the drawings. It should be noted that the present invention is not limited to the following description and can be appropriately changed without departing from the gist of the present invention.
[0014] 実施の形態  [0014] Embodiment
図 1—1は、本発明の実施の形態にカゝかる PLCの周辺装置システムの構成を示す 構成図である。図 1—1に示すように、実施の形態に力かる PLCの周辺装置システム は、 PLCの周辺装置 1 (以下、周辺装置 1と呼ぶ)と、該 PLCの周辺装置 1にそれぞ れ接続されたキーボードなどの入力装置 2、 CRTなどの表示装置 3、プリンタなどの 印刷装置 4、ハードディスクなどの外部記憶装置 5を備えて構成されて 、る。  FIG. 1-1 is a configuration diagram showing a configuration of a PLC peripheral device system according to an embodiment of the present invention. As shown in Fig. 1-1, the peripheral device system of the PLC that is relevant to the embodiment is connected to the peripheral device 1 of the PLC (hereinafter referred to as peripheral device 1) and the peripheral device 1 of the PLC. And an input device 2 such as a keyboard, a display device 3 such as a CRT, a printing device 4 such as a printer, and an external storage device 5 such as a hard disk.
[0015] また、 PLCの周辺装置 1は、シーケンスプログラムの一部を流用して他のシーケン スプログラム部分を作成可能な PLCの周辺装置であって、たとえばシーケンスプログ ラムなどのプログラム類を格納するプログラムメモリ 6と、変数データなどのデータ類を 格納するデータメモリ 7、 CPU (中央演算処理装置)などシステムプログラムの処理や PLCの周辺装置 1における処理全体を制御する制御部 8を備えて構成されている。  [0015] The PLC peripheral device 1 is a PLC peripheral device capable of creating another sequence program part by diverting a part of the sequence program, and stores programs such as a sequence program. It consists of a program memory 6, a data memory 7 that stores data such as variable data, a control unit 8 that controls the processing of system programs such as a CPU (Central Processing Unit) and the entire processing in the peripheral device 1 of the PLC. ing.
[0016] また、制御部 8は、プログラムブロックテーブル作成機能と、影響箇所データ作成機 能と、修正適用機能と、既存プログラムブロックテーブル作成機能と、試験マトリクス 作成機能と、を有する。  In addition, the control unit 8 has a program block table creation function, an affected part data creation function, a modification application function, an existing program block table creation function, and a test matrix creation function.
[0017] プログラムブロックテーブル作成機能は、図 1—2に示すように制御部 8のプログラム ブロックテーブル作成部 8aにより実行され、流用元のシーケンスプログラム部分と該 流用元のシーケンスプログラム部分を流用して作成した流用先のシーケンスプロダラ ム部分とから、シーケンスプログラム部分を特徴付ける識別子とシーケンスプログラム 部分の使用箇所とを対応付けたプログラムブロックテーブルを作成する機能である。  [0017] The program block table creation function is executed by the program block table creation unit 8a of the control unit 8 as shown in Fig. 1-2, and uses the diversion source sequence program portion and the diversion source sequence program portion. This is a function that creates a program block table in which the identifier that characterizes the sequence program part and the use location of the sequence program part are associated from the created sequence program part of the diversion destination.
[0018] 影響箇所データ作成機能は、図 1 2に示すように制御部 8の影響箇所データ作 成部 8bにより実行され、プログラムブロックテーブルに登録されているシーケンスプロ グラム部分の一部が修正された際に、修正が影響を及ぼす影響箇所を示す影響箇 所データをプログラムブロックテーブルに基づいて作成する機能である。 [0018] The affected part data creation function is executed by the affected part data creation unit 8b of the control unit 8 as shown in Fig. 12 and is registered in the program block table. This is a function that creates affected area data indicating the affected area affected by the modification based on the program block table when a part of the gram part is modified.
[0019] 修正適用機能は、図 1 2に示すように制御部 8の修正適用部 8cにより実行され、 影響箇所データに含まれる影響箇所に対して修正を適用する旨の修正適用情報に 基づいて影響箇所データに含まれる影響箇所に対応する流用先のシーケンスプログ ラム部分に対して自動的に修正を適用する機能である。  The correction application function is executed by the correction application unit 8c of the control unit 8 as shown in FIG. 12, and based on the correction application information indicating that the correction is applied to the affected part included in the affected part data. This is a function that automatically applies corrections to the sequence program part of the diversion destination corresponding to the affected part included in the affected part data.
[0020] 既存プログラムブロックテーブル作成機能は、図 1 2に示すように制御部 8の既存 プログラムブロックテーブル作成部 8dにより実行され、既存のシーケンスプログラムの 全体または一部に対応するプログラムブロックテーブルを作成する旨のプログラムブ ロックテーブル作成指示に従って、既存プログラムのプログラムブロックテーブルを作 成する機能である。 [0020] The existing program block table creation function is executed by the existing program block table creation unit 8d of the control unit 8 as shown in Fig. 12 and creates a program block table corresponding to all or part of the existing sequence program. This function creates a program block table for an existing program in accordance with the program block table creation instruction.
[0021] 試験マトリクス作成機能は、図 1—2に示すように制御部 8の試験マトリクス作成部 8e により実行され、修正を行った箇所と影響箇所に対する試験を行うための試験マトリ タスをプログラムブロックテーブル力も作成する機能である。  [0021] The test matrix creation function is executed by the test matrix creation unit 8e of the control unit 8 as shown in Fig. 1-2, and the test matrix for performing the test on the corrected part and the affected part is a program block. This function also creates table power.
[0022] なお、本実施の形態においては、制御部 8が上述した機能を備えるが、各機能を有 する機能部を独立して設けても良い。  [0022] In the present embodiment, the control unit 8 has the above-described functions, but the function units having the respective functions may be provided independently.
[0023] つぎに、図 2を用いてデータメモリ 7について説明する。図 2は、図 1—1に示したデ 一タメモリ 7の構成の一例を示す構成図である。データメモリ 7は、たとえば図 2に示 すように、シーケンスプログラムデータ 21と、流用データ 22と、プログラムブロックテー ブル 23と、試験マトリクステーブル 24と、命令テーブル 25と、試験手順テーブル 26と 、影響箇所データ 27と、を格納している。  Next, the data memory 7 will be described with reference to FIG. FIG. 2 is a block diagram showing an example of the configuration of the data memory 7 shown in FIG. 1-1. For example, as shown in FIG. 2, the data memory 7 includes sequence program data 21, diversion data 22, program block table 23, test matrix table 24, instruction table 25, test procedure table 26, The location data 27 is stored.
[0024] シーケンスプログラムデータ 21は、編集'作成を行っているシーケンスプログラムの データである。流用データ 22は、シーケンスプログラムを編集している際に、シーケ ンスプログラムデータ部分を流用するために一時的に格納する流用データである。プ ログラムブロックテーブル 23は、ユーザが記述したシーケンスプログラムデータ力 作 成するプログラムブロックテーブルである。  The sequence program data 21 is data of a sequence program that is being edited and created. The diversion data 22 is diversion data that is temporarily stored in order to divert the sequence program data portion when editing the sequence program. The program block table 23 is a program block table for creating the sequence program data described by the user.
[0025] また試験マトリクステーブル 24は、生成されるシーケンスプログラムデータの試験を 行うための試験マトリクステーブルである。命令テーブルは、シーケンスプログラムデ ータを参照して、試験マトリクステーブルを作成するための命令テーブルである。試 験手順テーブル 26は、ユーザが試験マトリクスから手動で行った試験手順を記憶す るための試験手順テーブルである。 [0025] The test matrix table 24 is a test matrix table for testing the generated sequence program data. The instruction table contains sequence program data. This is an instruction table for creating a test matrix table with reference to the data. The test procedure table 26 is a test procedure table for storing test procedures manually performed from the test matrix by the user.
[0026] つぎに、本発明の実施の形態に力かる PLCの周辺装置 1の動作について説明する 。以下、シーケンスプログラムデータにおいてユーザの指定したシーケンスプログラム 部分を他のシーケンスプログラムデータに流用する場合について説明する。ここでは 、後述するシーケンスプログラムデータ 70にお!/、てユーザの指定したシーケンスプロ グラム部分 71をシーケンスプログラムデータ 72に流用する例を用 、て説明する。  Next, the operation of the peripheral device 1 of the PLC, which is useful for the embodiment of the present invention, will be described. Hereinafter, a case will be described in which the sequence program portion specified by the user in the sequence program data is used for other sequence program data. Here, a description will be given using an example in which a sequence program portion 71 designated by the user is used for the sequence program data 72 to be described later.
[0027] 図 3は、表示装置 3に表示された、本実施の形態に力かる PLCの周辺装置 1にお いてシーケンスプログラムの流用を行う前の流用元シーケンスプログラムの回路表示 例である。図 3においては、シーケンスプログラムをラダー表示した画面イメージ 30を 示しており、ユーザが流用したいシーケンスプログラムのブロックとして、シーケンスプ ログラムブロック 31が記述されている。  FIG. 3 is a circuit display example of the diversion source sequence program before diversion of the sequence program in the peripheral device 1 of the PLC, which is useful for the present embodiment, displayed on the display device 3. FIG. 3 shows a screen image 30 in which a sequence program is displayed as a ladder, and a sequence program block 31 is described as a block of the sequence program that the user wants to divert.
[0028] また、同シーケンスプログラムをリスト形式で表示すると図 4のように表示される。図 4 は、本実施の形態に力かる PLCの周辺装置においてシーケンスプログラムの流用を 行う前の流用元シーケンスプログラムデータのリスト 40の表示例である。図 4に示すよ うに、リスト 40には、ステップ No. 41とコード 42とが記述されている。コード 42は、流 用元シーケンスプログラムデータ中のコードである。  [0028] When the sequence program is displayed in a list format, it is displayed as shown in FIG. FIG. 4 is a display example of the list 40 of diversion source sequence program data before diverting the sequence program in the peripheral device of the PLC that is relevant to the present embodiment. As shown in FIG. 4, the list 40 includes step No. 41 and code 42. Code 42 is the code in the diversion source sequence program data.
[0029] ステップ No. 41は、シーケンスプログラムデータのコード 42に対応して設けられた ステップ No.である。また、コード 42は、命令部分 43とアドレス部分 44との組み合わ せにより成り立つている。シーケンスプログラムブロック 45は、ユーザが流用したいシ 一ケンスプログラムのブロックであり、図 3におけるシーケンスプログラムブロック 31に 対応している。  Step No. 41 is a step number provided corresponding to the code 42 of the sequence program data. The code 42 is composed of a combination of the instruction part 43 and the address part 44. The sequence program block 45 is a sequence program block that the user wants to divert, and corresponds to the sequence program block 31 in FIG.
[0030] 図 5は、表示装置 3に表示された、本実施の形態に力かる PLCの周辺装置 1にお いてシーケンスプログラムの流用を行った流用先シーケンスプログラムの回路表示例 である。図 5においては、シーケンスプログラムをラダー表示した画面イメージ 50を示 しており、流用のための複製元となるシーケンスプログラムブロック 51と、該シーケン スプログラムブロック 51を流用した後にアドレスを編集して作成したシーケンスプログ ラムブロック 52と、が記述されている。 FIG. 5 is a circuit display example of a diversion destination sequence program that is displayed on the display device 3 and used for the sequence program in the peripheral device 1 of the PLC that is effective in the present embodiment. Fig. 5 shows a screen image 50 in which a sequence program is displayed in a ladder form. The sequence program block 51 is a copy source for diversion, and the address is created after the sequence program block 51 is diverted. Sequence program Ram block 52 is described.
[0031] また、同シーケンスプログラムをリスト形式で表示すると図 6のように表示される。図 6 は、本実施の形態に力かる PLCの周辺装置 1においてシーケンスプログラムの流用 を行った流用後シーケンスプログラムデータのリスト 60の表示例である。図 6に示すよ うに、リスト 60には、ステップ No. 61とコード 62とが記述されている。コード 62は、流 用後シーケンスプログラムデータ中のコードである。  [0031] When the sequence program is displayed in a list format, it is displayed as shown in FIG. FIG. 6 is a display example of a list 60 of post- diversion sequence program data in which the sequence program is diverted in the peripheral device 1 of the PLC that is relevant to the present embodiment. As shown in FIG. 6, in the list 60, step No. 61 and code 62 are described. Code 62 is the code in the sequence program data after diversion.
[0032] ステップ No. 61は、シーケンスプログラムデータのコード 42に対応して設けられた ステップ No.である。また、コード 62は、命令部分 63とアドレス部分 64との組み合わ せにより成り立つている。シーケンスプログラムブロック 65は、ユーザが流用したシー ケンスプログラムブロックであり、図 5におけるシーケンスプログラムブロック 51に対応 している。また、シーケンスプログラムブロック 66は、シーケンスプログラムブロック 65 流用した後にアドレスを編集して作成したシーケンスプログラムブロックであり、図 5に おけるシーケンスプログラムブロック 52に対応している。  [0032] Step No. 61 is a step number provided corresponding to the code 42 of the sequence program data. The code 62 is composed of a combination of the instruction part 63 and the address part 64. The sequence program block 65 is a sequence program block diverted by the user, and corresponds to the sequence program block 51 in FIG. Further, the sequence program block 66 is a sequence program block created by editing the address after diverting the sequence program block 65, and corresponds to the sequence program block 52 in FIG.
[0033] 以下、本実施の形態に力かる PLCの周辺装置の処理を処理の流れに沿って説明 する。まず、図 7および図 8—1〜図 8— 6を用いてシーケンスプログラムの流用処理 について説明する。図 7は、本実施の形態に力かる PLCの周辺装置 1においてシー ケンスプログラムの流用を実施する際の、プログラムグのループテーブルを作成する 処理の流れを説明するフローチャートである。図 8— 1〜図 8— 6は、本実施の形態に 力かる PLCの周辺装置 1にお 、てシーケンスプログラムの流用処理を実施する際の 、データの変化を説明するための図である。  [0033] Hereinafter, the processing of the peripheral device of the PLC, which is useful for the present embodiment, will be described along the flow of processing. First, the diversion processing of the sequence program will be described using FIG. 7 and FIGS. 8-1 to 8-6. FIG. 7 is a flowchart for explaining the flow of processing for creating a program loop table when a sequence program is diverted in the peripheral device 1 of the PLC, which is effective in the present embodiment. FIGS. 8-1 to FIGS. 8-6 are diagrams for explaining the change of data when the diversion processing of the sequence program is performed in the peripheral device 1 of the PLC which is useful for the present embodiment.
[0034] ここでは、図 8— 1に示すような作成中のシーケンスプログラムデータ 70に対してシ 一ケンスプログラムデータの流用を実施する場合について説明する。図 8—1に示す ようにシーケンスプログラムデータの流用を実施する前のシーケンスプログラムデータ 70において、流用するシーケンスプログラム部分 71を選択してコピーを行うために、 ユーザが入力装置 2を使用してデータ選択指示情報'コピー指示情報を PLCの周辺 装置 1に入力する。 Here, a case will be described in which the sequence program data is applied to the sequence program data 70 being created as shown in FIG. 8-1. As shown in Fig. 8-1, the sequence program data 70 before the diversion of the sequence program data is selected by the user using the input device 2 in order to select and copy the sequence program portion 71 to be diverted. Input the selection instruction information 'copy instruction information to peripheral device 1 of the PLC.
[0035] PLCの周辺装置 1は、上記のデータ選択指示情報'コピー指示情報を受信すると( ステップ S1)、図 8— 2に示すように該指示情報に従って選択された流用するシーケ ンスプログラム部分 71を、流用データ 73としてデータメモリ 7にコピーする(ステップ S 2)。 When the peripheral device 1 of the PLC receives the above data selection instruction information 'copy instruction information (step S 1), the diverted sequence selected according to the instruction information as shown in FIG. 8-2. The copy program portion 71 is copied to the data memory 7 as the diverted data 73 (step S2).
[0036] つぎに、 PLCの周辺装置 1は、流用データ 73のコード 80よりアドレス部分 82を取り 除いた命令部分 81を用いて、図 8— 3に示すように新たな識別子 76と管理 No. 75を 有するレコード 83を作成し、プログラムブロックテーブル 74に登録する(ステップ S3) 。なお、プログラムブロックテーブル 74には、図 8— 3に示すように使用ステップ数 77 と開始ステップ No. 78とが記述される力 これらは流用データ 73のステップ No. 79 より作成される。  Next, the peripheral device 1 of the PLC uses the instruction part 81 obtained by removing the address part 82 from the code 80 of the diversion data 73, and uses the new identifier 76 and the management number as shown in FIG. 8-3. A record 83 having 75 is created and registered in the program block table 74 (step S3). In the program block table 74, as shown in FIG. 8-3, the number of steps used 77 and the start step number 78 are described. These are created from the step number 79 of the diversion data 73.
[0037] つぎに、ユーザは、先に選択してコピーしたシーケンスプログラム部分 71を作成中 のシーケンスプログラムデータ中の所望の部分に貼り付ける旨の貼り付け指示情報 を、入力装置 2を使用して PLCの周辺装置 1に入力する。 PLCの周辺装置 1は、この 貼り付け指示情報を受信すると (ステップ S4)、図 8— 4に示すように該貼り付け指示 情報に従って、選択'コピーした流用するシーケンスプログラム部分 71を、シーケンス プログラム 72中における指定された場所に貼り付ける(挿入する)(ステップ S5)。図 8 4においては、ステップ No. 6〜9のシーケンスプログラム部分 84が貼り付けられた [0037] Next, using the input device 2, the user uses the input device 2 to send paste instruction information for pasting the sequence program portion 71 selected and copied to a desired portion in the sequence program data being created. Input to peripheral device 1 of PLC. When the peripheral device 1 of the PLC receives this pasting instruction information (step S4), the sequence program portion 71 that is selected and copied according to the pasting instruction information as shown in FIG. 8-4 is used as the sequence program 72. Paste (insert) in the specified place in the middle (step S5). In Fig. 84, the sequence program part 84 of steps No. 6 to 9 is pasted.
(挿入された)プログラムブロックである。なお、図 8—4は、アドレス修正前のシーケン スプログラムデータである。 A program block (inserted). Figure 8-4 shows the sequence program data before address correction.
[0038] つぎに、 PLCの周辺装置 1は、シーケンスプログラムデータ 72に貼り付けられたシ 一ケンスプログラム部分 84の(ステップ No. ) 85より、貝占り付けられたシーケンスプロ グラム部分 84の開始ステップ No. (ここでは「6」 )をプログラムブロックテーブル 74の (開始ステップ No. ) 78に追記登録する (ステップ S6)。登録後のプログラムブロック テーブル 87を図 8— 5に示す。  [0038] Next, the peripheral device 1 of the PLC starts the sequence program portion 84 assigned to the shell from (step No.) 85 of the sequence program portion 84 pasted to the sequence program data 72. The step number (here “6”) is additionally registered in (start step number) 78 of the program block table 74 (step S6). Figure 8-5 shows the program block table 87 after registration.
[0039] つぎに、ユーザは、流用して貼り付けられたシーケンスプログラム部分 84のアドレス 部分 89を用途に合わせて修正するためのアドレス修正指示情報を、入力装置 2を使 用して PLCの周辺装置 1に入力する。 PLCの周辺装置 1は、このアドレス修正指示 情報を受信すると (ステップ S 7)、該アドレス修正指示情報に従ってシーケンスプログ ラム部分 84のアドレス部分 89の修正を行う(ステップ S8)。これにより、シーケンスプ ログラムデータを流用したプログラム編集処理が完了する。処理が完了したシーケン スプログラムデータ 90を図 8— 6に示す。 [0039] Next, the user uses the input device 2 to correct the address correction instruction information for correcting the address portion 89 of the sequence program portion 84 pasted and pasted according to the application. Input to device 1. When the peripheral device 1 of the PLC receives this address correction instruction information (step S7), it corrects the address part 89 of the sequence program part 84 according to the address correction instruction information (step S8). Thus, the program editing process using the sequence program data is completed. Sequence completed The program data 90 is shown in Figure 8-6.
[0040] つぎに、図 9— 1、図 9— 2および図 10— 1〜図 10— 7を用いて、前記手順により流 用 '編集したシーケンスプログラムの一部を修正した際に、 PLCの周辺装置システム が流用元箇所または全ての流用先箇所への影響範囲をユーザに対して通知する手 順を説明する。 [0040] Next, using Fig. 9-1, Fig. 9-2, and Fig. 10-1 to Fig. 10-7, diverting a part of the edited sequence program according to the above procedure. The procedure for the peripheral device system to notify the user of the range of influence on the diversion source location or all diversion destination locations is explained.
[0041] 図 9—1および図 9 2は、本実施の形態に力かる PLCの周辺装置 1において、流 用したシーケンスプログラムブロックを修正する場合の処理の流れを説明するフロー チャートである。また、図 10— 1〜図 10— 6は、本実施の形態に力かる PLCの周辺 装置 1にお 、て流用したシーケンスプログラムブロックを修正する場合の、データの 変化を説明するための図である。ここでは、影響範囲に対して修正を適用することが 選択され、修正を適用するところまで説明する。  FIG. 9A and FIG. 92 are flowcharts for explaining the flow of processing when the used sequence program block is corrected in the peripheral device 1 of the PLC that is effective in the present embodiment. FIGS. 10-1 to 10-6 are diagrams for explaining data changes when the sequence program block used in the peripheral device 1 of the PLC, which is useful for the present embodiment, is corrected. is there. Here, it is chosen to apply the correction to the affected area, and the explanation will be made up to the point where the correction is applied.
[0042] 上述した流用 ·編集処理が完了した状態のシーケンスプログラムデータ 100 (図 8— 6に対応)およびプログラムブロックテーブル 101 (図 8— 5に対応)を、それぞれ図 10 1および図 10— 2に示す。図 10—1に示したシーケンスプログラムデータ 100にお いては、流用元のシーケンスプログラム部分 102および流用先のシーケンスプロダラ ム部分 103が含まれている。  [0042] The sequence program data 100 (corresponding to Fig. 8-6) and the program block table 101 (corresponding to Fig. 8-5) in the state where the above-described diversion and editing processing is completed are shown in Figs. 10 1 and 10-2, respectively. Shown in The sequence program data 100 shown in FIG. 10-1 includes a diversion source sequence program portion 102 and a diversion destination sequence program portion 103.
[0043] この状態において、流用元シーケンスプログラム部分 102を編集するために、たと えばコード「ANI X4」を追加する修正指示情報をユーザが入力装置 2を使用して P LCの周辺装置 1に入力する。 PLCの周辺装置 1は、この修正指示情報を受信すると (ステップ S11)、該修正指示情報に従って流用元シーケンスプログラム部分 102に( コード「ANI X4」)を追加する修正を行う(ステップ S 12)。修正されたシーケンスプ ログラムデータ 104を図 10— 3に示す。  [0043] In this state, in order to edit the diversion source sequence program part 102, for example, the user inputs correction instruction information for adding the code "ANI X4" to the peripheral device 1 of the PLC using the input device 2. To do. When the peripheral device 1 of the PLC receives the correction instruction information (step S11), the peripheral device 1 of the PLC performs correction by adding (code “ANI X4”) to the diversion source sequence program portion 102 according to the correction instruction information (step S12). The modified sequence program data 104 is shown in Figure 10-3.
[0044] 図 10— 3に示すように、修正されたシーケンスプログラムデータ 104においては、修 正したシーケンスプログラム部分 105に修正データ 106 (コード「ANI X4」)が追加 されている。また、修正データ 106に対してステップ No. 113として「3」を付与するこ とにより、それ以降のステップ No. 113が 1ずつ追加される。  As shown in FIG. 10-3, in the modified sequence program data 104, modified data 106 (code “ANI X4”) is added to the modified sequence program portion 105. Also, by assigning “3” as step No. 113 to the modified data 106, the subsequent step No. 113 is added one by one.
[0045] つぎに、 PLCの周辺装置 1は、図 10— 2に示したプログラムブロックテーブル 101 の使用ステップ数 110と開始ステップ No. I l lとを参照し、該プログラムブロックテー ブル 101に、修正したシーケンスプログラム部分 105の修正前のシーケンスプログラ ム部分(図 10— 2における流用元シーケンスプログラム部分 102に対応)が含まれる レコードが登録されている力否かを判定する(ステップ S13)。ここで、修正したシーケ ンスプログラム部分 105の修正前のシーケンスプログラム部分を含むレコードがプロ グラムブロックテーブル 101に登録されていない場合には (ステップ S13否定)、処理 を終了する。 Next, the peripheral device 1 of the PLC refers to the number of used steps 110 and the start step number Ill of the program block table 101 shown in FIG. It is determined whether or not the record 101 contains a record that includes the sequence program part before correction (corresponding to the diversion source sequence program part 102 in Fig. 10-2) of the corrected sequence program part 105 (step 10). S13). Here, when the record including the sequence program part before the correction of the corrected sequence program part 105 is not registered in the program block table 101 (No at Step S13), the process is ended.
[0046] 修正したシーケンスプログラム部分 105の修正前のシーケンスプログラム部分を含 むレコードがプログラムブロックテーブル 101に登録されている場合には(ここではレ コード 107が登録されている)(ステップ S13肯定)、 PLCの周辺装置 1はレコード 10 7の開始ステップ No. I l lから修正箇所のステップ No. (ここでは「0」)を消去する修 正を行い、レコード 116として更新する。  [0046] When a record including the sequence program part before the correction of the corrected sequence program part 105 is registered in the program block table 101 (here, record 107 is registered) (Yes in step S13) Peripheral device 1 of PLC performs the correction to delete the step number (0 in this case) of the corrected part from the start step number Ill in record 107 and updates it as record 116.
[0047] そして、 PLCの周辺装置 1は、修正したシーケンスプログラム部分 105のコード 114 中の命令部分 112より、新しい識別子 119 (ここでは「LD— OR— AND— ANI— O UTJ )を有する新たなレコード 117を作成してプログラムブロックテーブル 101に追加 登録する (ステップ S 14)。  Then, the peripheral device 1 of the PLC has a new identifier 119 (here, “LD—OR—AND—ANI—OUTJ”) from the instruction portion 112 in the code 114 of the modified sequence program portion 105. Record 117 is created and added to program block table 101 (step S14).
[0048] また同時に、 PLCの周辺装置 1は、プログラムブロックテーブル 101において、修正 箇所によって影響を受ける開始ステップ No. 121を全て修正して更新する。ここでは 、レコード 116の開始ステップ No. 121の値を「7」に修正して更新する。このようにし て更新されたプログラムブロックテーブル 115を図 10— 4に示す。  At the same time, the peripheral device 1 of the PLC corrects and updates all the start step numbers 121 affected by the correction location in the program block table 101. Here, the value of the start step No. 121 of the record 116 is corrected to “7” and updated. The program block table 115 updated in this way is shown in Fig. 10-4.
[0049] つぎに、 PLCの周辺装置 1は、修正箇所が属していたレコード 116の開始ステップ No. 121より、同じグループに属しているシーケンスプログラム部分がある力、すなわ ち他にレコード 116に属している(修正前のシーケンスプログラム部分を含む)シーケ ンスプログラム部分があるかをチェックする (ステップ S 15)。  [0049] Next, the peripheral device 1 of the PLC determines that the sequence program part belonging to the same group has the power from the start step No. 121 of the record 116 to which the correction point belongs, that is, the record 116. It is checked whether there is a sequence program part that belongs (including the sequence program part before modification) (step S15).
[0050] ここで、他にレコード 116に属しているシーケンスプログラム部分がない場合には( ステップ S15否定)、修正箇所が属していたレコードの開始ステップ No.が空欄の場 合には、該レコードを破棄して (ステップ S19)、処理を終了する。  [0050] Here, if there is no other sequence program part belonging to the record 116 (No in step S15), if the start step number of the record to which the correction point belongs is blank, the record Is discarded (step S19), and the process is terminated.
[0051] 一方、他にレコード 116に属しているシーケンスプログラム部分がある場合には(ス テツプ S 15肯定)、最初の修正候補であるプログラム部分を表示装置 3における表示 において強調表示することにより、ユーザに対して修正の影響箇所を通知するととも に、ユーザに当該箇所の修正の要否(「修正する Z修正しな 、」 )の指示を要求する( ステップ S16)。この例では、レコード 116の開始ステップ No. 121に「7」ステップで 開始するシーケンスプログラム部分が属して 、る。 [0051] On the other hand, if there is another sequence program part belonging to the record 116 (Yes at step S15), the program part which is the first correction candidate is displayed on the display device 3. By highlighting at step S16, the user is notified of the location affected by the correction, and the user is requested to indicate whether the location needs to be corrected ("Z to correct, do not correct") (step S16). . In this example, the sequence program part starting at step “7” belongs to the start step No. 121 of record 116.
[0052] この場合には、たとえば図 10— 5に示すような修正候補一覧画面 123が表示装置 3に表示され、修正したシーケンスプログラムの修正箇所の開始ステップ No. 124と 、レコード 116に登録されている開始ステップ No. 125と、が表示される。また、これと ともに、図 10— 3に示すような修正されたシーケンスプログラム 104において、最初の 修正候補であるシーケンスプログラム部分 122を強調表示する。これにより、 PLCの 周辺装置 1は、ユーザに対して修正の影響箇所を通知するとともに、ユーザに当該 箇所の修正の要否(「修正する Z修正しな 、」 )の指示を要求する。  [0052] In this case, for example, a correction candidate list screen 123 as shown in FIG. 10-5 is displayed on the display device 3, and is registered in the start step No. 124 of the corrected portion of the corrected sequence program and in the record 116. Start step No. 125 is displayed. At the same time, in the modified sequence program 104 as shown in FIG. 10-3, the sequence program portion 122 which is the first modification candidate is highlighted. As a result, the peripheral device 1 of the PLC notifies the user of the location affected by the correction, and requests the user whether or not the location needs to be corrected (“Z to correct, do not correct”).
[0053] また、修正候補が複数ある場合には、図 10— 5に示すような修正候補一覧画面 12 3において修正候補 125が複数表示され、ユーザによって選択されたシーケンスプロ グラム部分が強調表示される。そして、 PLCの周辺装置 1は、修正適用指示情報が 入力されたカゝ否かを判断する (ステップ S17)。  [0053] When there are a plurality of correction candidates, a plurality of correction candidates 125 are displayed on the correction candidate list screen 123 as shown in FIG. 10-5, and the sequence program portion selected by the user is highlighted. The Then, the peripheral device 1 of the PLC determines whether or not the correction application instruction information has been input (step S17).
[0054] ユーザは、修正候補一覧画面 123と、修正されたシーケンスプログラム 104におい て修正候補箇所として強調表示されたシーケンスプログラム部分 122と、を見て、修 正を適用する力否かを決定することができる。これにより、ユーザは、修正の必要箇 所を見落とすことなく確実に且つ作業効率良ぐシーケンスプログラムの修正を行うこ とが可能となる。  [0054] The user determines whether or not to apply the correction by looking at the correction candidate list screen 123 and the sequence program portion 122 highlighted as the correction candidate portion in the corrected sequence program 104. be able to. As a result, the user can reliably correct the sequence program with good work efficiency without overlooking the necessary portions.
[0055] そして、修正候補箇所として強調表示されたシーケンスプログラム部分 122の修正 を行う場合には、ユーザは、修正候補に対して修正を適用する旨の修正適用指示情 報を、入力装置 2を使用して PLCの周辺装置 1に入力する。  [0055] When the sequence program portion 122 highlighted as the correction candidate portion is to be corrected, the user uses the input device 2 to display correction application instruction information for applying the correction to the correction candidate. Used to input to the peripheral device 1 of the PLC.
[0056] たとえば、この例では、ユーザは修正候補一覧画面 123に修正候補 125毎に用意 されて!/ヽるチェックボックス 126〖こチェックを入れ、選択修正ボタン 127を選択すること で、修正候補に対して修正を適用するための修正適用指示情報を入力する。  [0056] For example, in this example, the correction candidate list screen 123 is prepared for each correction candidate 125! Check box 126 is selected for each correction candidate, and the selected correction button 127 is selected to select the correction candidate. The correction application instruction information for applying the correction is input.
[0057] また、全ての修正候補に対して修正を適用する場合には、ユーザはその旨の修正 適用指示情報を入力装置 2を使用して PLCの周辺装置 1に入力する。たとえば、ュ 一ザは、修正候補一覧画面 123の全修正ボタン 128を選択する。また、修正候補に 対して修正を適用しない場合は、その旨の修正不適用指示情報を入力装置 2を使用 して PLCの周辺装置 1に入力する。たとえば、ユーザは、修正候補一覧画面 123の キャンセルボタン 129を選択する。 In addition, when a correction is applied to all correction candidates, the user inputs correction application instruction information to that effect to the peripheral device 1 of the PLC using the input device 2. For example, The user selects the all correction button 128 on the correction candidate list screen 123. If the correction is not applied to the correction candidate, the correction non-application instruction information to that effect is input to the peripheral device 1 of the PLC using the input device 2. For example, the user selects the cancel button 129 on the correction candidate list screen 123.
[0058] ユーザが修正候補に対して修正を適用することを選択した場合、すなわち PLCの 周辺装置 1が修正適用指示情報を受信した場合には (ステップ S17肯定)、 PLCの 周辺装置 1は、図 10— 4に示すレコード 116から開始ステップ No. 121 (ここでは「7」 )をレコード 117の開始ステップ No. 121に移動する(ステップ S20)。開始ステップ N o.を移動した後のプログラムブロックテーブル 130を図 10— 6に示す。図 10— 6に 示すように、レコード 116は開始ステップ No.が空欄となったレコード 131として更新 される。また、レコード 117は、レコード 116から開始ステップ No. (ここでは「7」)が移 動されたレコード 132として更新される。そして、ステップ S18に進む。  [0058] When the user selects to apply the correction to the correction candidate, that is, when the peripheral device 1 of the PLC receives the correction application instruction information (Yes in step S17), the peripheral device 1 of the PLC The start step No. 121 (here “7”) from the record 116 shown in FIG. 10-4 is moved to the start step No. 121 of the record 117 (step S20). The program block table 130 after moving the start step No. is shown in Figure 10-6. As shown in Figure 10-6, record 116 is updated as record 131 whose start step number is blank. Further, the record 117 is updated as the record 132 in which the start step number (here “7”) is moved from the record 116. Then, the process proceeds to step S18.
[0059] 一方、ステップ S17に戻って、ユーザが修正候補に対して修正を適用しないことを 選択した場合、すなわち PLCの周辺装置 1が修正適用指示情報を受信しない場合( 修正不適用指示情報を受信した場合)には (ステップ S17否定)、 PLCの周辺装置 1 はレコード 131の開始ステップ No. 136を参照して、他に修正候補がないかをチエツ クする (ステップ S 18)。  [0059] On the other hand, returning to step S17, if the user selects not to apply the correction to the correction candidate, that is, if the peripheral device 1 of the PLC does not receive the correction application instruction information (the correction non-application instruction information is displayed). If received (No at step S17), the peripheral device 1 of the PLC refers to the start step No. 136 of the record 131 and checks whether there are other correction candidates (step S18).
[0060] ここで、他に修正候補がない場合は (ステップ S 18否定)、 PLCの周辺装置 1は、プ ログラムブロックテーブル 130の開始ステップ No. 136を参照して、開始ステップ No .が空欄のレコードを削除する(ステップ S19)。この例の場合には、レコード 131を削 除する。このようにして、レコード 131が削除された後のプログラムブロックテーブル 1 37を図 10— 7に示す。なお、 PLCの周辺装置 1が修正適用指示情報を受信した場 合 (修正不適用指示情報を受信した場合)には (ステップ S17否定)、プログラムプロ ックテーブルはレコード 116、 117のままである。  [0060] If there is no other candidate for correction (No at step S18), the peripheral device 1 of the PLC refers to the start step No. 136 of the program block table 130, and the start step No. is blank. Is deleted (step S19). In this example, record 131 is deleted. FIG. 10-7 shows the program block table 137 after the record 131 is deleted in this way. When the peripheral device 1 of the PLC receives the modification application instruction information (when the modification non-application instruction information is received) (No at step S17), the program block table remains records 116 and 117.
[0061] また、ステップ S 18で、他に修正候補が存在した場合には (ステップ S 18肯定)、次 の修正候補を強調表示することで、ユーザに修正する否かの判断を促してユーザに 修正の要否(「修正する Z修正しな 、」 )の指示を要求し (ステップ S21)、ステップ S 1 7に戻る。 [0062] 上述した例では、過去に作成したシーケンスプログラム力 ユーザの指定したシー ケンスプログラムの一部を流用した際に、流用元箇所および流用先箇所をグループ( 一括)化して管理することによって、流用元または流用先シーケンスプログラムの一部 を修正した場合に、ユーザに対して流用元箇所または全ての流用先箇所への影響 箇所を表示、通知した後に、影響箇所に修正を適用する手順を示した。 [0061] If another correction candidate exists in step S18 (Yes in step S18), the next correction candidate is highlighted to prompt the user to determine whether or not to correct. Is requested to make a correction (“Z to correct, do not correct”) (step S21), and the process returns to step S17. [0062] In the above-described example, when a part of a sequence program specified by the user is diverted, the diversion source location and the diversion destination location are managed as a group (collective), This section describes the procedure for applying corrections to affected locations after displaying and notifying the affected locations on the diversion source location or all diversion destination locations to the user when a part of the diversion source or diversion destination sequence program is modified. It was.
[0063] つぎに、図 11および図 12— 1〜図 12— 6を用いて、 PLCの周辺装置システムが上 述した手順により流用したシーケンスプログラムの一部を修正した際に、ユーザに対 して試験マトリクスを表示し、プログラムブロックテーブルより影響範囲となるシーケン スプログラムブロックを通知し、また、ユーザが影響範囲の試験を実施または非実施 を選択し、選択したプログラムブロックの試験マトリクスを作成するまでの手順を説明 する。 [0063] Next, referring to FIG. 11 and FIG. 12-1 to FIG. 12-6, when a part of the sequence program diverted by the PLC peripheral device system according to the procedure described above is corrected, the user is notified. Display the test matrix, notify the sequence program block that is in the affected area from the program block table, and select whether to execute or not to perform the affected area test, and create a test matrix for the selected program block The procedure up to is explained.
[0064] 図 11は、本実施の形態に力かる PLCの周辺装置 1においてシーケンスプログラム ブロックの試験を実施する際に試験マトリクステーブルを作成する処理の流れを説明 するフローチャートである。また、図 12— 1〜図 12— 6は、本実施の形態に力かる PL Cの周辺装置 1においてシーケンスプログラムブロックの試験を実施する際に試験マ トリタステーブルを作成する場合のデータの変化を説明するための図である。  FIG. 11 is a flowchart for explaining the flow of processing for creating a test matrix table when a sequence program block test is performed in the peripheral device 1 of the PLC, which is useful for the present embodiment. Also, Fig. 12-1 to Fig. 12-6 show changes in data when creating a test matrix table when a sequence program block test is performed in the peripheral device 1 of the PLC that is useful in this embodiment. It is a figure for demonstrating.
[0065] 以下の例では、 PLCの周辺装置システムにおいてシーケンスプログラムの修正箇 所の試験マトリクスを表示し、類似となる試験マトリクスとなる範囲の試験を実施または 非実施を選択する画面を表示し、ユーザが選択した試験実施範囲の試験マトリクス を表示するところまで説明する。  [0065] In the following example, the test matrix of the modification part of the sequence program is displayed in the peripheral device system of the PLC, and a screen for selecting whether or not to perform tests in a range that becomes a similar test matrix is displayed. The procedure up to displaying the test matrix of the test execution range selected by the user will be described.
[0066] 本実施の形態において PLCの周辺装置 1で作成される試験マトリクステーブル 150 を図 13に示す。これは、ユーザが作成したシーケンスプログラム中の、ユーザが選択 したシーケンスプログラムブロック力も作成する試験マトリクステーブルである。試験マ トリタステーブル 150は、命令部分とアドレス部分との組み合わせデータ (命令部分 Z アドレス) 151が(管理 No. ) 154と対応付けられて格納されている。  FIG. 13 shows a test matrix table 150 created in the peripheral device 1 of the PLC in the present embodiment. This is a test matrix table that also creates the sequence program block force selected by the user in the sequence program created by the user. In the test matrix table 150, combination data (instruction part Z address) 151 of an instruction part and an address part is stored in association with (Management No.) 154.
[0067] また、試験マトリクスの作成時に使用する命令テーブル 160を図 14に示す。命令テ 一ブル 160は、命令部分 162と、これに対応した(管理 NO. ) 161とによりなる。  Further, FIG. 14 shows an instruction table 160 used when creating the test matrix. The instruction table 160 includes an instruction part 162 and a (management No.) 161 corresponding thereto.
[0068] 上記において説明した流用処理が完了した状態のシーケンスプログラムデータ 17 0 (図 8— 6に対応)およびプログラムブロックテーブル 175 (図 8— 5に対応)をそれぞ れ図 12—1および図 12— 2に示す。 012- 1に示したシーケンスプログラムデータ 1 70においては、流用元のシーケンスプログラム部分 171および流用後のシーケンス プログラム部分 172が含まれている。この流用後のシーケンスプログラム部分 172は 、流用元のシーケンスプログラム部分 171をコピーして貼り付け、デバイス番号の変 更が完了した状態である。流用元のシーケンスプログラム部分 171と流用後のシーケ ンスプログラム部分 172とは、プログラムブロックテーブル 175の識別子 176に割り当 てられている。 [0068] Sequence program data in a state where the diversion process described above is completed 17 0 (corresponding to Fig. 8-6) and program block table 175 (corresponding to Fig. 8-5) are shown in Fig. 12-1 and Fig. 12-2, respectively. The sequence program data 170 shown in 012-1 includes a diversion source sequence program portion 171 and a diversion sequence program portion 172. The diverted sequence program part 172 is a state where the diversion source sequence program part 171 is copied and pasted, and the change of the device number is completed. The diversion source sequence program portion 171 and the diversion sequence program portion 172 are assigned to the identifier 176 of the program block table 175.
[0069] 以下、処理の流れに沿って説明する。まず、修正したプログラムデータ部分にお!ヽ て試験を実施したい箇所としてプログラムデータ部分 171を選択するために、プログ ラムデータ部分 171を選択する旨のデータ選択指示情報をユーザが入力装置 2を使 用して PLCの周辺装置 1に入力する。 PLCの周辺装置 1は、上記のデータ選択指示 情報を受信すると (ステップ S41)、該データ選択指示情報に従ってシーケンスプログ ラム部分 171を選択し、選択したシーケンスプログラム部分 171の命令部分 173を、 図 14の命令テーブル 160で検索して試験マトリクスを作成する(ステップ S42)。  [0069] Hereinafter, a description will be given along the flow of processing. First, in order to select the program data portion 171 as the location to be tested for the corrected program data portion, the user uses the input device 2 to select data selection instruction information for selecting the program data portion 171. Input to the peripheral device 1 of the PLC. When the peripheral device 1 of the PLC receives the data selection instruction information (step S41), the PLC peripheral device 1 selects the sequence program part 171 in accordance with the data selection instruction information, and selects the instruction part 173 of the selected sequence program part 171 as shown in FIG. A test matrix is created by searching the instruction table 160 (step S42).
[0070] ここで、該当する命令が図 14の命令テーブル 160に存在した場合は、図 12— 3に 示すような試験マトリクス 178の(命令 Zアドレス)の入力欄 179に、シーケンスプログ ラム部分 171の命令部分 173とアドレス部分 174とをコピーする。  [0070] Here, if the corresponding instruction exists in the instruction table 160 of FIG. 14, the sequence program portion 171 is entered in the (instruction Z address) input field 179 of the test matrix 178 as shown in FIG. 12-3. The instruction part 173 and the address part 174 are copied.
[0071] 一方、該当する命令が図 14の命令テーブルに存在しなかった場合は、図 12— 3に 示すような試験マトリクス 178の出力結果 196の欄に、シーケンスプログラム部分 171 の命令部分 173とアドレス部分 174とをコピーし、アドレスの状態による試験パターン を試験マトリクス 178の試験アドレス状態 195の欄に表示する。  On the other hand, if the corresponding instruction does not exist in the instruction table of FIG. 14, the instruction part 173 of the sequence program part 171 is displayed in the column of the output result 196 of the test matrix 178 as shown in FIG. 12-3. The address part 174 is copied, and the test pattern according to the address state is displayed in the test address state 195 column of the test matrix 178.
[0072] つぎに、 PLCの周辺装置 1は、シーケンスプログラム部分 171の(開始ステップ No . ) 193を、プログラムブロックテーブル 175の(開始ステップ No. ) 177で検索する。 ここでは、開始ステップ No.として「0」をプログラムブロックテーブル 175の(開始ステ ップ No. ) 177で検索する(ステップ S43)。  Next, the peripheral device 1 of the PLC searches the (start step number) 193 of the sequence program portion 171 with the (start step number) 177 of the program block table 175. Here, “0” is searched for (start step number) 177 in the program block table 175 as the start step number (step S43).
[0073] 該当する開始ステップが存在した場合には、 PLCの周辺装置 1は、(開始ステップ No. ) 177の中に、次の開始ステップ No.があるか否かを判別する。この場合には、 開始ステップ No. 「0」がプログラムブロックテーブル 175の(開始ステップ No. ) 177 に存在するので、 PLCの周辺装置 1は、次の開始ステップ No.があるか否かを判別 する。そして、この場合には、(開始ステップ No) . 177の中に開始ステップ No.とし て「6」が存在する。 When the corresponding start step exists, the peripheral device 1 of the PLC determines whether or not the next start step number is included in (start step number) 177. In this case, Since the start step number “0” exists in the (start step number) 177 of the program block table 175, the peripheral device 1 of the PLC determines whether or not there is a next start step number. In this case, “Start Step No.” 177 includes “6” as the start step number.
[0074] この場合には、 PLCの周辺装置 1は、図 12— 2に示すようにこの次の開始ステップ No.の候補である開始ステップ No. 「6」から、図 12— 2に示す使用ステップ数 182 の範囲 (4ステップ分)を、表示装置 3に表示された図 12— 4に示すような試験マトリク ス作成選択画面 184において強調表示することにより、ユーザに試験の実施または 非実施の判断を促す (ステップ S44)。  In this case, the peripheral device 1 of the PLC is used as shown in FIG. 12-2 from the start step number “6” that is a candidate for the next start step number as shown in FIG. 12-2. By highlighting the range of 182 steps (4 steps) on the test matrix creation selection screen 184 as shown in Fig. 12-4 displayed on the display device 3, the test execution or non-execution is shown to the user. Prompt decision (step S44).
[0075] 図 12— 4に示す試験マトリクス作成選択画面 184においては、シーケンスプロダラ ム部分 185が強調表示されている。そして、 PLCの周辺装置 1は、次の開始ステップ があるかどうかを判断する (ステップ S45)。次の開始ステップがある場合は (ステップ S45肯定)、ステップ S43に戻ってプログラムブロックテーブルの開始ステップの次候 補が終了するまで、同様の処理を繰り返す。  [0075] In the test matrix creation selection screen 184 shown in Fig. 12-4, the sequence program portion 185 is highlighted. Then, the peripheral device 1 of the PLC determines whether there is a next start step (step S45). If there is a next start step (Yes at step S45), the process returns to step S43 and the same processing is repeated until the next candidate for the start step of the program block table is completed.
[0076] 次の開始ステップがな!/、場合は (ステップ S45否定)、ユーザは試験マトリクス作成 を実施するカゝ否かを判断し、選択する。これにより、ユーザは、試験マトリクス作成選 択画面 184で強調表示されたシーケンスプログラム部分 185を見て、試験マトリクス の作成の実施または非実施を決定することができる。これにより、ユーザは試験の実 施、または非実施の判別を容易に行うことができ、また、類似の試験である場合には 省略することができ、試験を効率ィ匕することができる。  [0076] If there is no next start step! / (No in step S45), the user determines whether or not to execute the test matrix creation and selects it. As a result, the user can determine whether or not to create the test matrix by looking at the sequence program portion 185 highlighted on the test matrix creation selection screen 184. As a result, the user can easily determine whether the test is performed or not, and if the test is similar, it can be omitted, and the test can be performed efficiently.
[0077] 試験を行う場合には、ユーザは、所望の試験候補を指定する指定指示情報を入力 装置 2を使用して PLCの周辺装置 1に入力する。 PLCの周辺装置 1は、この指定指 示情報を受信すると (ステップ S46)、該指定指示情報に従って、指定された試験候 補に対して試験マトリクスを作成を開始する。  [0077] When performing a test, the user inputs designation instruction information for designating a desired test candidate to the peripheral device 1 of the PLC using the input device 2. When the peripheral device 1 of the PLC receives this designated instruction information (step S46), it starts to create a test matrix for the designated test candidate according to the designated instruction information.
[0078] たとえば試験マトリクス作成選択画面 184においては、ユーザは、試験候補ごとに 用意されているチェックボックス 186のうち所望のものにチェックを入れ、実行ボタン 1 87を選択する。  For example, on the test matrix creation selection screen 184, the user checks a desired one of the check boxes 186 prepared for each test candidate and selects the execution button 1 87.
[0079] PLCの周辺装置 1は、試験マトリクス 178をコピーして該試験マトリクス 178と同じ新 たな試験マトリクス 191を作成する (ステップ S47)。つぎに、コピーした試験マトリクス のデバイスをシーケンスプログラムテーブルの開始ステップと使用ステップにより算出 して置き換える。すなわち、図 12— 5に示すシーケンスプログラム部分のアドレス部 分 190を、図 12— 6【こ示すよう【こ試験マトリクス 191の(命令/ ド、レス) 192の欄【こ ピーする(ステップ S48)。 [0079] The peripheral device 1 of the PLC copies the test matrix 178 and creates the same new as the test matrix 178. A new test matrix 191 is created (step S47). Next, the copied test matrix device is calculated and replaced by the start and use steps of the sequence program table. That is, copy the address part 190 of the sequence program part shown in Fig. 12-5 to the column 192 (command / do, less) 192 of the test matrix 191 (shown in step S48). .
[0080] そして、 PLCの周辺装置 1は、次の試験候補があるかどうかを判断する (ステップ S 49)。次の試験候補がある場合には (ステップ S49肯定)、ステップ S47に戻って、 PL Cの周辺装置 1は、先にユーザが試験マトリクス作成選択画面 184において選択した シーケンスプログラムの試験候補の全てに対して、同様の処理を繰り返し、試験候補 が無くなった時点で (ステップ S49否定)試験マトリクスの作成を終了する。  Then, the peripheral device 1 of the PLC determines whether there is a next test candidate (step S 49). If there is a next test candidate (Yes in step S49), the process returns to step S47, and the PLC peripheral device 1 includes all of the sequence program test candidates previously selected on the test matrix creation selection screen 184 by the user. On the other hand, the same processing is repeated, and when there are no more test candidates (No at step S49), the creation of the test matrix is terminated.
[0081] 上述したように本実施の形態に力かる PLCの周辺装置 1によれば、シーケンスプロ グラムの一部を複製して他の複数箇所に流用したシーケンスプログラムに対して試験 を行う際に、修正箇所と修正の影響箇所とに対する試験項目をプログラムブロックテ 一ブルから自動生成し、且つ、プログラムブロックテーブル力 作成した試験項目は 類似の試験項目となるため、ユーザに試験の実施、または非実施の判別をさせること により、類似の試験を省略することができ、試験を効率ィ匕することができる。  [0081] As described above, according to the peripheral device 1 of the PLC that works with the present embodiment, when a test is performed on a sequence program in which a part of the sequence program is duplicated and used in other places. Test items for the correction part and the affected part of the correction are automatically generated from the program block table, and the test items created by the program block table are similar test items. By determining the execution, similar tests can be omitted and the tests can be made more efficient.
[0082] つぎに、前記の手順により作成した試験マトリクスの中から、 V、ずれかひとつの試験 をユーザが手動により実施し、同じグループに属する試験マトリクスが類似となるもの に対してはその試験手順と試験結果とを適用する場合にっ 、て図 15— 1および図 1 5— 2および図 16— 1〜図 16— 10を用いて説明する。図 15— 1は、 PLCの周辺装 置 1においてシーケンスプログラムブロックの試験をユーザが手動で実施する際に、 試験手順テーブルを作成する処理の流れを説明するフローチャートである。図 15— 2は、 PLCの周辺装置 1により作成した試験手順テーブルを、他の試験マトリクステー ブルに適用する処理の流れを説明するフローチャートである。 [0082] Next, among the test matrices created by the above-described procedure, the user manually performs a test for V or one of them, and if the test matrices belonging to the same group are similar, the test is performed. The procedure and test results will be explained with reference to Fig. 15-1, Fig. 15-2, and Fig. 16-1 to Fig. 16-10. FIG. 15-1 is a flowchart for explaining the flow of processing for creating the test procedure table when the user manually executes the test of the sequence program block in the peripheral device 1 of the PLC. FIG. 15-2 is a flowchart for explaining the flow of processing for applying the test procedure table created by the peripheral device 1 of the PLC to other test matrix tables.
[0083] 以下の例では、ユーザがシーケンスプログラムの修正箇所のうちのいずれかひとつ の試験マトリクスの試験を実行した際に、試験手順と試験結果とを記憶して、同一の プログラムブロックテーブルに属する類似となる試験マトリクスの試験に適用するまで の手順を説明する。 [0084] 上述した試験マトリクスの作成が完了した状態のシーケンスプログラムデータ 250を 図 16— 1に示す。図 16— 1に示したシーケンスプログラムデータ 250においては、該 シーケンスプログラムデータ 250を作成する際に使用した流用元のシーケンスプログ ラム部分 251および流用後のシーケンスプログラム部分 252が含まれている。ここで 、シーケンスプログラムデータ 250においてプログラムブロック 251とプログラムブロッ ク 252とに対しては、前記の方法により試験マトリクスの作成が完了している。また、 上述した方法で作成した試験マトリクス 253を図 16— 2に示す。 [0083] In the following example, when the user executes a test of any one of the correction portions of the sequence program, the test procedure and the test result are stored and belong to the same program block table. The procedure until application to the test of a similar test matrix is explained. FIG. 16-1 shows the sequence program data 250 in a state where the creation of the test matrix described above is completed. The sequence program data 250 shown in FIG. 16-1 includes a diversion source sequence program portion 251 and a diverted sequence program portion 252 used when the sequence program data 250 is created. Here, with respect to the program block 251 and the program block 252 in the sequence program data 250, the creation of the test matrix is completed by the above method. Figure 16-2 shows the test matrix 253 created by the method described above.
[0085] 以下、処理の流れに沿って説明する。まず、ユーザがシーケンスプログラムデータ 2 50におけるシーケンスプログラム部分 251に対して、試験マトリクス 253を使用して手 動で試験を実施する。  Hereinafter, a description will be given along the flow of processing. First, the user manually tests the sequence program portion 251 in the sequence program data 250 using the test matrix 253.
[0086] 修正したシーケンスプログラムデータ 250から試験を行うシーケンスプログラム部分 としてシーケンスプログラム部分 251を選択して所望の試験を開始するために、入力 装置 2を使用してユーザが試験開始指示情報 ·データ選択指示情報を PLCの周辺 装置 1に入力する。 PLCの周辺装置 1は、上記の試験開始指示情報'データ選択指 示情報を受信すると (ステップ S61)、該指示情報に従って試験処理、試験の記録開 始を実行する (ステップ S62)。  [0086] In order to select the sequence program part 251 as the sequence program part to be tested from the modified sequence program data 250 and start the desired test, the user uses the input device 2 to start the test start instruction information and data selection. Input the instruction information to the peripheral device 1 of the PLC. When the peripheral device 1 of the PLC receives the above-mentioned test start instruction information 'data selection instruction information (step S61), it executes test processing and test recording start according to the instruction information (step S62).
[0087] つぎに、ユーザが、試験対象のデバイスの動作を切り換える(ONまたは OFFする) 切り替え指示情報を入力装置 2を使用して PLCの周辺装置 1に入力する。ここでは、 たとえば試験対象となるシーケンスプログラム部分 251を図 16— 3に示すようにラダ 一プログラム 263で表したアドレス部分 264を ONにする切り替え指示情報を入力装 置 2を使用して PLCの周辺装置 1に入力する。 PLCの周辺装置 1は、該切り替え指 示情報を受信して (ステップ S63)、該指示情報に従ってアドレス部分 264 (「X2」 )を ONにする(ステップ S64)。  [0087] Next, the user switches the operation of the device under test (turns on or off). The switching instruction information is input to the peripheral device 1 of the PLC using the input device 2. Here, for example, the sequence program part 251 to be tested is switched to the address part 264 represented by the ladder program 263 as shown in Fig. 16-3. Input to device 1. The peripheral device 1 of the PLC receives the switching instruction information (step S63) and turns on the address portion 264 (“X2”) according to the instruction information (step S64).
[0088] つぎに、 PLCの周辺装置 1は、ユーザによって動作切り替えが指示されたデバイス  [0088] Next, the peripheral device 1 of the PLC is a device instructed to switch operation by the user.
(アドレス部分)の該当 No.とデバイス状態 (アドレス状態)との情報を取得する (ステ ップ S65)。そして、 PLCの周辺装置 1は、アドレス部分 264である「X2」が試験マトリ タス 253のアドレス 276において対応する番号 274を、図 16— 4に示すような試験手 順テーブル 256におけるアドレス番号の入力欄 260に値を追加する。ここでは、ユー ザが指示したアドレス「X2」は、試験マトリクス 253のアドレス番号「3」の列にあるため 、「3」を試験手順テーブル 256のアドレス番号の入力欄 260に追加する。また、デバ イス「X2」は ONにされて!、るため、アドレス状態の入力欄 261に「 1」を追加する。 Acquire information on the corresponding No. (address part) and device status (address status) (step S65). Then, the peripheral device 1 of the PLC inputs the address number 274 in the test procedure table 256 as shown in Fig. 16-4, with the address portion 264 "X2" corresponding to the address 276 in the test matrix 253. Add a value in column 260. Here, you Since the address “X2” instructed by the user is in the column of the address number “3” of the test matrix 253, “3” is added to the address number input field 260 of the test procedure table 256. Since the device “X2” is turned ON !, “1” is added to the address status input field 261.
[0089] つぎに、 PLCの周辺装置 1は、シーケンスプログラム部分 263のアドレス部分 271 の状態と同じ状態力 試験マトリクス 253のアドレス部分 275の中に存在する力否か を検索し、判定する(ステップ S66)。ここで、シーケンスプログラム部分 263のァドレ ス 271と同じ状態が試験マトリクス 253のアドレス部分 275中に見つ力つた場合には( ステップ S66肯定)、図 16— 5に示すように 254 (この場合アドレス 254の「Y1」)の状 態に、シーケンスプログラム部分 263のアドレス部分 266の値を試験マトリクス 267の 出力結果の入力欄 268に設定し (ステップ S67)、次のステップであるステップ S68に 進む。 [0089] Next, the peripheral device 1 of the PLC searches for and determines whether or not the force exists in the address portion 275 of the sequence force test matrix 253 that is the same as the state of the address portion 271 of the sequence program portion 263 (step S66). If the same state as the address 271 in the sequence program part 263 is found in the address part 275 of the test matrix 253 (Yes in step S66), 254 (in this case the address is shown) as shown in Figure 16-5. In the state of “Y1” of 254), the value of the address part 266 of the sequence program part 263 is set in the input field 268 of the output result of the test matrix 267 (step S67), and the process proceeds to the next step, step S68.
[0090] 一方、シーケンスプログラム部分 263のアドレス 271と同じ状態が試験マトリクス 253 のアドレス部分 275中に見つからない場合には (ステップ S66否定)、そのまま次のス テツプであるステップ S68に進む。  On the other hand, if the same state as the address 271 of the sequence program part 263 is not found in the address part 275 of the test matrix 253 (No at Step S66), the process proceeds to the next step, Step S68.
[0091] つぎに、 PLCの周辺装置 1は、次の試験候補があるか否か、すなわち次の切り替え 指示情報の受信があるか否かを判定する (ステップ S68)。つぎの試験候補がある場 合、すなわち次の切り替え指示情報の受信がある場合には (ステップ S68肯定)、ス テツプ S63〖こ戻る。  Next, the peripheral device 1 of the PLC determines whether or not there is a next test candidate, that is, whether or not the next switching instruction information has been received (step S68). If there is the next test candidate, that is, if the next switching instruction information is received (Yes at step S68), the process returns to step S63.
[0092] また、次の試験候補がな 、場合、すなわち次の切り替え指示情報の受信がな!、場 合には (ステップ S68否定)、 PLCの周辺装置 1は、試験マトリクス 267を表示装置 3 に表示する。ユーザは、試験が終了した試験マトリクス 267の出力結果 268を目視で 確認し、試験結果に問題がある力否かを判定することができる。  [0092] If there is no next test candidate, that is, the next switching instruction information is not received! In this case (No at Step S68), the peripheral device 1 of the PLC displays the test matrix 267 on the display device 3. The user can visually check the output result 268 of the test matrix 267 for which the test has been completed, and determine whether or not there is a problem with the test result.
[0093] ここで、試験結果に問題があった場合は、前述の試験手順と試験結果とが適用で きないため、ユーザは、試験の終了指示情報を入力装置 2を使用して PLCの周辺装 置 1に入力する。 PLCの周辺装置 1は、終了指示情報を受信した力どうかをチェック する (ステップ S69)。 PLCの周辺装置 1は該終了指示情報を受信した場合には (ス テツプ S69肯定)、該終了指示情報に従って一連の処理を終了する。  [0093] Here, if there is a problem with the test result, the test procedure and the test result described above cannot be applied, so the user uses the input device 2 to send the test end instruction information to the periphery of the PLC. Input to device 1. The peripheral device 1 of the PLC checks whether it has received the end instruction information (step S69). When the peripheral device 1 of the PLC receives the end instruction information (Yes at step S69), the series of processing ends according to the end instruction information.
[0094] 一方、試験結果に問題が無い場合は、ユーザは試験結果に問題が無い旨の情報 を試験マトリクス 267の試験結果の入力欄 270に設定するための指示情報を入力す る。 PLCの周辺装置 1は、該指示情報に従って試験結果に問題が無い旨の情報を 図 16— 5に示すように試験マトリクス 267の試験結果の入力欄 270の欄に設定する。 図 16— 5にお 、ては、試験結果に問題が無 、場合に「〇」印を記入して 、る。 [0094] On the other hand, if there is no problem in the test result, the user is informed that there is no problem in the test result. Enter the instruction information to set in the test result input field 270 of the test matrix 267. The peripheral device 1 of the PLC sets information indicating that there is no problem in the test result in accordance with the instruction information in the column of the test result input field 270 of the test matrix 267 as shown in Fig. 16-5. In Fig. 16-5, if there is no problem in the test result, enter a “○” mark.
[0095] そして、 PLCの周辺装置 1は、試験マトリクスが類似したものとなる図 16— 1に示す シーケンスプログラム部分 252の試験マトリクスに、前述の試験手順と試験結果との 適用を開始する。シーケンスプログラム部分 252の試験マトリクス 285を図 16— 6に 示す。 Then, the peripheral device 1 of the PLC starts applying the above-described test procedure and test results to the test matrix of the sequence program part 252 shown in FIG. 16-1, which has a similar test matrix. Figure 16-6 shows the test matrix 285 of the sequence program part 252.
[0096] PLCの周辺装置 1は、図 16— 7に示すようなシーケンスプログラム部分 251に対す る試験手順テーブル 280のアドレス番号とアドレス状態とのデータ 281を 1列ずつ読 み出す。つぎに、 PLCの周辺装置 1は、読み出したデータ 281のアドレス番号に対 応するアドレスを、図 16— 6に示す試験マトリクス 285の命令 Zアドレスの欄力も読み 出す。  [0096] The peripheral device 1 of the PLC reads the data 281 of the address number and address state of the test procedure table 280 for the sequence program part 251 as shown in Fig. 16-7 one column at a time. Next, the peripheral device 1 of the PLC also reads the field corresponding to the instruction Z address in the test matrix 285 shown in Figure 16-6 for the address corresponding to the address number of the read data 281.
[0097] つぎに、 PLCの周辺装置 1は、図 16— 8に示すシーケンスプログラム部分 252のラ ダー表示 282において、前記の試験マトリクス 285から読み出したアドレスに、先に試 験手順テーブル 280から読み出したデータ 281のアドレス状態の値を設定する (ステ ップ S70)。  Next, the peripheral device 1 of the PLC reads from the test procedure table 280 first to the address read from the test matrix 285 in the ladder display 282 of the sequence program part 252 shown in FIG. 16-8. Set the value of the address status of the data 281 (Step S70).
[0098] ここの例では、 PLCの周辺装置 1は、まずアドレス番号とアドレス状態とのデータ 28 1として、アドレス番号「3」とアドレス状態「1」とを読み出す。つぎに、 PLCの周辺装置 1は、読み出したデータ 281のアドレス番号「3」に対応するアドレス番号「X200」を試 験マトリクス 285の命令 Zアドレスの欄力 読み出す。そして、 PLCの周辺装置 1は、 シーケンスプログラムのラダー表示 282において前記の試験マトリクス 285から読み 出したアドレス番号「3」に対応するアドレス「X200」298に、先に試験手順テーブル 280から読み出したデータ 281のアドレス状態の値「1」を設定する。  In this example, the peripheral device 1 of the PLC first reads the address number “3” and the address state “1” as the data 28 1 of the address number and the address state. Next, the peripheral device 1 of the PLC reads the address number “X200” corresponding to the address number “3” of the read data 281 and reads the command Z address field of the test matrix 285. Then, the peripheral device 1 of the PLC reads the data previously read from the test procedure table 280 into the address “X200” 298 corresponding to the address number “3” read from the test matrix 285 in the ladder program display 282. Set 281 address status value “1”.
[0099] つぎに、 PLCの周辺装置 1は、図 16— 6に示す試験マトリクス 285のアドレス状態 2 99を検索し、シーケンスプログラム部分 282のアドレス 289の状態と同じアドレス状態 が試験マトリクス 285に存在する力否かを判定する(ステップ S71)。  [0099] Next, the peripheral device 1 of the PLC searches the address state 299 of the test matrix 285 shown in FIG. 16-6, and the same address state as the state of the address 289 in the sequence program part 282 exists in the test matrix 285. It is determined whether or not the force is to be applied (step S71).
[0100] ここで、同じアドレス状態が試験マトリクス 285のアドレス状態 299中において見つ 力 ない場合には (ステップ S71否定)、次のステップ S73に進む。 [0100] Here, the same address state is found in address state 299 of test matrix 285. If not (No at step S71), proceed to the next step S73.
[0101] 一方、ステップ S71で、同じアドレス状態が試験マトリクス 285のアドレス状態 299中 において見つ力つた場合には(この場合、アドレス状態結果 286が同じ状態となる) ( ステップ S71肯定)、出力結果アドレス 283 (この場合アドレス 283の Y100)の該当ァ ドレスとなるラダー表示 282におけるアドレス部分 284の値を取得し、試験マトリクスの 287【こ設定し (ステップ S72)、ステップ S73【こ進む。  [0101] On the other hand, in step S71, if the same address state is found in the address state 299 of the test matrix 285 (in this case, the address state result 286 is the same state) (Yes in step S71), the output Obtain the value of the address part 284 in the ladder display 282 that becomes the corresponding address of the result address 283 (in this case, Y100 of the address 283), set 287 [step S72], and proceed to step S73.
[0102] つぎに、 PLCの周辺装置 1は、試験手順テーブル 280に前記の試験結果の適用 候補のレコードがある力否かを判定する (ステップ S73)。試験結果の適用候補のレコ ードがある場合には (ステップ S73肯定)、ステップ S70に戻って、試験手順テーブル 280において試験結果の適用候補のレコードが無くなるまで同様の処理を繰り返す 。これにより、試験手順適用先の試験マトリクスが作成される。  Next, the peripheral device 1 of the PLC determines whether or not the test procedure table 280 has a record of candidates for application of the test result (step S73). If there is a record of candidates for application of test results (Yes at step S73), the process returns to step S70 and the same processing is repeated until there are no records of candidates for application of test results in the test procedure table 280. Thereby, a test matrix to which the test procedure is applied is created.
[0103] また、ステップ S73で試験結果の適用候補のレコードがない場合には (ステップ S7 3否定)、ステップ S74に進み、 PLCの周辺装置 1は、ユーザが手動で試験を実施し た、図 16— 9に示す試験手順適用元の試験マトリクス 290における試験結果 292の 1件目のレコードを読み出す。そして、 PLCの周辺装置 1は、この読み出したレコード と、図 16— 10に示す試験手順適用先の試験マトリクス 291の試験結果 294の 1件目 のレコードと、を比較してこれらが同じ値である力否かを判定する(ステップ S74)。  [0103] If there is no record of candidate application of the test result in step S73 (No in step S73), the process proceeds to step S74, and the peripheral device 1 of the PLC is manually tested by the user. Read the first record of the test result 292 in the test matrix 290 of the test procedure application source shown in 16-9. Then, the peripheral device 1 of the PLC compares this read record with the first record in the test result 294 of the test matrix 291 to which the test procedure is applied as shown in Fig. 16-10. It is determined whether or not there is a certain force (step S74).
[0104] ここで、試験手順適用元の試験マトリクス 290は、図 16— 5に示した試験マトリク 26 7が完成したものに対応する。また、試験手順適用先の試験マトリクス 291は、図 16 —6に示したシーケンスプログラム部分 252の試験マトリクス 285に対応する。  [0104] Here, the test matrix 290 to which the test procedure is applied corresponds to the completed test matrix 267 shown in Fig. 16-5. The test matrix 291 to which the test procedure is applied corresponds to the test matrix 285 of the sequence program part 252 shown in FIG. 16-6.
[0105] ステップ S74において、試験マトリクス 290の試験結果 292の 1件目のレコード値と 、試験マトリクス 291の試験結果 294の 1件目のレコード値と、が同じであった場合に は (ステップ S74肯定)、 PLCの周辺装置 1は、試験結果の入力欄 296の一件目のレ コードに、試験結果が正しい旨の結果を設定し (ステップ S75)、次のステップ S76、 に進む。図 16— 8においては、試験結果が正しい場合に「〇」印を記入している。  [0105] In step S74, if the first record value of test result 292 of test matrix 290 is the same as the first record value of test result 294 of test matrix 291 (step S74) (Yes), the peripheral device 1 of the PLC sets a result indicating that the test result is correct in the first record of the test result input field 296 (step S75), and proceeds to the next step S76. In Figure 16-8, “○” is entered when the test result is correct.
[0106] ステップ S74において、試験マトリクス 290の試験結果 292の 1件目のレコード値と 、試験マトリクス 291の試験結果 294の 1件目のレコード値と、が同じであった場合に は(ステップ S74否定)、そのまま次のステップ S76、に進む。 [0107] つぎに、 PLCの周辺装置 1は、次の試験結果の比較候補がある力否かを判断する (ステップ S76)。ここで、試験マトリクス 290の試験結果の次のレコードが存在した場 合には (ステップ S76肯定)、ステップ S74に戻って同様の処理を試験結果の次のレ コードが終了するまで繰り返す。 [0106] In step S74, if the first record value of test result 292 of test matrix 290 is the same as the first record value of test result 294 of test matrix 291 (step S74) (No), proceed directly to the next step S76. [0107] Next, the peripheral device 1 of the PLC determines whether or not there is a candidate for comparison of the next test result (step S76). If the next record of the test result of the test matrix 290 exists (Yes at step S76), the process returns to step S74 and the same processing is repeated until the next record of the test result is completed.
[0108] 一方、試験マトリクス 290の試験結果の次のレコードが存在しな 、場合には (ステツ プ S76否定)、試験手順の適用処理を終了する。  On the other hand, if the next record of the test result of the test matrix 290 does not exist (No at step S76), the test procedure application process is terminated.
[0109] 以上のようにこの発明によれば、シーケンスプログラムの一部を複製して複数箇所 に流用した場合の試験を行う際に、修正箇所と修正の影響箇所に対する試験項目を プログラムブロックテーブルから自動生成した試験に対して、 、ずれかひとつの試験 にユーザが手動により試験を実施することにより、同じグループに属する試験が類似 となるものに対しては、試験手順と試験結果を自動で適用することができ、試験を短 縮することができる。  As described above, according to the present invention, when a test is performed when a part of a sequence program is duplicated and used in a plurality of locations, the test items for the correction location and the location affected by the correction are stored in the program block table. The test procedure and test results are automatically applied to tests that are similar to those in the same group when the user manually performs a test on one of the automatically generated tests. And the test can be shortened.
[0110] この発明は、流用元のシーケンスプログラムと流用先のシーケンスプログラムとをグ ループ (一括)ィ匕して管理し、ある修正に対してユーザに影響箇所を表示、通知する ことを特徴としている。グループの作成については、上述の例のようにシーケンスプロ グラムを流用した際に作成するだけでなぐすでに作成したシーケンスプログラムの 全体、もしくはユーザによって選択されたシーケンスプログラム部分に対して作成す ることちでさる。  [0110] The present invention is characterized in that a diversion source sequence program and a diversion destination sequence program are managed in a group (collectively), and an influence location is displayed and notified to a user for a certain correction. Yes. The group can be created not only when the sequence program is diverted as shown in the above example, but also for the entire sequence program already created or the sequence program part selected by the user. I'll do it.
[0111] 以下においては、図 17に示すような、すでに作成されているシーケンスプログラム 3 [0111] In the following, an already created sequence program 3 as shown in FIG.
00の全体を走査してプログラムブロックテーブルを作成する例につ!、て説明する。図An example of creating a program block table by scanning the entire 00 will be explained. Figure
17は、すでに作成されているシーケンスプログラムの回路表示例である。図 18は、図17 is a circuit display example of a sequence program that has already been created. Figure 18
17のシーケンスプログラムをリスト形式で表示したものである。また、図 19は、 PLCの 周辺装置 1にお 、てプログラムブロックテーブルを作成する処理の流れを説明するフ ローチャートである。 17 sequence programs are displayed in list format. FIG. 19 is a flowchart for explaining the flow of processing for creating a program block table in the peripheral device 1 of the PLC.
[0112] まず、ユーザは、入力装置 2を用いて、すでに作成されてプログラムメモリ 6に記憶 されているシーケンスプログラム 300 (310)のプログラムデータを PLCの周辺装置 1 において呼び出し、表示装置 3に表示させる。 [0112] First, the user uses the input device 2 to call the program data of the sequence program 300 (310) already created and stored in the program memory 6 in the peripheral device 1 of the PLC and display it on the display device 3. Let
[0113] つぎに、ユーザは、プログラム全体のグループの作成を指示するグループ作成指 示情報を入力装置 2を使用して PLCの周辺装置 1に入力する (ステップ S81)。なお 、ここでは、ユーザが開いたシーケンスプログラムの一部を選択することで、シーケン スプログラムの一部に対してグループの作成を指示することもできる。 [0113] Next, the user creates a group creation instruction for instructing creation of a group for the entire program. The display information is input to the peripheral device 1 of the PLC using the input device 2 (step S81). Here, by selecting a part of the sequence program opened by the user, it is possible to instruct a part of the sequence program to create a group.
[0114] PLCの周辺装置 1は、グループ作成指示情報を受信すると (ステップ S81)、 PLC の周辺装置 1は、プログラムの先頭行(シーケンスプログラムの一部を選択してグルー プ化した場合には、ユーザによって選択されたプログラムの先頭行)から、プログラム ブロック単位で検索を開始する (ステップ S82)。なお、このとき、図 20— 1に示すよう にプログラムブロックテーブル 220はデータが入力されておらず、空の状態である。  [0114] When the peripheral device 1 of the PLC receives the group creation instruction information (step S81), the peripheral device 1 of the PLC reads the first line of the program (when a part of the sequence program is selected and grouped) The search is started in units of program blocks from the first line of the program selected by the user (step S82). At this time, as shown in FIG. 20-1, the program block table 220 is empty because no data is inputted.
[0115] つぎに、 PLCの周辺装置 1は、図 18に示すような最初のプログラムブロック 211から プログラムブロックテーブルの識別子を作成する(ステップ S83)。ここでは「LD— OR -AND -OUT Jという識別子を作成する。  Next, the peripheral device 1 of the PLC creates a program block table identifier from the first program block 211 as shown in FIG. 18 (step S83). Here, the identifier “LD—OR-AND-OUT J” is created.
[0116] つぎに、 PLCの周辺装置 1は、プログラムブロックテーブル 220を走査し、作成した 識別子が登録されて 、るか検索する (ステップ S84)。  Next, the peripheral device 1 of the PLC scans the program block table 220 and searches whether the created identifier is registered (step S84).
[0117] 作成した識別子がプログラムブロックテーブル 220に登録されていない場合は、(ス テツプ S84否定)、 PLCの周辺装置 1は、新規のレコードを作成し、プログラムブロッ クテーブル 220に登録する(ステップ S85)。この例では、識別子「LD— OR— AND -OUT Jはプログラムブロックテーブルに登録されていないので、 PLCの周辺装置 1 は、新規のレコード 222を作成し、プログラムブロックテーブル 220に登録する。新規 レコード 222を登録したプログラムブロックテーブル 221を図 20— 2に示す。  [0117] If the created identifier is not registered in the program block table 220 (No at step S84), the PLC peripheral device 1 creates a new record and registers it in the program block table 220 (step S85). In this example, since the identifier “LD—OR—AND-OUT J is not registered in the program block table, the peripheral device 1 of the PLC creates a new record 222 and registers it in the program block table 220. New record Figure 20-2 shows the program block table 221 with 222 registered.
[0118] また、ステップ S84において、作成した識別子がすでにプログラムブロックテーブル に作成されていた場合には (ステップ S84肯定)、 PLCの周辺装置 1は、プログラムブ ロックテーブルにおいて該当する識別子を有するレコードの開始ステップ No.に、ス テツプ No.を追加登録する(ステップ S86)。  [0118] If the created identifier has already been created in the program block table in step S84 (Yes in step S84), the peripheral device 1 of the PLC records the record having the corresponding identifier in the program block table. A step number is additionally registered in the start step number (step S86).
[0119] つぎに、 PLCの周辺装置 1は、次のプログラムブロックが存在するかチェックする(ス テツプ S87)。次のプログラムブロックが存在した場合には(ステップ S87肯定)、 PLC の周辺装置 1はステップ S83に戻って処理を行う。  [0119] Next, the peripheral device 1 of the PLC checks whether the next program block exists (step S87). If the next program block exists (Yes at step S87), the peripheral device 1 of the PLC returns to step S83 to perform processing.
[0120] この例の場合には、次のプログラムブロック 212が存在するので、ステップ S83に戻 り、プログラムブロックの識別子「LD—OUT」を作成する。ここで、識別子「LD—OU TJは、プログラムブロックテーブルに存在しないので、新たなレコード 224を作成し、 プログラムブロックテーブル 222に登録する。新たなレコード 224を登録したプロダラ ムブロックテーブル 223を図 20— 3に示す。 In the case of this example, since the next program block 212 exists, the process returns to step S83 to create the program block identifier “LD-OUT”. Where the identifier “LD—OU Since TJ does not exist in the program block table, a new record 224 is created and registered in the program block table 222. The program block table 223 with the new record 224 registered is shown in Figure 20-3.
[0121] そして、 PLCの周辺装置 1は、全てのプログラムブロックを走査して新たなプロダラ ムブロックがなくなるまで同様の処理を繰り返す。この例の場合には、次のプログラム ブロック 213、 214、 215、 216に対して同様の処理を繰り返す。プログラムブロック 2 13、 214に対する処理においては、プログラムブロックテーブルにおいて該当する識 別子を有するレコードの開始ステップ No.に、ステップ No.を追加登録する。プログ ラムブロック 215に対する処理においては、新たなレコードを作成し、プログラムブロ ックテーブルに登録する。  [0121] Then, the peripheral device 1 of the PLC scans all the program blocks and repeats the same processing until there are no new program blocks. In this example, the same processing is repeated for the next program blocks 213, 214, 215 and 216. In the processing for program blocks 213 and 214, a step number is additionally registered in the start step number of the record having the corresponding identifier in the program block table. In the process for program block 215, a new record is created and registered in the program block table.
[0122] 一方、ステップ S87に戻って、次のプログラムブロックが存在しない場合には (ステツ プ S87否定)、グループィ匕が完了となり、処理を終了する。すなわち、全てのプロダラ ムブロックを走査して次のプログラムブロックが存在し無くなった時点で、シーケンス プログラムがグループ化されたプログラムブロックテーブルが完成する。この例では、 On the other hand, returning to step S87, if the next program block does not exist (No at step S87), the grouping is completed and the process ends. That is, when all the program blocks are scanned and the next program block does not exist, the program block table in which the sequence programs are grouped is completed. In this example,
020-4に示すようなプログラムブロックテーブル 225が完成する。 A program block table 225 as shown in 020-4 is completed.
[0123] 以上により、シーケンスプログラムの全体 (または一部)をグループ化して簡潔にプ ログラムブロックテーブルに格納することができる。そして、このようにして作成したプ ログラムブロックテーブルを、上述したようにシーケンスプログラムの一部を複製して 複数箇所に流用する際に、 PLCの周辺装置 1が表示装置 3に表示することができる。 [0123] As described above, the whole (or part) of the sequence program can be grouped and stored in a simple program block table. Then, when the program block table created in this way is copied as a part of the sequence program and used in multiple places as described above, the peripheral device 1 of the PLC can display it on the display device 3. .
[0124] これにより、同じグループに属するシーケンスプログラムが修正された場合には、こ のプログラムブロックテーブルにより影響箇所が容易に判断でき、ユーザに修正の確 認を促すことができる。したがって、同じグループに属する全て、もしくは一部の影響 箇所に修正を容易に適用することができる。 Thus, when a sequence program belonging to the same group is modified, the affected part can be easily determined by this program block table, and the user can be prompted to confirm the modification. Therefore, the correction can be easily applied to all or some of the affected areas belonging to the same group.
[0125] また、グループの作成は、既存のシーケンスプログラムの全体または一部に対して 行うことができるため、効率良ぐ修正漏れのない正確なシーケンスプログラムを作成 することができる。 [0125] Furthermore, since the group can be created for all or part of the existing sequence program, an accurate sequence program can be created that is efficient and has no omissions.
[0126] なお、以上のような PLCの周辺装置 1における処理は、プログラムメモリ 6に格納さ れたプログラムに従って制御部 8の制御により実行される。 産業上の利用可能性 Note that the processing in the peripheral device 1 of the PLC as described above is executed under the control of the control unit 8 in accordance with the program stored in the program memory 6. Industrial applicability
以上のように、本発明に力かるプログラマブルロジックコントローラの周辺装置は、シ 一ケンスプログラムの作成、編集および試験を行う際にお 、て有用である。  As described above, the programmable logic controller peripheral device according to the present invention is useful when creating, editing, and testing a sequence program.

Claims

請求の範囲 The scope of the claims
[1] シーケンスプログラムの一部を流用して他のシーケンスプログラム部分を作成可能 な PLCの周辺装置であって、  [1] A PLC peripheral device that can create part of a sequence program by using part of a sequence program.
流用元のシーケンスプログラム部分と該流用元のシーケンスプログラム部分を流用 して作成した流用先のシーケンスプログラム部分とから、シーケンスプログラム部分を 特徴付ける識別子とシーケンスプログラム部分の使用箇所とを対応付けたプログラム ブロックテーブルを作成するプログラムブロックテーブル作成手段と、  A program block table in which an identifier characterizing the sequence program part is associated with a used part of the sequence program part from the diversion source sequence program part and the diversion source sequence program part created by diverting the diversion source sequence program part A program block table creating means for creating
シーケンスプログラム部分の一部が修正された際に、当該修正された箇所が前記 プログラムブロックテーブルに登録されているシーケンスプログラム部分の一部である かを判定し、登録されている場合には、前記修正が影響を及ぼす影響箇所を示す影 響箇所データを前記プログラムブロックテーブルに基づいて作成する影響箇所デー タ作成手段と、  When a part of the sequence program part is corrected, it is determined whether or not the corrected part is a part of the sequence program part registered in the program block table. Influence location data creating means for creating impact location data indicating the impact location affected by the modification based on the program block table;
を備えることを特徴とする PLCの周辺装置。  PLC peripheral device characterized by comprising:
[2] 前記影響箇所データに含まれる影響箇所に対して前記修正を適用する旨の修正 適用情報に基づいて影響箇所データに含まれる影響箇所に対応する前記流用先の シーケンスプログラム部分に対して自動的に修正を適用する修正適用手段を備える こと [2] Amendment to apply the amendment to the affected area included in the affected area data Automatically based on the sequence program part of the diversion destination corresponding to the affected area included in the affected area data based on the application information A means for applying corrections to apply corrections
を特徴とする請求項 1に記載の PLCの周辺装置。  The PLC peripheral device according to claim 1, wherein:
[3] 既存のシーケンスプログラムの全体または一部に対応するプログラムブロックテー ブルを作成する旨のプログラムブロックテーブル作成指示に従って、既存プログラム のプログラムブロックテーブルを作成する既存プログラムブロックテーブル作成手段 を備免ること [3] In accordance with the program block table creation instruction to create a program block table corresponding to all or part of the existing sequence program, the existing program block table creation means for creating the program block table for the existing program is omitted. thing
を特徴とする請求項 1に記載の PLCの周辺装置。  The PLC peripheral device according to claim 1, wherein:
[4] 前記既存プログラムブロックテーブル作成手段力 シーケンスプログラムの全体また は一部分を走査し、同一または回路の構造が同一のシーケンスプログラム部分を抽 出し、グループ化すること [4] The existing program block table creation means The whole or part of the sequence program is scanned, and the sequence program parts having the same or the same circuit structure are extracted and grouped
を特徴とする請求項 3に記載の PLCの周辺装置。  4. The PLC peripheral device according to claim 3, wherein the peripheral device is a PLC.
[5] 前記修正を行った箇所と前記影響箇所に対する試験を行うための試験マトリクスを 前記プログラムブロックテーブル力も作成する試験マトリクス作成手段を備えること を特徴とする請求項 1に記載の PLCの周辺装置。 [5] A test matrix for performing a test on the corrected part and the affected part. 2. The PLC peripheral device according to claim 1, further comprising test matrix creating means for creating the program block table force.
[6] 前記修正を行った箇所に対して前記試験マトリクスを用いて行った試験結果を前記 影響箇所に対する試験に適用して該影響箇所に対する試験を省略可能であること を特徴とする請求項 5に記載の PLCの周辺装置。 [6] The test result for the affected part can be omitted by applying the test result of the modified part using the test matrix to the test for the affected part. PLC peripheral device described in 1.
[7] 同一のプログラムブロックテーブル力 作成した試験マトリクスのうち試験を実行済 みの試験マトリクスの試験手順と試験結果を、前記同一のプログラムブロックテープ ルの全ての試験マトリクスに適用可能であること [7] Same program block table power The test procedure and test results of the test matrix that has been tested among the created test matrices can be applied to all test matrices of the same program block table.
を特徴とする請求項 5に記載の PLCの周辺装置。  6. The PLC peripheral device according to claim 5, wherein:
[8] 前記影響箇所データを表示装置に送出して、該表示装置に表示させること [8] Sending the affected part data to a display device and displaying it on the display device
を特徴とする請求項 1に記載の PLCの周辺装置。  The PLC peripheral device according to claim 1, wherein:
PCT/JP2006/315054 2006-07-28 2006-07-28 Programmable logic controller peripheral device WO2008012919A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2006/315054 WO2008012919A1 (en) 2006-07-28 2006-07-28 Programmable logic controller peripheral device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2006/315054 WO2008012919A1 (en) 2006-07-28 2006-07-28 Programmable logic controller peripheral device

Publications (1)

Publication Number Publication Date
WO2008012919A1 true WO2008012919A1 (en) 2008-01-31

Family

ID=38981235

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/315054 WO2008012919A1 (en) 2006-07-28 2006-07-28 Programmable logic controller peripheral device

Country Status (1)

Country Link
WO (1) WO2008012919A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108121297A (en) * 2016-11-29 2018-06-05 发那科株式会社 Trapezoid figure program managing device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05197533A (en) * 1992-01-22 1993-08-06 Hitachi Ltd Control method for data item
JPH08115110A (en) * 1994-10-13 1996-05-07 Mazda Motor Corp Program preparing device
JPH0916392A (en) * 1995-06-27 1997-01-17 Mitsubishi Electric Corp Software development support system
JP2004252719A (en) * 2003-02-20 2004-09-09 Mitsubishi Electric Corp Data management device, method and program
JP2005100078A (en) * 2003-09-25 2005-04-14 Hitachi Ltd Software asset management system
JP2006146955A (en) * 2004-03-31 2006-06-08 Omron Corp Development support device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05197533A (en) * 1992-01-22 1993-08-06 Hitachi Ltd Control method for data item
JPH08115110A (en) * 1994-10-13 1996-05-07 Mazda Motor Corp Program preparing device
JPH0916392A (en) * 1995-06-27 1997-01-17 Mitsubishi Electric Corp Software development support system
JP2004252719A (en) * 2003-02-20 2004-09-09 Mitsubishi Electric Corp Data management device, method and program
JP2005100078A (en) * 2003-09-25 2005-04-14 Hitachi Ltd Software asset management system
JP2006146955A (en) * 2004-03-31 2006-06-08 Omron Corp Development support device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108121297A (en) * 2016-11-29 2018-06-05 发那科株式会社 Trapezoid figure program managing device
JP2018088178A (en) * 2016-11-29 2018-06-07 ファナック株式会社 Ladder program management device
CN108121297B (en) * 2016-11-29 2019-08-23 发那科株式会社 Trapezoid figure program managing device
US10599119B2 (en) 2016-11-29 2020-03-24 Fanuc Corporation Ladder-program managing device

Similar Documents

Publication Publication Date Title
EP1650619B1 (en) Sequence program editing apparatus
US7757025B2 (en) Programmable logic controller peripheral device and program creation method thereof
JPWO2008102426A1 (en) Programmable controller peripheral device, replacement method and program
WO2008012919A1 (en) Programmable logic controller peripheral device
JP2013020437A (en) Requirements management support device
KR101726120B1 (en) Program editing device, program editing method and computer readable recoding medium for recording program editing program
JP2008242964A (en) User interface design program and user interface design method
JP2011059918A (en) Version management device and version management method
JP4245811B2 (en) Ladder circuit editing device
JP2000293519A (en) Document processor
JPH1124904A (en) Program generation device and storage medium storing program generation program
JP3598594B2 (en) Document processing apparatus and document processing method
JP3102222B2 (en) Knowledge acquisition method and its implementation device
JPH0944533A (en) Circuit diagram editing method
JP4592646B2 (en) Drawing method, drawing device and computer program
JP2000047777A (en) Operation screen generating method for program type display device
JPH0883293A (en) Change history controller of cad drawing
JPH06332970A (en) Mounting layout chart generator
JPH09134376A (en) Lsi design system
JPH0512361A (en) Circuit diagram input device for logic circuit
JPS6389966A (en) Documentation device
JPH0589103A (en) Document editing processor
JPH10340281A (en) Automatic editing device for expanded connection drawing
JPH03223927A (en) Support device for production of software
JPH01245353A (en) Section number forming system

Legal Events

Date Code Title Description
DPE2 Request for preliminary examination filed before expiration of 19th month from priority date (pct application filed from 20040101)
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 06781964

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

NENP Non-entry into the national phase

Ref country code: RU

NENP Non-entry into the national phase

Ref country code: JP

122 Ep: pct application non-entry in european phase

Ref document number: 06781964

Country of ref document: EP

Kind code of ref document: A1