Programmable logic controller and access information output method
The PLC system accurately detects and outputs access information for specified signals or variables, addressing the challenge of tracking read and write access orders, thereby improving traceability and efficiency.
Patent Information
- Application Number
- PCT/JP2024/022382
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-06-20
- Publication Date
- 2025-12-26
AI Technical Summary
Existing programmable logic controllers (PLCs) struggle to accurately detect the order of read and write accesses within a cycle and output access information related to specified signals or variables during sequence program execution.
A programmable logic controller (PLC) with a program execution unit, recording target reception unit, and access information output unit that acquires and outputs access information only for specified signals or variables, including details like read/write commands, signal names, variable values, sequence program IDs, and access times.
Enables precise detection of read and write access orders and outputs relevant access information for specified signals or variables, enhancing the traceability and efficiency of PLC operations.
Smart Images

Figure JP2024022382_26122025_PF_FP_ABST
Abstract
Description
Programmable logic controller and access information output method
[0001] The present disclosure relates to a programmable logic controller (PLC) and an access information output method, and more particularly to a PLC that executes a sequence program and a PLC access information output method.
[0002] PLCs have a trace function that periodically monitors and records the values of specified signals, etc. For example, Patent Document 1 describes an engineering tool for PLCs that correlates and displays log data and project data. Specifically, Patent Document 1 stores multiple time-series device values collected by the PLC and time data indicating the time each device value was collected. A first engineering software module displays the device values on a ladder diagram. A second engineering software module displays the device values as time-series waveforms. A synchronization software module synchronizes the display target time in the first engineering software module with the display target time in the second engineering software module.
[0003] Japanese Patent Application Laid-Open No. 2020-13528
[0004] Because the trace function monitors signal values at regular intervals, it is difficult to detect the order in which read and write accesses occurred within one cycle. Also, when a PLC outputs access information when accessing a signal or variable during execution of a sequence program, there are cases where it is desired to output only the access information related to a specified signal or variable.
[0005] Therefore, what is desired is a PLC and a method for outputting access information for a PLC that can detect the order in which read and write accesses have occurred and output only access information related to a specified signal or variable.
[0006] A first representative aspect of the present disclosure is a programmable logic controller comprising: a program execution unit that executes at least one sequence program and accesses a first signal or a first variable during execution of the sequence program; a recording target reception unit that receives designation of one or more second signals or second variables; and an access information output unit that acquires access information from the program execution unit when accessing the first signal or the first variable, and outputs the access information when the first signal or the first variable identified from the access information matches the one or more second signals or second variables received by the recording target reception unit.
[0007] A second representative aspect of the present disclosure is an access information output method in which a computer executes the following processes: executing at least one sequence program, and accessing a first signal or a first variable during execution of the sequence program; accepting designations of one or more second signals or second variables; and obtaining access information from a computer when accessing the first signal or the first variable, and outputting the access information if the first signal or the first variable identified from the access information matches the accepted one or more second signals or second variables.
[0008] FIG. 1 is a block diagram showing an example of a configuration of a programmable logic controller according to a first embodiment of the present disclosure. FIG. 2 is an explanatory diagram showing an example of access information output by a program execution unit. FIG. 3 is an explanatory diagram showing an example of a sequence program written in ladder language. FIG. 4 is an explanatory diagram showing an example of a sequence program written in ST language. FIG. 5 is an explanatory diagram showing an example in which a user clicks on "VAR2" in a ladder diagram displayed on a liquid crystal display device with a touch panel. FIG. 6 is a block diagram showing a part of a PLC, explaining the operation of an access information output unit. FIG. 7 is a diagram showing an example of an access history. FIG. 8 is a flowchart showing an example of an access information output method. FIG. 9 is a block diagram showing an example of a configuration of a programmable logic controller according to a second embodiment of the present disclosure.
[0009] Embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. (First Embodiment) FIG. 1 is a block diagram showing an example configuration of a programmable logic controller according to a first embodiment of the present disclosure. As shown in FIG. 1, a programmable logic controller (PLC) 10 includes recording units 11 and 12, program execution units 13 and 14, a record target receiving unit 15, and an access information output unit 16. The access information output unit 16 stores access information as an access history in a storage unit 20 provided outside the PLC 10. The PLC 10 may also include the storage unit 20. The access information output from the access information output unit 16 may be transmitted to an external device via a network via a communication unit. While FIG. 1 shows an example in which two recording units and two program execution units are provided, the number of recording units and three or more program execution units may be one.
[0010] PLC 10 controls controlled objects such as machines, such as machine tools and robots, or peripheral devices of machines, based on sequence program P1 stored in recording unit 11 and sequence program P2 stored in recording unit 12, but the configuration for such control is already known, so its explanation will be omitted.
[0011] (Recording units 11, 12) The recording unit 11 includes a program storage unit that stores the sequence program P1, and a signal variable information storage unit that stores a signal (becoming the first signal) or a variable (becoming the first variable) during execution of the sequence program P1. The recording unit 12 includes a program storage unit that stores the sequence program P2, and a signal variable information storage unit that stores a signal (becoming the first signal) or a variable (becoming the first variable) during execution of the sequence program P2. The signals stored in the signal variable information storage units of the recording units 11 and 12 are, for example, input signals or output signals. The variables stored in the signal variable information storage units of the recording units 11 and 13 are, for example, identification information that indicates an input signal or an output signal. The sequence programs P1 and P2 are written in, for example, ladder language, ST (Structured Text) language, SFC (Sequential Function Chart) language, FBD (Function Block Diagram) language, or IL (Instruction List) language.
[0012] (Program Execution Units 13, 14) The program execution unit 13 executes the sequence program P1 stored in the program storage unit of the recording unit 11, and during the execution of the sequence program P1, when reading or writing (accessing) a signal or variable stored in the signal variable information storage unit of the recording unit 11, it outputs access information to the access information output unit 16. The program execution unit 14 executes the sequence program P2 stored in the program storage unit of the recording unit 12, and during the execution of the sequence program P2, when reading or writing (accessing) a signal or variable stored in the signal variable information storage unit of the recording unit 12, it outputs access information to the access information output unit 16. The access information that the program execution units 13 and 14 each output to the access information output unit 16 includes at least one of the following: (1) A read or write command; (2) The name of the signal or variable to be accessed; (3) The value of the signal or variable before and / or after the access; (4) The ID of the sequence program that executes the read or write command; (5) The position in the sequence program where the read or write command is written; and (6) The time when the read or write command is executed.
[0013] 2 is an explanatory diagram showing an example of access information output by the program execution unit 13 and the program execution unit 14. The program execution unit 13 outputs access information A1 to the access information output unit 16, and the program execution unit 14 outputs access information A2 to the access information output unit 16. FIG. 2 illustrates an example in which the program execution unit 14 and the program execution unit 13 output access information A2 and access information A1 to the access information output unit 16 in that order.
[0014] Access information A2 indicates that the signal or variable name is "VAR2", the read / write command is "READ", the value of the signal or variable before the access was "3", the ID of the sequence program that executes either the read or write command is "2", the position within the sequence program where either the read or write command is written is line "110", column "10", and the time is "2024 / 1 / 1 10:05:50.000100". The program ID "2" is a number that identifies sequence program P2.
[0015] Access information A1 indicates that the signal or variable name is "VAR2", the read / write command is "WRITE", the value of the signal or variable before the access is "5", the value of the signal or variable after the access is "3", the ID of the sequence program that executes either the read or write command is "1", the position in the sequence program where either the read or write command is written is line "10", column "2", and the time is "2024 / 1 / 1 10:05:50.000130". The program ID "1" is a number that identifies sequence program P1.
[0016] Fig. 3 is an explanatory diagram showing an example of a sequence program P1 written in ladder language. Fig. 3 shows an example in which a command "WRITE" and a command "READ" are executed using a variable named "VAR2" in the sequence program P1. Fig. 4 is an explanatory diagram showing an example of a sequence program P1 written in ST language. Fig. 4 shows an example in which a command "WRITE" and a command "READ" are executed using a variable named "VAR2" in the sequence program P1.
[0017] (Recording Target Acceptance Unit 15) The recording target acceptance unit 15 accepts one or more signals (which will become second signals) or variables (which will become second variables) designated by the user as recording targets. The user inputs one or more second signals or second variables to be stored as access history using an input device such as a keyboard or a touch-panel liquid crystal display device. The recording target acceptance unit 15 outputs the input one or more second signals or second variables to the access information output unit 16 as recording targets. FIG. 5 is an explanatory diagram showing an example in which the user clicks on "VAR2" of a ladder circuit displayed on a touch-panel liquid crystal display device. When the user clicks on "VAR2" of the ladder circuit displayed on the touch-panel liquid crystal display device, the touch-panel liquid crystal display device notifies the recording target acceptance unit 15 that the variable named "VAR2" has been selected. The record target receiving unit 15 receives the variable with the variable name “VAR2” as a target variable of the access history, and outputs the variable name “VAR2” to the access information output unit 16 .
[0018] (Access Information Output Unit 16) The access information output unit 16 acquires access information from the program execution units 13, 14 and determines whether a signal or variable (first signal or first variable) identified from the access information matches a signal or variable (second signal or second variable) output from the recording target reception unit 15. If the first signal or first variable matches the second signal or second variable, the access information output unit 16 outputs the access information output from the program execution units 13, 14 to the storage unit 20. If the first signal or first variable does not match the second signal or second variable, the access information output unit 16 does not output the access information output from the program execution units 13, 14 to the storage unit 20.
[0019] The operation of the access information output unit 16 will be described below with reference to FIG. 6 . FIG. 6 is a block diagram illustrating a portion of a PLC for explaining the operation of the access information output unit 16. For example, as shown in FIG. 6 , the access information output unit 16 acquires the access information A1 shown in FIG. 2 from the program execution unit 13 and determines whether a first signal or a first variable identified from the access information A1 matches a second signal or a second variable output from the recording target receiving unit 15. Specifically, the variable name "VAR2" identified from the access information A1 shown in FIG. 2 matches the variable name "VAR2" accepted by the recording target receiving unit 15, so the access information output unit 16 stores the access information A1 in the storage unit 20. On the other hand, if the variable name of the first variable identified in the access information is "VAR1," the variable name does not match the variable name "VAR2" of the second variable accepted by the recording target receiving unit 15, so the access information output unit 16 does not store the access information in the storage unit 20.
[0020] In the above-described example, whether a first variable and a second variable match is determined by the variable name, but the information is not limited to the variable name and can be any information that can identify the first variable and the second variable.While the signal name can also be used to determine whether a first signal and a second signal match, the information is not limited to the signal name and can be any information that can identify the first signal and the second signal.
[0021] The above describes the configuration and operation of the PLC 10. The storage unit 20 stores the access information output from the access information output unit 16 as an access history. For example, as shown in Fig. 6, when the access information output unit 16 stores access information A1 in the storage unit 20, the access information A1 is stored as an access history as shown in Fig. 7. Fig. 7 is a diagram showing an example of the access history.
[0022] As shown in FIG. 7, it can be seen that the access information stored in the storage unit 20 is limited to address information including the variable name "VAR2" of the second variable accepted by the record target accepting unit 15. Therefore, only the address information related to the second variable designated by the user can be stored as the access history. From the access history shown in FIG. 7, access information when the program execution units 13 and 14 access the first signal or the first variable is stored as the access history in the order of read and write access. As a result, it is possible to know which program execution unit performed the read and write (access) and in what order. Furthermore, by including time information in the access history shown in FIG. 7, the timing of the signal read and write can be known.
[0023] 7, it is possible to determine in which sequence program the signal was rewritten, and further, by including the values of the signal or variable before and after the access in the access history, it is possible to determine how the value of the signal or variable changed.Furthermore, by including in the access history shown in FIG. 7 the position (row and column) where either a read or write command was written, it is possible to identify the position in the sequence program where the access was made.
[0024] 8 is a flowchart illustrating an example of an access information output method. In the following description, an example in which the access information output method of the present disclosure is executed by the PLC 10 will be described, but the access information output method of the present disclosure can also be executed by a configuration other than the PLC 10.
[0025] In step S11, the recording target receiving unit 15 receives one or more signals or variables (second signals or second variables) to be recorded, and outputs the received second signals or second variables to the access information output unit 16. The one or more second signals or second variables to be recorded are input by the user using an input device.
[0026] In step S12, the program execution units 13 and 14 output access information to the access information output unit 16 when accessing the first signal or the first variable during execution of the sequence programs P1 and P2 stored in the recording units 11 and 12, respectively.
[0027] In step S13, the access information output unit 16 acquires the access information from the program execution units 13 and 14, and determines whether the first signal or first variable specified by the access information matches the second signal or second variable output from the recording target receiving unit 15. If the first signal or first variable matches the second signal or second variable, the process proceeds to step S14; if they do not match, the process returns to step S12.
[0028] In step S14, the access information is output to the storage unit 20. In step S15, it is determined whether or not to continue the process. If not, the process ends, and if so, the process returns to step S12.
[0029] According to the PCL and access information output method of this embodiment described above, the output access information is limited to address information based on signals or variables that match the signals or variables accepted by the record target accepting unit. Furthermore, according to the PCL and access information output method of this embodiment, the order in which read and write accesses occurred can be determined. Furthermore, by including time information in the output access information, the timing of signal reads and writes can be determined.
[0030] Furthermore, according to the PCL and access information output method of this embodiment, by including the sequence program ID and read / write in the access information, it is possible to determine in which sequence program the signal was rewritten, and further, by including in the access information the value of the signal or variable before and after the access, it is possible to determine how the value of the signal or variable changed.Furthermore, by including in the access information the location where either a read or write command was written, it is possible to identify the location in the sequence program where the access was made.
[0031] Second Embodiment FIG. 9 is a block diagram showing an example configuration of a programmable logic controller according to a second embodiment of the present disclosure. A PLC 10A according to this embodiment shown in FIG. 9 is obtained by adding an output condition setting unit 17 to the PLC 10 shown in FIG. 1 . The output condition setting unit 17 sets one or more conditions under which the access information output unit 16 outputs access information. The conditions may be, for example, when the value of a signal or variable changes, when the ID of the sequence program is a predetermined ID, for example, "1," when the command is "READ," or a combination of these conditions. The access information output unit 16 outputs access information when the condition is met, and does not output access information when the condition is not met.
[0032] According to this embodiment, in addition to the effects of the first embodiment, it is possible to set conditions for outputting access information, and therefore it is possible to limit the content of the access information to be output to only the necessary content.
[0033] In each embodiment described above, the PLC may be implemented using hardware, software, or a combination thereof to realize the functional blocks included in the PLC. The access information output method may also be implemented using hardware, software, or a combination thereof. "Implemented using software" here means that the method is implemented by a computer reading and executing a program.
[0034] To realize the components of a PLC using software or a combination of these, the PLC includes a central processing unit (CPU) or other processing device that functions as an execution unit. The PLC also includes a secondary storage device such as a hard disk drive (HDD) that stores various control programs, such as application software or an operating system (OS), and a primary storage device such as a random access memory (RAM) that stores data temporarily required for the processor to execute the programs.
[0035] The PLC's processing unit reads application software or an OS from the auxiliary storage device, and then loads the loaded application software or OS into the main storage device, performing calculations based on the application software or OS. The PLC also controls various hardware components based on the results of the calculations. This achieves the functional blocks of this embodiment. The access information output method can also be achieved using a similar configuration to the PLC.
[0036] The components included in the PLC can be realized by hardware including electronic circuits, etc. When the PLC is configured by hardware, some or all of the functions of the components included in the PLC can be configured by an integrated circuit (IC), such as an application specific integrated circuit (ASIC), a gate array, a field programmable gate array (FPGA), or a complex programmable logic device (CPLD).
[0037] The program can be stored and supplied to a computer using various types of non-transitory computer-readable media. Non-transitory computer-readable media include various types of tangible storage media. Examples of non-transitory computer-readable media include magnetic recording media (e.g., hard disk drives), magneto-optical recording media (e.g., magneto-optical disks), CD-ROMs (Read Only Memory), CD-Rs, CD-R / Ws, and semiconductor memories (e.g., mask ROMs, PROMs (Programmable ROMs), EPROMs (Erasable PROMs), flash ROMs, and RAMs (Random Access Memory)). The program may also be supplied to the computer by various types of transient computer readable media.
[0038] According to the PLC and the access information output method of the present disclosure, including the embodiments described above, the output access information can be limited to address information including a signal or variable that matches the received signal or variable. Furthermore, according to the PLC and the access information output method of this embodiment, the order in which read and write accesses occurred can be determined.
[0039] Although the above-described embodiments are preferred embodiments of the present invention, the scope of the present invention is not limited to the above-described embodiments, and the present invention can be implemented in various modified forms within the scope that does not deviate from the gist of the present invention.
[0040] The following supplementary note is further disclosed regarding the above embodiment: (Supplementary note 1) A programmable logic controller comprising: at least one program execution unit that executes a sequence program and accesses a first signal or a first variable during execution of the sequence program; a recording target reception unit that receives designation of one or more second signals or second variables; and an access information output unit that acquires access information from the program execution unit when accessing the first signal or the first variable, and outputs the access information when the first signal or the first variable identified from the access information matches the one or more second signals or second variables received by the recording target reception unit.
[0041] (Supplementary Note 2) The programmable logic controller according to Supplementary Note 1, characterized in that the access information includes at least one of the following: (1) a read or write command, (2) the name of the signal or variable to be accessed, (3) the current value of the signal or variable to be accessed before and / or after the access, (4) the ID of the sequence program that executes the command, (5) the position in the sequence program where the command is written, and (6) the time when the command is executed.
[0042] (Supplementary Note 3) The programmable logic controller according to Supplementary Note 2, wherein the access information output unit outputs the access information based on an ID of the sequence program that executes the command.
[0043] (Supplementary Note 4) The programmable logic controller according to Supplementary Note 2 or 3, wherein the access information output unit includes an output condition setting unit that sets one or more conditions for outputting the access information.
[0044] (Supplementary Note 5) An access information output method in which a computer executes at least one sequence program, and during execution of the sequence program, accesses a first signal or a first variable; accepts designations of one or more second signals or second variables; and acquires access information when accessing the first signal or the first variable, and outputs the access information if the first signal or the first variable identified from the access information matches the accepted one or more second signals or second variables.
[0045] 10, 10A Programmable Logic Controller (PLC) 11, 12 Recording unit 13, 14 Program execution unit 15 Recording target receiving unit 16 Access information output unit 17 Output condition setting unit
Claims
1. A programmable logic controller comprising: a program execution unit that executes at least one sequence program and accesses a first signal or a first variable during execution of the sequence program; a recording target reception unit that receives designation of one or more second signals or second variables; and an access information output unit that obtains access information from the program execution unit when accessing the first signal or first variable, and outputs the access information if the first signal or first variable identified from the access information matches the one or more second signals or second variables received by the recording target reception unit.
2. The programmable logic controller according to claim 1, wherein the access information includes at least one of the following: (1) a read or write command, (2) the name of the signal or variable to be accessed, (3) the current value of the signal or variable to be accessed before and / or after the access, (4) the ID of the sequence program that executes the command, (5) the position in the sequence program where the command is written, and (6) the time when the command is executed.
3. The programmable logic controller according to claim 2, wherein said access information output section outputs said access information based on the ID of said sequence program that executes said command.
4. The programmable logic controller according to claim 2 or 3, wherein said access information output section comprises an output condition setting section that sets one or more conditions for outputting said access information.
5. An access information output method in which a computer executes at least one sequence program, and during execution of the sequence program, accesses a first signal or a first variable; accepts the designation of one or more second signals or second variables; and acquires access information when accessing the first signal or first variable, and outputs the access information if the first signal or first variable identified from the access information matches the accepted one or more second signals or second variables.
Citation Information
Patent Citations
Control device, program generating device thereof, program and recording medium therefor
JP2007179113A
Information processor, information processing method and program
JP2013205866A
Control device, control device control method, information processing program, and recording medium
JP2019079256A