Programming support device for programmable logic controllers
Patent Information
- Application Number
- JP2019023077
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2019-02-12
- Publication Date
- 2025-03-04
- Estimated Expiration
- 2039-02-12
AI Technical Summary
【0008】 本発明の第1の態様に係るプログラマブルロジックコントローラ用プログラム作成支援装置によれば、一以上のユニットで構成されたプログラマブルロジックコントローラであり、ユーザープログラムを繰り返し実行するプログラム実行部、該プログラム実行部によって参照される記憶領域であるデバイスを有するデバイス部、該デバイス部に記憶されているデバイス値を現在時刻と共にログデータとして時系列に記録すると共に、前記プログラマブルロジックコントローラ又は該プログラマブルロジックコントローラにより制御される被制御装置にて発生した複数のイベントを発生時刻と共にイベントデータとして時系列に記録する一時記録部、及び運転時において所定の保存条件が満たされると該一時記録部に記録されているログデータ及びイベントデータ、並びに前記ユーザープログラム及び前記ユニットの構成情報を含むプロジェクトデータを保存する保存メモリを備える前記プログラマブルロジックコントローラにおいて実行される、グラフィカルプログラミング言語で記述される前記ユーザープログラムについて、当該ユーザープログラムの作成を支援するためのプログラム作成支援装置であって、前記プログラマブルロジックコントローラの運転時に前記保存メモリに保存されたログデータ及びイベントデータ並びに前記プロジェクトデータを、運転記録データとして記憶する運転記録データ保持部と、ログ再生モードにおいて、前記運転記録データ保持部から読み出したプロジェクトデータに含まれる前記ユーザープログラム及び前記ユニットの構成情報を表示させる表示部と、前記運転記録データ保持部から読み出したイベントデータに含まれる複数のイベント及び該複数のイベントの各々の発生時刻を、前記ログ再生モードにおいて、前記表示部に一覧表示するイベント表示制御部と、前記イベント表示制御部により一覧表示された複数のイベントの中から一つの選択を受け付ける選択受付部と、前記運転記録データ保持部から読み出したログデータに含まれ、かつ、前記選択受付部により選択されたイベントの発生時刻に対応する時刻に記録されたデバイス値を、前記ログ再生モードにおいて前記運転記録データ保持部から読み出した前記ユーザープログラム上に重ねて表示するデバイス表示制御部と、を備え、前記イベント表示制御部は、前記運転記録データ保持部から読み出したイベントデータに含まれる複数のイベントの中から、前記プログラマブルロジックコントローラの動作状態又は該プログラマブルロジックコントローラにより制御される被制御装置の動作状態を変更する特定イベントであって、前記プログラム実行部によるユーザープログラムの実行と独立してユーザが行った操作に関する特定イベントを、前記表示部上に選択的に一覧表示するよう構成しており、前記表示部は、前記イベント表示制御部により前記特定イベントを一覧表示するイベント表示領域、前記デバイス表示制御部により前記ユーザープログラム上にデバイス値を重ねて表示するプログラム表示領域、及び、前記プログラム表示領域に表示されるデバイス値の表示対象時刻を操作するための時刻UIを表示する時刻UI表示領域を有し、前記イベント表示領域において前記選択受付部により一つのイベントが選択されると、選択されたイベントの発生時刻に応じて、前記プログラム表示領域におけるデバイス値の表示が連動して更新されると共に、前記時刻UI表示領域における時刻UIの表示が連動して更新されるようにできる。上記構成により、多種多様なイベントの内から、トラブル解決に有用なイベントを選択的に表示させて、トラブルの原因究明に役立てることができる。
Smart Images

Figure 0007638614000001 
Figure 0007638614000002 
Figure 0007638614000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a program creation support device for a programmable logic controller. [Background technology]
[0002] A Programmable Logic Controller (hereinafter referred to as "PLC") is a controller that controls manufacturing equipment, transport equipment, and inspection equipment in factory automation (FA). PLC controls various extension units and controlled devices by executing user programs such as ladder programs created by the user. When actually executing a user program on a PLC, an event that was not anticipated when the user program was created may be found, making it necessary to modify the user program. In order to identify the parts that need to be modified, the user not only reviews the user program but also refers to the log data generated by the PLC. The log data stores the device values (device values) collected when the user program is executed. In the field of PLC, a device means a memory area that stores information. Devices include relay devices that store one bit of information and word devices that store one word of information.
[0003] To perform sequence control in the field of FA, a program for a PLC and an application program for program editing are designed. After designing a program, the designer simulates the sequence operation of this program, verifies the results of the simulation while debugging the program, and transfers the completed program to the PLC for execution. However, the operation is not always as expected, so the program is edited, such as being debugged again, in consideration of actual operation. In particular, when the operation is not as expected during actual operation, it is important to identify the cause and the event that caused the trouble. For example, operation may stop due to a cause that is not necessarily related to the program design (one example is when control stops due to unexpected work flowing on the line).
[0004] In addition to such a technique for storing device values, a technique for storing an event log (such as occurrence of a failure) is known (for example, Patent Document 1).
[0005] However, because there are so many types of saved event logs (on the order of 1,000), if important event logs are buried, it takes time for the user to search for the cause of a problem, which makes it difficult to use. On the other hand, while it is conceivable that the user could narrow down the event logs to be saved in advance, it is difficult to select the events to be saved, and there is a risk that events that are useful for solving a problem will not be saved. [Prior art documents] [Patent documents]
[0006] [Patent Document 1] JP 2003-029829 A Summary of the Invention [Problem to be solved by the invention]
[0007] It is an object of the present invention to provide a program creation support device for a programmable logic controller that is capable of acquiring an event log that is useful for troubleshooting.
[0008] According to a first aspect of the present invention, there is provided a program creation support device for a programmable logic controller, the program creation support device being a programmable logic controller composed of one or more units, the program execution unit being configured to repeatedly execute a user program, a device unit having a device which is a storage area referenced by the program execution unit, a temporary recording unit which records device values stored in the device unit in chronological order together with a current time as log data, and which records a plurality of events which have occurred in the programmable logic controller or a controlled device controlled by the programmable logic controller in chronological order together with the time of occurrence as event data, and a storage memory which, when a predetermined storage condition is satisfied during operation, stores the log data and event data recorded in the temporary recording unit, as well as project data including the user program and configuration information of the unit. The program creation support device supports the creation of a user program for the user program written in a graphical programming language and executed in the programmable logic controller, the program execution unit being configured to repeatedly execute a user program, a device unit having a device which is a storage area referenced by the program execution unit, a temporary recording unit which records device values stored in the device unit in chronological order together with a current time as log data, and which records a plurality of events which have occurred in the programmable logic controller or a controlled device controlled by the programmable logic controller in chronological order together with the time of occurrence as event data, and In log replay mode, a display unit that displays configuration information of the user program and the unit included in the project data read from the operation record data storage unit; and a display unit that displays a plurality of events and occurrence times of each of the plurality of events included in the event data read from the operation record data storage unit. In the log playback mode,an event display control unit that displays a list on the display unit; a selection receiving unit that receives a selection of one of the multiple events displayed in the list by the event display control unit; and a device value that is included in the log data read from the driving record data storage unit and that is recorded at a time corresponding to the occurrence time of the event selected by the selection receiving unit, In the log playback mode a device display control unit that displays the event information read from the driving record data storage unit in a superimposed manner on the user program, and the event display control unit Among a plurality of events included in the event data read from the driving record data storage unit, A specific event that changes the operating state of the programmable logic controller or the operating state of a controlled device controlled by the programmable logic controller. a specific event related to an operation performed by a user independently of the execution of a user program by the program execution unit; the display unit is configured to selectively display a list of the specific events on the display unit, the display unit having an event display area in which the event display control unit displays a list of the specific events, a program display area in which the device display control unit displays device values superimposed on the user program, and a time UI display area in which a time UI for manipulating the display time of the device values displayed in the program display area is displayed, and when an event is selected in the event display area by the selection receiving unit, the display of the device values in the program display area is updated in conjunction with the occurrence time of the selected event, and the display of the time UI in the time UI display area is updated in conjunction with the occurrence time of the selected event. With the above configuration, it is possible to selectively display events that are useful for solving a problem from among a wide variety of events, which can be used to help identify the cause of the problem.
[0009] In addition, according to the programmable logic controller program creation support device according to the second aspect, in addition to the above configuration, 、 The programmable logic controller may further include a record setting unit that sets the temporary recording unit of the programmable logic controller to record only the specific event among the plurality of events.
[0010] Furthermore, according to the third aspect of the program creation support device for a programmable logic controller, in addition to any of the configurations described above, the specific event can include an event related to an operation performed by a user independently of the execution of the user program by the program execution unit.
[0011] Furthermore, according to a fourth aspect of the program creation support device for a programmable logic controller, in addition to any of the above configurations, the events related to the user operations include at least rewriting project data including the user program and configuration information of the programmable logic controller, mode switching between a setting mode for configuring the programmable logic controller and an operation mode for executing the user program on the programmable logic controller, inserting and removing a cable that can be connected to the programmable logic controller, inserting and removing a storage medium that can be attached to the programmable logic controller, and turning on and off the power of the controlled device.
[0012] Furthermore, according to the program creation support device for a programmable logic controller relating to the fifth aspect, in addition to any of the configurations described above, the event display control unit can hide events corresponding to processing that is automatically executed within the programmable logic controller in accordance with execution of the user program by the program execution unit.
[0013] Furthermore, according to a sixth aspect of the program creation support device for a programmable logic controller, in addition to any of the configurations described above, the events corresponding to the automatically executed processing can include at least the start or end of communication when establishing a TCP connection or an FTP connection with an external device connected to the programmable logic controller, and writing to a folder or file prepared within the programmable logic controller.
[0014] Furthermore, according to a seventh aspect of the present invention, in addition to any one of the above configurations, the program creation support device for a programmable logic controller further includes a synchronization software module that synchronizes the display target time in the device display control unit and the display target time in the event display control unit, and the synchronization software module can display the device display control unit and the event display control unit in conjunction with each other on the display unit.
[0015] Furthermore, according to an eighth aspect of the programmable logic controller program creation support device, in addition to any one of the above configurations, the display unit The event display area includes: An event display column that displays a list of events; As the program display area, The system can be configured to include a ladder monitor column for displaying a ladder diagram which is the user program, and when an arbitrary event is selected from the event display column by the selection receiving unit, the ladder diagram corresponding to the time of the selected event is selected and displayed in the ladder monitor column.
[0016] Furthermore, according to a ninth aspect of the programmable logic controller program creation support device, in addition to any of the above configurations, the storage device can be an SD card (product name).
[0017] Furthermore, according to a programmable logic controller program creation support device relating to a tenth aspect, in addition to any of the above configurations, the event display control unit can display the device value as a time-series waveform on the display unit. [Brief description of the drawings]
[0018] [Figure 1] FIG. 1 is a conceptual diagram of a programmable logic controller system. [Diagram 2] FIG. 1 illustrates a programmable logic controller system. [Diagram 3] FIG. 2 is a diagram for explaining a ladder program. [Figure 4] FIG. 1 is a diagram illustrating a program creation support device. [Diagram 5] FIG. 1 is a diagram illustrating a PLC. [Figure 6] FIG. 13 is a diagram for explaining scanning of a ladder program. [Figure 7] FIG. 2 is a block diagram showing a program creation support device. [Figure 8] FIG. 13 is an explanatory diagram showing the association between driving record data and project data. [Figure 9] FIG. 2 is a diagram illustrating a user interface. [Figure 10] FIG. 13 is an image diagram showing a GUI screen of the user program creation support program in a history replay mode. [Figure 11] FIG. 13 is an image diagram showing a GUI screen of the user program creation support program in a recording mode. [Figure 12] FIG. 13 is an image diagram showing an example of a mode selection field. [Figure 13] FIG. 13 is an image of a GUI showing how to edit a ladder program. [Figure 14] FIG. 14 is an image diagram showing an edit screen displayed from the state shown in FIG. 13. [Figure 15] FIG. 15 is an image diagram showing a ladder program in which the editing shown in FIG. 14 has been reflected. [Figure 16] FIG. 13 is an image diagram of the GUI of the user program creation support program showing how to edit device values. [Figure 17] FIG. 13 is an image of a GUI showing a project saving screen. [Figure 18] FIG. 13 is an image diagram showing a “Save project as” dialogue screen. [Figure 19] 13 is a flowchart illustrating an example of a “prohibit overwriting” process. [Figure 20] 13 is a flowchart illustrating an example of a "save as new project data" process. [Figure 21] FIG. 13 is an image diagram of a GUI screen showing a project data collation function. [Figure 22] FIG. 13 is an image diagram of a GUI screen showing an example of a matching result. [Figure 23] FIG. 2 is a diagram illustrating functions of the program creation support device. [Figure 24] FIG. 2 is a diagram illustrating the functions of a CPU unit. [Diagram 25] 11 is a diagram illustrating a process for creating unit configuration information. FIG. [Figure 26] 11 is a flowchart showing an outline of a debugging process. [Figure 27] FIG. 2 is a diagram illustrating a project creation unit. [Figure 28] FIG. 4 is a diagram illustrating a log display control unit. [Figure 29] FIG. 2 is a diagram illustrating a program display module. [Diagram 30] FIG. 13 is a diagram illustrating a display module of project data and log data. [Diagram 31] FIG. 2 is a diagram illustrating a playback control module. [Diagram 32] FIG. 13 is a diagram illustrating a UI that displays a user program and a device value. [Diagram 33] 13 is a flowchart showing a process for displaying a user program and a device value. [Diagram 34] 10 is a flowchart showing a process for displaying a waveform of a device value. [Diagram 35] 13 is a flowchart showing a reproduction control. [Diagram 36] FIG. 1 is a block diagram showing an example of a PLC engineering tool. [Figure 37] FIG. 2 is a block diagram of an event log function of the programmable logic controller system. [Figure 38] 13 is a flowchart showing an operation of recording an event occurring in a CPU unit. [Figure 39] 11 is a flowchart showing an operation of recording an event occurring in the expansion unit. [Diagram 40] 13 is a flowchart showing a filter operation when an event log is displayed. [Diagram 41] FIG. 13 is an image diagram showing a setting screen for setting display filtering. [Diagram 42] FIG. 2 is a conceptual diagram showing a GUI of an engineering tool for a programmable logic controller according to an embodiment. [Diagram 43] FIG. 13 is an image of a GUI with the cursor on the operation bar overlapping. [Diagram 44] This is an image of the GUI. [Diagram 45] This is an image of the GUI. [Diagram 46] FIG. 13 is an image diagram showing a GUI of an engineering tool for a programmable logic controller having a camera monitor field. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0019] Hereinafter, an embodiment of the present invention will be described based on the drawings. However, the embodiment shown below is an example for embodying the technical idea of the present invention, and the present invention is not limited to the following. In addition, this specification never specifies the members shown in the claims to the members of the embodiment. In particular, the dimensions, materials, shapes, and relative positions of the components described in the embodiment are not intended to limit the scope of the present invention, and are merely explanatory examples, unless otherwise specified. Note that the size and positional relationship of the members shown in each drawing may be exaggerated to clarify the explanation. Furthermore, in the following explanation, the same name and symbol indicate the same or similar members, and detailed explanation will be omitted as appropriate. Furthermore, each element constituting the present invention may be configured as a form in which multiple elements are composed of the same member and one member serves multiple elements, or conversely, the function of one member can be shared by multiple members.
[0020] A schematic diagram of a programmable logic controller system is shown in Fig. 1. The programmable logic controller system 1000 shown in this figure illustrates a system that inspects an object WK traveling on a line by capturing an image of the object WK 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 connected to each other so that they can communicate with each other via an inter-unit bus 90. The units are roughly divided into a CPU unit 3 and an expansion unit 4. The CPU unit 3 is also called a main unit or a basic unit, and performs the basic operation of the programmable logic controller. The expansion unit 4 is a function expansion unit that expands the function 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 one type of the expansion unit 4, is connected to a camera section 98, captures an image of an object WK at a predetermined timing, and sends the image to the CPU unit. The motion unit 4d is also called a positioning unit, and controls the position of a control object called an axis. Generally, a driving source such as a motor exists for each axis. The communication unit 4e communicates with external devices. The CPU unit 3 also collects data from these expansion units 4 and performs necessary control. <System configuration>
[0022] Here, in order to allow those skilled in the art to better understand programmable logic controllers (hereinafter also referred to as "PLCs"), the configuration and operation of a typical PLC will be described.
[0023] FIG. 2 is a conceptual diagram showing an example of a configuration of a programmable logic controller system according to an embodiment of the present invention. As shown in FIG. 2, this system includes a PC 2 for editing a user program such as a ladder program, and a PLC 1 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 motion program in a flow chart format such as SFC (Sequential Function Chart), or may be created using a high-level programming language such as C language. In the following, for convenience of explanation, the user program is assumed to be a ladder program. The PLC 1 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. The letters a, b, c... added to the end of the reference numbers may be omitted. It should be noted that the system including PLC1 and PC2 may be called a programmable logic controller system.
[0024] The CPU unit 3 is equipped with a PLC side display unit 5 and a PLC side operation unit 6. The PLC side display unit 5 can display the operating 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 into the CPU unit 3, or it may be an input device such as an external console, mouse, or keyboard. Alternatively, the PLC side display unit 5 can be a touch panel that also functions as the operation unit.
[0025] The PLC side display unit 5 normally displays the current values (device values) of devices in the PLC 1, information on errors that have occurred in the PLC 1, etc. A device is a name that refers to an area in memory provided to store device values (device data), and may also be called a device memory. A device value is information that indicates the input status from an input device, the output status to an output device, and the status of internal relays (auxiliary relays), timers, counters, data memories, etc. that are set in a user program. Device values are classified into 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 units 4 are provided 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 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. In addition, a plurality of field devices may be connected to one expansion unit 4. (Programmable logic controller engineering tool)
[0027] The PC2 realizes an engineering tool for a programmable logic controller (hereinafter also referred to as an "engineering tool for PLC"). The engineering tool for PLC is a member for connecting to the PLC1 and for setting it up, controlling it during operation, and checking its operation. It can also create various programs for operating the PLC1 and the programmable logic controller system including the PLC1, and edit and modify programs that have already been created. In this sense, it may be called a program creation support device. Furthermore, the engineering tool for PLC can reproduce the operating status of each device at that time based on operation record data that records the operation of the programmable logic controller system in the past. The operation record data includes user programs such as ladder programs, project data including setting data such as unit configuration information of each unit, and log data that is operation data such as device values of each device at the time of operation and image data of the camera unit. This engineering tool for PLC can also read and edit the project data out of the operation record data. In this sense, the engineering tool for PLC may be called a project data editing program.
[0028] The PC2 is, for example, a portable notebook or tablet type personal computer, and includes a display unit 7 and a PC side operation unit 8. A ladder program, which is an example of a user program for controlling the PLC1, is created using the PC2. The created ladder program is converted into a mnemonic code in the PC2. The PC2 is connected to the CPU unit 3 of the PLC1 via a communication cable 9 such as a USB (Universal Serial Bus), and sends the ladder program converted into the mnemonic code to the CPU unit 3. The CPU unit 3 converts the ladder program into a machine code and stores it in a memory provided in the CPU unit 3. Note that, although the mnemonic code is transmitted to the CPU unit 3 here, the present invention is not limited to this. For example, the PC2 may convert the mnemonic code into an intermediate code and transmit the intermediate code to the CPU unit 3.
[0029] 2, the PC-side operation unit 8 of the PC 2 may include a pointing device such as a mouse connected to the PC 2. The PC 2 may be configured to be detachably connected to the CPU unit 3 of the PLC 1 via a communication cable 9 other than USB. The PC 2 may also be configured to be wirelessly connected to the CPU unit 3 of the PLC 1 without 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 a ladder program is created. The PC2 displays a number of cells arranged in a matrix on the display unit 7. A virtual device symbol is placed in each cell. The symbols indicate input relays, output relays, etc. A relay circuit is formed by such a number of symbols. The ladder diagram Ld has, for example, 10 columns by N rows (N is any natural number) of cells arranged. Then, virtual device symbols are appropriately placed in the cells of each row.
[0031] The relay circuit shown in Figure 3 is constructed by appropriately combining symbols of three virtual devices (hereinafter referred to as "input devices") that are turned ON / OFF based on input signals from an input device, and symbols of virtual devices (hereinafter referred to as "output devices") that are turned ON / OFF to control the operation of an output device.
[0032] The characters displayed above each input device symbol ("R0001," "R0002," and "R0003") indicate the device name (address name) of that input device. The characters displayed below each input device symbol ("Flag 1," "Flag 2," and "Flag 3") indicate the device comment associated with that input device. The characters displayed above the output device symbol ("Return to origin") are a label consisting of a string of characters that indicate the function of that output device.
[0033] In the example shown in Fig. 3, two input device symbols corresponding to device names "R0001" and "R0002" are connected in series to form an AND circuit. An input device symbol corresponding to device name "R0003" is connected in parallel to the AND circuit consisting of these two input device symbols to form an OR circuit. That is, in this relay circuit, the output device corresponding to the symbol in the first row is turned ON only when both input devices corresponding to the two symbols in the first row are turned ON, or when the input device corresponding to the symbol in the second row is turned ON. <Program creation support device>
[0034] Fig. 4 is a block diagram for explaining the electrical configuration of the PC 2. As shown in Fig. 4, the PC 2 includes a PC memory unit 11, a PC CPU 21, a display unit 7, a PC operation unit 8, a PC storage device 22, and a PC communication unit 23. The display unit 7, the PC operation unit 8, the PC storage device 22, and the PC communication unit 23 are each electrically connected to the PC CPU 21.
[0035] The PC memory unit 11 is a working memory that provides a working space for the PC CPU 21 to execute processes, and is typically configured with a RAM or the like. The PC storage device 22 realizes the function of a driving record data storage unit 36B, which will be 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 CPU 21 to execute editing software, which is a computer program stored in the PC storage device 22, and edits the project data through the PC 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 (e.g., ladder programs) and unit configuration information of the CPU unit 3 and the extension unit 4. The project data may also include program configuration information indicating what program parts the user program is made up of. Furthermore, the unit configuration information is information indicating the connection positions of the multiple extension units 4 relative to the CPU unit 3, the functions provided in the CPU unit 3 (e.g., communication functions and positioning functions), the functions of the extension units 4 (e.g., imaging functions), etc.
[0039] Here, editing of project data includes creation and modification of project data. Project data created using the project data editing program is stored in the PC side storage device 22. Furthermore, the user can read out the project data stored in the PC side storage device 22 as necessary and modify the project data using the project data editing program. The PC side communication unit 23 is for communicatively 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, and allows editing of project data. The monitor mode allows simulation operations for debugging user programs, and the like. The history playback mode is also called a replay mode or time machine playback, and allows playback display. Switching between the edit mode, monitor mode, and history playback mode is performed by a mode selection unit 50D, which will be described later. <plc1>
[0041] 5 is a block diagram for explaining the electrical configuration of the PLC 1. As shown in this diagram, 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 section 35, a device section 34, a temporary recording section 91a, and a storage memory 36.
[0043] The project storage unit 35 stores project data input from the PC 2. The PLC side storage device 32 also stores a control program for the CPU unit 3.
[0044] The device section 34 has bit devices, word devices, etc., and each device stores a device value. The device section 34 functions as a device memory that stores the device values of a plurality of devices. It may also function as a storage area referenced by a user program.
[0045] The temporary recording unit 91a records in chronological order the device values stored in the device unit 34. This temporary recording unit 91a can be configured with a ring buffer or the like.
[0046] The storage memory 36 stores the device values recorded in chronological order in the temporary recording unit 91a. The storage memory 36 is composed of an internal memory 37, a removable memory card 36A, or the like as a non-volatile memory.
[0047] In this way, the PLC side storage device 32 has multiple storage areas. The 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 with a removable memory card 36A. (PLC side CPU31)
[0048] The PLC side CPU 31 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 a user program. The device unit 34, which is a storage area referenced by the program execution unit 514 according to the user program, stores each device value 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 indicating a period during which temporary recording is performed in the temporary recording unit 91a, the period including at least one of the period up to the reference time and the period from the reference time, with the time point indicated by the recording trigger as a reference time.
[0050] The storage condition setting unit 45 can set a condition for a recording start trigger for starting recording in the temporary recording unit 91a as the first trigger condition. Also, the period from the reference time indicated by the recording start trigger can be set as the buffer recording period.
[0051] When the first trigger condition for the recording trigger is satisfied, the recording control unit 39 records the time-series device values corresponding to the buffer recording period with the time indicated by the recording trigger as the reference time in the temporary recording unit 91a as log data. The recording control unit 39 also holds the recorded log data in the temporary recording unit 91a until the time when the second trigger condition for the storage trigger is satisfied or the time when the first trigger condition for the recording trigger is satisfied next, whichever is earlier. Then, when the first trigger condition for the recording trigger is satisfied next, the recording control unit 39 records the time-series device values corresponding to the buffer recording period with the time indicated by the recording trigger as the reference time 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 in the save memory 36. Here, when the second trigger condition for the save trigger is satisfied, the save control unit 50C preferably saves the log data held in the temporary recording unit 91a by the recording control unit 39 and corresponding to the immediately preceding recording trigger in the save memory. In this way, the save control unit 50C holds the log data recorded during the buffer recording period even after the buffer recording period has elapsed, and when the save trigger is activated, it 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 recording trigger two or three times before.
[0053] 5, the CPU unit 3 and the expansion unit 4 are connected via an inter-unit bus 90, which is a type of expansion bus. The communication function related to the inter-unit bus 90 may be implemented as a part of the PLC side communication unit 33. The PLC side communication unit 33 may also have a network communication circuit. The PLC side CPU 31 may transmit log data, etc. to the PC 2, a cloud, etc. via the PLC side communication unit 33.
[0054] Here, a supplementary explanation will be given regarding the inter-unit bus 90. This inter-unit bus 90 is a bus on which input / output refresh and the like described below are performed. Communication control on the inter-unit bus 90 is realized by a so-called bus master 38 (note that the bus master may be provided as a part of the PLC side communication section 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, and upon receiving a communication request from the PLC side CPU 31, performs communication with the expansion unit 4, such as input / output refresh, which will be described later.
[0055] The expansion unit 4 includes a CPU 41 and a memory 42. The CPU 41 controls the field device 10 according to instructions (device values) from the CPU unit 3 stored in the device. The CPU 41 also stores the control results of the field device 10 in a device called a buffer memory. The control results stored in the device are transferred to the CPU unit 3 by input / output refresh. The control results stored in the device are also transferred to the CPU unit 3 according to a read command from the CPU unit 3, even at a timing different from the input / output refresh. The memory 42 includes a RAM, a ROM, and the like. In particular, a storage area used as a buffer memory is secured in the RAM. The memory 42 may also have a buffer that temporarily holds data (e.g., still image data or video data) acquired by the field device 10.
[0056] FIG. 6 is a schematic diagram showing the scan time of the CPU unit 3. As shown in FIG. 6, one scan time T is composed of inter-unit communication 201, program execution 202, and END processing 204 for refreshing input and output. In inter-unit communication 201, the CPU unit 3 executes a ladder program and transmits output data obtained from the PLC side storage device 32 in the CPU unit 3 to an external device such as the expansion unit 4. Furthermore, the CPU unit 3 takes in 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. In other words, the device values stored in the devices of the CPU unit 3 are reflected in the devices of the expansion unit 4 by output refresh. Similarly, the device values stored in the devices of the expansion unit 4 are reflected in the devices of the CPU unit 3 by input refresh. In this way, the devices of the CPU unit 3 and the devices of the expansion unit 4 are synchronized by input and output refresh.
[0057] In addition, a mechanism for updating device values between units at a timing other than refresh (inter-unit synchronization) 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. In other words, the devices of the CPU unit 3 can be accessed by the internal device of the CPU unit 3 at any time. Similarly, the devices of the expansion unit 4 can be accessed by the internal device of the expansion unit 4 at any time. Basically, the device values between the CPU unit 3 and the expansion unit 4 are updated and synchronized with each other at the timing of refresh. In the program execution 202, the CPU unit 3 executes (calculates) 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 executes the program to perform calculations on the data. In addition, the END process means the general process related to peripheral services such as data communication with external devices such as the PC 2 and a display (not shown) connected to the CPU unit 3, and system error checks.
[0058] In this way, PC 2 creates a ladder program in response to user operations and transfers the created ladder program to PLC 1. PLC 1 executes input / output refresh, ladder program execution, and END processing as one cycle (one scan) periodically, i.e., cyclically. This allows it to control various output devices (motors, etc.) based on timing signals from various input devices (sensors, etc.). In addition to the scan cycle, CPU unit 3 and expansion unit 4 each have an internal control cycle. CPU unit 3 and expansion unit 4 control functions of field devices 10, etc. based on the internal control cycle. <Logging>
[0059] When a user improves or modifies a user program, the device values acquired while PLC1 is executing the user program may be useful. Therefore, PLC1 acquires pre-specified device values and creates log data. Here, the devices managed by PLC1 include not only those used by user programs but also those not used by user programs. Also, some devices are useful when improving or modifying a user program, but some devices are not useful. Since there are generally several thousand devices, it is a big burden for the user to specify the required device. Therefore, PC2 analyzes the user program and extracts the devices used or described in the user program as targets for logging. This reduces the burden on the user.
[0060] If all devices managed by PLC1 are subject to logging, the scan time will be long. This is because logging is executed as part of the user program and during I / O refresh. Sometimes, the delay caused by logging may prevent the user program from running as desired. Therefore, the number of devices subject to logging should be kept appropriate.
[0061] A user program may be composed of multiple program parts (for example, program modules (main ladder program and sub ladder program), function blocks). In some cases, it may be sufficient for the user to log the devices related to the program part that the user wishes to modify. In addition, the user may wish to exclude a specific program part from the extraction targets, or add a specific program part to the extraction targets among multiple program parts. Therefore, it would be convenient for the user if they could add or delete devices from the logging targets on a program part basis.
[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 it were possible to add or delete devices from the logging targets for each of these functions. For example, if an undesirable event occurs related to 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 a 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 to be executed by a PLC 1 composed of one or more units. This program creation support device 1200 can be realized by loading a user program creation support program into a PC 2 and having it run, or it may be constructed using dedicated hardware. In the example shown in Fig. 7, the program creation support device 1200 is realized by installing the user program creation support program into the PC 2. This program creation support device 1200 includes a PC CPU 21, a PC memory unit 11, a PC storage device 22, a display unit 7, a PC operation unit 8, and a communication unit.
[0064] The PC memory unit 11 is a working space for executing processes by the PC CPU 21. A RAM or the like can be used as such a working memory.
[0065] The PC side storage device 22 is a storage that can be read by the PC2. Typically, it is a storage device such as a hard disk provided in the PC2, but it is not limited to a fixed type, and can also be a portable medium. For example, a memory card 36A provided in the PLC1 can be removed from the PLC1 side and inserted into the PC2 side for reading. Alternatively, the PLC side storage device 32 of the PLC1 connected to the PC2 through a network can be accessed.
[0066] This PC side storage device 22 realizes the function of a 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 PLC1 and unit configuration information of each unit. The unit configuration information includes the function of each unit, information on the connection positions between units, etc. The log data is data such as device values when PLC1 is operating. The driving record data in which this 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 by 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 to the PC side memory unit 11, and displays the log data in the driving record data in association with the project data.
[0068] The PC side CPU 21 realizes the functions of a project editing unit 50B, a storage control unit 50C, etc. The project editing unit 50B accepts an instruction to edit the project data displayed on the display unit 7 by the log display control unit 61, and edits this project data. When the edited project data is saved, it is stored in the driving record data storage unit 36B as driving record data in which the project data is associated with the corresponding log data.
[0069] The save control unit 50C restricts the project data in the driving record data stored in the driving record data storage unit 36B from being saved in a state edited by the project editing unit 50B. This makes it possible to avoid a situation in which the credibility of the entire project data is unintentionally impaired due to a user's modification of a user program or the like in the project data. Specifically, the save control unit 50C restricts the project data in the driving record data stored in the driving record data storage unit 36B from being overwritten and saved in a state edited by the project editing unit 50B. For example, when an attempt is made to overwrite the project data by the project editing unit 50B, an overwrite prohibition pop-up is displayed on the display unit 7. Alternatively, when an attempt is made to save the edited project data, the edited project data is saved as a file separate from the original project data included in the driving record data. For example, to encourage saving under a different name, a save file name input dialogue may be displayed, or the name may be automatically changed and a new copy may be saved. (Driving record data)
[0070] The driving record data is recorded at a predetermined timing. Specifically, by specifying a period during which a problem may occur and storing the data during this period as driving record data, it can be used to analyze the cause of a problem when it occurs.
[0071] Driving record data can be a package of multiple files. Information included in driving record data can be, for example, management information data, project data, project identification information, device data, image data, event data, etc. Management information data is information about what is included in the driving record data. Its extension can be, for example, TMN. Project data is project data at the time the driving record data is recorded (for example, when a problem occurs). Its extension can be, for example, TPJ. Details will be described later.
[0072] The project identification information is information for identifying the project data at the time this driving record data was recorded. The extension may be, for example, TPI. The device data is data that records the device at the time the driving record data was recorded, and there are as many device data as there are devices. The extension may be, for example, TDV. The image data is data that records the image at the time the driving record data was recorded. The extension may be, for example, TCA. The event data is data that records events and errors that occurred at the time the driving record data was recorded. The extension may be, for example, TEV. These are just examples, and the driving record data may include only one of these pieces of information, or other information may be added. (Project data configuration)
[0073] Project data is composed of multiple data. When there is a large amount of data, it is preferable to store it in a compressed format. Project data can include project files, modules, function blocks, unit setting files, mail setting files, and the like. Project files are information about project settings. The file extension is, for example, kpr. Modules are information about ladder programs. The file extension is, for example, mod. Function blocks are information about modularized ladder programs. The file extension is, for example, kfb. Unit setting files are configuration information about units. The file extension is, for example, ue2. Mail setting files are information about mail settings. The file extension is, for example, mil. In addition to these, files with different extensions for each unit may be included. These are just examples, and only one of these pieces of information may be included in the project data, or other information may be added.
[0074] The file extension can be used as the identification information indicating the type of each data file. Also, the file extension can be used to associate driving record data with project data. For example, the TMN file is associated with driving record data, and the kpr file is associated with project data, both of which are associated with the user program creation support program on the PC2. The user program creation support program is started by double-clicking the corresponding file on the PC2. This is shown in FIG. 8. Here, the project editing section 50B of the user program creation support program is equipped with an identification information interpretation section. Here, the TPJ interpretation section 50B1 and the kpr interpretation section 50B2 are shown as examples of the identification information interpretation section. When a TMN file is double-clicked on a filer screen such as Explorer on the display section 7, the user program creation support program decompresses the TPJ file saved in a compressed format and loads it onto the PC side memory section 11. Also, when a kpr file is double-clicked, the user program creation support program loads onto the PC side memory section 11 together with other setting files located in the same folder as the kpr. 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 realize the function of the mode selection unit 50D. The mode selection unit 50D can select an edit mode or a history replay mode. The edit mode is a mode in which project data is edited, and is also called an edit mode. The history replay mode is a mode in which display is performed by the log display control unit 61, and is also called a replay mode. In this way, the user program creation support program can switch the operation mode within one program, and while replaying past events to solve a problem, it is possible to move to a task of correcting the user program at a location that is thought to be the cause. Also, by using a common GUI for the history replay mode and the edit mode, it is possible to perform a smooth transition between tasks. (User Program Creation Support Program 1300)
[0076] First, FIG. 9 shows the GUI of the user program creation support program 1300 when the history replay mode is selected in the mode selection section 50D. 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, the project display area 420 in the left column displays various information constituting the project data 71. From the top, unit configurations (CPU unit, motion unit, analog input unit, camera input expansion unit, etc.) and program configurations (each scan module, fixed cycle module, inter-unit synchronization module, function block, macro, etc.) are displayed. For the motion unit, setting parameters of axis configuration and axis control are displayed as function settings. The user can check the setting contents of these setting parameters by double-clicking the axis configuration and axis control on the GUI shown in FIG. 9. In addition, in the project display area 420, Main and Sub are displayed for each scan module. When the user clicks Main, the Main program is displayed in the program display area 410 of the ladder monitor 450 in the center. (History playback mode)
[0077] Next, the procedure for reproducing driving record data recorded when a problem occurred, etc., in the history reproduction mode will be described with reference to Fig. 10. For example, when a data file of pre-saved driving record data (driving record data file with the above-mentioned extension TMN) or a project file (project data file with the extension kpr) is double-clicked, the user program creation support program 1300 shown in Fig. 10 is started and the double-clicked file is analyzed, the included files are expanded, and other associated files are called up, thereby automatically reproducing the situation when the driving record data was saved. Alternatively, the user can start the user program creation support program 1300 and then select the relevant file, such as the driving record data file, from a file menu or the like to expand it.
[0078] In this example, when driving record data is double-clicked, the user program creation support program 1300 is configured to start in the history replay mode shown in Fig. 10. On the other hand, when project data is double-clicked, the user program creation support program 1300 is configured to start in the edit mode shown in Fig. 11. In this way, by varying the initially selected operating mode depending on the file selected by the user, an operating mode that is suited to expected user operations can be selected in advance, providing a smooth operating environment. (Switch between history playback mode and edit mode)
[0079] To switch between the two operation modes, edit mode and history replay mode, after starting the user program creation assistance program 1300, the user selects the operation mode to be switched to from a mode selection field 50D1, which is one form of the mode selection section 50D. For example, the mode selection field 50D1 may be configured as a pull-down menu as shown in FIG. 12, allowing the user to easily select the desired operation mode. In the example of FIG. 12, selecting "replay" switches to history replay mode (replay mode), and selecting "editor" switches to edit mode (editor mode). The currently selected operation mode is also displayed in the mode selection field 50D1, which also serves the function of informing the user of the current operation mode.
[0080] When the user program creation support program, which is started in edit mode by double-clicking on project data, is switched to history replay mode, device data, etc. are not specified in the project data, so the user is prompted to separately specify driving record data including device data to be used in history replay mode. For example, a dialogue screen for selecting driving 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 the trouble are played back, so that the user can estimate the cause of the trouble and consider the necessary measures to improve it. For example, the ladder program can be edited to eliminate the trouble.
[0082] In the history playback mode of Figure 9, editing of user programs is prohibited. In other words, playback, i.e. viewing, of driving record data is permitted, but tampering is prohibited. This ensures the authenticity of driving record data when trouble occurs. The history playback mode in which editing of user programs is prohibited is called log playback mode. (Edit mode)
[0083] Here, an example of modifying a ladder program as a procedure for editing a user program using the user program creation support program 1300 in the edit mode will be described with reference to Figs. 13 to 15. In this example, a user program is considered in which, while performing positioning control of a motion unit using the user program creation support program 1300, if the value of a device indicating the current coordinate exceeds 12000, the operation is changed to torque control. Here, as a result of verifying the cause of the trouble in the history replay mode, it was found that if the operation is changed after the device value of the ladder diagram shown in the program display area 410 as shown in Fig. 13 exceeds 12000, the movable arm comes into contact with the workpiece. Therefore, a case is assumed in which the threshold value is changed from 12000 to 10000 in the edit mode. First, in the user program creation support program 1300 in Fig. 13, the part surrounded by a dashed line is selected, and the Enter key of the keyboard constituting the PC side operation unit 8 is pressed, etc., to display the program edit screen 1310 in Fig. 14. On this program editing screen 1310, in the device value input field 1312, the value 12000 is corrected to 10000, and the "overwrite" button 1314 is pressed. This changes the ladder program as shown in the program display area 410 of the user program creation support program 1300 in FIG.
[0084] As another example of editing a user program, a procedure for correcting parameters for positioning control of a 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 replay mode, it is found that the acceleration of the workpiece was too rapid, so the edit mode is switched to reduce the speed of the workpiece when moving to point parameter No. 1. 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 the tree in the project display field 420 displayed on the left. In this state, select the parameter you want to change and input the value from the keyboard or the like that is the PC side operation unit 8. Then, in the point parameter edit field 1320 on the right side of the screen, change the speed to a low value (for example, 300 mm / s) in the speed designation field 1322. By such an operation, the user program can be changed to the desired value.
[0085] The procedure for saving the result of editing the user program in this way will be described with reference to Figs. 17 and 18. When saving a user program, if the original user program included in the driving record data is edited, the user program at the time of the occurrence of a problem cannot be reproduced in the history replay mode, so it is necessary to save it separately from the original user program. Here, a case where it is saved as a different project data will be considered. First, as shown in the file menu 1330 of the user program creation support program 1300 shown in Fig. 17, the project data is saved in the same procedure as for a normal project. Here, when "Save project as" 1332 is selected from the file menu 1330, a "Save project as" dialogue screen 1340 is displayed as shown in Fig. 18, and the user is prompted to specify the project name and the save location of the data file. With this procedure, the user program included in the driving record data is saved as new project data while maintaining it.
[0086] On the other hand, when the user tries to save the project by selecting "Save Project" 1334 in the file menu 1330 in FIG. 17 or by operating the keyboard of a general shortcut key Ctrl+S, the save control unit 50C controls the save. That is, regardless of the instruction to save the project, the "Save Project with a Different Name" dialogue screen 1340 shown in FIG. 18 is displayed to prompt the user to save the project data under a different name. Alternatively, in order to prohibit the save from being overwritten, the corresponding "Save Project with a Different Name" may be grayed out to make it unselectable, or "Save Project with a Different Name" may not be displayed as an option in the file menu in the save screen in FIG. 17. Alternatively, the project data may be automatically saved under a different name. For example, a branch number such as "-1" may be added to the file name to automatically generate a file with a different name. Alternatively, when the user selects "Save Project with a Different Name", a pop-up window may be displayed indicating that the save from being overwritten is prohibited.
[0087] If an instruction is given to overwrite a user program that has already been saved under a different name, the overwrite save is executed as is, since this is not an operation on the original user program included in the driving record data. In other words, the operation of the save control unit 50C that restricts the above-mentioned overwrite save operation is executed when the original project data or user program included in the driving record data at the time of the trouble occurrence has not yet been copied and saved under a different name, and once it has been saved under a different name, the overwrite save operation is permitted. (Operation to save driving record data)
[0088] As described above, the user can play back driving record data based on the device's backup project that was saved in advance on PC 2. Also, if there is no device backup project, the user can play back the driving record based on the project data saved in the driving record data. By playing back the driving record data in history playback mode, the user can find problem areas in the processing targeted by the project data, and when the user has corrected the problem areas in edit mode, the user can perform an operation to save the changes on PC 2.
[0089] On the other hand, if project data in the driving record data is used to play back the driving record, when the project data edited in the edit mode is saved, the user program creation support program may block the save by issuing a message prohibiting overwriting in the save control unit. Alternatively, the project data may be saved as new project data on the hard disk of the PC, etc. (Procedure for "Do not overwrite")
[0090] An example of such "overwrite save prohibition" processing by the save control unit 50C will be described with reference to the flowchart in Figure 19. First, when a save operation is started in step S1901, it is determined in step S1902 whether or not the project data saved in the driving record data is being edited. If it is being edited, in step S1903 a message is displayed to the user indicating that saving is not possible, and the save processing is canceled. On the other hand, if editing is not being performed, the flow proceeds to step S1904, where the save processing is executed. ("Save as new project data" procedure)
[0091] An example of the "save as new project data" process by the save control unit 50C will now be described with reference to the flowchart in Fig. 20. First, when a save operation is started in step S2001, it is determined in step S2002 whether or not the project data saved in the driving record data is being edited. If it is being edited, in step S2003, the user is requested to input a 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. (Collect saved projects function)
[0092] As with normal project data, the comparison function provided by the user program creation support program 1300 allows the user to check the difference between the project currently displayed in the user program creation support program and the edited project data saved on the PC 2. For example, when "Project - Compare Project" 1336 is selected from the file menu 1330 on the screen of the user program creation support program 1300 in FIG. 21, 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 and changed parts of the project data to be compared are highlighted, while the deleted parts are grayed out. Also, the differences may be displayed in a list and highlighted. As an example, the result of executing the comparison function on the ladder program edited in FIG. 13 to FIG. 15 is shown in FIG. 22. FIG. 22 shows an example of a comparison display screen 1350 for comparing and displaying project data in the user program creation support program 1300. In the example shown in this figure, for items edited in the ladder program, the step number, the comparison source value, and the comparison target value are shown in red characters. In this way, the user can easily visually grasp the edited parts of the referenced project data, for example, the user program at the time of the occurrence of a problem. ● Logging settings (automatic extraction and addition / removal)
[0093] 23 shows functions that are realized by the PC-side CPU 21 of the PC 2 executing a project data editing program stored in the PC-side storage device 22. Some or all of these functions may be realized by hardware circuits such as ASIC and FPGA. ASIC is an abbreviation for application specific integrated circuit. FPGA is an abbreviation for field programmable gate array.
[0094] 23 realizes the functions of a project creation unit 50, a log setting unit 51, and a log display control unit 61. In this embodiment, the functions shown in FIG. 23 are realized on the PC 2, but the present invention is not limited to this, and the functions may be realized on the PLC 1. (Project Creation Department 50)
[0095] The project creation unit 50 realizes the functions of a program creation unit 63 and a function setting unit 62. The project creation unit 50 displays a UI for creating project data 71 on the display unit 7, creates the project data 71 according to user instructions input from the PC-side operation unit 8, and stores the project data 71 in the PC-side storage device 22. UI is an abbreviation for user interface. The project data 71 includes a user program, unit configuration information of the PLC 1, and the like.
[0096] The program creation unit 63 creates a plurality of program parts (each module) that constitute a 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 functions of the expansion unit 4. For example, the function setting unit 62 assigns any device to the functions provided in the CPU unit 3, or assigns any device to the functions provided in the expansion unit 4, and writes assignment information indicating the relationship between the functions and the devices to the unit configuration information. The project creation unit 50 also stores, as project data 71, program configuration information indicating what program parts the user program is made up of. The project creation unit 50 also stores, as project data 71, unit configuration information indicating what units the entire PLC 1 is made up of. (Log setting section 51)
[0097] The log setting unit 51 realizes the functions of a part designation unit 52, a function designation unit 60, a device extraction unit 53, a manual setting unit 58, and an estimation unit 59. This log setting unit 51 extracts devices described in the project data 71 by analyzing 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 part designation unit 52 designates program parts to be subject to device extraction in accordance with a user instruction input from the PC-side operation unit 8. The part designation unit 52 also designates program parts to be excluded from device extraction in accordance with a user instruction input from the PC-side operation unit 8.
[0098] The device extraction unit 53 realizes the functions of an addition unit 54, a deletion unit 55, a merging unit 56, and an identification unit 57. The device extraction unit 53 extracts devices described in the project data 71 by analyzing the project data 71, and creates log setting data 72. The addition unit 54 analyzes program parts designated as extraction targets by the part designation unit 52, extracts devices described in the program parts, and adds them to the extraction list. The deletion unit 55 analyzes program parts designated as exclusion targets by the part designation unit 52, extracts devices described in the program parts, and deletes the extracted devices from the extraction list. Alternatively, the deletion unit 55 adds the extracted devices to the exclusion list. The merging unit 56 deletes from the extraction list devices that are extracted in duplicate from among devices extracted from a plurality of program parts. The identification unit 57 detects an instruction word for a memory card in the project data 71, identifies a device that is the target of the instruction word, and adds the identified device to the extraction list.
[0099] In this embodiment, after the part designation unit 52 designates a program part, the adding unit 54 analyzes the designated program part to extract and add a device to be logged, but the present invention is not limited to this. For example, the adding unit 54 may first analyze one or more program parts included in the project data 71 to extract a device, add the extracted device to an extraction list, and then extract a device described in the program part designated by the part designation unit 52 and add it to the extraction list.
[0100] Similarly, the deletion unit 55 may first create an extraction list by analyzing one or more program parts included in the project data 71, and then extract the device described in the program part specified by the part specification unit 52 and delete it from the extraction list.
[0101] In this embodiment, for convenience of explanation, the adding unit 54 and the deleting unit 55 are separated, but it goes without saying that they may be one 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 effect that the recording of device values by the PLC 1 has on the execution of a 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 due to logging is added to the scan time. 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 as an estimation result on the display unit 7. This delay time may be called an extension of the scan time.
[0103] The function designation unit 60 designates the functions of the CPU unit 3 and the expansion unit 4 to be extracted as devices according to a user instruction input from the PC operation unit 8. The function designation unit 60 also designates the functions of the CPU unit 3 and the expansion unit 4 to be excluded from the extraction of devices according to a user instruction input from the PC operation unit 8. The addition unit 54 analyzes the unit configuration information of the function designated as an extraction target by the function designation unit 60, extracts devices assigned to the function by the unit configuration information, and adds them to the extraction list. The deletion unit 55 analyzes the unit configuration information of the function designated as an exclusion target by the function designation unit 60, extracts devices assigned to the function by the unit configuration information, and deletes the extracted devices from the extraction list. The merging unit 56 deletes devices extracted in duplicate from the extraction list among the devices extracted for each of the multiple functions. The identification unit 57 detects an instruction word for a memory card in the project data 71, identifies the device that is the target of the instruction word, and adds the identified 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 may use the memory card 36A or the like. The log data 73 stored in the log data storage unit 74 is read out 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 display the device values recorded in the log data 73 and the program parts of the project data 71 in association with each other on the display unit 7. The log display control unit 61 is the core of an engineering tool for a programmable logic controller. The log data 73 may include image data captured by a camera unit in addition to the device values (details will be described later). The project data and the log data are packaged and stored as operation record data. Alternatively, the project data and the log data may be stored in separate files in association with each other, and when one of the project data or the log data is opened, the other file may be read out by referring to the association information (details will be described later). Executing logging
[0105] 24 shows functions of the PLC-side CPU 31 of the CPU unit 3. Some or all of these functions may be realized by hardware circuits such as ASIC and FPGA. ASIC is an abbreviation for Application Specific Integrated Circuit. FPGA is an abbreviation for Field Programmable Gate Array.
[0106] 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 has a ladder execution engine 80a that repeatedly executes a user program, and a unit control unit 80b that controls the ladder execution engine 80a and executes input / output refresh 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 in accordance with the user program. The ladder execution engine 80a of the execution unit 80 writes device values to output-system devices held in the CPU unit device unit 34a of the device unit 34 and reads device values from input-system devices held in the CPU unit device unit 34a in accordance with the user program.
[0107] Meanwhile, the unit control unit 80b of the execution unit 80 reads and writes the device values related to the expansion unit 4 acquired by the input / output refresh to 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 controlling communication 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, i.e., information indicating what units the entire PLC 1 is composed of.
[0108] The recording unit 81 obtains device values from the device unit 34 (the CPU unit device unit 34a or the expansion unit device unit 34b) in accordance with the log setting data 72, or obtains device values from the buffer memory of the expansion unit 4, and writes them to a memory (for example, a ring buffer) as log data 73. As described above, the recording unit 81 executes logging processing during END processing, etc.
[0109] The logging process in the END process will be described in more detail. The log setting data 72 includes, as logging targets, devices described in the program parts specified by the part specification unit 52 and devices assigned to functions (e.g. targets for monitoring by the unit monitor) specified by the function specification unit 60. For the former devices, the log data 73 is written during the END process, while for the latter devices, the device values of the target devices (UGs) are read from the extension unit 4 and written to the log data 73 during the END process.
[0110] Here, the update period (so-called control period) of the current coordinates and command coordinates of the motor is much shorter than the scan period of the ladder program. Therefore, in this embodiment, the device values of the UG are read out in synchronization with the scan period, so that not all current coordinates and command coordinates are written to the log data 73. However, the present invention is not limited to this, and it is also possible to configure, for example, to store the current coordinates and command coordinates for each control period in the memory of the extension unit 4, and to read out the multiple current coordinates and command coordinates stored up to that point at the timing of the scan period.
[0111] Furthermore, the recording unit 81 assigns 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 chronological order in the log data 73.
[0112] The devices to be logged are basically specified by the logging target list of the log setting data 72, but additional devices may be specified by the detection unit 82. The detection unit 82 may detect, for example, rewriting of a device value from an external device for any of the devices included in the device unit 34. Generally, device values are rewritten according to a user program or by an external device. Such rewriting cannot be grasped in advance by only analyzing the user program. The recording unit 81 may add a device whose device value has been detected as being rewritten by the detection unit 82 to the logging targets. Generally, rewriting of a device value from an external device is likely to cause an event that is unexpected for the user. Therefore, the recording unit 81 will be useful for the user to improve the program by logging the device value rewritten by the external device.
[0113] Incidentally, in the END process, a UG read command may be issued independently of a user program. UG is a device type indicating a buffer memory. The detection unit 82 may detect a UG read command issued independently of a user program. The recording unit 81 may identify the buffer memory that is the target of the UG read command detected by the detection unit 82, and add the identified buffer memory as a recording target. When the extension unit 4 is a motion unit, such a buffer memory stores torque values, current coordinate positions, etc.
[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 uses an address line to specify the address of the device to be read / written to the PLC-side storage device 32. Therefore, the detection unit 82 may dynamically detect a 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 in the device unit 34, and may also 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 that is dynamically allocated as a recording target.
[0116] In this way, 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 may obtain the log data 73 without creating the log setting data 72. For example, when the execution unit 80 starts up, the execution unit 80 obtains device values from all devices in the device unit 34. The detection unit 82 monitors the devices, and therefore detects that the execution unit 80 has read the device values, and transmits information (address information) of the devices from which the device values have been read to the recording unit 81. The recording unit 81 reads the 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 values.
[0117] Incidentally, the recording unit 81 may write the device value to the log data 73 for each scan cycle or each predetermined collection cycle. For example, even if the detection unit 82 detects multiple accesses to a device within one cycle, the recording unit 81 may write only the device value at the time when the last access was detected to the log data 73. This makes it possible to reduce the data size of the log data 73.
[0118] The execution unit 80 may have a cache that holds the device. In this case, the detection unit 82 may detect writing to the device 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 in accordance with the user program. If the detection unit 82 is implemented in the execution unit 80, when the execution unit 80 detects an instruction word that rewrites 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) into the log data 73.
[0122] Incidentally, the log setting data 72 may include the data format (e.g., binary format or text format) of the log data 73. As the data format, 16-bit decimal, 32-bit decimal, ±16-bit ±32-bit decimal, 16-bit hexadecimal, 32-bit hexadecimal, character string, Float, DoubleFloat, etc. may be set for each device. Such a data format can be determined by analyzing the command words in the program parts.
[0123] When a predetermined output condition is satisfied, such as when the execution of a user program is completed or when a trigger relay for saving to the memory card is turned on, 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 erased 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 attached to the mounting portion of the PC 2. As a result, the log data 73 is displayed on the display unit 7 of the PC 2. The output unit 84 may transmit the log data 73 to the PC 2, a cloud, or the like via the PLC side communication unit 33.
[0124] In this embodiment, the log data 73 and the like are written to the memory card 36A when a predetermined output condition is satisfied, but the present invention is not limited to this, and may be stored in an internal memory (non-volatile memory such as a flash memory or a hard disk). At least the log data 73 needs to be stored in the memory card 36A or the internal memory 37 when a predetermined output condition is satisfied, whereas the project data 71 is not limited to being stored when a predetermined output condition is satisfied. For example, the project data 71 may be stored in advance in the memory card 36A or the internal memory 37 when the PLC 1 changes from the setting mode (PROGRAM mode) to the operation mode (RUN mode). ● Creating 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 section 62. The function setting section 62 may be called a unit editor. When the start of the unit editor is requested, the function setting section 62 displays a unit setting UI 150 on the display section 7. The name column 151 is a column for displaying the name of each unit (e.g., model number, etc.). A unit number is automatically assigned to each unit. In this example, the CPU unit 3 is assigned the unit number "0". The input area column 152 is a column for allocating input system devices. In this example, devices R000 to R015 are allocated to the CPU unit 3 as input system devices. The output area column 153 is a column for allocating output system devices. In this example, devices R500 to R507 are allocated to the CPU unit 3 as output system devices. 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 of expansion unit 4, the connection order, and the devices to be assigned through the PC side operation unit 8. The function setting unit 62 stores information indicating the type of expansion unit 4, the connection order (unit number), and the devices to be assigned to each of the CPU unit 3 and the expansion unit 4 in unit configuration information. The unit configuration information may be called unit setting information. Here, a device is assigned to each unit, but a device may also be assigned to each function of each unit. The function setting unit 62 manages the unit configuration information as part of the project data 71.
[0126] In this way, the unit configuration information includes information indicating the devices assigned to each unit and information indicating the devices assigned to each function, so the device extraction unit 53 can extract the devices assigned to each unit and each function by referring to the unit configuration information. <Debug>
[0127] FIG. 26 is a flow chart showing an outline of the debugging process for a user program executed by a user.
[0128] In step S2601, the user operates PC 2 to create a user program consisting of a plurality of program parts, and creates project data 71 including the user program. The program creation unit 63 creates the 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 perform an operation on the project data 71 or the user program to obtain a hash value or an error detection code, etc., and add these to the project data 71 as identification information. The identification information may be a GUID (globally unique identifier), etc.
[0129] In step S2602, the user operates PC 2 to transfer project data 71 to PLC 1. The project creation unit 50 reads out the project data 71 from the PC-side storage device 22, and transmits it to PLC 1 via the PC-side communication unit 23. Upon receiving the project data 71, the CPU unit 3 of PLC 1 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 change switch to switch from PROGRAM mode to RUN mode) to instruct 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, etc., and stores (records) the logged device values in the temporary recording unit 91a. When a predetermined output condition is satisfied, the saving unit 93 in the output unit 84 creates log data 73 by saving the device values recorded in the temporary recording unit 91a and the above-mentioned image data in the memory card 36A or the internal memory 37.
[0131] Furthermore, the storage unit 93 stores the project data 71 in the memory in addition to the log data 73. This allows the PC 2 to reproduce the behavior at the time of the trouble occurrence on the monitor using the project data 71 at the time of the trouble occurrence. Details will be described later.
[0132] Furthermore, the storage unit 93 stores in memory, in addition to the project data 71, identification information (such as a hash value) of the project data 71. This allows the PC2 to use the identification information to verify whether the current project data (to be the subject of replay) matches the project data 71 at the time of the actual occurrence of the problem. Details will be described later.
[0133] In this embodiment, the project data 71 and its identification information are stored in memory in addition to the log data 73 when a predetermined output condition is satisfied, but the present invention is not limited to this. For example, the project data 71 and its identification information may be stored in memory before, when, or during operation of the PLC 1, and only the log data 73 may be stored in memory when a predetermined output condition is satisfied. In short, it is sufficient that the log data 73, the project data 71, and their identification information are stored in memory in a correlated state when the predetermined output condition is satisfied.
[0134] In addition, in this embodiment, the project data 71 is stored in the memory, but 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 PC 2 matches the project data 71 at the time of the actual occurrence of the trouble. In other words, it is assumed that the current project data has not been edited or modified after the project data is transferred to the PLC 1. If it is determined that the two data do not match, the user only needs to perform replay after recognizing that the current project data is different from the project data 71 at the time of the actual occurrence of the trouble, so that replay (inaccurate troubleshooting) can be prevented from being performed without the user being aware of this.
[0135] In step S2604, the user operates the PLC-side operation unit 6 of the CPU unit 3 to instruct the transfer of the project data 71 and the log data 73 to the PC2. Alternatively, the user may operate the PC-side operation unit 8 of the PC2 to read out the project data 71, the identification information of the project data 71, and the log data 73 written in the memory card 36A. The output unit 84 transmits the project data 71 and the log data 73 to the PC2. Note that the output unit 84 may be configured to add the identification information of the project data 71 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. When a predetermined condition for writing to the memory card 36A is satisfied, the output unit 84 may perform an operation (using a hash function, for example) on the project data 71 or the user program to obtain a hash value or an error detection code, and add these to the log data 73 as identification information. Note that, as long as the rule for creating the identification information executed by the PC 2 and the rule for creating the identification information executed by the CPU unit 3 match, any rule may be adopted.
[0136] In step S2605, the user operates the PC 2 to investigate the cause of the trouble while replaying the log data 73, and debug the user program constituting the project data 71. Replaying 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 keeps virtual time, and acquires the 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 PLC 1. In this case, the log display control unit 61 may use the user program of the project data 71 (master data) held in the PC-side storage device 22 and display the device values in association with the user program. Details of investigating the cause of the trouble by replaying the log data 73 will be described later.
[0137] It should be noted here that the version of the project data 71 used to acquire the log data 73 may differ from the version of the project data 71 held in the PC2. In this case, it may be impossible to display the device value in association with the user program, or the user program may be erroneously associated with the device value. In this case, the log display control unit 61 may use the identification information of the project data to display a warning indicating that the version of the project data 71 used to acquire the log data 73 is different from the version of the project data 71 held in the PC2 on the display unit 7. The log display control unit 61 may inquire of the user whether or not to display the log data 73 acquired using the first version of the project data 71 in association with the second version of the project data 71 held in the PC2. If the user desires such a display, the log display control unit 61 displays the log data 73 acquired using the first version of the project data 71 on the display unit 7 in association with the second version of the project data 71 held in the PC2. The version is managed by the identification information. If the user confirms that there is no problem with the log data 73, debugging is not necessary, and the subsequent steps S2606 and S2607 are also unnecessary. The user analyzes the log data 73, finds any bugs in the user program, and corrects the user program. The project creation unit 50 corrects (updates) the project data 71 in accordance with the user input, and stores it in the PC-side storage device 22.
[0138] In step S2606, the user operates the PC 2 to transfer the project data 71 to the PLC 1. When a user program in the project data 71 is changed, the identification information is updated. This makes it possible to distinguish between the project data 71 before and after the correction.
[0139] In step S2607, the user operates the CPU unit 3 to instruct execution of a user program included in the project data 71, thereby verifying the project data 71. The execution unit 80 executes the user program included in the project data 71. If the PLC 1 is operating as the user expected, the user determines that debugging of the project data 71 has been successful. If the PLC 1 is not operating as the user expected, the recording unit 81 logs the device values, etc. again, and the storage unit 93 creates log data 73. The user then 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. This is believed to improve the efficiency of debugging.
[0141] The transfer of the project data 71 may be performed via the memory card 36A. That is, the PC 2 writes the project data 71 to the memory card 36A. The user removes the memory card 36A from the PC 2 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 performed via the memory card 36A. <Project Creation Division 50>
[0142] FIG. 27 shows the details of the project creation unit 50. The function setting unit 62 sets the unit configuration information of the extension unit 4, the function of the CPU unit 3, and the function of the extension unit 4 based on the information input from the PC side operation unit 8, and creates unit configuration information indicating the setting contents. The function settings of the CPU unit 3 include IP address settings, settings related to the FTP client, and settings of access authority for the project data 71. The function settings of the extension unit 4 include input channel settings and settings related to communication between PLCs. The unit configuration information is 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 an editing UI for the user program 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 adding unit 312 adds identification information to the project data 71. The calculation unit 313 calculates identification information (e.g., hash value or error detection code). It should be noted that the function of the calculation unit 313 to calculate (calculate) the identification information may be implemented by the output unit 84. <Log display control unit 61>
[0143] FIG. 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 on the display unit 7 together with the user program included in the project data 71. The program display module 321 is capable of displaying not only the user program but also various information for the user to visually confirm the setting contents of the project data 71, such as program configuration information included in the project data 71, a plurality of program parts, unit configuration, and function settings for each unit. The image display module 323 displays time-series image data included in the log data 73 on the display unit 7. The waveform display module 322 is a module that converts time-series device values included in the log data 73 into waveforms 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 time. These modules may be called engineering software. The image display module 323 may be embodied as one function (image display unit) of the program display module 321, or may be embodied as one function (image display unit) of the waveform display module 322. ●Program display module
[0144] FIG. 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 manipulating the acquisition time (display time) of a device displayed together with a user program. The display time control unit 331a sends the display time specified by the time UI 330a to the playback control module 324, and 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, and 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. The program display unit 332 also displays the device values acquired by the device value acquisition unit 333a in association with the devices 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 values, and passes them 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.
[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 pieces of information constituting the project data 71 are displayed in the project display area 420 in the left column. From the top, unit configurations (CPU unit, motion unit, analog input unit, camera input expansion unit), program configurations (each 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 check the setting contents of these setting parameters by double-clicking the axis configuration or axis control on the GUI shown in FIG. 9. In addition, in the project display area 420, Main and Sub are displayed for each scan module. When the user clicks 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 out the project data 71 from the memory card 36A, and displays various pieces 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 replay mode. It is also possible to hide only the ladder monitor 450 by clicking the cross mark. On the other hand, in the log replay mode, the program display unit 332 is capable of reproducing the ladder program included in the project when the operation record was saved. In addition, in the log replay mode, the program display unit 332 displays the device values included in the log data 73 via the device value acquisition unit 333a in association with the devices described in the Main program. 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 later with reference to FIG. 32).
[0147] For example, in FIG. 9, the device value associated with 18:52:54 on 10 / 01 / 20XX displayed in the time display area 409 is displayed in association with the device described in the Main program. [35000 / 74286] displayed to the right of this date indicates that the current number of scans is 35000 out of the total number of scans of 74286. The user can drag and move the time designation cursor 404 to update the display time and the number of scans, as well as the display of the device value. For example, at the updated display time, the location of the relay device that is ON is displayed as ON (for example, filled in with color, etc.), and the location of the relay device that is OFF is displayed as OFF (for example, colored out, etc.). Details of the function of the play button 406 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 image data from the log data 73 in synchronization with the display time displayed on the ladder monitor 450 by the program display module 321, and displays the image data in the image display area of the camera monitor 430. In Fig. 9, image data associated with the display time of 18:52:54 on 10 / 1 / 20XX is displayed on the camera monitor 430. Also, to the right of this display time, 282 / 601 is displayed, which indicates the current order of image data (282nd image) with respect to the total number of captured images 601. The user can update the display time and the current order of image data by dragging and moving the time designation cursor 404a on the camera monitor 430.
[0149] At this time, the time designation cursor 404 in the ladder monitor 450 described above moves in conjunction with the movement of the time designation cursor 404a. For example, when the time designation cursor 404a is set to 19:00:00 on the display time 20XX / 10 / 01, the time designation cursor 404 in the ladder monitor 450 also moves to the position of 19:00:00 on the display time 20XX / 10 / 01. Then, the device value in the ladder monitor 450 is updated with the movement of the time designation cursor 404. Here, the time designation cursor 404a is moved, but the reverse is also true. For example, when the time designation cursor 404 in the ladder monitor 450 is moved, the time designation cursor 404a in the camera monitor 430 also moves accordingly. Such processing operation is possible because the program display module 321 and the image display module 323 execute synchronous control regarding the display time via the playback control module 324.
[0150] 9, a unit monitor 440 is displayed in the lower right column. For example, the unit monitor 440 displays the device values 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 played back from the playback control module 324, it reads out the device values associated with that time from the memory card 36A and displays them on the unit monitor 440. Therefore, for example, in FIG. 9, a list of device values associated with the display time 20XX / 10 / 01 18:52:54 is displayed on the unit monitor 440.
[0151] FIG. 30 is a diagram showing a schematic diagram of a data source for displaying a GUI in a log replay mode. As shown in FIG. 30, the project display area 420 reads out the unit configuration, function settings, program configuration, and program parts 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 (what kind of program parts it consists of) and the program parts from the memory and displays the program parts specified by the user, and also 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 image data corresponding to the display time from the log data 73 based on information such as the unit configuration (whether or not there is a camera monitor) and function settings (functions of the camera monitor. For example, port numbers, imaging cycles, gain settings, etc., if there are multiple ports). 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 kind of units there are) and function settings (axis configuration, axis control, etc., if it is a motion unit).
[0152] 9 and 30, the program display module 321, the image display module 323, and the unit display module 325 can be synchronously controlled and linked by the function of the playback control module 324. The linkage of the waveform display module 322 will be described in detail later.
[0153] Here, in this embodiment, it is possible to verify whether the current project data matches the project data 71 at the time of the actual occurrence of a problem. More specifically, a collation unit 334 in a 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 a warning unit 335. The warning unit 335 displays a warning on the display unit 7 when the identification information of the project data 71 (user program) output from the PLC 1 at the time the driving record was saved does not match the identification information of the project data (user program) stored in the PC-side storage device 22.
[0154] In this 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, multiple program parts, unit configuration, and function settings for each unit included in the project data, and verification is performed based on whether all of these match or not. However, the present invention is not limited to this, and it is sufficient to compare at least the identification information of a user program composed of multiple program parts to verify whether they match or not. ● Playback control module 324
[0155] FIG. 31 shows the details of the playback control module 324. The device value providing unit 341 provides the device value acquired from the log data 73 by the log data acquiring unit 344 to the program display module 321 and the waveform display module 322. The device value providing unit 341 also provides the device value acquired from the log data 73 to the unit display module 325. The device value acquired from the log data 73 may be temporarily stored in the log device 345. The device value acquiring unit 333a of the program display module 321 and the waveform display module 322 requests the device value from the device value providing unit 341. The device value acquiring unit 333a acquires the device value from the log device 345 and transmits it to the device value acquiring unit 333a. The time device 342 is a device that holds the display time set by the playback control unit 343. The device value providing unit 341 may also transmit the device value (time information) held in the time device 342 to the device value acquiring 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 or 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 display time designation from the display time control unit 331a and the display time control unit of the waveform display module 322, it sets the received display time to the internal clock (time adjustment). Thus, when a 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 a 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. This causes the display time of the program display module 321 and the display time of the waveform display module 322 to be synchronized.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 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 provision unit 341.
[0156] Similarly, the playback control unit 343 may synchronize the display time of the program display module 321 and the display time of the waveform display module 322 as well as the times of the image display module 323 and the unit display module 325 .
[0157] In this embodiment, 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 in the log playback mode, but the present invention is not limited to this. For example, the user may be able to select whether or not to synchronize. For example, a check box for synchronization may be provided on each monitor screen, and may be checked by default. The user may uncheck a module that he or she does not want to synchronize, thereby preventing synchronization of only that module. In this way, the log display control unit 61 may have a selection function for selecting a module to be synchronously controlled (following controlled) 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 described in further detail 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 displays a ladder program (ladder diagram). The program display unit 332 acquires the device values of the devices used or described in the user program by the device value acquisition unit 333a, and displays them together with the user program. For example, if the relay device is ON, the program display unit 332 may display an icon 401a indicating ON superimposed on the user program. If the relay device is OFF, the program display unit 332 may display an icon 401b indicating OFF superimposed on the user program. The program display unit 332 may acquire the device value of the DM100, which is an output device, by the device value acquisition unit 333a, and display it superimposed on the description of the DM100 in the user program. In this example, a device value display area 403 is provided below the description of the 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 together with the display time, the program display unit 332 updates the device value displayed together with the user program. (Playback control section 402)
[0159] A playback control field 402 for controlling playback of log data such as saved device values is provided below the program display area 410. Specifically, the time UI 330a moves the time designation cursor 404 from right to left according to the display time acquired from the time device 342. The time designation cursor 404 can be dragged by the pointer 101. When the time UI 330a detects that the time designation cursor 404 has been dragged by the pointer 101, the display time control unit 331a causes the playback control unit 343 to stop updating the display time and notifies the playback control unit 343 of the amount of dragging of the time designation cursor 404. The playback control unit 343 adjusts the count value (display time) of the internal clock according to the amount of dragging. The time UI 330a may display the update speed of the display time (e.g., ···, 2.0x, 1.0x, 0.5x, 0.1x, ···) in the speed designation unit 405. Note that speed designation unit 405 may be realized by a pull-down menu that displays a list of multiple update speeds and allows one of the update speeds to be selected. When time UI 330a detects a click by pointer 101 on speed designation unit 405, it may display such a pull-down menu and accept the selection of an update speed.
[0160] The play button 406 is a button for instructing to display the device values in chronological order. When the time UI 330a detects that the play button 406 has been clicked by the pointer 101, it instructs the playback control unit 343 to make the display time control unit 331a start updating the display time. This instruction corresponds to an instruction to start displaying the device values or an instruction to resume displaying. The one-step reverse play button 407 is a button for instructing to display the device values in chronological order while updating (rewinding) the display time one step at a time. When the time UI 330a detects that the one-step reverse play button 407 has been clicked by the pointer 101, it instructs the display time control unit 331a to move the display time back one step. The one-step play button 408 is a button for instructing to display the device values in chronological order while updating the display time one step at a time. When the time UI 330a detects that the one-step play button 408 has been clicked by the pointer 101, it instructs the display time control unit 331a to move the display time forward one step. When one-step playback is being performed, 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 play button 406 is operated while one-step playback is being performed, 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 that displays 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. <Display HMI emulator>
[0161] The PLC1 can connect to a display HMI, which is an external display device. The display HMI may have a touch panel type input device. The display HMI reads out device values stored in the device unit 34 of the PLC1 and displays them on the display device. The project creation unit 50 sets the UI to be displayed on the display HMI and the device values to be displayed on the UI, and saves them in project data 71. The debug unit 314 has an emulator for the display HMI, and checks the operation of the display HMI by operating the emulator according to the project data 71. The log display control unit 61 supplies the device values of the log data 73 to the emulator for the display HMI. The emulator for the display HMI displays the device values provided in chronological order on the UI. <Flowchart for displaying logs> ●Program display module
[0162] 33 shows the display process executed by the program display module 321. Note that steps S3301, S3302, and S3309 may be executed only when the project data 71 cannot be acquired from PLC1. When the project data 71 can be acquired from PLC1, the project data 71 from PLC1 is used. When the project data 71 cannot be acquired from PLC1, the project data 71 held in PC2 is used.
[0163] In step S3301, the PC side CPU 21 (collation unit 334) acquires 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 CPU 21 (comparison unit 334) determines whether the identification information of the project data 71 held in PLC1 matches the identification information of the project data 71 held in PC2. If they do not match, the PC CPU 21 proceeds to step S3309. In step S3309, the PC CPU 21 (warning unit 335) displays a warning on the display unit 7 indicating that the identification information of the project data 71 held in PLC1 does not match the identification information of the project data 71 held in PC2. If they match, the PC CPU 21 proceeds to step S3303.
[0165] In step S3303, the PC CPU 21 (program display unit 332) acquires the project data 71 from the PLC 1 or the PC storage device 22.
[0166] In step S3304, the PC CPU 21 (program display unit 332) determines whether log playback mode or real-time playback mode has been selected based on information input from the PC operation unit 8. If real-time playback mode has been selected, the PC CPU 21 proceeds to step S3310. In step S3310, the PC CPU 21 (device value acquisition unit 333a) acquires device values from the real-time transmission unit of PLC 1 without going through the playback control module 324. In step S3311, the PC CPU 21 (program display unit 332) displays the device values on the display unit 7 together with the user program included in the project data 71. If log playback mode has been selected, the PC CPU 21 proceeds to step S3305.
[0167] In step S3305, the PC CPU 21 (device value acquisition unit 333a) starts 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 user program included in the project data 71, as well as the device value and the display time on the display unit 7.
[0169] In step S3307, the PC CPU 21 (display time control unit 331a) determines whether or not a time specification has been detected by the time UI 330a. As described above, a time specification is executed by operating the time specification cursor 404. If a time specification has not been detected, the PC CPU 21 returns to step S3305. If a time specification has been detected, the PC CPU 21 proceeds to step S3308.
[0170] In step S3308, the PC CPU 21 (display time control unit 331a) notifies the playback control unit 343 of the playback control module 324 of the designated time input by the time designation cursor 404. The PC CPU 21 returns to step S3305. Waveform display module
[0171] FIG. 34 illustrates the display process performed by the waveform display module 322.
[0172] In step S3401, the PC CPU 21 (waveform display unit 336) determines whether log playback mode or real-time playback mode has been selected based on information input from the PC operation unit 8. If real-time playback mode has been selected, the PC CPU 21 proceeds to step S3406. In step S3406, the PC CPU 21 (device value acquisition unit of the waveform display module 322) acquires device values from the real-time transmission unit of PLC 1 without going through the playback control module 324. In step S3407, the PC CPU 21 (waveform display unit 336) displays the device values on the display unit 7. If log playback mode has been selected, the PC CPU 21 proceeds to step S3402.
[0173] In step S 3402 , the PC side CPU 21 (the device value acquisition section of the waveform display module 322 ) starts 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 CPU 21 (the display time control unit of the waveform display module 322) determines whether or not a time specification has been detected by the time UI 330b. As described above, time specification is performed by the bar 103. If a time specification has not been detected, the PC CPU 21 returns to step S3402. If a time specification has been detected, the PC CPU 21 proceeds to step S3405.
[0176] In step S3405, the PC CPU 21 (the display time control unit of the waveform display module 322) notifies the playback control unit 343 of the playback control module 324 of the designated time input by the bar 103. The PC CPU 21 returns to step S3402. ●Playback control module
[0177] FIG. 35 illustrates the playback control performed by the playback control module 324.
[0178] In step S 3501 , 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 CPU 21 (playback control unit 343) initializes the time of its internal clock.
[0180] In step S 3503 , the PC side CPU 21 (playback control unit 343 ) obtains 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 a 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. This enables the device value providing unit 341 to provide the program display module 321 and the waveform display module 322 with the device value and the display time.
[0182] In step S3505, the PC CPU 21 (playback control unit 343) determines whether or not a time designation has been received from the display time control unit 331a. If a time designation has been received, the PC CPU 21 proceeds to step S3506. If a time designation has not been received, the PC CPU 21 proceeds to step S3507.
[0183] In step S3506, the PC CPU 21 (playback control unit 343) changes the time of the internal clock in accordance with the time designation from the display time control unit 331a.
[0184] In step S3507, the PC CPU 21 (playback control unit 343) determines whether or not an instruction to change the update speed has been received from the display time control unit 331a. If an instruction to change has been received, the PC CPU 21 proceeds to step S3508. If an instruction to change has not been received, the PC CPU 21 proceeds to step S3503.
[0185] In step S3508, the PC CPU 21 (playback control unit 343) changes the update rate of the internal clock according to the update rate specified by the display time control unit 331a. After that, the PC CPU 21 proceeds to step S3503. (Event history display function)
[0186] In addition, the PLC engineering tool according to the present embodiment can record and display carefully selected event logs that lead to troubleshooting. The PLC and its expansion unit 4 have an event log function that records various events that have occurred. There is also a logging function that records device values at timings such as every control cycle, every arbitrary cycle, and every rewrite. When a problem occurs, the user can combine these functions to search for the cause after the fact. However, various log functions are often mainly recorded in a non-volatile storage area on the PLC, and the non-volatile storage area of such a PLC often has a size restriction. In addition, when the number of logs increases and the storage area reaches its upper limit, it is common to erase the oldest logs in order to leave new logs. For this reason, when the number of logs that have occurred reaches the order of several thousand or tens of thousands, there is a high possibility that logs that are the cause of the problem and lead to troubleshooting have been erased, making it difficult to trace the cause of the problem. In response to this, if the user narrows down the events to be saved in order to extend the recording time, there is a risk that events that are useful for troubleshooting will not be saved. On the other hand, even if the records are not erased and remain, if there are a large number of events displayed, events that lead to solving the problem may be buried under other events and become difficult to find.
[0187] Therefore, in the PLC engineering tool according to this embodiment, events that can lead to troubleshooting are carefully selected and recorded. When displaying the carefully selected and recorded events, it is possible to filter and display the events, or to display related log information, which makes it easier for the user to solve the problem. An example of such a PLC engineering tool is shown in the block diagram of FIG.
[0188] The PLC engineering tool is a tool for evaluating a user program that specifies the operation of the PLC1. FIG. 36 shows a programmable logic controller system in which the PLC1 is connected to the PC2 in which a dedicated program, which is the PLC engineering tool, is installed. This PLC engineering tool is realized by the PC2 in which the dedicated program is installed, but the present invention is not limited to the PLC engineering tool being a PC in which a dedicated program is installed, and the PLC engineering tool may be realized by dedicated hardware. Also, in the example of FIG. 36, the PC2 and the PLC1 are configured as separate entities, but they may be integrated.
[0189] 36 also has the same configuration as the above-mentioned PLC. That is, the PLC 1 includes a program execution unit 514 that repeatedly executes a user program, a device unit 34 having a device that is a storage area referenced by the program execution unit 514, a temporary recording unit 91a that records device values stored in the device unit 34 in chronological order as log data together with the current time, and records a plurality of events that have occurred in the PLC 1 or a controlled device controlled by the PLC 1 in chronological order as event data together with the occurrence time, and a storage memory 36 that stores the log data and event data recorded in the temporary recording unit 91a when a predetermined storage condition is satisfied during operation. The PLC engineering tool is a program creation support device that supports the creation of a user program written in a graphical programming language to be executed in the PLC 1.
[0190] The PLC engineering tool shown in Fig. 36 includes a display unit 7, a PC CPU 21, a PC storage device 22, a PC memory unit 11, a PC operation unit 8, and a PC communication unit 23. The display unit 7 displays user programs such as ladder diagrams. The display unit 7 may be a monitor connected to the PC 2 or may be a display HMI.
[0191] The PC side storage device 22 realizes the function of a driving record data holding unit 22b. The driving record data holding unit 22b stores, as driving record data, the log data and event data saved in the storage memory 36 during operation of the PLC 1.
[0192] The PC side CPU 21 realizes the functions of the record setting unit 12, the device display control unit 13, the event display control unit 14, and the selection receiving unit 16. The event display control unit 14 displays a list of a plurality of events included in the event data read from the driving record data storage unit 22b and the occurrence time of each of the plurality of events on the display unit 7. The selection receiving unit 16 receives the selection of one of the plurality of events displayed in a list by the event display control unit 14. The device display control unit 13 displays, superimposed on the user program, a device value that is included in the log data read from the driving record data storage unit 22b and that is recorded at a time corresponding to the occurrence time of the event selected by the selection receiving unit 16. The event display control unit 14 is configured to selectively display a list of specific events that change the operating state of the PLC 1 or the operating state of a controlled device controlled by the PLC 1 on the display unit 7.
[0193] Furthermore, the recording setting unit 12 sets the temporary recording unit 91a of the PLC 1 to record only a specific event among a plurality of events.
[0194] Here, the specific event includes an event related to an operation performed by a user independent of the execution of a user program by the program execution unit 514. Examples of events related to user operations include rewriting project data including the user program and configuration information of PLC1, switching between a setting mode for setting PLC1 and an operation mode for executing a user program on PLC1, inserting or removing a cable connectable to PLC1, inserting or removing a storage medium attachable to PLC1, turning the power of a controlled device on or off, and the like.
[0195] On the other hand, the event display control unit 14 hides events corresponding to processes that are automatically executed in the PLC1 according to the execution of the user program by the program execution unit 514. Examples of events corresponding to such automatically executed processes include the start or disconnection of communication when connecting to an external device connected to the PLC1 via TCP or FTP, and writing to a folder or file prepared in the PLC1. In this way, the event display control unit 14 displays events corresponding to user operations performed by the user because they are useful for troubleshooting. On the other hand, events corresponding to processes that are automatically executed without the user's intervention are hidden. The reason for hiding events is that automatically executed processes are performed too frequently, so if they are left as logs, the log volume would be huge, and since they are internal processes, it is difficult to know how to solve the problem based on the event log, so there are probably few situations where these are useful for solving the problem. In this way, by classifying the display contents of events into those that are considered to be useful for solving the problem and those that are not, and selectively displaying them on the display unit 7, it is expected that the user's troubleshooting can be supported.
[0196] The details of each component will be described below with reference to FIG. 36. The record setting unit 12 sets various data such as operation record data to be stored in the PLC side storage device 32. The data stored in the PLC side storage device 32 includes a plurality of device values in time series recorded in the PLC 1 during operation of the PLC 1, first time data corresponding to the recording time of each device value, a plurality of events occurring in the PLC 1 or the controlled device controlled by the PLC 1, and second time data corresponding to the occurrence time of each event. The PLC side storage device 32 can be a rewritable non-volatile memory inside the PLC 1 or a removable SD card (product name). In particular, the SD card is preferable because data can be easily transferred. 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 the device values on the ladder diagram displayed on the display unit 7. The event display control unit 14 displays a list of multiple events on the display unit 7. At this time, the event display control unit 14 can selectively display specific events that change the operating state of PLC 1 or the operating status of a controlled device such as a motor controlled by PLC 1.
[0198] After configuring the settings for the PLC using the PLC engineering tool shown in Fig. 36, the project data is transferred to the PLC side. Specifically, project data that specifies 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 the operation record data, user programs, settings for each function, and the like. (Display section 7)
[0199] The display unit 7 displays a ladder diagram and the like. Specifically, the display unit 7 can include an event display field 1400 that displays a list of events, and a ladder monitor field 1500 that displays a ladder diagram. When the user selects an arbitrary event from the GUI in the event display field 1400 using the selection receiving unit 16, here by operating the PC side operation unit 8, the ladder diagram corresponding to the time of the selected event is selected and displayed in the ladder monitor field 1500.
[0200] The display unit 7 may further include a camera monitor field 1600. The camera monitor field 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 field 1400, a ladder diagram corresponding to the time of the selected event is selected in the ladder monitor field 1500, and image data corresponding to the time of the selected event is displayed in the camera monitor field 1600.
[0201] The 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 in the recording setting unit 12 as described above, a plurality of time-series device values recorded in the PLC1, first time data corresponding to the recording time of each device value, a plurality of events that have occurred in the PLC1 or in a controlled device controlled by the PLC1, second time data corresponding to the occurrence time of each event, and the like are stored.
[0202] The 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 preferably events are left 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 a specific event, 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 a controlled device controlled by the PLC 1. For example, an engineering tool for a programmable logic controller may record carefully selected events that lead to troubleshooting in the PLC side storage device 32, and when displaying these events, may filter and display only those events. This makes it possible to selectively display events that are useful for troubleshooting from among a wide variety of events, and to help in identifying 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 a display target time in the device display control unit 13, with second time data, which is a 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, only specific events selected from among the events may be recorded 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. This allows only specific events useful for troubleshooting to be stored in the storage device and displayed on the display unit 7, thereby avoiding a situation where the events are buried in events unrelated to troubleshooting without performing search or narrowing down. In this case, while all device values are recorded as operation record data, only specific events that change the operating state of the PLC1 or the operating state of a controlled device such as a motor controlled by the PLC1 are recorded. This makes it possible to selectively display only the selected specific events in the event display field 1400. In addition, synchronizing the specific events with device values recorded separately is useful for troubleshooting. Furthermore, the specific events selectively displayed may be prioritized. (Specific event)
[0206] The specific events displayed on the display unit 7 include rewriting of project data including the user program of the PLC1 and unit configuration information of each unit, turning on / off the power supply of the controlled device, switching between a setting mode for setting the programmable logic controller and an operation mode for executing the programmable logic controller, clearing various histories, inserting / removing a storage device, inserting / removing 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. For example, a mode switch indicates the timing of switching between the PROGRAM mode, which is the operation mode when the PLC1 is set, and the RUN mode during actual operation. The device rewrite signal from the display HMI is also useful when you want to check whether or not the operation has been performed according to a predetermined recovery procedure when a problem occurs. (Event log recording operation)
[0207] The event log recording operation will now be described with reference to Fig. 37, which is a functional block diagram of a programmable logic controller system. The programmable logic controller system shown in this figure comprises 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 executes user programs, exchanges data with the extension unit 4, and performs data collection processing. (PLC side time management section 83)
[0209] The PLC side time management unit 83 is a component for managing the time when events and log data are recorded. (Device memory section 34B)
[0210] The device memory unit 34B is a memory in which devices that store values used by programs and functions are arranged. The device memory unit 34B can also record device rewrites from communication as events. Detection is performed by the PLC side CPU 31. (Event Management Department 76)
[0211] The event management unit 76 records the generated events in the event log memory unit 75. This event management unit 76 receives events issued from the PLC side CPU 31 asynchronously with the scanning operation of the PLC 1 and saves them in the event log. In other words, the event log can be recorded at any timing independent of the repetition cycle of the END process of the PLC 1. The event management unit 76 also arbitrates when multiple events occur simultaneously, and controls the sequential deletion of data starting from the oldest when the memory capacity of the event log memory unit 75 becomes full. (Event log memory section 75)
[0212] The event log memory unit 75 is a memory for storing an event that has occurred. The event log memory unit 75 stores the event together with the second time data. (Log memory section 73B)
[0213] The log memory unit 73B is a memory that stores collected data. The event log memory unit 75 and the log memory unit 73B have common time data in the order of μs, and can be linked at the scan level when displayed. Therefore, the log memory unit 73B records data collected as part of the scan operation in synchronization with the scan operation. Furthermore, when the log data is recorded, it is recorded together with the first time data. (Expansion Unit 4)
[0214] The expansion unit 4 is one or more units to which controlled devices such as a camera unit 98 and a motion unit are connected. 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 for controlling the functions of the expansion unit 4 and monitor values are stored. The function execution unit 96 executes the functions of the expansion unit 4. The function execution unit 96 also transmits information to the expansion bus-CPU unit control unit. For example, the function execution unit 96 operates automatically or upon receiving a request from the PLC side CPU 31, and stores the status and results in the buffer memory unit 77. As an example, in the case of a motion-based expansion unit, if a motion-based error occurs, such as the work reaching the limit of the device, the function execution unit 96 detects it. It is also possible to issue an event from the expansion unit 4 side. (Event log recording operation flowchart (for events occurring in CPU unit 3))
[0215] In the programmable logic controller system of FIG. 37, the operation of recording an event log can be performed for events that occur on the CPU unit 3 side, or for events that occur on the expansion unit 4 side.
[0216] Next, the operation of recording an event that occurs in the CPU unit 3 will be described with reference to the flowchart in Figure 38. First, in step S3801, the PLC CPU 31 in the CPU unit 3 detects an event. Next, in step S3802, the event management unit 76 receives the event from the PLC CPU 31 in 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, processing proceeds to step S3804, where old events are deleted from the event log memory unit 75. On the other hand, if there is remaining capacity, processing proceeds to step S3805, where time data on the order of μs is obtained and the event is stored in the event log memory unit 75.
[0217] Next, the operation of recording an event occurring in the expansion unit 4 will be described with reference to 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 including the event to the expansion bus. Furthermore, in step S3903, the PLC side CPU 31 of the CPU unit 3 receives the message communication including the event from the expansion bus using an interrupt process. Next, in step S3904, the PLC side CPU 31 of the CPU unit 3 extracts the event from the message communication. Furthermore, 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. If there is no remaining capacity here, in step S3907, old events are deleted from the event log memory unit 75, and the process proceeds to step S3908. On the other hand, if there is remaining capacity in step S3906, the process proceeds to step S3908, where time data on the order of μs is obtained and the event is stored in the event log.
[0218] Next, the filtering operation when the event log is displayed will be described with reference to the flowchart in Fig. 40. First, in step S4001, all the event logs are read into memory. Next, in step S4002, a group of events to be filtered when the events are displayed is selected in the UI. Then, in step S4003, one event is extracted from the event log. Then, in step S4004, if the extracted event corresponds to the event selected in the UI, it is stored in the event log for display. Then, in step S4005, it is determined whether any events remain in event log memory unit 75, and if so, the process returns to step S4003 and repeats. On the other hand, if no events remain, the process proceeds to step S4006, where all the event logs for display are displayed in the GUI. (Example of selectively displaying events)
[0219] Examples of events that can be selectively displayed are shown below. First, a serious error is a serious error that prevents PLC1 from continuing operation. Serious errors are detected by the CPU Unit 3 (control unit / peripheral control).
[0220] A minor error is a minor error that allows PLC1 to continue operation. However, a minor error may not lead to a solution to the problem. The CPU unit 3 (control unit / peripheral control) and the expansion unit 4 are responsible for detecting the minor error.
[0221] Power ON / OFF is an event related to turning on and off the power. It may occur around a trouble. Power ON / OFF is detected by the CPU unit 3 (peripheral control).
[0222] The alarm relay is an alarm history designated by the user. The subject of detection of the alarm relay is the CPU unit 3 (the PLC side CPU 31).
[0223] A device value change is a rewrite of a device value via communication. Depending on the device, this may occur regardless of any trouble, but it may be the start of a problem. The CPU unit 3 (PLC side CPU 31) is responsible for detecting this device value change.
[0224] The operation record storage relates to the timing of the storage trigger and the recording of the operation record data. This operation record data can also be the starting point for troubleshooting. The subject of detection of the operation record storage is the CPU unit 3 (the PLC side CPU 31).
[0225] RUN / PROGRAM switching is information about switching the operation mode of the PLC 1. Problems may occur when switching modes, but they also occur during normal operation. The RUN / PROGRAM switching is detected by the CPU unit 3 (PLC side CPU 31).
[0226] Project changes are considered to be useful for troubleshooting because problems often occur when, for example, a program change in the PLC 1 is the trigger. Project changes are detected by the CPU unit 3 (the PLC side CPU 31).
[0227] History clearing can also be a factor in determining whether to resolve a problem. In particular, when the history was cleared can be an important factor. The entity that detects whether the history was cleared is also the CPU unit 3 (event management unit 76).
[0228] The insertion and removal of memory cards can be the key to solving problems. On the other hand, depending on the way the equipment is operated, events may occur on a daily basis even if no trouble is occurring. The CPU unit 3 (peripheral control) is responsible for detecting memory cards.
[0229] The calendar timer is a candidate because it is sometimes important to record changes in the calendar timer value in order to analyze and resolve problems based on historical data. On the other hand, if the system is operated in such a way that the time is automatically adjusted, events will occur periodically. The calendar timer is detected by the CPU unit 3 (peripheral control).
[0230] Ethernet communication is a candidate because Ethernet hardware-level connection events can occur as a sign of a fault such as a loose connection. However, they also occur daily when the power is turned on and off. Ethernet communication is detected by the CPU Unit 3 (peripheral control) and Expansion Unit 4.
[0231] Serial communication is considered to be useful because a connection at the serial hardware level may occur as a sign of a fault such as a loose connection. The main entity that detects serial communication is the expansion unit 4.
[0232] An event error occurs when a large number of events occur. The event error is detected by the CPU unit 3 (event management section 76).
[0233] As described in the discussion of such problems, there are cases where you may want to mask certain types of events, and cases where you may want to display them without masking. In other words, the necessity for masking changes depending on how the user operates the device. Therefore, we have made it possible for the user to select what to display for each group.
[0234] When selecting events, for example, the error event history filter setting unit 1370 shown in Fig. 41 can be used to set the display filtering individually for each group. Here, errors and events to be hidden are selected from among the candidate errors and events to be displayed. In this example, events to be displayed are listed in a display list 1371 on the left side of the screen, and events to be hidden are listed in a hidden list 1372 on the right side, and it is possible to select whether to display or hide each event by freely moving them. (An example of an event that is recorded but not displayed.)
[0235] Next, we will explain examples of events that are recorded as events but are not displayed. These are events that, even if disclosed to users, do not directly lead to the disclosure of a user's trouble.
[0236] First, detailed information about when a compilation error occurs in a program on PLC1 is not displayed because it would be difficult to show the user how to deal with the error even if the information were made available to the user.
[0237] Firmware update information is not displayed because a firmware update may change the recording format, which may result in a loss of continuous recording.
[0238] The self-test execution history is not displayed because it would be difficult to provide a solution to the problem even if it were made public to the user. (List of events that are not recorded intentionally (high priority))
[0239] Next, examples of high-priority events that are not intentionally recorded are shown below. First, TCP connection start / end communications are excluded from recording because, depending on how the user program is written, there could be too many events and the log could easily become overflowing. In the case of a system that disconnects communications after each communication, this event may occur multiple times per second.
[0240] In addition, if the FTP connection start / disconnection is used in a way that updates a file at the top each time a piece of data is collected, the number of events will increase.
[0241] Furthermore, when writing folders / files, if the device is used in such a way that each time data is collected it is recorded on a memory card, the number of events increases.
[0242] Next, examples of events that are unlikely to occur during system operation and may not lead to troubleshooting will be described. First, remote operation request acceptance is excluded from recording because it is a function that is likely to be used when programming, starting up, or debugging the device, rather than during operation. In addition, setting forced value refresh, resetting forced value refresh, completely canceling forced value refresh, canceling forced value refresh, etc. are all functions that are likely to be used during debugging the device or for analysis after a problem has occurred, rather than during operation, and are therefore excluded from recording. (Examples of events that are not recorded (low priority))
[0243] Furthermore, we will explain some examples of low-priority events that are not recorded. First, depending on how the system is configured, recipe execution operations can easily cause an event to occur for each work, which can easily cause the log capacity to overflow.
[0244] In addition, the start, stop, and termination of the DB connection service are all events that occur frequently during operation, and this can easily cause the log capacity to overflow.
[0245] Furthermore, user authentication enable / disable, logon success, logon failure, CPU unit backup success, CPU unit backup failure, CPU unit restore success, CPU unit restore failure, etc. are all functions that are likely to be used when programming, starting up or debugging the device, and not during operation.
[0246] Here, a manner 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 PLC engineering tool 1380 in Fig. 42. The PLC engineering tool 1380 shown in this figure shows a project data editing program or a display UI provided by the program display module 321. This project data editing program functions as a project data playback program in which editing is prohibited, with the log playback mode (replay mode) selected in the mode selection unit 50D. Note that a project data playback program that does not have an editing function and only plays back project data is also included as a type of PLC engineering tool.
[0247] This project data editing program has 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 also has a ladder monitor column 1500 on the top and a playback control column 402 on the bottom. The ladder monitor column 1500 displays a ladder program (ladder diagram). (Playback control section 402)
[0248] In the playback control field 402, playback control is performed for playing back an event selected in the event display field 1400 etc. Specifically, by using the function of the playback control module 324 in Fig. 31, the operation record data corresponding to the selected event, including the recorded device values and image data, is read from the PLC side storage device 32 and played back. As explained in Fig. 32 etc., the playback control field 402 includes a slider-shaped operation bar 404d representing the time axis, a time designation cursor 404 movable on the operation bar 404d, a speed designation section 405, a playback button 406, a one-step reverse playback button 407, a one-step playback button 408, etc.
[0249] By pressing the play button 408, the state of a past event can be played back. Also, by operating the time designation cursor 404 on the operation bar 404d, the state at which time is to be played back can be selected. Furthermore, the device display control unit 13 and the event display control unit 14 are linked, and the display of each unit is linked in response to an item selected in either one. For example, when a playback time is designated by clicking on the operation bar 404d in the playback control field 402, the device value at the designated playback time is displayed on the ladder diagram in the ladder monitor field 1500. Similarly, in the event display field 1400, an event that occurred at the playback time designated on the operation bar 404d is displayed inverted. Meanwhile, by clicking on any of the events displayed in the list in the event display field 1400, the playback time on the operation bar 404d moves in conjunction with the ESMs. In this way, by linking the ESMs together, it becomes easier to analyze problems.
[0250] It may be possible to determine whether an event displayed in event display column 1400 is an event that occurred within the collected driving record data. For example, events that occurred within the driving record data may be displayed in color, allowing the user to visually distinguish the events.
[0251] FIG. 43 shows an example of a specific event displayed in the event display column 1400. Here, Ethernet link up and Ethernet link down are displayed in a list in the event display column 1400. Ethernet link up indicates that an Ethernet connection has started. This Ethernet link up occurs, for example, when an Ethernet cable is connected or when the power supply of a hub is turned on. Ethernet link down indicates that an Ethernet connection has ended. This occurs, for example, when an Ethernet cable is disconnected or when the power supply of a hub is turned off. In the example of FIG. 43, Ethernet link up and Ethernet link down occur repeatedly in a short period of time, making the Ethernet connection unstable, and it is assumed that as a result, a problem occurred and the save trigger was turned ON.
[0252] 43, among the events displayed in the event display field 1400, an event 1402 that is highlighted by color or the like indicates that it occurred during the recording time of the device display control unit 13. An event 1401 that is highlighted in inverse display in the event display field 1400 is an event related to the currently selected playback display. The position of the time designation cursor 404 in the playback control field 402 is moved in accordance with the playback time selected in the event display field 1400. Similarly, the device value is displayed in the corresponding ladder diagram in the ladder monitor field 1500. Furthermore, when the time designation cursor 404 in the playback control field 402 is moved, the display in the event display field 1400 and ladder monitor field 1500 is updated accordingly to display the corresponding playback time.
[0253] Furthermore, the operation bar 404d in the playback control field 402 may display a save trigger bar 404e at the time when an event that generates a save trigger (a save trigger generating event) occurs. The save trigger bar 404e is made easy to see by displaying it in red or the like. In the example of FIG. 43, since a trigger generating event is selected in the event display field 1400, the gray time designation cursor 404 and the red trigger generating event are displayed overlapping each other in the operation bar 404d. Therefore, in the time display area 409 indicating the playback time designated by the time designation cursor 404, 2018 / 11 / 20 11:20:46 is displayed, which is the same as the second time data selected and highlighted in the event display field 1400.
[0254] Furthermore, in the playback control field 402, a scan count display field 409b showing the total number of scans and the number of scans currently being displayed may be provided alongside the time display field 409. In the example of Fig. 43, it can be seen that a total of 360,629 scans' worth of device value sets are stored as driving record data. Also, the time display field 409 shows the playback time (11:20:46) currently specified by the current time designation cursor 404, and the scan count display field 409b shows that at this playback time, the device value set for the 193,526th scan is displayed in the ladder monitor display field.
[0255] Figure 44 shows the state in which time specification cursor 404 has been moved to the right from the state in Figure 43, that is, to a time advanced from that in Figure 43. Here, time specification cursor 404 is positioned later in time than save trigger bar 404e of operation bar 404d. In other words, the more time specification cursor 404 is moved to the right, the more time advances, and the more time specification cursor 404 is moved to the left, the more time goes back.
[0256] The operation bar 404d corresponds to the recording time of the drive record data stored in the PLC side storage device 32. That is, the left end of the operation bar 404d indicates the start time of recording the drive record data, and the right end indicates the end time of recording the drive record data. As described above, the save trigger bar 404e is displayed on the operation bar 404d at the time when a save trigger occurrence event occurs that causes the recording of the drive record data. That is, on 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, the second time data of the "Ethernet link down" event selected in the event display column 1400 is 11:20:49 on 2018 / 11 / 20, and therefore the time displayed in the time display area 409 of the playback control column 402 in conjunction with this is also displayed to match this time. Note that in the ladder monitor column of Fig. 44, some input contacts and some output elements are displayed in color. This indicates that those input contacts and output elements are ON at the time when the time designation cursor 404 is in the position shown in Fig. 44.
[0258] FIG. 45 shows an example in which an event other than the highlighted event 1402 is selected in the event display field 1400. Events that are not highlighted in the event display field 1400 are outside the storage period because no driving record data such as device values are saved, and no corresponding driving record data exists. In this example, 2018 / 11 / 20 10:38:08 is selected in the event display field 1400, but since no driving record data is saved at this time, the time specification cursor 404 is stuck to the left end, which is the lower limit of the operation bar 404d, in the playback control field 402. That is, since the operation bar 404d cannot express a time before or after the storage period, when a time outside the storage period is selected in the event display field 1400, it is moved to the closest value corresponding to the operation bar 404d because it cannot be displayed in conjunction with the time. Specifically, the time specification cursor 404 is positioned at the left end of the operation bar 404d if the time is older than the storage period, and at the right end of the operation bar 404d if the time is newer than the storage period.
[0259] Furthermore, the time display area 409 displays the time 2018 / 11 / 20 11:20:20, which corresponds to the right end of the operation bar 404d, and the driving record data saved by the save trigger indicated by the save trigger bar 404e is from 2018 / 11 / 20 11:20:20 onwards. Furthermore, the scan count display area 409b indicates the oldest scan count, which is 1st.
[0260] In addition, in the event display column 1400, events from 2018 / 11 / 20 11:20:38 onwards are highlighted. This is because there were no events during the storage period from 2018 / 11 / 20 11:20:20 to 11:20:37, and since there are no events recorded during this period, no events are displayed in the event display column 1400. Also, in FIG. 45, the number of colored input contacts and output elements has increased compared to FIG. 44. This indicates that at the time when the time designation cursor 404 is in the position shown in FIG. 45, there are more input contacts and output elements that are turned ON than in FIG. 44. (Camera monitor column 1600)
[0261] In the above example, the display of the event display field 1400, the playback control field 402, and the ladder monitor field 1500 are synchronized. In addition, image data captured by the camera unit 98 can be synchronized and displayed. Such an example is shown in the GUI of FIG. 46. In this example, a camera monitor field 1600 that displays image data is provided in the upper right corner of the screen. Similarly, in this example, when an arbitrary event is selected in the event display field 1400, image data captured at the time corresponding to the time of the selected event is displayed, and the time designation cursor 404 in the playback control field 402 is also moved to the corresponding playback time. In addition, when the playback button 406 is pressed, a video is played in the camera monitor field 1600, and the selection in the event display field 1400 is switched to the corresponding event as time passes, and the device value of the ladder diagram in the ladder monitor field 1500 is also updated. This allows the operation at the time of the occurrence of a problem to be dynamically reproduced, which can be effective in identifying the cause of the problem. [Industrial Applicability]
[0262] INDUSTRIAL APPLICABILITY The program creation support device for a programmable logic controller according to the present invention can be suitably used for troubleshooting a PLC system in FA. [Explanation of symbols]
[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 section 6...PLC side operation section 7…Display section 8...PC side operation section 9…Communication cable 10, 10a, 10b... Field devices 11…PC side memory section 12...Recording Settings 13...Device display control unit 14...Event display control section 15...Synchronization software module 16. Selection reception section 21, 21B…PC side CPU 22…PC side storage device 22b...Driving record data storage section 23…PC communication section 31…PLC side CPU 32…PLC side storage device 33…PLC communication section 34...device section; 34a...CPU unit device section; 34b...extension unit device section 34B…Device memory section 35…Project Memory Section 36…storage memory; 36A…memory card 36B…Driving record data storage section 37…Internal memory 38...Bus master 39...Recording control section 41...CPU 42…Memory 45…Storage condition setting section 46...Recording buffer setting section 47…Storage trigger setting section 50…Project Creation Department 50B…Project Editorial Department 50B1…TPJ interpretation section; 50B2…kpr interpretation section 50C…Storage control section 50D...mode selection section; 50D1...mode selection section 51, 51B…Log setting section 52...Part designation section 53...Device extraction section 54…Additional section 55…Deleted section 56…Merge section 57…Specific part 58…Manual setting section 59…Estimation part 60...Function specification part 61...Log display control unit 62…Function setting section 63…Program Creation Department 71...Project Data 72...Log setting data 73...Log data 73B…Log memory section 74…Log data storage section 75...Event log memory section 76…Event Management Department 77...Buffer memory section 80…Executive Department 80a…Ladder execution engine 80b...Unit control section 81...Recording section 82…Detection unit 83…Time management department 84...Output section 90…Inter-unit bus 91a...Temporary Recording Section 93…Storage section 96…Function execution department 98…Camera section 101...Pointer 150…Unit Settings UI 151…Name field 152...Input area field 153…Output area field 154…Occupied area field 201...Inter-unit communication 202...Program execution 204...END processing 311…Editorial Department 312…Additional part 313...Arithmetic section 314…Debugging section 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 unit 332…Program display section 333a...Device value acquisition unit 334…Collation section 335...Warning section 341...Device value providing unit 342…Time device 343...Playback control unit 344…Log data acquisition unit 345...Log device 400…Display UI 401a…Icon 401b…Icon 402...Playback control section 403…Display area 404, 404a...Time specification cursor 404d…Operation bar 404e…Save trigger bar 405…Speed specification section 406...Play button 407…One-step reverse play button 408…One-step play 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 Department 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 as" 1334… "Save project overwrite" 1340..."Save project as" dialog screen 1336 ... "Project - Project matching" 1350…Comparison display screen 1370...Error event history filter setting section 1371…Display list 1372…Hidden list 1400…Event display column 1401...Highlighted event 1402…Highlighted Event 1500...Ladder monitor section 1600...Camera monitor section Ld…Ladder diagram T: Scan time Ta…Collection time Tb: collection time WK…Object
Claims
1. A program creation assistance device for assisting in the creation of a user program written in a graphical programming language, the program being executed in a programmable logic controller comprised of one or more units, the program execution unit comprising: a device unit having a device which is a storage area referenced by the program execution unit; a temporary recording unit which records device values stored in the device unit in chronological order together with a current time as log data, and which records a plurality of events which have occurred in the programmable logic controller or a controlled device controlled by the programmable logic controller in chronological order together with the time of occurrence as event data, and a storage memory which, when a predetermined storage condition is satisfied during operation, stores the log data and event data recorded in the temporary recording unit, as well as project data including configuration information of the user program and the units, the program creation assistance device comprising: an operation record data storage unit that stores, as operation record data, the log data, the event data, and the project data stored in the storage memory during operation of the programmable logic controller; a display unit that displays the user program and configuration information of the unit included in the project data read from the operation record data storage unit in a log replay mode; an event display control unit that displays, on the display unit in the log playback mode, a list of a plurality of events and the occurrence times of each of the plurality of events included in the event data read from the driving record data storage unit; a selection receiving unit that receives a selection of one of 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 is recorded at a time corresponding to the occurrence time of the event selected by the selection receiving unit, overlaid on the user program read from the driving record data storage unit; Equipped with the event display control unit is configured to selectively display on the display unit a list of specific events that change an operating state of the programmable logic controller or an operating state of a controlled device controlled by the programmable logic controller, the specific events being related to an operation performed by a user independently of execution of a user program by the program execution unit, from among a plurality of events included in the event data read out from the driving record data storage unit; the display unit has an event display area in which the specific events are displayed as a list by the event display control unit, a program display area in which device values are displayed by the device display control unit in a superimposed manner on the user program, and a time UI display area in which a time UI for operating a display target time of the device values displayed in the program display area is displayed, When an event is selected in the event display area by the selection receiving unit, the display of the device value in the program display area is updated in conjunction with the occurrence time of the selected event, and the display of the time UI in the time UI display area is updated in conjunction with the occurrence time of the selected event.
2. 2. The programmable logic controller program creation support device according to claim 1, further comprising: a recording setting section for setting said temporary recording section of said programmable logic controller so as to record only said specific event out of said plurality of events;
3. 3. The program creation support device for a programmable logic controller according to claim 1, The specific event includes an event related to an operation performed by a user independently of execution of the user program by the program execution unit.
4. 4. The programmable logic controller program creation support device according to claim 3, The event related to the user operation includes at least Rewriting project data including the user program and configuration information of the programmable logic controller; switching between a setting mode for setting the programmable logic controller and an operation mode for executing the user program on the programmable logic controller; Inserting and removing a cable connectable to the programmable logic controller; Inserting and removing a storage medium that can be attached to the programmable logic controller; and Turning the power supply of the controlled device on / off A program creation support device for a programmable logic controller comprising:
5. The program creation support device for a programmable logic controller according to any one of claims 1 to 4, The event display control unit hides events corresponding to processing that is automatically executed within the programmable logic controller in accordance with execution of the user program by the program execution unit.
6. 6. The programmable logic controller program creation support device according to claim 5, The event corresponding to the automatically executed process includes at least Starting or disconnecting communication when a TCP connection or an FTP connection is established with an external device connected to the programmable logic controller; and Writing to a folder or file prepared in the programmable logic controller A program creation support device for a programmable logic controller comprising:
7. 3. The programmable logic controller program creation support device according to claim 2, further comprising: a synchronization software module that synchronizes a display target time in the device display control unit with a display target time in the event display control unit; The synchronization software module causes the device display control section and the event display control section to be displayed in a linked manner on the display section.
8. 8. The programmable logic controller program creation support device according to claim 7, The display unit is an event display section for displaying a list of the events as the event display area; As the program display area, a ladder monitor field for displaying a ladder diagram which is the user program; Equipped with When any event is selected from the event display column in the selection receiving unit, a ladder diagram corresponding to the time of the selected event is selected and displayed in the ladder monitor column.
9. 9. The programmable logic controller program creation support device according to claim 8, the recording setting unit sets a plurality of image data captured in time series by a camera unit connected to the programmable logic controller to be stored in the storage memory; The display unit further includes A camera monitor section for displaying a plurality of image data captured in time series by the camera unit Equipped with When an arbitrary event is selected from the event display column by the selection receiving unit, a ladder diagram corresponding to the time of the selected event is selected in the ladder monitor column, and image data corresponding to the time of the selected event is displayed in the camera monitor column.
10. 10. The programmable logic controller program creation support device according to claim 9, The program creation support device for a programmable logic controller, wherein the storage memory is an SD card (product name).
11. The program creation support device for a programmable logic controller according to any one of claims 1 to 10, The event display control unit displays device values as time-series waveforms on the display unit.
12. The program creation support device for a programmable logic controller according to any one of claims 1 to 10, a display area for displaying a device value in accordance with the specified display target time, and a display area for displaying a selection position of an event in accordance with the specified display target time, the display area for displaying a device value in accordance with the specified display target time, and the display area for displaying a selection position of an event in accordance with the specified display target time.
Citation Information
Patent Citations
Monitoring method and device for programmable controller system
JP1999327610A
Plant monitor controller
JP2003029829A
Programmable display
JP2012118567A
Control system, method, program and information processor
JP2015176370A
Programmable controller
JP2017010159A