Program Creation Support Device for Programmable Logic Controllers
The program creation support device for PLCs addresses the challenge of overwhelming event logs by selectively displaying relevant device values, event logs, and image data in chronological order, enhancing troubleshooting efficiency by correlating this information with the user program.
Patent Information
- Application Number
- JP2023147288
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2023-09-12
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2039-02-12
AI Technical Summary
Existing programmable logic controllers (PLCs) face challenges in efficiently identifying and troubleshooting issues due to the overwhelming number of event logs, making it difficult for users to find relevant logs for troubleshooting, and there is a risk of missing important events when narrowing down stored logs.
A program creation support device for PLCs that includes a temporary recording unit to log device values and events in time series, a storage unit to store image data, and a display unit to selectively display relevant events, device values, and image data in chronological order, aiding in troubleshooting by overlaying this information on the user program.
Enables the selective display of events useful for troubleshooting, allowing users to efficiently identify the cause of issues by correlating device values, event logs, and image data with the user program, thereby improving troubleshooting efficiency.
Smart Images

Figure 0007717129000001 
Figure 0007717129000002 
Figure 0007717129000003
Abstract
Description
Technical Field
[0001] The present invention relates to a program creation support device for a programmable logic controller.
Background Art
[0002] A programmable logic controller (hereinafter referred to as "PLC") is a controller that controls manufacturing equipment, conveying devices, and inspection devices in factory automation (FA). The PLC controls various expansion units and controlled devices by executing a user program such as a ladder program created by the user. When actually executing the user program on the PLC, an event that was not assumed during the creation of the user program may be found, and it may be necessary to modify the user program. In order to identify the modification points, the user not only reviews the user program but also refers to the log data generated by the PLC. The log data stores the values of devices (device values) collected when the user program is being executed. In the field of PLC, a device means a storage area that stores information. Examples of devices include relay devices that hold one-bit information and word devices that hold one-word information.
[0003] In order to perform sequence control in the field of FA, a program for a PLC is designed as an application program for program editing. After designing the program, the designer simulates the sequence operation of this program, debugs the program while verifying the simulation results, transfers the completed program to the PLC, and executes it. However, the operation does not always realize as expected. Based on actual operation, editing such as debugging the program again is carried out. Especially during actual operation, when the expected operation cannot be realized, it is important to identify where the cause lies and the event that caused the trouble. For example, the operation may stop due to a cause other than the program design (as an example, when the control stops because an unexpected workpiece is flowing on the line).
[0004] Apart from the technology of storing such device values, a technology of storing an event log (such as when a failure occurs) is known (for example, Patent Document 1).
[0005] However, since the types of stored event logs are very numerous (on the order of 1000 types), if important event logs are buried, there is a problem that it takes time and is inconvenient for users to search for the cause of the trouble. On the other hand, it is also conceivable that the user narrows down the event logs to be stored in advance, but it is difficult to select the events to be stored, and there is a risk of missing storing events useful for trouble shooting.
Prior Art Documents
Patent Documents
[0006]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0007] One object of the present invention is to provide a program creation support device for a programmable logic controller capable of acquiring logs of events useful for troubleshooting. Means for Solving the Problems and Effects of the Invention
[0008] According to a program creation support device for a programmable logic controller according to a first aspect of the present invention, Includes the unit to which the camera is connected a programmable logic controller composed of one or more units, a program execution unit that repeatedly executes a user program, a device unit having a device that is a storage area referred to by the program execution unit, and the device unit A temporary recording unit that records the device values stored in the time series as log data together with the current time, and a plurality of events generated in the programmable logic controller or a controlled device controlled by the programmable logic controller together with the generation time as event data in time series, and when a predetermined storage condition is satisfied during operation, the log data and event data recorded in the temporary recording unit a storage unit that stores the image data in a storage memory and also stores the image data captured in time series by the camera unit in the storage memory; A program creation support device for assisting in creating the user program described in the graphical programming language, which is executed in the programmable logic controller including the above, and the log data and event data stored in the storage memory during operation of the programmable logic controller and the plurality of image data. An operation record data holding unit that stores as operation record data, an event display field for displaying a list of the events, a ladder monitor field for displaying a ladder diagram that is the user program, and a camera monitor field for displaying the plurality of image data read from the operation record data storage unit in chronological order; A display unit that displays, and a plurality of events included in the event data read from the operation record data holding unit and the generation time of each of the plurality of events Event display column An event display control unit that displays a list in, a selection reception unit that receives a selection of one from among the plurality of events displayed in a list by the event display control unit, and the log data included in the log data read from the operation record data holding unit and corresponding to the time recorded at the generation time of the event selected by the selection reception unit The ladder monitor column A device display control unit that is displayed superimposed on the user program, and When one event is selected in the event display field by the selection receiving unit, the display of the device value in the ladder monitor field is updated in accordance with the occurrence time of the selected event, and image data corresponding to the occurrence time of the selected event is displayed in the camera monitor field.It can be configured as follows. With the above configuration, from among a wide variety of events, events useful for trouble shooting can be selectively displayed and used to investigate the cause of the trouble.
[0009] Further, according to the program creation support device for a programmable logic controller according to the second aspect, in addition to the above configuration, The device may include a synchronization software module for synchronizing the display target time in the device display control section, the display target time in the event display section, and the display of image data displayed in the camera monitor section.
[0010] Furthermore, according to the program creation support device for a programmable logic controller according to the third aspect, in addition to any of the above configurations, The display unit has a time UI display area that displays a time UI for manipulating the display target time of the device value displayed in the ladder monitor column, and when an event is selected in the event display column by the selection receiving unit, the display of the time UI in the time UI display area is updated in conjunction with the occurrence time of the selected event, and image data corresponding to the occurrence time of the selected event can be displayed in the camera monitor column.
[0011] Furthermore, according to the program creation support device for a programmable logic controller according to the fourth aspect, in addition to any of the above configurations, The time UI includes a play button, and when the play button is operated in the time UI display area, the device values are displayed and updated in chronological order in the ladder monitor field, a video made up of the plurality of image data is played in the camera monitor field, and corresponding events are switched over in the event display field as time passes. it can be done.
[0012] Furthermore, according to the program creation support device for a programmable logic controller according to the fifth aspect, in addition to any of the above configurations, The display unit further displays a time designation cursor for designating a time associated with image data to be displayed in the camera monitor field, and the image data displayed in the camera monitor field is updated in accordance with the time designated by the time designation cursor, and the display of the time UI in the time UI display area is updated accordingly. it can be done.
[0013] Furthermore, according to the program creation support device for a programmable logic controller according to the sixth aspect, in addition to any of the above configurations, The storage unit of the programmable logic controller stores the log data, the event data, and the plurality of image data in the storage memory as a package composed of a plurality of files, and the operation record data holding unit stores the package composed of the plurality of files stored in the storage memory as the operation record data. it can be done.
[0014] Furthermore, according to the program creation support device for a programmable logic controller according to the seventh aspect, in addition to any of the above configurations, The operation record data includes management information data indicating the contents of the package composed of the plurality of files. it can be done.
[0015] Furthermore, according to the program creation support device for a programmable logic controller according to the eighth aspect, in addition to any of the above configurations, The storage unit stores the log data, the event data, and the plurality of image data in the storage memory, and also stores project data including the user program and the configuration information of the unit. The display unit displays the user program and the configuration information of the unit included in the project data read from the operation record data holding unit, and the device display control unit overlays and displays the device value recorded at the time corresponding to the occurrence time of the event included in the log data read from the operation record data holding unit and selected by the selection reception unit on the user program included in the project data read from the operation record data holding unit. It is possible.
Brief Explanation of Drawings
[0018]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Figure 14
Figure 15
Figure 16
Figure 17
Figure 18
Figure 19
Figure 20
Figure 21
Figure 22
Figure 23
Figure 24
Figure 25
Figure 26
Figure 27
Figure 28
Figure 29
Figure 30
Figure 31
Figure 32
Figure 33
Figure 34
Figure 35
Figure 36
Figure 37
Figure 38
Figure 39
Figure 40
Figure 41
Figure 42
Figure 43
Figure 44
Figure 45
Figure 46
Embodiments for Carrying Out the Invention
[0019] Hereinafter, embodiments of the present invention will be described with reference to the drawings. However, the embodiments shown below are examples for embodying the technical idea of the present invention, and the present invention is not limited to the following. Also, this specification does not in any way specify the members shown in the claims as the members of the embodiments. In particular, the dimensions, materials, shapes, relative arrangements, etc. of the components described in the embodiments are not intended to limit the scope of the present invention thereto alone, but are merely illustrative examples. Note that the sizes and positional relationships of the members shown in each drawing may be exaggerated for clarity of explanation. Furthermore, in the following description, the same names and reference numerals denote the same or equivalent members, and detailed descriptions will be omitted as appropriate. Further, each element constituting the present invention may be configured such that a plurality of elements are formed of the same member and one member serves as a plurality of elements, or conversely, the function of one member may be shared by a plurality of members and realized.
[0020] FIG. 1 shows an overview diagram of a programmable logic controller system. The programmable logic controller system 1000 shown in this figure exemplifies a system that captures and inspects an object WK flowing through a line with a camera unit 98. This programmable logic controller system 1000 is connected to a PC 2 and edits a project data editing program.
[0021] The programmable logic controller 1 is configured by connecting a plurality of units. The plurality of units are communicably connected via an inter-unit bus 90. The units are roughly classified into a CPU unit 3 and an expansion unit 4. The CPU unit 3, also called a main unit or a basic unit, performs the basic operations of the programmable logic controller. The expansion unit 4 is a function expansion unit that expands the functions of the CPU unit 3. In the example of FIG. 1, the expansion unit 4 includes a camera input expansion unit 4c, a motion unit 4d, and a communication unit 4e. The camera input expansion unit 4c, which is a type of expansion unit 4, is connected to the camera unit 98, images the object WK at a predetermined timing, and sends it to the CPU unit. The motion unit 4d, also called a positioning unit, controls the position of a control target called an axis. Generally, there is a drive source such as a motor for each axis. The communication unit 4e communicates with external devices. The CPU unit 3 collects data from these expansion units 4 and performs necessary control. <System Configuration>
[0022] Here, to make the programmable logic controller (hereinafter also referred to as "PLC") better understood by those skilled in the art, the configuration and operation of a general PLC will be described.
[0023] Figure 2 is a conceptual diagram showing a configuration example of a programmable logic controller system according to an embodiment of the present invention. As shown in Figure 2, this system includes a PC2 for editing a user program such as a ladder program, and a PLC1 for comprehensively controlling various control devices installed in a factory or the like. PC is an abbreviation for personal computer. The user program may be created using a graphical programming language such as a ladder language or a flowchart-form motion program such as SFC (Sequential Function Chart), or may be created using a high-level programming language such as C language. Hereinafter, for convenience of explanation, the user program is assumed to be a ladder program. The PLC1 includes a CPU unit 3 with a built-in CPU and one or more expansion units 4. One or more expansion units 4 are detachable from the CPU unit 3. For example, the expansion unit 4a may be a positioning unit that drives a motor (field device 10a) to position a workpiece, and the expansion unit 4b may be a counter unit. The counter unit counts signals from an encoder (field device 10b) such as a manual pulsar. Note that the letters a, b, c... attached to the end of the reference numerals may be omitted. Note that the system including the PLC1 and the PC2 may be called a programmable logic controller system.
[0024] The CPU unit 3 is provided with a PLC-side display unit 5 and a PLC-side operation unit 6. The PLC-side display unit 5 can display the operation status of each expansion unit 4 attached to the CPU unit 3. The PLC-side display unit 5 switches the display content according to the operation content of the PLC-side operation unit 6. The PLC-side operation unit 6 may be a button or the like integrated with the CPU unit 3, or may be an external input device such as a console, a mouse, or a keyboard. Alternatively, the PLC-side display unit 5 can also serve as a touch panel and combine the function of the operation unit.
[0025] The PLC-side display unit 5 usually displays the current values (device values) of the devices in the PLC 1, error information generated in the PLC 1, and the like. A device refers to a name for an area on the memory provided for storing device values (device data), and may be called device memory. The device value is information indicating the input state from the input device, the output state to the output device, and the states of internal relays (auxiliary relays), timers, counters, data memories, etc. set in the user program. The types of device values are bit type and word type. A bit device stores a 1-bit device value. A word device stores a 1-word device value.
[0026] The expansion unit 4 is prepared to expand the functions of the PLC 1. A field device (controlled device) 10 corresponding to the function of the expansion unit 4 is connected to each expansion unit 4, and thereby each field device 10 is connected to the CPU unit 3 via the expansion unit 4. The field device 10 may be an input device such as a sensor or a camera unit, or an output device such as an actuator. Also, a plurality of field devices may be connected to one expansion unit 4. (Engineering Tool for Programmable Logic Controller)
[0027] PC2 implements an engineering tool for programmable logic controllers (hereinafter also referred to as the "engineering tool for PLCs"). The engineering tool for PLCs is a component that connects to PLC1 to perform its settings, control during operation, operation verification, etc. It can also create various programs for operating PLC1 and the programmable logic controller system including it, and edit and modify the created programs. In this sense, it may be called a program creation support device. Furthermore, the engineering tool for PLCs can reproduce the operating status of each device at that time based on the operation record data that records the operation of the past programmable logic controller system. The operation record data includes project data containing user programs such as ladder programs and setting data such as unit configuration information of each unit, and log data which is operation data such as device values of each device and image data of the camera unit during operation. This engineering tool for PLCs can also read and edit the project data among the operation record data. In this sense, the engineering tool for PLCs may be called a project data editing program.
[0028] PC2 is, for example, a portable notebook type or tablet type personal computer, and is equipped with a display unit 7 and a PC side operation unit 8. A ladder program, which is an example of a user program for controlling PLC1, is created using PC2. The created ladder program is converted into mnemonic code in PC2. PC2 is connected to the CPU unit 3 of PLC1 via a communication cable 9 such as USB (Universal Serial Bus), and sends the ladder program converted into mnemonic code to the CPU unit 3. The CPU unit 3 converts the ladder program into machine code and stores it in the memory provided in the CPU unit 3. Here, the mnemonic code is being sent to the CPU unit 3, but the present invention is not limited to this. For example, PC2 may convert the mnemonic code into intermediate code and send the intermediate code to the CPU unit 3.
[0029] Although not shown in FIG. 2, the PC-side operation unit 8 of the PC2 may include a pointing device such as a mouse connected to the PC2. Further, the PC2 may be configured to be detachably connected to the CPU unit 3 of the PLC1 via a communication cable 9 other than USB. Further, the PC2 may be configured to be wirelessly connected to the CPU unit 3 of the PLC1 without passing through the communication cable 9. <Ladder program>
[0030] FIG. 3 is a diagram showing an example of a ladder diagram Ld displayed on the display unit 7 of the PC2 when creating a ladder program. The PC2 displays a plurality of cells arranged in a matrix on the display unit 7. Symbols of virtual devices are arranged in each cell. The symbols indicate input relays, output relays, etc. A relay circuit is formed by such a plurality of symbols. In the ladder diagram Ld, for example, cells of 10 columns × N rows (N is an arbitrary natural number) are arranged. And symbols of virtual devices are appropriately arranged in the cells of each row.
[0031] The relay circuit shown in FIG. 3 is configured by appropriately coupling symbols of three virtual devices (hereinafter referred to as "input devices") that are turned ON / OFF based on an input signal from an input device and symbols of a virtual device (hereinafter referred to as "output device") that is turned ON / OFF to control the operation of an output device.
[0032] The characters ("R0001", "R0002", and "R0003") displayed above the symbol of each input device represent the device name (address name) of the input device. The characters ("Flag 1", "Flag 2", and "Flag 3") displayed below the symbol of each input device represent the device comment associated with the input device. The character ("Home return") displayed above the symbol of the output device is a label consisting of a character string representing the function of the output device.
[0033] In the example shown in FIG. 3, symbols of two input devices corresponding to device names "R0001" and "R0002" are serially combined to form an AND circuit. Further, for the AND circuit composed of symbols of these two input devices, a symbol of an input device corresponding to the device name "R0003" is parallely combined to form an OR circuit. That is, in this relay circuit, the output device corresponding to the symbol in the first row turns ON only when both of the input devices corresponding to the two symbols in the first row are ON or when the input device corresponding to the symbol in the second row is ON. <Program creation support device>
[0034] FIG. 4 is a block diagram for explaining the electrical configuration of PC2. As shown in FIG. 4, PC2 includes a PC-side memory unit 11, a PC-side CPU 21, a display unit 7, a PC-side operation unit 8, a PC-side storage device 22, and a PC-side communication unit 23. The display unit 7, the PC-side operation unit 8, the PC-side storage device 22, and the PC-side communication unit 23 are each electrically connected to the PC-side CPU 21.
[0035] The PC-side memory unit 11 is a work memory that serves as a work space for the PC-side CPU 21 to execute processing, and is typically composed of a RAM or the like. The PC-side storage device 22 realizes the function of the driving record data storage unit 36B described later. The driving record data includes project data.
[0036] The PC-side storage device 22 includes a hard disk, a semiconductor memory, a ROM, etc., and may further include a removable memory card. CPU is an abbreviation for central processing unit. ROM is an abbreviation for read-only memory. RAM is an abbreviation for random access memory.
[0037] The user causes the PC-side CPU 21 to execute editing software, which is a computer program stored in the PC-side storage device 22, and edits project data through the PC-side operation unit 8. This editing software corresponds to a project data editing program. (Project Data)
[0038] The project data includes one or more user programs (such as ladder programs), unit configuration information of the CPU unit 3 and the expansion unit 4, etc. The project data may also include program configuration information indicating what program components the user program is composed of. Further, the unit configuration information is information indicating the connection positions of a plurality of expansion units 4 with respect to the CPU unit 3, information indicating functions provided in the CPU unit 3 (such as communication functions and positioning functions), information indicating functions of the expansion unit 4 (such as photographing functions), etc.
[0039] Here, the editing of the project data includes the creation and modification of the project data. The project data created using the project data editing program is stored in the PC-side storage device 22. Also, the user can read out the project data stored in the PC-side storage device 22 as needed and modify the project data using the project data editing program. The PC-side communication unit 23 is for communicably connecting the PC 2 to the CPU unit 3 via the communication cable 9. The PC-side CPU 21 transfers the project data to the CPU unit 3 via the PC-side communication unit 23.
[0040] The project data editing program has an edit mode, a monitor mode, and a history playback mode. The edit mode is also called an edit mode, etc., and the project data can be edited. Also, the monitor mode can perform a simulation operation for debugging the user program, etc. Further, the history playback mode is also called a replay mode, time machine playback, etc., and a playback display can be performed. The switching between these edit mode, monitor mode, and history playback mode is performed by a mode selection unit 50D described later. <plc1>
[0041] FIG. 5 is a block diagram for explaining the electrical configuration of the PLC1. As shown in this figure, the CPU unit 3 includes a PLC-side CPU 31, a PLC-side display unit 5, a PLC-side operation unit 6, a PLC-side storage device 32, and a PLC-side communication unit 33. The PLC-side display unit 5, the PLC-side operation unit 6, the PLC-side storage device 32, and the PLC-side communication unit 33 are each electrically connected to the PLC-side CPU 31. (PLC-side storage device 32)
[0042] The PLC-side storage device 32 includes a project storage unit 35, a device unit 34, a temporary recording unit 91a, and a storage memory 36.
[0043] The project storage unit 35 stores the project data input from the PC2. The PLC-side storage device 32 also stores a control program for the CPU unit 3.
[0044] The device unit 34 has bit devices, word devices, etc., and each device stores a device value. This device unit 34 functions as a device memory that stores the device values of a plurality of devices. It may also function as a storage area referred to according to the user program.
[0045] The temporary recording unit 91a records the device values stored in the device unit 34 in time series. This temporary recording unit 91a can be configured by a ring buffer or the like.
[0046] The storage memory 36 stores the device values recorded in time series in the temporary recording unit 91a. The storage memory 36 is configured as a non-volatile memory, such as an internal memory 37 or a removable memory card 36A.
[0047] Thus, the PLC-side storage device 32 has a plurality of storage areas. This PLC-side storage device 32 may include a RAM, a ROM, a memory card, etc. For example, in the example of FIG. 5, the storage memory 36 is configured by a removable memory card 36A. (CPU 31 on the PLC side)
[0048] The CPU 31 on the PLC side includes a program execution unit 514, a storage condition setting unit 45, a recording control unit 39, and a storage control unit 50C. The program execution unit 514 functions as a ladder execution engine that repeatedly executes user programs. According to the user program, the device unit 34, which is a storage area referred to by the program execution unit 514, stores the device values of a plurality of devices.
[0049] The storage condition setting unit 45 is a member for setting various conditions. Here, the storage condition setting unit 45 sets a first trigger condition for a recording trigger for recording in the temporary recording unit 91a, a second trigger condition for a storage trigger for storing in the storage memory 36, and a buffer recording period that indicates a period including at least one of the period up to this reference time and the period from this reference time, based on the time point indicated by the recording trigger, and is a period for temporarily recording in the temporary recording unit 91a.
[0050] In the storage condition setting unit 45, as the first trigger condition, conditions for a recording start trigger for starting recording in the temporary recording unit 91a can be set. Also, as the buffer recording period, a period from the reference time indicated by this recording start trigger can be set.
[0051] When the first trigger condition for the recording trigger is satisfied, the recording control unit 39 records time-series device values corresponding to the buffer recording period with the time point indicated by this recording trigger as the reference time in the temporary recording unit 91a as log data. Also, the recording control unit 39 holds the recorded log data in the temporary recording unit 91a until either the time point when the second trigger condition for the storage trigger is satisfied or the earlier time point of the next time when the first trigger condition for the recording trigger is satisfied. Then, when the first trigger condition for the next recording trigger is satisfied, time-series device values corresponding to the buffer recording period with the time point indicated by the next recording trigger as the reference time are recorded in the temporary recording unit 91a as log data.
[0052] When the second trigger condition for the save trigger is satisfied, the save control unit 50C saves the log data held in the temporary recording unit 91a by the recording control unit 39 to the save memory 36. Here, when the second trigger condition for the save trigger is satisfied, it is preferable that the save control unit 50C saves to the save memory the log data held in the temporary recording unit 91a by the recording control unit 39 and corresponding to the immediately preceding recording trigger as viewed from the save trigger. In this way, even after the buffer recording period has elapsed, the save control unit 50C holds the log data recorded during the buffer recording period, and when the save trigger is activated, saves the log data held in association with the recording trigger. However, the log data saved by the recording control unit 39 is not limited to the log data corresponding to the most recent recording trigger, and may be the log data corresponding to the recording trigger two times before or three times before.
[0053] As shown in FIG. 5, the CPU unit 3 and the expansion unit 4 are connected via an inter-unit bus 90 which is a kind of expansion bus. Note that the communication function related to the inter-unit bus 90 may be implemented as a part of the PLC side communication unit 33. Further, the PLC side communication unit 33 may have a network communication circuit. The PLC side CPU 31 may transmit log data and the like to the PC 2, the cloud, etc. via the PLC side communication unit 33.
[0054] Here, a supplementary explanation will be given about the inter-unit bus 90. This inter-unit bus 90 is a bus on which input / output refresh and the like to be described below are performed. The communication control on the inter-unit bus 90 is realized by a so-called bus master 38 (note that a bus master may be provided as a part of the PLC side communication unit 33, or the bus master 38 may be provided as a part of the PLC side CPU 31). The bus master 38 is a control circuit for controlling communication on the inter-unit bus 90, receives a communication request from the PLC side CPU 31, and performs communication such as input / output refresh to be described below with the expansion unit 4.
[0055] The expansion unit 4 is equipped with a CPU 41 and a memory 42. The CPU 41 controls the field device 10 according to an instruction (device value) from the CPU unit 3 stored in the device. Also, the CPU 41 stores the control result of the field device 10 in a device called a buffer memory. The control result stored in the device is transferred to the CPU unit 3 by input / output refresh. Also, the control result stored in the device is transferred to the CPU unit 3 according to a read instruction from the CPU unit 3 even at a timing different from the input / output refresh. The memory 42 includes a RAM, a ROM, etc. In particular, a storage area used as a buffer memory is secured in the RAM. Also, the memory 42 may have a buffer for temporarily holding data (e.g., still image data or moving image data) acquired by the field device 10.
[0056] Figure 6 is a schematic diagram showing the scan time of the CPU unit 3. As shown in Figure 6, one scan time T is composed of inter-unit communication 201 for input / output refresh, program execution 202, and END processing 204. In the inter-unit communication 201, the CPU unit 3 transmits the output data obtained by executing the ladder program from the PLC-side storage device 32 in the CPU unit 3 to an external device such as the expansion unit 4. Further, the CPU unit 3 takes in the input data received from an external device such as the expansion unit 4 into the PLC-side storage device 32 in the CPU unit 3. That is, the device value stored in the device of the CPU unit 3 is reflected in the device of the expansion unit 4 by output refresh. Similarly, the device value stored in the device of the expansion unit 4 is reflected in the device of the CPU unit 3 by input refresh. In this way, the devices of the CPU unit 3 and the expansion unit 4 are synchronized by input / output refresh.
[0057] In addition, a mechanism for updating device values between units (inter-unit synchronization) at timings other than refresh may be adopted. However, the devices of the CPU unit 3 are rewritten by the CPU unit 3 at any time, and similarly, the devices of the expansion unit 4 are rewritten by the expansion unit 4 at any time. That is, the devices of the CPU unit 3 can be accessed at any time by the devices inside the CPU unit 3. Similarly, the devices of the expansion unit 4 can be accessed at any time by the devices inside the expansion unit 4. Between the CPU unit 3 and the expansion unit 4, basically, the device values are updated and synchronized with each other at the timing of refresh. In the program execution 202, the CPU unit 3 executes (performs calculations on) a program using the updated input data. As shown in FIG. 6, in the program execution 202, a plurality of program modules or ladder programs may be executed in order according to the project data. The CPU unit 3 performs arithmetic processing on data by executing the program. Note that the END processing means all processes related to peripheral services such as data communication with external devices such as a display (not shown) connected to the PC2 or the CPU unit 3, and system error checking.
[0058] In this way, the PC2 creates a ladder program according to the user's operation and transfers the created ladder program to the PLC1. The PLC1 takes the input / output refresh, the execution of the ladder program, and the END processing as one cycle (one scan) and repeatedly executes this cycle periodically, that is, cyclically. Thereby, various output devices (such as motors) are controlled based on the timing signals from various input devices (such as sensors). Note that separately from the scan cycle, the CPU unit 3 and the expansion unit 4 each have an internal control cycle. The CPU unit 3 and the expansion unit 4 control functions such as the field device 10 based on the internal control cycle. <Logging>
[0059] When a user improves or modifies a user program, the device values obtained when the PLC1 executes the user program may be useful. Therefore, the PLC1 acquires specified device values in advance and creates log data. Here, among the devices managed by the PLC1, there are not only those used by the user program but also those not used by the user program. Also, among the devices, some are useful and some are not useful when improving or modifying the user program. Generally, since the number of devices reaches several thousand, it has been a heavy burden for the user to specify the necessary devices. Therefore, the PC2 analyzes the user program and extracts the devices used or described in the user program as logging targets. This reduces the burden on the user.
[0060] If all the devices managed by the PLC1 are targeted for logging, the scan time will become long. This is because logging is executed as one of the user programs or during input / output refresh. Sometimes, due to the delay caused by logging, the user program may not operate as the user expects. Therefore, the number of devices to be logged should be appropriately maintained.
[0061] The user program may be composed of a plurality of program components (for example, program modules (main ladder program and sub ladder program), function blocks). Among these, it may be sufficient for the user if the devices related to the program components that the user wishes to modify are logged. Also, among the plurality of program components, the user may wish to exclude a specific program component from the extraction target or add a specific program component to the extraction target. Therefore, it would be convenient for the user if devices can be added or deleted from the logging target in units of program components.
[0062] As described above, the CPU unit 3 and the expansion unit 4 have one or more functions. Various devices are assigned to each function. Therefore, it would be convenient for the user if devices could be added or removed from the logging target in units of these functions. For example, when an undesirable event occurs regarding the communication function of the CPU unit 3, the user can easily resolve this event by referring to the device values of the devices related to the communication function of the CPU unit 3. (Program creation support device)
[0063] An example of the program creation support device is shown in the block diagram of FIG. 7. The program creation support device 1200 shown in this figure supports the creation of a user program executed by the PLC 1 composed of one or more units. This program creation support device 1200 can be realized by loading and executing a user program creation support program on the PC 2, or can also be constructed with dedicated hardware. In the example shown in FIG. 7, an example realized by installing a user program creation support program on the PC 2 is shown. This program creation support device 1200 includes a PC-side CPU 21, a PC-side memory unit 11, a PC-side storage device 22, a display unit 7, a PC-side operation unit 8, and a communication unit.
[0064] The PC-side memory unit 11 is a work space for the PC-side CPU 21 to execute processing. As such a work memory, a RAM or the like can be used.
[0065] The PC-side storage device 22 is a storage that can be read by the PC 2. Typically, it is a storage device such as a hard disk provided in the PC 2, but it is not limited to a fixed type and can also be a portable medium or media. For example, the memory card 36A provided in the PLC 1 can be removed from the PLC 1 side and inserted into the PC 2 side for reading. Or, it may be in a mode of accessing the PLC-side storage device 32 of the PLC 1 network-connected to the PC 2.
[0066] This PC-side storage device 22 realizes the function of the driving record data storage unit 36B that stores driving record data. The driving record data includes project data and log data. The project data includes the user program of the PLC 1 and the unit configuration information of each unit. The unit configuration information includes the functions of each unit, information on the connection positions between units, and the like. The log data is data such as device values during the operation of the PLC 1. The driving record data in which these project data and log data are associated is stored in the driving record data storage unit 36B.
[0067] The display unit 7 displays the log under the control of the log display control unit 61. The log display control unit 61 reads the driving record data from the driving record data storage unit 36B into the PC-side memory unit 11, and associates and displays the log data and the project data in the driving record data.
[0068] The PC-side CPU 21 realizes functions such as the project editing unit 50B and the save control unit 50C. The project editing unit 50B receives an editing instruction for the project data displayed on the display unit 7 by the log display control unit 61, and edits this project data. When saving the edited project data, the driving record data in which the project data and the corresponding log data are associated is stored in the driving record data storage unit 36B.
[0069] The save control unit 50C restricts saving the project data in the driving record data stored in the driving record data storage unit 36B in the state edited by the project editing unit 50B. This can avoid a situation where the reliability of the entire project data is unintentionally impaired due to modifications such as user programs in the project data by the user. Specifically, the save control unit 50C restricts overwriting and saving the project data in the driving record data stored in the driving record data storage unit 36B in the state edited by the project editing unit 50B. For example, when it is detected that an overwrite operation has been attempted on the project data by the project editing unit 50B, an overwrite prohibition popup is displayed on the display unit 7. Alternatively, when attempting to save the edited project data, this edited project data is saved as a file separate from the original project data included in the driving record data. For example, an input dialog for the save file name may be displayed to prompt saving under a different name, or the name may be automatically changed and newly copy-saved. (Driving record data)
[0070] The driving record data is recorded at a predetermined timing. Specifically, by designating a period when troubles may occur and collectively saving the data during this period as the driving record data, it can be used for cause analysis when a trouble occurs.
[0071] The driving record data can be formed by packaging a plurality of files. The information included in the driving record data includes, for example, management information data, project data, project identification information, device data, image data, event data, etc. The management information data is information on what is included in the driving record data. Its extension is, for example, TMN. The project data is the project data at the time of recording the driving record data (for example, when a trouble occurs). Its extension is, for example, TPJ. Details will be described later.
[0072] The project identification information is information for identifying project data at the time of recording this driving record data. Its extension is, for example, TPI. The device data is data that records the device at the time of recording the driving record data, and there is one for each device. Its extension is, for example, TDV. The image data is data that records the image at the time of recording the driving record data. Its extension is, for example, TCA. The event data is data that records events and errors that occurred at the time of recording the driving record data. Its extension is, for example, TEV. These are just examples, and only any one of this information may be included in the driving record data, or other information may be added. (Composition of Project Data)
[0073] The project data is composed of multiple data. When the number of data is large, it is preferably saved in a compressed format. The project data can include a project file, modules, function blocks, unit setting files, mail setting files, etc. The project file is information regarding the settings of the project. Its extension is, for example, kpr. The module is information of the ladder program. Its extension is, for example, mod. The function block is information of the componentized ladder program. Its extension is, for example, kfb. The unit setting file is configuration information of the unit. Its extension is, for example, ue2. The mail setting file is setting information of the mail. Its extension is, for example, mil. In addition to these, files with different extensions for each unit may be included. Also, these are just examples, and only any one of this information may be included in the project data, or other information may be added.
[0074] As the identification information indicating the type of each data file, the file extension can be used. Also, using the file extension, the driving record data and the project data can be associated with each other. For example, for the driving record data, the TMN file, and for the project data, the kpr file are respectively associated with the user program creation support program on the PC2. By double-clicking the corresponding file on the PC2, the user program creation support program is launched. This state is shown in FIG. 8. Here, the project editing unit 50B of the user program creation support program includes an identification information interpretation unit. Here, as an example of the identification information interpretation unit, a TPJ interpretation unit 50B1 and a kpr interpretation unit 50B2 are shown. When the TMN file is double-clicked from a file screen such as an explorer on the display unit 7, the user program creation support program decompresses the TPJ file saved in a compressed format and loads it onto the PC-side memory unit 11. Also, when the kpr file is double-clicked, the user program creation support program loads other setting files arranged in the same folder as the kpr onto the PC-side memory unit 11 together. On the other hand, the TPJ file and the kpr file are interpreted as common model data by the TPJ interpretation unit 50B1 and the kpr interpretation unit 50B2 and are loaded onto the PC-side memory unit 11. (Mode selection unit 50D)
[0075] Furthermore, the PC-side CPU 21 can also implement the function of the mode selection unit 50D. The mode selection unit 50D can select an edit mode or a history playback mode. The edit mode is a mode for editing project data and is also called an edit mode or the like. Also, the history playback mode is a mode for performing display by the log display control unit 61 and is also called a replay mode or the like. Thus, in the user program creation support program, it is possible to switch the operation mode in one program, reproduce past events for troubleshooting, and then shift to the work of correcting the user program at the location considered to be the cause. Also, by using a common GUI for both the history playback mode and the edit mode, it is possible to perform a smooth transition of work. (User Program Creation Support Program 1300)
[0076] First, the GUI of the user program creation support program 1300 when the history playback mode is selected by the mode selection unit 50D is shown in FIG. 9. The GUI shown in this figure includes a project display area 420, a ladder monitor 450, a camera monitor 430, and a unit monitor 440. In FIG. 9, various pieces of information constituting the project data 71 are displayed in the project display area 420 in the left column. In order from the top, unit configuration (CPU unit, motion unit, analog input unit, camera input expansion unit, etc.), program configuration (per scan module, fixed cycle module, inter-unit synchronization module, function block, macro, etc.) are displayed. Regarding the motion unit, setting parameters for axis configuration and axis control are displayed as function settings. The user can double-click on the axis configuration and axis control on the GUI shown in FIG. 9 to check what the setting contents of these setting parameters are. Also, in the project display area 420, where Main and Sub are displayed for the per scan module, when the user clicks on Main, the Main program is displayed in the program display area 410 of the central ladder monitor 450. (History Playback Mode)
[0077] Next, in the history playback mode, the procedure for playing back the driving record data recorded at the time of trouble or the like will be described with reference to FIG. 10. For example, when double-clicking on a data file of the driving record data saved in advance (the driving record data file with the above-described extension TMN) or a project file (a project data file with the extension kpr), the user program creation support program 1300 shown in FIG. 10 is launched, and the double-clicked file is analyzed to reproduce the situation at the time of saving the driving record data automatically, such as expanding the included files or calling associated separate files. Alternatively, after the user launches the user program creation support program 1300, it is also possible to select and expand the corresponding file such as the driving record data file from the file menu or the like.
[0078] In this example, when the driving record data is double-clicked, the user program creation support program 1300 is configured to be launched in the history playback mode shown in FIG. 10. On the other hand, when the project data is double-clicked, the user program creation support program 1300 is configured to be launched in the edit mode shown in FIG. 11. By varying the initially selected operation mode according to the file selected by the user in this way, it is possible to pre-select the operation mode along with the assumed user operation and provide a smooth operation environment. (Switching between the history playback mode and the edit mode)
[0079] After the user program creation support program 1300 is started, to switch between the two operation modes of the editing mode and the history playback mode, select the operation mode to be switched from the mode selection bar 50D1 which is a form of the mode selection unit 50D. For example, configure the mode selection bar 50D1 as a pull-down menu as shown in FIG. 12, and the user can easily select the desired operation mode. In the example of FIG. 12, when "Replay" is selected, it switches to the history playback mode (replay mode), and when "Editor" is selected, it switches to the editing mode (editor mode). Also, the currently selected operation mode is displayed in the mode selection bar 50D1, and it also has the function of notifying the user of the current operation mode.
[0080] When switching the user program creation support program started in the editing mode by double-clicking the project data to the history playback mode, since device data etc. are not specified in the project data, the user is prompted to separately specify the operation record data including the device data for use in the history playback mode. For example, a dialog screen for selecting the operation record data is displayed.
[0081] In this way, in the history playback mode, the saved operation record data is read and the events at the time of trouble occurrence are reproduced, and the user can estimate the cause of the trouble and consider the necessary measures to improve it. For example, edit the ladder program so that the trouble can be eliminated.
[0082] In the history playback mode of FIG. 9, editing of the user program is prohibited. In other words, playback i.e., browsing of the operation record data is permitted, but tampering is prohibited. This ensures the reliability of the operation record data at the time of trouble occurrence. The history playback mode in which editing of the user program is prohibited is called the log playback mode. (Editing mode)
[0083] Here, as a procedure for editing a user program using the user program creation support program 1300 in edit mode, an example of modifying a ladder program will be described based on FIGS. 13 to 15. In this example, while performing positioning control of the motion unit using the user program creation support program 1300, if the value of the device indicating the current coordinates exceeds 12000, a user program is being considered that changes the operation to torque control. Here, as a result of verifying the cause of the trouble in the history playback mode, as shown in FIG. 13, it was found that when the operation was changed after the device value in the ladder diagram shown in the program display area 410 exceeded 12000, the movable arm would contact the workpiece. Therefore, in the edit mode, a case is assumed where the threshold value is to be changed from 12000 to 10000. First, in the user program creation support program 1300 of FIG. 13, select the portion surrounded by the dashed line, and press the Enter key on the keyboard that constitutes the PC-side operation unit 8, etc., to display the program edit screen 1310 of FIG. 14. From this program edit screen 1310, in the device value input field 1312, correct the value 12000 to 10000 and press the "Overwrite" button 1314. As a result, as shown in the program display area 410 of the user program creation support program 1300 of FIG. 15, the ladder program is changed.
[0084] As another example of editing a user program, the procedure for modifying the parameters of the positioning control of the motion unit will be described based on the user program creation support program 1300 in FIG. 16. Here, as a result of verifying the cause of the trouble in the history playback mode, it was found that the acceleration of the workpiece was too rapid. Therefore, considering switching to the edit mode and reducing the speed of the workpiece when moving to point parameter No1. First, in the user program creation support program 1300 in FIG. 16, select the "point parameter" of the motion unit from the unit configuration displayed in a tree view in the project display column 420 shown on the left side. In this state, select the parameter to be changed and input a value from a keyboard or the like which is the PC-side operation unit 8. Here, in the point parameter editing column 1320 on the right side of the screen, change the speed to a lower value (for example, 300 mm / s) from the speed specification column 1322. By such an operation, the user program can be changed to a desired value.
[0085] The procedure for saving the result of editing the user program in this way will be described based on FIGS. 17 to 18. When saving the user program, if the original user program included in the operation record data is edited, the user program at the time of trouble occurrence in the history playback mode cannot be reproduced. Therefore, it is necessary to save it separately from the original user program. Here, consider the case of saving it as another project data. First, perform the save operation of the project data in the same procedure as a normal project, such as the file menu 1330 of the user program creation support program 1300 shown in FIG. 17. Here, when selecting "Save project under a different name" 1332 from the file menu 1330, as shown in FIG. 18, a "Save project under a different name" dialog screen 1340 is displayed, and the user is prompted to specify the project name and the save location of the data file. With this procedure, it is saved as new project data while maintaining the user program included in the operation record data.
[0086] On the other hand, when attempting to perform an overwrite save by performing a keyboard operation such as "Save Project As" 1334 in the file menu 1330 of FIG. 17 or the general shortcut key Ctrl+S, the save control unit 50C controls the overwrite save. That is, regardless of the instruction for overwrite save, the "Save Project As" dialog screen 1340 shown in FIG. 18 is displayed to prompt the saving of project data with an alias. Alternatively, in the save screen of FIG. 17, the corresponding "Save Project As" may be grayed out and made unselectable to prohibit overwrite save, or "Save Project As" may not be displayed as an option in the file menu. Alternatively, the project data can be automatically saved with an alias. For example, a branch number such as "-1" is appended to the file name to automatically generate an alias file. Or, when "Save Project As" is selected, an overwrite prohibition popup indicating that the overwrite save operation is prohibited may be displayed.
[0087] In addition, when an overwrite save is further instructed for a user program that has already been saved with an alias, since it is not an operation on the original user program included in the operation record data, the overwrite save is executed as it is. That is, the operation of the save control unit 50C that regulates the above-described overwrite save operation is executed when the original project data and user program included in the operation record data at the time of trouble have not yet been copied and saved with an alias. Once saved with an alias, the overwrite save operation is permitted. (Save operation of operation record data)
[0088] As described above, the user can play back the driving record data based on the backup project of the device pre-stored on the PC2. Also, when there is no backup project of the device, the driving record can be played back based on the project data stored in the driving record data. By playing back the driving record data in the history playback mode, the user can find the problem areas of the process targeted by the project data. When the problem areas are corrected in the edit mode, the user can perform an operation to save the changed content on the PC2.
[0089] On the other hand, when using the project data in the driving record data for playing back the driving record, when executing the save operation of the project data edited in the edit mode, the user program creation support program may issue a write protection message at the save control unit to block the save. Alternatively, it may be saved on the hard disk of the PC or the like as new project data. (Procedure for "Write Protection")
[0090] An example of the "write protection" process by such a save control unit 50C will be described based on the flowchart of FIG. 19. First, in step S1901, when the save operation starts, in step S1902, it is determined whether the project data stored in the driving record data is being edited. If it is being edited, in step S1903, a message indicating that saving is not possible is displayed to the user, and the save process is canceled. On the other hand, if it is not being edited, the process proceeds to step S1904 to execute the save process. (Procedure for "Save as New Project Data")
[0091] Next, an example of the "save as new project data" process by the save control unit 50C will be described based on the flowchart of FIG. 20. First, in step S2001, when the save operation starts, in step S2002, it is determined whether the project data stored in the operation record data is being edited. If it is being edited, in step S2003, the user is requested to input the file save path on PC2 in order to save it as a new project. Then, in step S2004, the project is saved to the input save path. On the other hand, if it is not being edited in step S2002, the process proceeds to step S2005 and the save process is executed. (Verification function of the saved project)
[0092] The edited project data, like normal project data, can have the difference between the project currently being displayed in the user program creation support program and the edited project data saved on PC2 confirmed by the verification function provided by the user program creation support program 1300. For example, on the screen of the user program creation support program 1300 in FIG. 21, when "Project - Project Verification" 1336 is selected from the file menu 1330, the difference in the specified project data is automatically extracted and displayed on the screen of the user program creation support program 1300. For example, the added or changed parts in the verification target project data are highlighted, while the deleted parts are grayed out. Also, the differences can be listed and highlighted. As an example, FIG. 22 shows the result of executing the verification function for the ladder program edited in FIGS. 13 to 15. FIG. 22 shows an example of a comparison display screen 1350 for performing comparative display of project data in the user program creation support program 1300. In the example shown in this figure, for the items edited in the ladder program, the step number, the value of the verification source, and the value of the verification target are shown in red characters. In this way, it becomes easier for the user to visually grasp the edited parts with respect to the reference destination project data, for example, the user program at the time of trouble occurrence. ●Logging settings (automatic extraction and addition / removal)
[0093] Figure 23 shows the functions realized by the PC-side CPU 21 of the PC 2 executing the project data editing program stored in the PC-side storage device 22. Some or all of these functions may be realized by a hardware circuit such as an ASIC or an FPGA. ASIC is an abbreviation for Application Specific Integrated Circuit. FPGA is an abbreviation for Field Programmable Gate Array.
[0094] The PC-side CPU 21 in Figure 23 realizes the functions of the project creation unit 50, the log setting unit 51, and the log display control unit 6I. In this embodiment, the functions shown in Figure 23 are realized on the PC 2, but the present invention is not limited to this and may be realized on the PLC 1. (Project creation unit 50)
[0095] The project creation unit 50 realizes the functions of the program creation unit 63 and the function setting unit 62. This project creation unit 50 displays a UI for creating project data 71 on the display unit 7, creates the project data 71 according to the user instructions input from the PC-side operation unit 8, and stores it in the PC-side storage device 22. UI is an abbreviation for User Interface. The project data 71 includes a user program, the unit configuration information of the PLC 1, etc.
[0096] The program creation unit 63 creates a plurality of program components (each module) that make up the user program based on user operations via the UI. The function setting unit 62 executes settings related to the functions of the CPU unit 3 and the expansion unit 4. For example, the function setting unit 62 assigns any device to the function provided in the CPU unit 3, or assigns any device to the function provided in the expansion unit 4, and writes allocation information indicating the relationship between the function and the device into the unit configuration information. Note that the project creation unit 50 also stores, as project data 71, program configuration information indicating what program components the user program is composed of. The unit configuration information indicating what units the entire PLC 1 is composed of is also stored as project data 71. (Log setting unit 51)
[0097] The log setting unit 51 realizes the functions of the component specifying unit 52, the function specifying unit 60, the device extraction unit 53, the manual setting unit 58, and the estimation unit 59. By analyzing the project data 71, the log setting unit 51 extracts the devices described in the project data 71 and creates log setting data 72 for setting the extracted devices as logging targets. The log setting unit 51 has various functions. The component specifying unit 52 specifies the program components to be the extraction targets of the devices according to the user instructions input from the PC-side operation unit 8. Also, the component specifying unit 52 specifies the program components to be excluded from the extraction targets of the devices according to the user instructions input from the PC-side operation unit 8.
[0098] The device extraction unit 53 realizes the functions of the addition unit 54, the deletion unit 55, the merge unit 56, and the identification unit 57. By analyzing the project data 71, this device extraction unit 53 extracts the devices described in the project data 71 and creates log setting data 72. The addition unit 54 analyzes the program components designated as extraction targets by the component designation unit 52, extracts the devices described in the program components, and adds them to the extraction list. The deletion unit 55 analyzes the program components designated as exclusion targets by the component designation unit 52, extracts the devices described in the program components, and deletes the extracted devices from the extraction list. Alternatively, the deletion unit 55 adds the extracted devices to the exclusion list. The merge unit 56 deletes the devices that are extracted repeatedly from among the devices extracted from a plurality of program components from the extraction list. The identification unit 57 detects an instruction word for the memory card in the project data 71, identifies the device targeted by the instruction word, and adds the identified device to the extraction list.
[0099] In this embodiment, after the component designation unit 52 designates a program component, the addition unit 54 analyzes the designated program component to extract and add the devices to be logged. However, the present invention is not limited to this. For example, the addition unit 54 may first analyze one or more program components included in the project data 71 to extract devices, add the extracted devices to the extraction list, and then extract the devices described in the program components designated by the component designation unit 52 and add this to the extraction list.
[0100] Similarly, the deletion unit 55 may first create an extraction list by analyzing one or more program components included in the project data 71, and then extract the devices described in the program components designated by the component designation unit 52 and delete this from the extraction list.
[0101] In this embodiment, for convenience of explanation, the addition unit 54 and the deletion unit 55 are separated, but it goes without saying that they may be a single functional block.
[0102] The manual setting unit 58 adds one device or a series of related devices to the extraction list according to a user instruction input through the PC-side operation unit 8. The estimation unit 59 estimates the influence of the recording of device values by the PLC 1 on the execution of the user program based on the number of devices extracted as recording targets by the device extraction unit 53. A delay time correlated with the number of device values is added to the scan time by logging. Therefore, the estimation unit 59 may obtain the delay time by multiplying the number of device values by a predetermined coefficient, and display the delay time on the display unit 7 as an estimation result. This delay time may be referred to as an increase in the scan time.
[0103] The function specifying unit 60 specifies the functions of the CPU unit 3 and the expansion unit 4 that are the extraction targets of the devices according to a user instruction input from the PC-side operation unit 8. Also, the function specifying unit 60 specifies the functions of the CPU unit 3 and the expansion unit 4 that are excluded from the extraction targets of the devices according to a user instruction input from the PC-side operation unit 8. The addition unit 54 analyzes the unit configuration information of the functions specified as extraction targets by the function specifying unit 60, extracts the devices assigned to the functions by the unit configuration information, and adds them to the extraction list. The deletion unit 55 analyzes the unit configuration information of the functions specified as exclusion targets by the function specifying unit 60, extracts the devices assigned to the functions by the unit configuration information, and deletes the extracted devices from the extraction list. The merge unit 56 deletes the devices that are extracted repeatedly from the extraction list among the devices extracted for each of the plurality of functions. The specifying unit 57 detects an instruction word for the memory card in the project data 71, specifies the device targeted by the instruction word, and adds the specified device to the extraction list.
[0104] The log display control unit 61 stores the log data 73 generated in the PLC 1 in the log data storage unit 74. The log data storage unit 74 can use a memory card 36A or the like. The log data 73 stored in the log data storage unit 74 is read via the memory card 36A, and the log data 73 is displayed on the display unit 7. For example, the log display control unit 61 may associate the device value recorded in the log data 73 with the program component of the project data 71 and display it on the display unit 7. The log display control unit 61 forms the core of an engineering tool for a programmable logic controller. The log data 73 may include, in addition to the device value, image data captured by the camera unit, etc. (details will be described later). These project data and log data are packaged and stored as operation record data. Alternatively, the project data and the log data may be associated and stored in separate files, and when one of the project data or the log data is opened, the other file may also be read by referring to the association information (details will be described later). ● Execution of logging
[0105] Figure 24 shows the functions of the PLC-side CPU 31 of the CPU unit 3. Some or all of these functions may be realized by a hardware circuit such as an ASIC or an FPGA. ASIC is an abbreviation for Application Specific Integrated Circuit. FPGA is an abbreviation for Field Programmable Gate Array.
[0106] Assume that the PLC-side CPU 31 stores the project data 71 and the log setting data 72 received from the PC 2 in the PLC-side storage device 32. The execution unit 80 includes a ladder execution engine 80a that repeatedly executes the user program, and a unit control unit 80b that controls the ladder execution engine 80a and performs input / output refreshing with the expansion unit 4. The ladder execution engine 80a of the execution unit 80 repeatedly executes the user program included in the project data 71 and controls the expansion unit 4 according to the user program. Note that the ladder execution engine 80a of the execution unit 80 writes device values to the output devices held in the CPU unit device unit 34a of the device unit 34 or reads device values from the input devices held in the CPU unit device unit 34a according to the user program.
[0107] On the other hand, the unit control unit 80b of the execution unit 80 reads and writes device values related to the expansion unit 4 obtained by input / output refreshing to and from the expansion unit device unit 34b. The CPU unit 3 and the expansion unit 4 are electrically connected by an inter-unit bus 90, and the unit control unit 80b has a function of performing communication control on this inter-unit bus 90, that is, a function as a so-called bus master. When the unit control unit 80b functions as a bus master, it performs refresh communication with each expansion unit 4 based on the unit configuration information described with reference to FIG. 23, that is, information indicating how the entire PLC 1 is composed of which units.
[0108] The recording unit 81 acquires device values from the device unit 34 (CPU unit device unit 34a or expansion unit device unit 34b) according to the log setting data 72 or acquires device values from the buffer memory of the expansion unit 4, and writes them as log data 73 to a memory (for example, a ring buffer). As described above, the recording unit 81 executes logging processing at the time of END processing or the like.
[0109] The logging process in the END process will be described in more detail. The log setting data 72 includes devices described in the program components designated by the component designation unit 52 and devices assigned to the functions designated by the function designation unit 60 (for example, the objects to be monitored by the unit monitor) as the logging targets. For the former devices, during the END process, they are written into the log data 73, while for the latter devices, during the END process, the device values of the target devices (UG) are read from the expansion unit 4 and written into the log data 73.
[0110] Here, the update cycle (so-called control cycle) of the current coordinates and command coordinates of the motor is much shorter than the scan cycle of the ladder program. Therefore, in this embodiment, since the device values of the UG are read in synchronization with the scan cycle, not all of the current coordinates and command coordinates are written into the log data 73. However, the present invention is not limited to this. For example, it is also possible to configure to store the current coordinates and command coordinates for each control cycle in the memory of the expansion unit 4 and read out the plurality of current coordinates and command coordinates stored so far at the timing of the scan cycle.
[0111] Also, the recording unit 81 assigns the time information held by the time management unit 83 to each record of the log data 73. As a result, the device values are arranged in time series in the log data 73.
[0112] The devices to be logged are basically specified by the logging target list in the log setting data 72, but additional devices may be specified by the detection unit 82. The detection unit 82 may detect, for example, the rewriting of the device value from an external device to any of the devices included in the device unit 34. Generally, the device value can be rewritten according to the user program and may also be rewritten by an external device. Such rewriting cannot be grasped in advance only by analyzing the user program. The recording unit 81 may add the device whose device value has been detected by the detection unit 82 as a logging target. Generally, the rewriting of the device value from an external device is likely to cause an unexpected event for the user. Therefore, by logging the device value rewritten by the external device, it will be useful for the user to improve the program.
[0113] By the way, in the END process, a UG read instruction may be issued regardless of the user program. UG is a device type indicating a buffer memory. The detection unit 82 may detect a UG read instruction issued regardless of the user program. The recording unit 81 may identify the buffer memory targeted by the UG read instruction detected by the detection unit 82 and add the identified buffer memory as a recording target. When this expansion unit 4 is a motion unit, torque values, current coordinate positions, etc. are stored in such a buffer memory.
[0114] The detection unit 82 may be realized by an FPGA or the like. The execution unit 80 may be realized by an ASIC. In this case, the execution unit 80 specifies the address of the device to be read / written with respect to the PLC-side storage device 32 using the address line. Therefore, the detection unit 82 may dynamically detect the device whose device value has been updated by monitoring this address line. This will be useful when adding a device not described in the user program as a recording target.
[0115] The detection unit 82 may be provided in the execution unit 80. In this case, the execution unit 80 may write a device value to a specific device of the device unit 34 and write this device value and the device name (device number) to the log data 73. This method will be useful when adding a device that is not described in the user program and can be dynamically allocated as a recording target.
[0116] As described above, the recording unit 81 may record devices regardless of the device list included in the log setting data 72. In an extreme case, the user can obtain the log data 73 without creating the log setting data 72. For example, when the execution unit 80 is activated, the execution unit 80 obtains device values from all devices in the device unit 34. Since the detection unit 82 monitors the devices, it detects that the execution unit 80 has read a device value and transmits the information (address information) of the device from which the device value has been read to the recording unit 81. The recording unit 81 reads device values from all devices included in the device unit 34 based on the address information transmitted by the detection unit 82 and writes them to the log data 73. Thereafter, every time the detection unit 82 detects an access to the device unit 34, the recording unit 81 logs the device value.
[0117] Incidentally, the recording unit 81 may write the device value to the log data 73 for each scan cycle or for each predetermined collection cycle. For example, even if the detection unit 82 detects accesses to a device multiple times within one cycle, the recording unit 81 may write only the device value at the time when the last access is detected to the log data 73. Thereby, it becomes possible to reduce the data size of the log data 73.
[0118] The execution unit 80 may have a cache for holding devices. In this case, the detection unit 82 may detect a device write by monitoring the cache.
[0119] The log setting data 72 includes a device list indicating devices to be recorded, but may also include a device list indicating devices to be excluded from recording. In this case, when the detection unit 82 detects an access to a device to be excluded, the recording unit 81 skips recording the device value for that device.
[0120] The detection unit 82 may detect an access by the execution unit 80 to the buffer memory of the expansion unit 4. In this case, the execution unit 80 writes the device value read from the buffer memory of the expansion unit 4 to a buffer or the like secured in the PLC-side storage device 32. The recording unit 81 reads the device value from the buffer and writes it to the log data 73.
[0121] The execution unit 80 repeatedly executes the user program and rewrites the device value according to the user program. When the detection unit 82 is implemented in the execution unit 80, when the execution unit 80 detects an instruction word for rewriting the device value, it outputs the device value together with the instruction word to the recording unit 81. The recording unit 81 may write the instruction word, the device value, and a timestamp (the time when the device value was acquired) to the log data 73.
[0122] Incidentally, the log setting data 72 may include the data format of the log data 73 (e.g., binary format or text format). As the data format, decimal 16 bits, decimal 32 bits, ±decimal 16 bits, ±decimal 32 bits, hexadecimal 16 bits, hexadecimal 32 bits, character string, Float, DoubleFloat, etc. may be set for each device. Such a data format can be determined by analyzing the instruction words in the program component.
[0123] When the execution of the user program ends, or when a save trigger relay to the memory card is turned ON, etc., when a predetermined output condition is satisfied, the output unit 84 writes the project data 71, the log data 73, and the image data to the memory card 36A. Until the predetermined output condition is satisfied, the log data 73 is recorded in a memory (for example, a ring buffer), and when the capacity is full, the oldest log data 73 is deleted and new log data 73 is additionally recorded (recorded in a so-called FIFO format). This memory card 36A is removed from the CPU unit 3 and mounted on the mounting part of the PC2. As a result, the log data 73 is displayed on the display unit 7 of the PC2. Note that the output unit 84 may transmit the log data 73 to the PC2, the cloud, etc. via the PLC side communication unit 33.
[0124] In this embodiment, when a predetermined output condition is satisfied, the log data 73 and the like are written to the memory card 36A. However, the present invention is not limited to this. For example, it may be stored in an internal memory (non-volatile memory such as a flash memory or a hard disk). Also, at least for the log data 73, it is necessary to be stored in the memory card 36A or the internal memory 37 when a predetermined output condition is satisfied, while for the project data 71, it is not limited to when a predetermined output condition is satisfied. For example, it may be stored in the memory card 36A or the internal memory 37 in advance at the timing when the PLC1 changes from the setting mode (PROGRAM mode) to the operation mode (RUN mode). ● Creation of unit configuration information
[0125] FIG. 25 is a diagram for explaining the creation process (unit setting) of unit configuration information executed by the function setting unit 62. The function setting unit 62 may be called a unit editor. When the function setting unit 62 is supported to start the unit editor, it displays the unit setting UI 150 on the display unit 7. The name column 151 is a column for displaying the name (e.g., model number, etc.) of each unit. Note that a unit number is automatically assigned to each unit. In this example, "0” is assigned as the unit number to the CPU unit 3. The input area column 152 is a column for allocating input system devices. In this example, devices from R000 to R015 are allocated as input system devices to the CPU unit 3. The output area column 153 is a column for allocating output system devices. In this example, devices from R500 to R507 are allocated as output system devices to the CPU unit 3. The occupied area column 154 is a column for allocating input / output mixed system devices. The end unit is a so-called terminal unit. The user sets the type, connection order, and allocated devices of the expansion unit 4 through the PC-side operation unit 8. The function setting unit 62 stores information indicating the type, connection order (unit number), and devices allocated to each of the CPU unit 3 and the expansion unit 4 in the unit configuration information. The unit configuration information may be called unit setting information. Here, devices are allocated for each unit, but devices may be allocated for each function of each unit. The function setting unit 62 manages the unit configuration information as a part of the project data 71.
[0126] Thus, the unit configuration information includes information indicating the devices allocated to each unit and information indicating the devices allocated to each function. Therefore, the device extraction unit 53 can extract the devices allocated to each unit and the devices allocated to each function by referring to the unit configuration information. <Debug>
[0127] FIG. 26 is a flowchart showing an overview of the debug process of the user program executed by the user.
[0128] In step S2601, the user operates PC2 to create a user program composed of a plurality of program components, and creates project data 71 including the user program. The program creation unit 63 creates a user program according to user input and stores it in the PC-side storage device 22. The project creation unit 50 creates project data 71 according to user input and stores it in the PC-side storage device 22. The project data 71 includes identification information for identifying the project data 71 or the user program. The project creation unit 50 may execute an operation on the project data 71 or the user program to obtain a hash value, an error detection code, etc., and add these as identification information to the project data 71. Note that the identification information may be a GUID (Global Unique Identifier) or the like.
[0129] In step S2602, the user operates PC2 to transfer the project data 71 to the PLC1. The project creation unit 50 reads the project data 71 from the PC-side storage device 22 and transmits it to the PLC1 via the PC-side communication unit 23. When the CPU unit 3 of the PLC1 receives the project data 71, it writes it to the PLC-side storage device 32.
[0130] In step S2603, the user operates the PLC-side operation unit 6 of the CPU unit 3 (for example, by operating a mode switch for switching from the PROGRAM mode to the RUN mode) to instruct the execution of the project. The execution unit 80 executes the user program included in the project data 71. The recording unit 81 logs device values and stores (records) the logged device values in the temporary recording unit 91a. When a predetermined output condition is satisfied, the storage unit 93 in the output unit 84 creates log data 73 by storing the device values recorded in the temporary recording unit 91a and the above-described image data in the memory card 36A or the internal memory 37.
[0131] In addition to the log data 73, the storage unit 93 stores the project data 71 in the memory. As a result, on the PC 2, when a trouble occurs, the movement at the time of the trouble can be reproduced on the monitor using the project data 71 at the time of the trouble. Details will be described later.
[0132] In addition to the project data 71, the storage unit 93 stores the identification information (such as a hash value) of the project data 71 in the memory. As a result, the PC 2 can verify whether the current project data (which is intended to be the replay target) matches the project data 71 at the actual time of trouble using the identification information. Details will be described later.
[0133] In the present embodiment, in addition to the log data 73, the project data 71 and its identification information are stored in the memory at the timing when a predetermined output condition is satisfied. However, the present invention is not limited to this. For example, before the operation of the PLC 1 starts, at the start of the operation, or during the operation, the project data 71 and its identification information may be stored in the memory, and only the log data 73 may be stored in the memory at the timing when a predetermined output condition is satisfied. In short, at the time when a predetermined output condition is satisfied, it is sufficient that the log data 73, the project data 71, and its identification information are stored in the memory in an associated state.
[0134] Also, in this embodiment, the project data 71 is stored in the memory. However, the present invention is not limited to this. For example, instead of the project data 71, only the identification information of the project data 71 may be stored in the memory. In this case, it is assumed that the current project data in the PC2 matches the project data 71 at the time of actual trouble occurrence. That is, it is assumed that the current project data has not been edited or modified after the project data is transferred to the PLC1. If it is determined that the two data do not match, the user may perform a replay after recognizing that the current project data is different from the project data 71 at the time of actual trouble occurrence, so that it is possible to prevent a replay (incorrect troubleshooting) from being performed without the user recognizing this.
[0135] In step S2604, the user operates the PLC side operation unit 6 of the CPU unit 3 and instructs to transfer the project data 71 and the log data 73 to the PC2. Alternatively, the PC side operation unit 8 of the PC2 may be operated to read out the project data 71 written in the memory card 36A, the identification information of the project data 71, and the log data 73. The output unit 84 transmits the project data 71 and the log data 73 to the PC2. Note that the output unit 84 may adopt a configuration in which the identification information of the project data 71 is added to the log data 73 when it is determined that the transfer of the project data 71 is prohibited. The identification information of the project data 71 and the log data 73 may be transmitted separately. The output unit 84 may execute an operation (for example, using a hash function) on the project data 71 or the user program at the timing when a predetermined condition for writing to the memory card 36A is satisfied to obtain a hash value, an error detection code, etc., and add these as identification information to the log data 73. As long as the creation rules of the identification information executed by the PC2 and the creation rules of the identification information executed by the CPU unit 3 match, any rules may be adopted.
[0136] In step S2605, the user operates PC2 to investigate the cause of a problem while playing back (replaying) the log data 73, and executes debugging of the user program that constitutes the project data 71. The playback of the log data 73 includes displaying the time-series device values included in the log data 73 as waveforms on the display unit 7, displaying the device values in association with the user program, and displaying the time-series image data included in the log data 73 on the display unit 7. The log display control unit 61 has an internal clock that measures virtual time, and acquires device values from the log data 73 in synchronization with the internal clock and displays them on the display unit 7. The project data 71 may not be transmitted from the PLC1. In this case, the log display control unit 61 may display the device values in association with the user program using the user program of the project data 71 (master data) held in the PC-side storage device 22. Details of the cause investigation of the problem by playing back the log data 73 will be described later.
[0137] Here, it should be noted that the version of the project data 71 used to obtain the log data 73 may be different from the version of the project data 71 held in the PC2. In this case, it may be impossible to associate the device value with the user program for display, or the association between the user program and the device value may be incorrect. In this case, the log display control unit 61 may display, on the display unit 7, a warning indicating that the version of the project data 71 used to obtain the log data 73 is different from the version of the project data 71 held in the PC2, using the identification information of the project data. Note that the log display control unit 61 may also inquire of the user whether to display the log data 73 obtained using the project data 71 of the first version in association with the project data 71 of the second version held in the PC2. If the user desires such display, the log display control unit 61 displays, on the display unit 7, the log data 73 obtained using the project data 71 of the first version in association with the project data 71 of the second version held in the PC2. Note that the version is managed by the identification information. When the user confirms that there is no problem with the log data 73, debugging is unnecessary, and the subsequent step S2606 and step S2607 are also unnecessary. The user analyzes the log data 73, discovers bugs in the user program, etc., and corrects the user program. The project creation unit 50 corrects (updates) the project data 71 according to the user input and stores it in the PC-side storage device 22.
[0138] In step S2606, the user operates the PC2 to transfer the project data 71 to the PLC1. Note that when the user program in the project data 71 is changed, the identification information is updated. Thereby, the project data 71 before correction and the project data 71 after correction can be distinguished.
[0139] In step S2607, the user operates the CPU unit 3 and instructs the execution of the user program included in the project data 71 to verify the project data 71. The execution unit 80 executes the user program included in the project data 71. If the PLC1 operates as expected by the user, the user determines that the debugging of the project data 71 has been successful. If the PLC1 does not operate as expected by the user, the recording unit 81 logs the device values again, and the storage unit 93 creates the log data 73. Then, the user executes steps S2604 to S2607 again.
[0140] In this way, the user can debug the project data 71 while referring to the log data 73. Therefore, it is considered that the efficiency of debugging is improved.
[0141] Note that the transfer of the project data 71 may be executed via the memory card 36A. That is, the PC2 writes to the memory card 36A. The user removes the memory card 36A from the PC2 and attaches the memory card 36A to the CPU unit 3. The CPU unit 3 reads the project data 71 from the memory card 36A and writes it to the PLC side storage device 32. Similarly, the transfer of the log data 73 may also be executed via the memory card 36A. <Project creation unit 50>
[0142] Figure 27 shows the details of the project creation unit 50. The function setting unit 62 sets the unit configuration information of the expansion unit 4, the functions of the CPU unit 3, and the functions of the expansion unit 4 based on the information input from the PC-side operation unit 8, and creates unit configuration information indicating the setting contents. Examples of the function settings of the CPU unit 3 include IP address setting, FTP client-related setting, access authority setting for project data 71, etc. Examples of the function settings of the expansion unit 4 include input channel setting and PLC-to-PLC communication-related setting, etc. The unit configuration information is a part of the project data 71. The editing unit 311 (which may also serve as the program creation unit 63 shown in FIG. 23) displays the user program editing UI on the display unit 7 and edits the user program based on the information input from the PC-side operation unit 8. The debugging unit 314 debugs the user program using the project data 71. The addition unit 312 adds identification information to the project data 71. The calculation unit 313 obtains the identification information (e.g., hash value or error detection code) through calculation. Regarding the function of calculating (computing) the identification information by this calculation unit 313, the output unit 84 may be made to exhibit the same function. <Log display control unit 61>
[0143] Figure 28 shows the details of the log display control unit 61. The program display module 321 is a module that displays the device values included in the log data 73 together with the user program included in the project data 71 on the display unit 7. Further, the program display module 321 can display not only the user program but also various types of information for the user to visually recognize the setting contents of the project data 71, such as the program configuration information included in the project data 71, a plurality of program components, the unit configuration, and the function settings for each unit. The image display module 323 displays the time-series image data included in the log data 73 on the display unit 7. The waveform display module 322 is a module that waveforms the time-series device values included in the log data 73 and displays them on the display unit 7. The playback control module 324 synchronizes the information displayed by the program display module 321 and the information displayed by the waveform display module 322 in terms of time. These modules may be called engineering software. Note that the image display module 323 may be implemented as a function (image display unit) of the program display module 321, or may be implemented as a function (image display unit) of the waveform display module 322. ● Program display module
[0144] Figure 29 shows the details of the program display module 321. The time UI 330a provides a UI (e.g., a slide bar, a cursor, etc.) for operating the acquisition time (display time) of the device displayed together with the user program. The display time control unit 331a sends the display time specified by the time UI 330a to the playback control module 324, or sets the display time notified from the playback control module 324 to the time UI 330a. The program display unit 332 displays the project data 71 on the display unit 7, or reads out the project data 71 corresponding to the identification information from the PC-side storage device 22 and displays it on the display unit 7. Further, the program display unit 332 displays the device value acquired by the device value acquisition unit 333a in association with the device used or described in the user program. The device value acquisition unit 333a has a real-time playback mode and a history playback mode (log playback mode). In the real-time playback mode, the device value acquisition unit 333a accesses the real-time transmission unit of the PLC 1, acquires the device value, and passes it to the program display unit 332. In the log playback mode, the device value acquisition unit 333a accesses the playback control module 324 in FIG. 28, acquires the display time and the device value, and passes them to the program display unit 332.
[0145] FIG. 9 is a schematic diagram showing an example of a GUI displayed on the display unit 7 by the program display unit 332 or the like. In FIG. 9, various types of information constituting the project data 71 are displayed in the project display area 420 in the left column. In order from the top, unit configuration (CPU unit, motion unit, analog input unit, camera input expansion unit), program configuration (per scan module, fixed cycle module, inter-unit synchronization module, function block, macro) are displayed. For the motion unit, setting parameters for axis configuration and axis control are displayed as function settings. The user can double-click on the axis configuration or axis control on the GUI shown in FIG. 9 to check the setting contents of these setting parameters. Also, in the project display area 420, where Main and Sub are displayed for the per scan module, when the user clicks on Main, the Main program is displayed in the program display area 410 of the ladder monitor 450 in the center. In this way, the program display module 321 shown in FIG. 28 reads the project data 71 from the memory card 36A and displays various types of information in the project display area 420 or displays a desired program in the program display area 410.
[0146] Here, the program display area 410 is a part of the so-called ladder monitor 450 and can be operated independently in the real-time playback mode. By clicking on the × mark, it is also possible to hide only the ladder monitor 450. On the other hand, in the log playback mode, the program display unit 332 can reproduce the ladder program included in the project when the operation record was saved. Also, in the log playback mode, the program display unit 332 displays the device values included in the log data 73 in association with the devices described in the Main program via the device value acquisition unit 333a. The device values to be displayed are the device values corresponding to the time specified by the time specification cursor 404 (more details will be described with reference to FIG. 32 described later).
[0147] In FIG. 9, the device value associated with 18:52:54 of 20XX / 10 / 01 displayed in the time display area 409 is displayed in association with the device described in the Main program. [35000 / 74286] displayed on the right side of this date indicates the current scan count 35000 out of the total scan count 74286. By dragging and moving the time-specifying cursor 404, the user can update the display time and the scan count, and also update the display of the device value. For example, at the updated display time, an ON display (e.g., filling with color) is made at the location of the relay device that is ON, and an OFF display (e.g., leaving it unfilled) is made at the location of the relay device that is OFF. Details of the functions of the playback button 406 and the like will be described later with reference to FIG. 32.
[0148] In FIG. 9, an image display area of the camera monitor 430 is provided in the upper right column. The image display module 323 reads out image data from the log data 73 and displays it in the image display area of the camera monitor 430 in synchronization with the display time displayed on the ladder monitor 450 by the program display module 321. In FIG. 9, the image data associated with 18:52:54 of 20XX / 10 / 01, which is the display time, is displayed on the camera monitor 430. Also, on the right side of this display time, 282 / 601 is displayed, which represents the order (the 282nd sheet) of the current image data out of the total number of captured images 601. The user can update the display time and the order of the current image data by dragging and moving the time-specifying cursor 404a on the camera monitor 430.
[0149] At this time, as the time-specifying cursor 404a moves, the time-specifying cursor 404 in the above-described ladder monitor 450 also moves in conjunction. For example, when the time-specifying cursor 404a is adjusted to 19:00:00 of the display time 20XX / 10 / 01, the time-specifying cursor 404 in the ladder monitor 450 also moves following the position of 19:00:00 of the display time 20XX / 10 / 01. Then, as the time-specifying cursor 404 moves, the device value in the ladder monitor 450 is also updated. Here, the time-specifying cursor 404a was moved, but the reverse is also true. For example, when the time-specifying cursor 404 in the ladder monitor 450 is moved, the time-specifying cursor 404a in the camera monitor 430 also moves accordingly. Such processing operations are possible because the program display module 321 and the image display module 323 execute synchronization control regarding the display time via the reproduction control module 324.
[0150] Also, in FIG. 9, the unit monitor 440 is displayed in the lower right column. For example, the unit monitor 440 displays the device value of the buffer memory (UG) in the motion unit. More specifically, when the unit display module 325 of the log display control unit 61 receives the display time to be currently reproduced from the reproduction control module 324, it reads out the device value associated with that time from the memory card 36A and displays it on the unit monitor 440. Therefore, for example, in FIG. 9, a list of device values associated with 18:52:54 of the display time 20XX / 10 / 01 is displayed on the unit monitor 440.
[0151] FIG. 30 is a diagram schematically showing a data source for displaying a GUI in the log playback mode. As shown in FIG. 30, the project display area 420 reads out the unit configuration, function settings, program configuration, and program components included in the project data 71 from the memory and displays them in a tree format. The ladder monitor 450 reads out the program configuration (which program components it consists of) and program components from the memory, displays the program components specified by the user, and reads out and displays the device values corresponding to the display time from the log data 73. The camera monitor 430 reads out and displays the image data corresponding to the display time from the log data 73 based on information such as the unit configuration (whether there is a camera monitor or not) and function settings (the function of the camera monitor. For example, if there are multiple ports, the port number, imaging cycle, gain settings, etc.). The unit monitor 440 reads out and displays the device values corresponding to the display time from the log data 73 based on information such as the unit configuration (what units there are) and function settings (if it is a motion unit, the axis configuration, axis control, etc.).
[0152] As can be seen from FIGS. 9 and 30, the functions of the playback control module 324 can synchronize and cooperate the program display module 321, the image display module 323, and the unit display module 325. The details of the cooperation of the waveform display module 322 will be described later.
[0153] Here, in the present embodiment, it is possible to verify whether the current project data matches the project data 71 at the time of actual trouble occurrence. More specifically, the collation unit 334 within the program display module 321 shown in FIG. 29 collates the identification information of the project data 71 (user program) output from the PLC 1 with the identification information of the project data 71 (user program) stored in the PC-side storage device 22, and outputs the collation result to the warning unit 335. When the identification information of the project data 71 (user program) at the time when the operation record is saved, which is output from the PLC 1, does not match the identification information of the project data (user program) stored in the PC-side storage device 22, the warning unit 335 causes a warning to be displayed on the display unit 7.
[0154] In the present embodiment, the identification information of two pieces of project data is compared to verify whether they match or not. More specifically, identification information is added to the program configuration, a plurality of program components, unit configuration, and function settings for each unit included in the project data, and verification is performed based on whether all of them match or not. However, the present invention is not limited to this, and at least the identification information of the user program composed of a plurality of program components may be compared to verify whether they match or not. ● Reproduction control module 324
[0155] Figure 31 shows the details of the playback control module 324. The device value providing unit 341 provides the device values obtained from the log data 73 by the log data acquisition unit 344 to the program display module 321 and the waveform display module 322. Also, the device value providing unit 341 provides the device values obtained from the log data 73 to the unit display module 325 as well. Note that the device values obtained from the log data 73 may be temporarily stored in the log device 345. The device value acquisition units 333a of the program display module 321 and the waveform display module 322 request device values from the device value providing unit 341. The device value acquisition unit 333a acquires the device values from the log device 345 and transmits them to the device value acquisition unit 333a. The time device 342 is a device that holds the display time set by the playback control unit 343. The device values (time information) held in the time device 342 may also be transmitted by the device value providing unit 341 to the device value acquisition unit 333a. Alternatively, the playback control unit 343 may provide time information to the display time control unit 331a of the program display module 321 and the display time control unit of the waveform display module 322. The playback control unit 343 has a virtual internal clock for measuring the display time, and updates the time information held in the time device 342 according to this internal clock. The playback control unit 343 transmits the time information held in the time device 342 to the display time control unit 331a and the display time control unit of the waveform display module 322. When the playback control unit 343 receives a designation of the display time from the display time control unit 331a of the program display module 321 and the display time control unit of the waveform display module 322, it sets the received display time in the internal clock (time adjustment). Therefore, when the display time is designated from the display time control unit 331a of the program display module 321, this display time is transmitted to the display time control unit of the waveform display module 322 via the playback control unit 343. Similarly, when the display time is designated from the display time control unit of the waveform display module 322, this display time is transmitted to the display time control unit 331a via the playback control unit 343. As a result, the display time of the program display module 321 and the display time of the waveform display module 322 are synchronized.In order to realize slow playback, fast forward playback, rewind playback, etc., the playback control unit 343 changes the update speed of the internal clock according to the user input from the PC-side operation unit 8. The playback control unit 343 may set the time information of the oldest record included in the log data 73 as the initial value of the internal clock. The log data acquisition unit 344 acquires the device value associated with the display time held in the time device 342 from the log data 73 and passes it to the device value providing unit 341.
[0156] Similarly, the playback control unit 343 may synchronize the times of the image display module 323 and the unit display module 325 in addition to the display times of the program display module 321 and the waveform display module 322.
[0157] Note that in this embodiment, in the log playback mode, the display times of the program display module 321, the waveform display module 322, the image display module 323, and the unit display module 325 are always synchronized. However, the present invention is not limited to this. For example, the user may be able to select whether to synchronize or not. For example, a check box for synchronization presence / absence may be provided on each monitor screen and may be set to the checked state by default. Then, the user can deselect the module for which synchronization is not desired, so that only that module is not synchronized. In this way, the log display control unit 61 may have a selection function of selecting the modules to be synchronously controlled (tracking control) by the playback control module. <Program display UI>
[0158] FIG. 32 shows a display UI 400 provided by the program display module 321. The display UI 400 described in FIG. 9 and the like will be further detailed from another perspective. The program display area 410 is an area for displaying the user program of the project data 71. In this example, the program display area 410 is displaying a ladder program (ladder diagram). The program display unit 332 acquires the device value of the device used or described in the user program by the device value acquisition unit 333a and displays it together with the user program. For example, if the relay device is ON, the program display unit 332 may superimpose and display an icon 401a indicating ON on the user program. If the relay device is OFF, the program display unit 332 may superimpose and display an icon 401b indicating OFF on the user program. The program display unit 332 acquires the device value of DM100, which is an output system device, by the device value acquisition unit 333a and may display it superimposed on the description of DM100 in the user program. In this example, a device value display area 403 is provided below the description of DM100. The program display unit 332 displays the device value in the display area 403. Note that since the playback control module 324 updates the device value along with the update of the display time, the program display unit 332 updates the device value displayed together with the user program. (Playback control bar 402)
[0159] Below the program display area 410, a playback control bar 402 for operating the playback of log data such as stored device values is provided. Specifically, the time UI 330a moves the time specification cursor 404 from right to left according to the display time acquired from the time device 342. The time specification cursor 404 can be dragged by the pointer 101. When the time UI 330a detects that the time specification cursor 404 has been dragged by the pointer 101, the display time control unit 331a stops the update of the display time in the playback control unit 343 and notifies the playback control unit 343 of the drag amount of the time specification cursor 404. The playback control unit 343 adjusts the count value (display time) of the internal clock according to the drag amount. The time UI 330a may display the update speed of the display time (e.g., ···, 2.0 times, 1.0 times, 0.5 times, 0.1 times, ···) on the speed specification unit 405. Note that the speed specification unit 405 may be realized by a pull-down menu that displays a list of a plurality of update speeds and allows selection of one of the update speeds. When the time UI 330a detects a click by the pointer 101 on the speed specification unit 405, the time UI 330a may display such a pull-down menu and accept the selection of the update speed.
[0160] The playback button 406 is a button for instructing a time-series display of device values. When the time UI 330a detects that the playback button 406 has been clicked by the pointer 101, it instructs the playback control unit 343 to start updating the display time in the display time control unit 331a. This instruction corresponds to an instruction to start displaying the device values or resume the display. The one-step reverse playback button 407 is a button for instructing a time-series display of device values while updating (rewinding) the display time one step at a time. When the time UI 330a detects that the one-step reverse playback button 407 has been clicked by the pointer 101, it instructs the display time control unit 331a to step back the display time by one step. The one-step playback button 408 is a button for instructing a time-series display of device values while updating the display time one step at a time. When the time UI 330a detects that the one-step playback button 408 has been clicked by the pointer 101, it instructs the display time control unit 331a to advance the display time by one step. Note that while one-step playback is being executed, the playback control unit 343 does not update the display time unless the one-step reverse playback button 407 or the one-step playback button 408 is operated. When the playback button 406 is operated while one-step playback is being executed, the playback control unit 343 resumes updating the display time at the update speed specified by the speed specification unit 405. The time display area 409 is an area for displaying the display time held in the time device 342. The display time control unit 331a displays the display time acquired from the time device 342 in the time display area 409. <Emulator of the display unit HMI>
[0161] The PLC1 can be connected to an externally attached display device, the display HMI. The display HMI may have a touch panel type input device. The display HMI reads out the device values held in the device unit 34 of the PLC1 and displays them on the display device. The project creation unit 50 sets the UI displayed on the display HMI and the device values displayed on the UI, and saves them in the project data 71. The debug unit 314 has an emulator for the display HMI, and operates the emulator according to the project data 71 to check the operation of the display HMI. The log display control unit 61 supplies the device values of the log data 73 to the emulator of the display HMI. The emulator of the display HMI displays the device values provided in time series on the UI. <Flowchart regarding log display> ● Program display module
[0162] Figure 33 shows the display process executed by the program display module 321. Note that step S3301, step S3302, and step S3309 may be executed only when the project data 71 cannot be obtained from the PLC1. When the project data 71 can be obtained from the PLC1, the project data 71 from the PLC1 is used. When the project data 71 cannot be obtained from the PLC1, the project data 71 held in the PC2 is used.
[0163] In step S3301, the PC side CPU 21 (verification unit 334) obtains the identification information of the project data 71 held in the PLC1 and the identification information of the project data 71 held in the PC2.
[0164] In step S3302, the PC-side CPU 21 (verification unit 334) determines whether the identification information of the project data 71 held in the PLC 1 matches the identification information of the project data 71 held in the PC 2. If they do not match, the PC-side CPU 21 proceeds to step S3309. In step S3309, the PC-side CPU 21 (warning unit 335) displays a warning indicating that the identification information of the project data 71 held in the PLC 1 does not match the identification information of the project data 71 held in the PC 2 on the display unit 7. If they match, the PC-side CPU 21 proceeds to step S3303.
[0165] In step S3303, the PC-side CPU 21 (program display unit 332) acquires the project data 71 from the PLC 1 or the PC-side storage device 22.
[0166] In step S3304, the PC-side CPU 21 (program display unit 332) determines whether the log playback mode or the real-time playback mode is selected based on the information input from the PC-side operation unit 8. If the real-time playback mode is selected, the PC-side CPU 21 proceeds to step S3310. In step S3310, the PC-side CPU 21 (device value acquisition unit 333a) acquires the device value from the real-time transmission unit of the PLC 1 without going through the playback control module 324. In step S3311, the PC-side CPU 21 (program display unit 332) displays the device value together with the user program included in the project data 71 on the display unit 7. If the log playback mode is selected, the PC-side CPU 21 proceeds to step S3305.
[0167] In step S3305, the PC-side CPU 21 (device value acquisition unit 333a) activates the playback control module 324 and acquires the display time and the device value of the log data 73 from the playback control module 324.
[0168] In step S3306, the PC-side CPU 21 (program display unit 332) displays the device value and the display time together with the user program included in the project data 71 on the display unit 7.
[0169] In step S3307, the PC-side CPU 21 (display time control unit 331a) determines whether a time specification has been detected by the time UI 330a. As described above, the time specification is executed by operating the time specification cursor 404. If no time specification has been detected, the PC-side CPU 21 returns to step S3305. If a time specification has been detected, the PC-side CPU 21 proceeds to step S3308.
[0170] In step S3308, the PC-side CPU 21 (display time control unit 331a) notifies the playback control unit 343 of the playback control module 324 of the specified time input by the time specification cursor 404. The PC-side CPU 21 returns to step S3305. ● Waveform display module
[0171] FIG. 34 shows the display process executed by the waveform display module 322.
[0172] In step S3401, the PC-side CPU 21 (waveform display unit 336) determines whether the log playback mode or the real-time playback mode has been selected based on the information input from the PC-side operation unit 8. If the real-time playback mode has been selected, the PC-side CPU 21 proceeds to step S3406. In step S3406, the PC-side CPU 21 (device value acquisition unit of the waveform display module 322) acquires the device value from the real-time transmission unit of the PLC 1 without going through the playback control module 324. In step S3407, the PC-side CPU 21 (waveform display unit 336) displays the device value on the display unit 7. If the log playback mode has been selected, the PC-side CPU 21 proceeds to step S3402.
[0173] In step S3402, the PC-side CPU 21 (device value acquisition unit of the waveform display module 322) activates the playback control module 324 and acquires the device value and the display time from the playback control module 324.
[0174] In step S3403, the PC-side CPU 21 (waveform display unit 336) displays the device value and the display time on the display unit 7.
[0175] In step S3404, the PC-side CPU 21 (display time control unit of the waveform display module 322) determines whether a time specification has been detected by the time UI 330b. As described above, the time specification is executed by the bar 103. If no time specification has been detected, the PC-side CPU 21 returns to step S3402. If a time specification has been detected, the PC-side CPU 21 proceeds to step S3405.
[0176] In step S3405, the PC-side CPU 21 (display time control unit of the waveform display module 322) notifies the playback control unit 343 of the playback control module 324 of the specified time input by the bar 103. The PC-side CPU 21 returns to step S3402. ● Playback Control Module
[0177] Figure 35 shows the playback control executed by the playback control module 324.
[0178] In step S3501, the PC-side CPU 21 (log data acquisition unit 344) acquires the log data 73 from the PLC 1 and stores it in the PC-side storage device 22.
[0179] In step S3502, the PC-side CPU 21 (playback control unit 343) initializes the time of the internal clock.
[0180] In step S3503, the PC-side CPU 21 (playback control unit 343) acquires the time of the internal clock and stores the time in the time device 342.
[0181] In step S3504, the PC-side CPU 21 (playback control unit 343) acquires the device value corresponding to the display time held in the time device 342 from the log data 73 and stores it in the log device 345. Thereby, the device value providing unit 341 can provide the device value and the display time to the program display module 321 and the waveform display module 322.
[0182] In step S3505, the PC-side CPU 21 (reproduction control unit 343) determines whether it has received a time specification from the display time control unit 331a. If it has received the time specification, the PC-side CPU 21 proceeds to step S3506. If it has not received the time specification, the PC-side CPU 21 proceeds to step S3507.
[0183] In step S3506, the PC-side CPU 21 (reproduction control unit 343) changes the time of the internal clock according to the time specification from the display time control unit 331a.
[0184] In step S3507, the PC-side CPU 21 (reproduction control unit 343) determines whether it has received an update speed change instruction from the display time control unit 331a. If it has received the change instruction, the PC-side CPU 21 proceeds to step S3508. If it has not received the change instruction, the PC-side CPU 21 proceeds to step S3503.
[0185] In step S3508, the PC-side CPU 21 (reproduction control unit 343) changes the update speed of the internal clock according to the update speed specified by the display time control unit 331a. Then, the PC-side CPU 21 proceeds to step S3503. (Event history display function)
[0186] In addition, the engineering tool for PLC according to this embodiment can carefully select and record event logs that lead to trouble shooting and display them. PLCs and their expansion units 4 have an event log function for recording various events that occur. There is also a logging function for recording the values of devices at timings such as every control cycle, at arbitrary cycles, and every rewrite. When trouble occurs, the user can combine these functions to find the cause retrospectively. However, various log functions are often mainly recorded in the non-volatile memory area on the PLC, and such non-volatile memory areas of PLCs often have size limitations. Also, when the number of logs increases and the memory area reaches its upper limit, it is common to sequentially delete old logs to leave new logs. For this reason, when the number of generated logs is on the order of thousands or tens of thousands, there is a high possibility that the logs of the causes leading to trouble shooting are deleted, making it difficult to trace the cause of the trouble. On the other hand, if the user narrows down the events to be saved in order to extend the recording time, there is a risk of missing events that are useful for trouble shooting. Also, even if the records are not deleted and remain, if the number of displayed records is large, the events leading to trouble shooting will be buried in other events and become difficult to find.
[0187] Therefore, the engineering tool for PLC according to this embodiment carefully selects and records events that lead to trouble shooting. When displaying the carefully selected and recorded events, it is possible to filter and display them or display related log information, thereby facilitating trouble shooting for the user. An example of such an engineering tool for PLC is shown in the block diagram of FIG. 36.
[0188] The engineering tool for PLC is a tool for evaluating the user program that defines the operation of PLC1. FIG. 36 shows a programmable logic controller system in which PLC1 is connected to a PC2 installed with a dedicated program that is the engineering tool for PLC. This engineering tool for PLC is realized on a PC2 installed with a dedicated program, but the present invention is not limited to a PC installed with a dedicated program for the engineering tool for PLC, and the engineering tool for PLC may be realized with dedicated hardware. Also, in the example of FIG. 36, PC2 and PLC1 are configured separately, but they may be integrated.
[0189] PLC1 shown in FIG. 36 also has the same configuration as the PLC described above. That is, a program execution unit 514 that repeatedly executes a user program, a device unit 34 having a device that is a storage area referred to by this program execution unit 514, the device values stored in this device unit 34 are recorded in time series as log data together with the current time, and a plurality of events occurring in PLC1 or a controlled device controlled by this PLC1 are recorded in time series as event data together with the occurrence time. A temporary recording unit 91a, and a storage memory 36 that stores the log data and event data recorded in this temporary recording unit 91a when a predetermined storage condition is satisfied during operation. And the engineering tool for PLC is a program creation support device for supporting the creation of a user program described in a graphical programming language that is executed in this PLC1.
[0190] The engineering tool for PLC shown in FIG. 36 includes a display unit 7, a PC-side CPU 21, a PC-side storage device 22, a PC-side memory unit 11, a PC-side operation unit 8, and a PC-side communication unit 23. The display unit 7 displays a user program such as a ladder diagram. Also, the display unit 7 may be a monitor connected to PC2, or a display HMI may be used.
[0191] The PC-side memory device 22 implements the function of the operation record data holding unit 22b. The operation record data holding unit 22b stores the log data and event data stored in the save memory 36 during the operation of the PLC1 as operation record data.
[0192] The PC-side CPU 21 implements the functions of the recording setting unit 12, the device display control unit 13, the event display control unit 14, and the selection reception unit 16. The event display control unit 14 displays a list of a plurality of events included in the event data read from the operation record data holding unit 22b and the occurrence times of each of the plurality of events on the display unit 7. The selection reception unit 16 receives a selection of one from among the plurality of events displayed in a list by the event display control unit 14. The device display control unit 13 overlays and displays on the user program the device values recorded at the time corresponding to the occurrence time of the event selected by the selection reception unit 16 and included in the log data read from the operation record data holding unit 22b. The event display control unit 14 is configured to selectively display in a list on the display unit 7 specific events that change the operating state of the PLC1 or the operating state of the controlled device controlled by the PLC1.
[0193] The recording setting unit 12 also sets the temporary recording unit 91a of the PLC1 to record only specific events among the plurality of events.
[0194] Here, the specific events include events related to operations performed by the user independently of the execution of the user program by the program execution unit 514. Examples of events related to user operations include, for example, rewriting of project data including the user program and the configuration information of the PLC1, the setting mode for setting the PLC1, the mode switching between the operation mode for executing the user program on the PLC1, the insertion and removal of cables connectable to the PLC1, the insertion and removal of storage media attachable to the PLC1, the ON / OFF of the power supply of the controlled device, and the like.
[0195] On the other hand, the event display control unit 14 makes non-display an event corresponding to a process automatically executed in the PLC 1 in accordance with the execution of the user program by the program execution unit 514. Examples of such an event corresponding to the automatically executed process include communication start or communication disconnection when making a TCP connection or an FTP connection to an external device connected to the PLC 1, writing to a folder or file prepared in the PLC 1, and the like. In this way, with the event display control unit 14, an event corresponding to a user operation with user intervention is displayed because it is useful for troubleshooting. On the other hand, an event corresponding to a process automatically executed without user intervention is made non-display. The reason for making it non-display is that the automatically executed process is too frequent and would become huge if left as a log, and since it is an internal process, it is difficult to understand how to lead to troubleshooting by referring to the event log, so it is considered that there are few scenarios where these are useful for troubleshooting. In this way, by classifying the display content of the event into those considered useful for troubleshooting and those not, and selectively displaying them on the display unit 7, it can be expected to assist the user in troubleshooting.
[0196] Hereinafter, the details of each member will be described with reference to FIG. 36. The recording setting unit 12 sets to save various data such as operation record data in the PLC-side storage device 32. Examples of the data stored in the PLC-side storage device 32 include a plurality of time-series device values recorded by the PLC 1 during the operation of the PLC 1, first time data corresponding to the recording time of each device value, a plurality of events generated by the PLC 1 or a controlled device controlled by the PLC 1, second time data corresponding to the occurrence time of each event, and the like. As the PLC-side storage device 32, a rewritable nonvolatile memory inside the PLC 1, a removable SD card (trade name), or the like can be used. In particular, the SD card is preferable because data transfer is easy. For example, even if the PC 2 is not connected to the PLC 1, it is possible to access the data stored in the PLC-side storage device 32.
[0197] The device display control unit 13 displays device values on the ladder diagram displayed on the display unit 7. The event display control unit 14 displays a list of a plurality of events on the display unit 7. At this time, the event display control unit 14 can selectively display a specific event that changes the operating state of the PLC 1 or the operating status of a controlled device such as a motor controlled by the PLC 1.
[0198] After performing PLC settings with the PLC engineering tool shown in Fig. 36, the project data is transferred to the PLC side. Specifically, the project data that defines the events to be recorded and their priorities is transferred from the PC side communication unit 23 to the PLC side communication unit 33 of the PLC 1. The project data may also include settings related to operation record data, user programs, settings for each function, and the like. (Display unit 7)
[0199] The display unit 7 displays a ladder diagram or the like. Specifically, the display unit 7 can include an event display column 1400 for displaying a list of events and a ladder monitor column 1500 for displaying a ladder diagram. When the user selects an arbitrary event from the GUI by operating the PC side operation unit 8 here using the selection reception unit 16 in the event display column 1400, the ladder diagram corresponding to the time of the selected event is selected and displayed in the ladder monitor column 1500.
[0200] The display unit 7 may further include a camera monitor column 1600. The camera monitor column 1600 displays a plurality of image data captured in time series by the camera unit 98 connected to the programmable logic controller system. When an arbitrary event is selected in the event display column 1400, the ladder diagram corresponding to the time of the selected event is selected in the ladder monitor column 1500, and the image data corresponding to the time of the selected event is displayed in the camera monitor column 1600.
[0201] PLC1 includes a PLC-side CPU, a PLC-side storage device 32, and a PLC-side communication unit 33. In the PLC-side storage device 32, in accordance with the settings made by the recording setting unit 12 as described above, a plurality of time-series device values recorded by PLC1, first time data corresponding to the recording time of each device value, a plurality of events that have occurred in PLC1 or in a controlled device controlled by PLC1, second time data corresponding to the occurrence time of each event, and the like are stored.
[0202] Multiple device values and events are recorded separately in the PLC-side storage device 32. After a certain amount of device values and events have been collected, old data is deleted, but it is preferable to keep events for a longer period of time than device values. This is to accommodate the possibility that the cause of a problem may be due not only to the most recent event, but also to past changes. In addition, by storing the first time data of these device values and the second time data of specific events, it is possible to synchronize them (details will be described later).
[0203] Here, the event display control unit 14 selectively displays on the display unit 7 specific events that change the operating state of the PLC 1 or the operating state of controlled devices controlled by the PLC 1. For example, an engineering tool for a programmable logic controller may record carefully selected events that can lead to troubleshooting in the PLC-side storage device 32, and when displaying these events, may filter and display only those events. This allows events that are useful for troubleshooting to be selectively displayed from a wide variety of events, making it possible to help identify the cause of the trouble. The event display control unit 14 can also display device values as time-series waveforms on the display unit 7.
[0204] The PLC engineering tool may also include a synchronization software module 15. The synchronization software module 15 can synchronize first time data, which is the display target time in the device display control unit 13, with second time data, which is the display target time in the event display control unit 14, and display them in conjunction with each other on the display unit 7.
[0205] Alternatively, in addition to recording all events, it may be configured to record only specific events selected from among the events in the PLC-side storage device 32. For example, the recording setting unit 12 can be set to record only specific events in the PLC-side storage device 32. By doing so, only specific events useful for troubleshooting are stored in the storage device and displayed on the display unit 7, thereby avoiding the situation of being buried in events unrelated to troubleshooting without performing searches or filters. In this case, all device values are recorded as operation record data, while for events, only specific events that change the operating state of the PLC 1 or the operating state of a controlled device such as a motor controlled by the PLC 1 are recorded. As a result, only the selected specific events can be selectively displayed in the event display column 1400. Also, by synchronizing the specific events with separately recorded device values, it becomes beneficial for trouble analysis. Furthermore, the specific events to be selectively displayed may be prioritized. (Specific event)
[0206] Specific events to be displayed on the display unit 7 include rewriting of project data including the user program of the PLC 1 and the unit configuration information of each unit, ON / OFF of the power supply of the controlled device, mode switching between the setting mode for setting the programmable logic controller or the operation mode for running the programmable logic controller, clearing of various histories, insertion / removal of the storage device, insertion / removal of an Ethernet cable for communicating with other devices, a device rewrite signal requested from a display HMI connected to the PLC system, or a motion error of a motion unit connected to the PLC system, etc. For example, the mode switching indicates the timing when switching between the PROGRAM mode, which is the operation mode at the time of setting the PLC 1, and the RUN mode during actual operation. Also, the device rewrite signal from the display HMI is useful when it is desired to confirm whether operations have been performed in accordance with predetermined recovery procedures when a trouble occurs. (Recording operation of event log)
[0207] Here, the recording operation of the event log will be described based on FIG. 37, which is a functional block diagram of a programmable logic controller system. The programmable logic controller system shown in this figure includes a CPU unit 3 and an expansion unit 4. (CPU unit 3)
[0208] The CPU unit 3 includes a PLC-side CPU 31, a PLC-side time management unit 83, an event management unit 76, an event log memory unit 75, a log memory unit 73B, and a device memory unit 34B. The PLC-side CPU 31 performs operations such as executing a user program, exchanging data with the expansion unit 4, and data collection processing. (PLC-side time management unit 83)
[0209] The PLC-side time management unit 83 is a component for managing the time at the time of recording events and log data. (Device memory unit 34B)
[0210] The device memory unit 34B is a memory in which devices storing values used in programs and each function are arranged. The device memory unit 34B can also record as an event regarding device rewriting from communication. Detection is performed by the PLC-side CPU 31. (Event management unit 76)
[0211] The event management unit 76 records the generated events in the event log memory unit 75. This event management unit 76 receives the events issued from the PLC-side CPU 31 asynchronously with the scan operation of PLC1 and stores them in the event log. That is, the event log can be recorded at an arbitrary timing independently of the repetition cycle of the END process of PLC1. Also, the event management unit 76 performs arbitration when a plurality of events occur simultaneously, and control to sequentially erase old data when the memory capacity of the event log memory unit 75 becomes full. (Event log memory unit 75)
[0212] The event log memory unit 75 is a memory that stores the generated events. Events are stored in the event log memory unit 75 together with the second time data. (Log memory unit 73B)
[0213] The log memory unit 73B is a memory that stores the collected data. These event log memory unit 75 and log memory unit 73B have common time data on the order of μs and can be linked at the scan level during display. For this reason, the log memory unit 73B records the data collected as part of the scan operation in synchronization with the scan operation. Also, when recording the log data, it is recorded together with the first time data. (Expansion unit 4)
[0214] The expansion unit 4 is one or more units that connect controlled devices such as the camera unit 98 and the motion unit. Each expansion unit 4 includes a buffer memory unit 77 and a function execution unit 96. The buffer memory unit 77 is a memory in which values and monitor values for controlling the functions of the expansion unit 4 are stored. The function execution unit 96 executes the functions of the expansion unit 4. Also, the function execution unit 96 transmits information to and from the expansion bus - CPU unit control unit. For example, in response to a request from the PLC - side CPU 31 or operating automatically, it stores the status and results in the buffer memory unit 77. As an example, in the case of a motion - type expansion unit, when a motion - type error such as a work reaching the limit of the device occurs, the function execution unit 96 detects it. Also, it is possible to issue an event from the expansion unit 4 side. (Flowchart of the event log recording operation (in the case of an event occurring in the CPU unit 3))
[0215] In the programmable logic controller system of FIG. 37, the operation of recording the event log can be performed for events occurring on the CPU unit 3 side or for events occurring on the expansion unit 4 side.
[0216] Next, the operation of recording events occurring in the CPU unit 3 will be described based on the flowchart of FIG. 38. First, in step S3801, the PLC-side CPU 31 of the CPU unit 3 detects an event. Next, in step S3802, the event management unit 76 receives the event from the PLC-side CPU 31 of the CPU unit 3. Then, in step S3803, the remaining capacity of the event log memory unit 75 is checked. If there is no remaining capacity, the process proceeds to step S3804 to delete the old event from the event log memory unit 75. On the other hand, if there is remaining capacity, the process proceeds to step S3805 to acquire time data in the order of μs and store the event in the event log memory unit 75.
[0217] Next, the operation of recording events occurring in the expansion unit 4 will be described based on the flowchart of FIG. 39. First, in step S3901, the function execution unit 96 of the expansion unit 4 detects an event. Next, in step S3902, the function execution unit 96 of the expansion unit 4 transmits a message communication containing the event to the expansion bus. Further, in step S3903, the PLC-side CPU 31 of the CPU unit 3 uses interrupt processing to receive the message communication containing the event from the expansion bus. Then, in step S3904, the PLC-side CPU 31 of the CPU unit 3 extracts the event from the message communication. Further, in step S3905, the event management unit 76 receives the event from the PLC-side CPU 31 of the CPU unit 3. Then, in step S3906, the remaining capacity of the event log memory unit 75 is checked. Here, if there is no remaining capacity, in step S3907, the old event is deleted from the event log memory unit 75 and then the process proceeds to step S3908. On the other hand, if there is remaining capacity in step S3906, the process proceeds to step S3908 to acquire time data in the order of μs and store the event in the event log.
[0218] Next, the filter operation when displaying the event log will be described based on the flowchart of FIG. 40. First, in step S4001, all event logs are read into the memory. Next, in step S4002, the group of events to be filtered when displaying the events is selected on the UI. Further, in step S4003, one event is retrieved from the event log. Then, in step S4004, if the retrieved event corresponds to the event selected on the UI, it is stored in the display event log. Further, in step S4005, it is determined whether there are any remaining events in the event log memory unit 75. If there are remaining events, the process returns to step S4003 and the process is repeated. On the other hand, if there are no remaining events, the process proceeds to step S4006, and all the display event logs are displayed on the GUI. (Examples of events to be selectively displayed)
[0219] Examples of events to be selectively displayed are shown below. First, a severe error is a serious error in which PLC1 cannot continue operation. The detection entity for severe errors is the CPU unit 3 (control unit / peripheral control).
[0220] Also, a minor error is a minor error in which PLC1 can continue operation. However, a minor error may not lead to the resolution of the trouble. The detection entities for minor errors are the CPU unit 3 (control unit / peripheral control) and the expansion unit 4.
[0221] Power ON / OFF is an event regarding the turning on and off of the power supply. It may occur around the trouble. The detection entity for power ON / OFF is the CPU unit 3 (peripheral control).
[0222] The alarm relay is the alarm history specified by the user. The detection entity for the alarm relay is the CPU unit 3 (PLC side CPU31).
[0223] The device value change is the rewriting of the device value through communication. Although it occurs in some devices regardless of trouble, it may also be the starting point of trouble. The detection entity of this device value change is the CPU unit 3 (PLC side CPU 31).
[0224] The operation record storage is related to the timing of the storage trigger of the operation record data and the recording. This operation record data can also be the starting point of trouble analysis. The detection entity of the operation record storage is the CPU unit 3 (PLC side CPU 31).
[0225] The RUN / PROGRAM switch is information regarding the switching of the operation mode of PLC 1. Although trouble may occur during mode switching, it also occurs normally during normal operation. The detection entity of the RUN / PROGRAM switch is the CPU unit 3 (PLC side CPU 31).
[0226] The project change is often triggered by, for example, a program change in PLC 1 and is likely to cause trouble, so it is considered beneficial for trouble analysis. The detection entity of the project change is the CPU unit 3 (PLC side CPU 31).
[0227] The history clear also serves as a basis for judgment to solve trouble. In particular, when it is erased can be an important factor. The detection entity of the history clear is also the CPU unit 3 (event management unit 76).
[0228] The memory card may be the key to solving trouble in terms of its insertion and removal, etc. On the other hand, depending on the operation method of the device, events may occur daily even without trouble. The detection entity of the memory card is the CPU unit 3 (peripheral control).
[0229] The calendar timer may be listed as a candidate because it is important to record changes in the calendar timer value for troubleshooting analysis based on historical data. On the other hand, if operations such as automatic time adjustment are being performed, events occur regularly. The detection entity of the calendar timer is the CPU unit 3 (peripheral control).
[0230] Ethernet communication may be listed as a candidate because connection events at the hardware level of Ethernet may occur as a sign of a fault such as poor contact. However, it also occurs daily at the timing of power on / off. The detection entities of Ethernet communication are the CPU unit 3 (peripheral control) and the expansion unit 4.
[0231] Serial communication is considered beneficial because a connection at the hardware level of the serial port may occur as a sign of a fault such as poor contact. The detection entity of serial communication is the expansion unit 4.
[0232] An event error is an error that occurs when a large number of events occur. The detection entity of the event error is the CPU unit 3 (event management unit 76).
[0233] As described in the consideration of such troubles, depending on the type of event, there may be cases where you want to mask it, or cases where you want to display it without masking. That is, the necessity of masking changes depending on the operation method of the user's device. Therefore, it is possible for the user to select the display for each group.
[0234] When selecting an event, for example, in the error event history filter setting unit 1370 shown in FIG. 41, filtering settings for display can be performed individually for each group. Here, from the errors and events that are candidates for display, errors and events to be made non-displayed are selected. In this example, the events to be displayed are listed in the display list 1371 on the left side of the screen, and the events to be made non-displayed are listed in the non-display list 1372 on the right side, and it is possible to select whether to display or not by freely moving each event. (Examples of events recorded but not explicitly displayed)
[0235] Next, examples of events that are recorded but not explicitly displayed will be explained. These are events that, even if made public to the user, do not directly lead to the disclosure of user troubles.
[0236] First, detailed information when a compilation error occurs in the program on PLC1 is not displayed because it is difficult to show the solution method even if made public to the user.
[0237] Firmware update information is not displayed because the recording format may change due to firmware updates and continuous recording may not be possible.
[0238] The execution history of self - tests is not displayed because it is difficult to show the solution method even if made public to the user. (List of events not deliberately recorded (high priority))
[0239] Next, examples of high - priority events among those not deliberately recorded are shown below. First, depending on how the user program is configured, the number of events may be too large and the log may easily overflow. As an example of what is excluded from recording, there is the start / end of TCP connection communication. In the case of a system that disconnects communication for each communication, events may occur multiple times per second.
[0240] Also, for FTP connection start / disconnection, in the case of a usage where a file is updated at a higher level every time one piece of data is collected, the number of events increases.
[0241] Furthermore, for folder / file writing, in the case of a usage where data is recorded on a memory card every time one piece of data is collected, the number of events increases.
[0242] Next, examples of events to be excluded from the records will be described because they are unlikely to occur during system operation and may not lead to trouble shooting. First, the remote operation request reception is a function that is likely to be used not during operation but during device programming, startup, or debugging, so it is excluded from the records. Also, setting of forced value refresh, reset of forced value refresh, full cancellation of forced value refresh, cancellation of forced value refresh, etc. are all functions that are likely to be used not during operation but during device debugging or analysis after a trouble occurs, so they are excluded from the records. (Examples of events not deliberately recorded (low priority))
[0243] Furthermore, examples of events with low priority among those not deliberately recorded will be described. First, for recipe execution operations, depending on how the system is configured, an event may occur for each piece of work, and the log capacity may easily overflow.
[0244] Also, the start of the DB connection service, the stop of the DB connection service, and the end of the DB connection service are all events that frequently occur during operation, and the log capacity may easily overflow.
[0245] Also, user authentication enabled / disabled, logon success, logon failure, backup success of the CPU unit, backup failure of the CPU unit, restore success of the CPU unit, restore failure of the CPU unit, etc. are all functions that are likely to be used not during operation but during device programming, startup, or debugging.
[0246] Here, the state in which the device display control unit 13 and the event display control unit 14 selectively display a specific event on the display unit 7 will be described based on the GUI screen of the engineering tool 1380 for PLC in FIG. 42. The engineering tool 1380 for PLC shown in this figure shows a display UI provided by a project data editing program or a program display module 321. This project data editing program has a log playback mode (replay mode) selected by the mode selection unit 50D and functions as a project data playback program with editing prohibited. Note that a project data playback program that only plays back project data without an editing function is also included as a type of engineering tool for PLC.
[0247] This project data editing program is provided with a project display area 420 on the left, a program display area 410 in the center, and an event display column 1400 on the right. The program display area 410 is provided with a ladder monitor column 1500 in the upper part and a playback control column 402 in the lower part. The ladder monitor column 1500 displays a ladder program (ladder diagram). (Playback control column 402)
[0248] In the playback control column 402, playback control for playing back the event selected in the event display column 1400 etc. is performed. Specifically, by the function of the playback control module 324 in FIG. 31, the operation record data including the recorded device values and image data corresponding to the selected event is read from the PLC side storage device 32 and played back. The playback control column 402 includes a slider-shaped operation bar 404d representing a time axis, a time specification cursor 404 movable on this operation bar 404d, a speed specification unit 405, a playback button 406, a one-step reverse playback button 407, a one-step playback button 408, etc., as described with reference to FIG. 32 etc.
[0249] By pressing the playback button 408, the state of past events can be played back. Also, by operating the time specification cursor 404 on the operation bar 404d, it is possible to select which time state to play back. Furthermore, the device display control unit 13 and the event display control unit 14 are interlocked, and the displays of each unit are interlocked corresponding to the item selected by either one. For example, when instructing the playback time by clicking on the operation bar 404d in the playback control column 402, the device value at the specified playback time is displayed on the ladder diagram in the ladder monitor column 1500. Similarly, in the event display column 1400, the event that occurred at the playback time specified on the operation bar 404d is reversely displayed. On the other hand, in the event display column 1400, when clicking on any one of the events listed, the playback time on the operation bar 404d moves in conjunction. Thus, by performing the interlock between ESMs, the analysis of troubles becomes easier.
[0250] It may be possible to determine whether the event displayed in the event display column 1400 is an event that occurred within the collected operation record data. For example, by coloring and displaying the events that occurred within the operation record data, the user can visually determine.
[0251] An example of displaying a specific event in the event display column 1400 is shown in FIG. 43. Here, in the event display column 1400, Ethernet link up and Ethernet link down are listed. Ethernet link up indicates that the connection of Ethernet has started. This Ethernet link up occurs, for example, when an Ethernet cable is connected, when the power of the hub is turned on, etc. Also, Ethernet link down indicates that the connection of Ethernet has ended. For example, it occurs when an Ethernet cable is disconnected, when the power of the hub is turned off, etc. In the example of FIG. 43, Ethernet link up and Ethernet link down are repeated in a short period, the connection of Ethernet becomes unstable, and as a result, it is assumed that troubles occurred and the save trigger became ON.
[0252] In FIG. 43, among the events displayed in the event display column 1400, the highlighted event 1402 such as being colored indicates an event that occurred at the recording time of the device display control unit 13. Also, the event 1401 that is reverse-displayed in the event display column 1400 is an event related to the currently selected playback display. Corresponding to the playback time selected in the event display column 1400, the position of the time-specifying cursor 404 in the playback control column 402 is moved. Similarly, the device value is displayed in the corresponding ladder diagram in the ladder monitor column 1500. Also, when the time-specifying cursor 404 in the playback control column 402 is moved, accordingly, the displays in the event display column 1400 and the ladder monitor column 1500 are also linked and updated to the display of the corresponding playback time.
[0253] Also, the operation bar 404d in the playback control column 402 may display the save trigger bar 404e at the time when an event that generates a save trigger (save trigger generation event) occurs. The save trigger bar 404e is made easy to visually recognize by being indicated in red or the like. In the example of FIG. 43, since the trigger generation event is selected in the event display column 1400, in the operation bar 404d, the gray time-specifying cursor 404 and the red trigger generation event are displayed overlapping. Therefore, in the time display area 409 indicating the playback time specified by the time-specifying cursor 404, the same 2018 / 11 / 20 11:20:46 as the second time data selected and reverse-displayed in the event display column 1400 is displayed.
[0254] Furthermore, in the playback control bar 402, a scan count display area 409b indicating the total number of scans and the number of scans being displayed may be provided beside the time display area 409. In the example of FIG. 43, it can be seen that a device value set for 360,629 scans in total is stored as operation record data. Also, in the time display area 409, the playback time (11:20:46) currently specified by the current time designation cursor 404 is displayed. At this playback time, it is shown in the scan count display area 409b that the device value set for the 193,526th scan is being displayed in the ladder monitor display column.
[0255] The state where the time designation cursor 404 is moved to the right side, that is, the time advanced from FIG. 43, from the state of FIG. 43 is shown in FIG. 44. Here, the time designation cursor 404 is positioned at a position that is temporally later than the save trigger bar 404e of the operation bar 404d. That is, the time advances as the time designation cursor 404 is moved to the right, and the time goes back as it goes to the left.
[0256] Also, the operation bar 404d corresponds to the recording time of the operation record data stored in the PLC-side storage device 32. That is, the left end of the operation bar 404d is at the start of the recording of the operation record data, and the right end is at the end of the recording of the operation record data. And as described above, the save trigger bar 404e is displayed on the operation bar 404d at the time when the save trigger generation event for recording the operation record data occurs. That is, in the operation bar 404d, the left side of the save trigger bar 404e indicates the collection time Ta before the save trigger, and the right side of the save trigger bar 404e indicates the collection time Tb after the save trigger.
[0257] In the example of FIG. 44, since the second time data of the event "Ethernet link down", which is the event selected in the event display column 1400, is 11:20:49 on November 20, 2018, the time displayed in the time display area 409 of the playback control column 402 is also synchronized and displayed as this time. In the ladder monitor column of FIG. 44, some input contacts and some output elements are colored. This indicates that these input contacts and output elements are ON at the time when the time specification cursor 404 is at the position shown in FIG. 44.
[0258] Furthermore, an example of selecting an event other than the highlighted event 1402 in the event display column 1400 is shown in FIG. 45. Since the operation record data such as device values is not stored for the events not highlighted in the event display column 1400, they are outside the storage period and there is no corresponding operation record data. In this example, 10:38:08 on November 20, 2018 is selected in the event display column 1400. Since the operation record data at this time is not stored, in the playback control column 402, the time specification cursor 404 is in a state attached to the left end, which is the lower limit of the operation bar 404d. That is, since the operation bar 404d cannot represent times before or after the storage period, when a time outside the storage period is selected in the event display column 1400, linked display cannot be performed, so the time specification cursor 404 is moved to the closest corresponding value on the operation bar 404d. Specifically, when the time is older than the storage period, the time specification cursor 404 is located at the left end of the operation bar 404d, and when the time is newer than the storage period, the time specification cursor 404 is located at the right end of the operation bar 404d.
[0259] Also, in the time display area 409, the time 11:20:20 on November 20, 2018 corresponding to the right end of the operation bar 404d is displayed, and the operation record data stored by the save trigger indicated by the save trigger bar 404e is after 11:20:20 on November 20, 2018. Also, the scan count display area 409b indicates the first scan count, which is the oldest.
[0260] Note that in the event display column 1400, events after 2018 / 11 / 20 11:20:38 are highlighted. This is because there were no events in particular from 2018 / 11 / 20 11:20:20 to 11:20:37 within the storage period. Since there are no events recorded during this period, the event display column 1400 is also in a state where there is no display. Also, in FIG. 45, compared with FIG. 44, the colored input contacts and output elements have increased. This indicates that at the time when the time - specifying cursor 404 is at the position shown in FIG. 45, there are more input contacts and output elements that have become ON than in FIG. 44. (Camera monitor column 1600)
[0261] In the above example, an example of synchronizing the displays of the event display column 1400, the playback control column 402, and the ladder monitor column 1500 has been described. In addition to this, image data captured by the camera unit 98 can also be synchronously displayed in the same way. Such an example is shown in the GUI of FIG. 46. In this example, a camera monitor column 1600 for displaying image data is provided in the upper right of the screen. Similarly in this example, when an arbitrary event is selected in the event display column 1400, the image data captured at the time corresponding to the selected event is displayed, and the time - specifying cursor 404 in the playback control column 402 also moves to the corresponding playback time. Also, when the playback button 406 is pressed, a video is played in the camera monitor column 1600, and as time passes, the selection in the event display column 1400 switches to the corresponding event, and the device values of the ladder diagram in the ladder monitor column 1500 are also updated. As a result, the operation at the time of trouble occurrence can be dynamically reproduced, which can be effective for investigating the cause of the trouble.
Industrial Applicability
[0262] The program creation support device for a programmable logic controller according to the present invention can be suitably used for troubleshooting of a PLC system in FA.
Explanation of Signs
[0263] 1…PLC 2…PC 3…CPU unit 4, 4a, 4b…Expansion unit 4c…Camera input expansion unit 4d…Motion unit 4e…Communication unit 5…PLC side display unit 6…PLC side operation unit 7…Display unit 8…PC side operation unit 9…Communication cable 10, 10a, 10b…Field device 11…PC side memory unit 12…Recording setting unit 13…Device display control unit 14…Event display control unit 15…Synchronization software module 16…Selection reception unit 21, 21B…PC side CPU 22…PC side storage device 22b…Operation record data holding unit 23…PC side communication unit 31…PLC side CPU 32…PLC side storage device 33…PLC side communication unit 34…Device unit; 34a…CPU unit device unit; 34b…Expansion unit device unit 34B…Device memory unit 35…Project memory unit 36…Storage memory; 36A…Memory card 36B…Operation record data memory unit 37…Internal memory 38…Bus master 39…Recording control unit 41…CPU 42…Memory 45…Storage condition setting unit 46…Recording buffer setting unit 47…Storage trigger setting unit 50…Project creation unit 50B…Project editing unit 50B1…TPJ Interpretation Unit; 50B2…kpr Interpretation Unit 50C…Save Control Unit 50D…Mode Selection Unit; 50D1…Mode Selection Column 51, 51B…Log Setting Unit 52…Component Designation Unit 53…Device Extraction Unit 54…Addition Unit 55…Deletion Unit 56…Merge Unit 57…Specification Unit 58…Manual Setting Unit 59…Estimation Unit 60…Function Designation Unit 61…Log Display Control Unit 62…Function Setting Unit 63…Program Creation Unit 71…Project Data 72…Log Setting Data 73…Log Data 73B…Log Memory Unit 74…Log Data Storage Unit 75…Event Log Memory Unit 76…Event Management Unit 77…Buffer Memory Unit 80…Execution Unit 80a…Ladder Execution Engine 80b…Unit Control Unit 81…Recording Unit 82…Detection Unit 83…Time Management Unit 84…Output Unit 90…Inter-unit Bus 91a…Temporary Recording Unit 93…Storage Unit 96…Function Execution Unit 98…Camera Unit 101…Pointer 150…Unit Setting UI 151…Name Column 152…Input Area Column 153…Output Area Column 154…Occupied Area Column 201…Inter-unit Communication 202…Program Execution 204…END process 311…Editing department 312…Adding department 313…Calculation department 314…Debugging department 321…Program display module 322…Waveform display module 323…Image display module 324…Playback control module 325…Unit display module 330a…Time UI 331a…Display time control section 332…Program display section 333a…Device value acquisition section 334…Verification section 335…Warning section 341…Device value providing section 342…Time device 343…Playback control section 344…Log data acquisition section 345…Log device 400…Display UI 401a…Icon 401b…Icon 402…Playback control bar 403…Display area 404, 404a…Time specification cursor 404d…Operation bar 404e…Save trigger bar 405…Speed specification section 406…Playback button 407…One-step reverse playback button 408…One-step playback button 409…Time display area 409b…Scan count display area 410…Program display area 420…Project display area 430…Camera monitor 440…Unit monitor 450…Ladder monitor 514…Program execution section 1000, 2000... Programmable Logic Controller System 1200... Program Creation Support Device 1300... User Program Creation Support Program 1310... Program Editing Screen 1312... Device Value Input Field 1314... "Overwrite" Button 1320... Point Parameter Editing Field 1322... Speed Specification Field 1330... File Menu 1332... "Save Project Under a Different Name" 1334... "Overwrite Save Project" 1340... "Save Project Under a Different Name" Dialog Screen 1336... "Project - Project Comparison" 1350... Comparison Display Screen 1370... Error Event History Filter Setting Section 1371... Display List 1372... Non - display List 1400... Event Display Field 1401... Inverted Display Event 1402... Highlighted Event 1500... Ladder Monitor Field 1600... Camera Monitor Field Ld... Ladder Diagram T... Scan Time Ta... Collection Time Tb... Collection Time WK... Object
Claims
1. A programmable logic controller composed of one or more units including a camera input expansion unit to which a camera unit is connected, having a program execution unit that repeatedly executes a user program, a device unit having a device that is a storage area referred to by the program execution unit, recording device values stored in the device unit as log data in time series together with the current time, and recording a plurality of events generated in the programmable logic controller or a controlled device controlled by the programmable logic controller as event data in time series together with the generation time, a temporary recording unit, and when a predetermined storage condition is satisfied during operation, saving the log data and event data recorded in the temporary recording unit to a storage memory, and a storage unit that saves a plurality of image data captured in time series by the camera unit and sent to the camera input expansion unit to the storage memory. A program creation support device for assisting in creating the user program described in the graphical programming language executed in the programmable logic controller, An operation record data holding unit that stores the log data, event data, and the plurality of image data stored in the storage memory during operation of the programmable logic controller as operation record data, In the log playback mode, an event display column for displaying a list of the events, a ladder monitor column for displaying a ladder diagram that is the user program, a project display column for displaying a unit configuration including the camera input expansion unit, and a camera monitor column for displaying the plurality of image data read from the operation record data holding unit in time series based on the information of the unit configuration. A display unit for displaying, An event display control unit that displays a list in the event display column in the log playback mode of a plurality of events included in the event data read from the operation record data holding unit and the generation time of each of the plurality of events, A selection reception unit that receives a selection of one from among the plurality of events displayed in a list by the event display control unit, a device display control unit that displays, in the log playback mode, a device value that is included in the log data read from the driving record data storage unit and that was recorded at a time corresponding to the occurrence time of the event selected by the selection receiving unit, superimposed on the user program displayed in the ladder monitor field; Equipped with When an event is selected in the event display column by a selection receiving unit, the display of device values in the ladder monitor column is updated in accordance with the time of occurrence of the selected event, and image data corresponding to the time of occurrence of the selected event from among the plurality of image data displayed in chronological order based on the unit configuration information is displayed in the camera monitor column. A program creation support device for a programmable logic controller.
2. 2. The program creation support device for a programmable logic controller according to claim 1, A program creation support device for a programmable logic controller, comprising a synchronization software module for synchronizing the display target time in the device display control unit, the display target time in the event display column, and the display of image data displayed in the camera monitor column.
3. 2. The program creation support device for a programmable logic controller according to claim 1, the display unit has a time UI display area that displays a time UI for operating a display target time of a device value displayed in the ladder monitor field, When an event is selected in the event display field by a selection receiving unit, the display of the time UI in the time UI display area is updated in accordance with the occurrence time of the selected event, and image data corresponding to the occurrence time of the selected event is displayed in the camera monitor field.
4. 4. The program creation support device for a programmable logic controller according to claim 3, The time UI includes a play button; When a play button is operated in the time UI display area, device values are displayed and updated in chronological order in the ladder monitor column, a video composed of the plurality of image data is played in the camera monitor column, and corresponding events are switched in the event display column according to the passage of time. A programmable logic controller program creation support device.
5. The programmable logic controller program creation support device according to claim 3, wherein the display unit further displays a time designation cursor for designating a time associated with the image data to be displayed in the camera monitor column, and the image data displayed in the camera monitor column is updated according to the time designated by the time designation cursor, and the display of the time UI in the time UI display area is updated in conjunction therewith. A programmable logic controller program creation support device.
6. The programmable logic controller program creation support device according to claim 1, wherein the storage unit of the programmable logic controller stores the log data, the event data, and the plurality of image data in the storage memory as a package composed of a plurality of files, and the driving record data holding unit stores, as the driving record data, a package composed of a plurality of files stored in the storage memory. A programmable logic controller program creation support device.
7. The programmable logic controller program creation support device according to claim 6, wherein the driving record data includes management information data indicating the contents of the package composed of the plurality of files. A programmable logic controller program creation support device.
8. The programmable logic controller program creation support device according to claim 1, wherein the storage unit stores the log data, the event data, and the plurality of image data in the storage memory, and also stores project data including the user program and the configuration information of the unit, and the display unit displays the user program and the configuration information of the unit included in the project data read from the driving record data holding unit. A programmable logic controller program creation support device for displaying, superimposed on the user program included in the project data read from the operation record data holding unit, a device value recorded at a time corresponding to the occurrence time of an event included in the log data read from the operation record data holding unit and selected by the selection reception unit.
Citation Information
Patent Citations
Plant monitor controller
JP2003029829A
Programmable display
JP2012118567A
Control system, method, program and information processor
JP2015176370A
Programmable controller peripheral device and debug assistance program
WO2014167726A1