Tracing apparatus
11281179 · 2022-03-22
Assignee
Inventors
Cpc classification
G06F11/3034
PHYSICS
International classification
G05B19/05
PHYSICS
G06F11/34
PHYSICS
Abstract
A tracing apparatus communicably connected to a programmable logic controller (PLC) that inputs and outputs a signal based on a ladder program, includes a constituent element setting unit configured to set a plurality of constituent elements to be traced among the constituent elements of the ladder program, a tracing data acquisition unit configured to acquire tracing data indicating a signal state of the constituent element at a specified timing, at a predetermined sampling cycle, a section detection unit configured to detect a sampling cycle section in which two or more of the acquired tracing data corresponding to the constituent elements simultaneously change, a change sequence calculation unit configured to calculate change sequence of signals of the constituent elements simultaneously changing in the detected sampling cycle section, and a change sequence output unit configured to output the calculated change sequence of the signals of the constituent elements.
Claims
1. A tracing apparatus communicably connected to a programmable logic controller (PLC) that inputs and outputs a signal based on a sequence control program, the tracing apparatus comprising a processor that performs the following: setting a plurality of constituent elements to be traced among the constituent elements of the sequence control program; acquiring, at a predetermined sampling cycle for each of the plurality of constituent elements, tracing data indicating a signal state of the constituent element at a specified timing, by executing the sequence control program at the PLC; detecting, from a plurality of sampling cycle sections, a sampling cycle section in which two or more of the acquired tracing data corresponding to the plurality of constituent elements simultaneously change; calculating change sequence of signals of the plurality of constituent elements simultaneously changing in the detected sampling cycle section by analyzing a sequence diagram representing the execution of the sequence control program during the detected sample cycle section, the sequence diagram being a processing flow of the plurality of constituent elements; and outputting the calculated change sequence of the signals of the plurality of constituent elements, wherein the outputting of the calculated change sequence of the signals of the plurality of constituent elements includes (i) outputting, to a display, the plurality of sampling cycle sections including the detected sampling cycle section such that the detected sampling cycle section is enlarged as compared to the the plurality of sampling cycle sections other than the detected sampling cycle section and (ii) explicitly outputting, to the display, the change sequence of the signals of the constituent elements in the detected sampling cycle section by displacing positions of changes of the signals of the plurality of constituent elements according to the calculated change sequence of the signals of the plurality of constituent elements.
2. The tracing apparatus according to claim 1, wherein the outputting of the change sequence of the signals of the constituent elements includes outputting the calculated change sequence of the signals of the constituent elements as an indication according to a change time.
3. The tracing apparatus according to claim 1, wherein the outputting of the change sequence of the signals of the constituent elements includes outputting a number corresponding to the calculated change sequence of the signals of the constituent elements.
4. The tracing apparatus according to claim 1, wherein the outputting of the change sequence of the signals of the constituent elements includes outputting the calculated change sequence of the signals of the constituent elements together with the tracing data to a file.
5. The tracing apparatus according to claim 1, wherein the tracing apparatus is included in the PLC.
6. The tracing apparatus according to claim 1, wherein, for each of the positions of changes of the signals of the constituent elements, the position of the change of the signal is displaced from a start of the detected sampling cycling section by a length based on an approximate time from the start of the detected sampling cycling section until the signal change.
7. The tracing apparatus according to claim 1, wherein, on the display, the change sequence of the signals of the constituent elements in the detected sampling cycle section is indicated using arrows.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
DETAILED DESCRIPTION OF THE INVENTION
Embodiment
(9) First, an outline of an embodiment of the present invention will be described. The present embodiment relates to a tracing apparatus communicably connected to a PLC that inputs and outputs a signal based on a ladder program, which indicates tracing results obtained as a result of executing the ladder program so as to determine the sequence of signal changes within a cycle.
(10) The configurations of a tracing system 1000 and a tracing apparatus 100 according to the present embodiment will be described with reference to
(11) [Tracing Apparatus 100]
(12) The tracing apparatus 100 detects a sampling cycle section in which two or more of the tracing data corresponding to the constituent elements simultaneously change. The tracing apparatus 100 calculates the change sequence of the signals of the constituent elements simultaneously changing in the detected sampling cycle section. Then, the tracing apparatus 100 outputs the calculated change sequence of the signals of the constituent elements to, for example, a display unit 140. The tracing apparatus 100 is, for example, a personal computer (PC).
(13) The tracing apparatus 100 includes a control unit 110, a storage unit 120, an input unit 130, a display unit 140, and a communication interface unit 150. The control unit 110 may be a central processing unit (CPU), and performs overall control of the tracing apparatus 100 by executing various programs for controlling the tracing apparatus 100 stored in the storage unit 120. The control unit 110 includes a constituent element setting unit 111, a tracing data acquisition unit 112, a section detection unit 113, a change sequence calculation unit 114, and a change sequence output unit 115. Each of these function units is fulfilled by the control unit 110 executing a program stored in the storage unit 120.
(14) In the constituent element setting unit 111, a plurality of constituent elements to be traced are set through, for example, the input unit 130 among the constituent elements included in a ladder program executed in the PLC 400. The constituent element setting unit 111 may set one or more contacts and one or more coils as the constituent elements, or may set only a plurality of contacts or coils. The control unit 110 has the set constituent elements stored in the constituent element storage unit 122. The tracing data acquisition unit 112 acquires tracing data indicating a signal state of the constituent element at a specified timing, at a predetermined sampling cycle. The tracing data acquisition unit 112 acquires tracing data from, for example, the PLC 400. The tracing data indicates a signal state (ON/OFF) of each of the set constituent elements and is acquired at a specified timing. The control unit 110 has the acquired tracing data stored in the tracing data storage unit 123.
(15) The section detection unit 113 detects a sampling cycle section in which two or more of the tracing data corresponding to the constituent elements acquired by the tracing data acquisition unit 112 simultaneously change. The change sequence calculation unit 114 calculates the change sequence of the signals of the constituent elements simultaneously changing in the sampling cycle section detected by the section detection unit 113. The change sequence calculation unit 114 calculates the change sequence of the signals of the constituent elements simultaneously changing in the sampling cycle section based on, for example, a ladder diagram (ladder) representing the content of a ladder program. The change sequence output unit 115 outputs the change sequence of the signals of the constituent elements calculated by the change sequence calculation unit 14 to, for example, the display unit 140. The change sequence output unit 115 may output, for example, the change sequence of the signals of the constituent elements together with the tracing data to the display unit 140.
(16) The storage unit 120 is a storage area that stores programs executed by the control unit 110, and others. The storage unit 120 includes a program storage unit 121, a constituent element storage unit 122, and a tracing data storage unit 123. The program storage unit 121 is, for example, a storage area that stores programs for executing various functions of the control unit 110 described above. The constituent element storage unit 122 is a storage area that stores the constituent elements to be traced set through the input unit 130. The tracing data storage unit 123 is a storage area that stores acquired tracing data.
(17) The input unit 130 is an input device such as a keyboard, a mouse, or a button such as a switch button. The display unit 140 is a display device, and is composed of, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), or the like. A touch panel or a display device in which the input unit 130 and the display unit 140 are integrated may be provided. The communication interface unit 150 is a communication control device composed of, for example, a predetermined connector such as a connector for RS232C and for directly connecting with the PLC 400.
(18) The tracing apparatus 100 may not be a PC, and may be provided in a machine tool control apparatus. For example, if the tracing apparatus 100 is provided in a machine tool control apparatus, it includes a function unit specific to a machine tool control apparatus in addition to the above-described function units, but the description is omitted because the function unit is known to those skilled in the art.
(19) The PLC 400 is an apparatus that inputs and outputs a signal by executing a program that has been commanded, such as a ladder program. The PLC 400 includes a CPU, a memory, a communication unit, or the like for performing various controls, arithmetic processing, and communication processing according to a ladder program, but they are not shown.
(20) Prior to describing the processing of the tracing apparatus 100 of the present embodiment, tracing results of a conventional tracing apparatus at the time of executing a ladder program will be described.
(21)
(22) The tracing results of the tracing apparatus 100 according to the present embodiment at the time of executing the ladder program will be described.
(23) In step S10 (hereinafter, step S is simply referred to as S) in
(24) In S11, the control unit 110 (the tracing data acquisition unit 112) acquires tracing data indicating a signal state of the constituent element at a specified timing, at a predetermined sampling cycle. The tracing data acquisition unit 112, for example, acquires the tracing data of the respective constituent elements obtained by executing the ladder program to be traced from the PLC 400. Then, the control unit 110 has the acquired tracing data stored in the tracing data storage unit 123. In S12, the control unit 110 (the section detection unit 113) detects a sampling cycle section in which two or more of the tracing data corresponding to the constituent elements acquired by the tracing data acquisition unit 112 simultaneously change. For example, in the case of the tracing data of the ladder 20 in
(25) In S13 of
(26) Specific examples of tracing results will be described.
Specific Example 1
(27)
Specific Example 2
(28)
Specific Example 3
(29) A ladder program differing from the above-described specific examples 1 and 2 will be described.
(30)
(31) In this regard, if the sampling cycle is c and the total net is n, the time t until the signal of the constituent element in the mth net changes is represented by the following equation:
t=c×m/n
(32) If the sampling cycle 221 is 10 msec and the total net is 100, the time until the signal of the constituent element B changes is 10× 1/100=0.1 msec. In contrast, the time until the signal of the constituent element E changes is 10× 99/100=9.9 msec. The length 241 between the constituent element A and the constituent element B is set at a length corresponding to 0.1 when the length of the section Y is set at 10. The length 242 between the constituent element A and the constituent element E is set at a length corresponding to 9.9 when the length of the section Y is set at 10. The tracing results 240 indicate the sequence in which the signals of the constituent elements change by using arrows. The tracing results 240 in
(33) Thus, in the tracing system 1000, the tracing apparatus 100 detects a sampling cycle section in which two or more of the tracing data of the constituent elements simultaneously change, and calculates and outputs the sequence in which the signals of the constituent elements change in the detected section. Therefore, the visibility of the tracing results output by the tracing apparatus 100 is improved. As a result, the time for analysis of signal correlation can be reduced.
(34) In addition, in the present embodiment, the change sequence can be easily recognized by, in the tracing results, lengthening the section and showing the displaced positions of the signal changes in the change sequence or numerically indicating the change sequence. Furthermore, in the present embodiment, the tracing results are displayed not only in the change sequence but also by expressing the timing of change in terms of the ratio of length, thereby making it easier to recognize the timing of change.
(35) Programs including operating programs used in the present invention may be stored using various types of non-transitory computer readable media and supplied to a computer. The 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., flexible disks, magnetic tapes, hard disk drives), magneto-optical recording media (e.g., magneto-optical disks), CD-ROMs (read only memories), CD-Rs, CD-R/Ws, semiconductor memories (e.g., mask ROMs, PROMs (programmable ROMs), EPROMs (erasable PROMs), flash ROMs, RAMs (random access memories)). The programs may also be supplied to a computer by various types of transitory computer readable media. Examples of the transitory computer readable media include electric signals, optical signals, and electromagnetic waves. The transitory computer readable media can provide programs to a computer via wired communication paths such as electrical wires and optical fibers, or via radio communication paths.
(36) The above-described embodiment is a preferred embodiment of the present invention, but the scope of the present invention is not limited to the above-described embodiment only. The present invention can be implemented in a form in which various modifications are made within a scope that does not depart from the gist of the present invention.
Modification 1
(37) In the embodiment described above, the tracing apparatus is connected to the PLC, but the present invention is not limited thereto. The PLC may include a function of the tracing apparatus.
Modification 2
(38) In the above-described embodiment, a ladder logic program is described as the sequence control program, but the present invention is not limited thereto. For example, the program may be another sequence control program such as a sequential function chart (SFC) logic.
Modification 3
(39) In the above-described embodiment, tracing results including change sequence are displayed on the display unit, but the present invention is not limited thereto. The tracing results may be output to a file as data.
EXPLANATION OF REFERENCE NUMERALS
(40) 100 TRACING APPARATUS
(41) 110 CONTROL UNIT
(42) 111 CONSTITUENT ELEMENT SETTING UNIT
(43) 112 TRACING DATA ACQUISITION
(44) 113 SECTION DETECTION UNIT
(45) 114 CHANGE SEQUENCE CALCULATION UNIT
(46) 115 CHANGE SEQUENCE OUTPUT UNIT
(47) 120 STORAGE UNIT
(48) 122 CONSTITUENT ELEMENT STORAGE UNIT
(49) 123 TRACING DATA STORAGE UNIT
(50) 140 DISPLAY UNIT
(51) 400 PLC
(52) 1000 TRACING SYSTEM