Program monitoring system, engineering assistance program, programmable logic controller, and program monitoring method
Patent Information
- Application Number
- PCT/JP2025/015265
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2026-10-22
Smart Images

Figure JP2025015265_22102026_PF_FP_ABST
Abstract
Description
Program monitoring system, engineering support program, programmable logic controller, and program monitoring method
[0001] The present disclosure relates to a program monitoring system, an engineering support program, a programmable logic controller, and a program monitoring method.
[0002] In recent years, a technique is known for monitoring a control program being executed in a PLC (programmable logic controller) using a Web browser. For example, Patent Document 1 describes that a PLC generates an HTML (HyperText Markup Language) file for displaying a control program on a Web browser, transmits the HTML file to a client device in response to a request from the client device equipped with the Web browser, and the client device displays the control procedure indicated by the control program and the current state of devices on its own screen as a ladder diagram.
[0003] Japanese Unexamined Patent Application Publication No. 2002-189508
[0004] In the technique described in Patent Document 1, when the client device acquires the state of a device from the PLC, the device is specified by an address. In this case, the user needs to manage the usage and data type of the device for each address. For this reason, there is a concern that the following problems will arise when the number of devices used increases. (1) The amount of information to be managed increases, and the user's labor increases. (2) It takes time to identify the address corresponding to the intended usage. (3) The risk of accidentally specifying a different address increases, and as a result, the risk of the PLC performing unintended control also increases.
[0005] Furthermore, Patent Document 1 states that when a client device obtains the status of a device from a PLC, it may specify the status using a variable instead of an address. In this case, the PLC refers to the variable memory to identify the address corresponding to the specified variable. However, as the number of devices used increases, the time it takes to refer to the variable memory increases, which in turn increases the time it takes for the client device to obtain the status of the device, thus compromising user convenience.
[0006] Therefore, there is a need for new technologies that can shorten the time required to obtain device values from a PLC, particularly when it comes to monitoring control programs executed on a PLC via a web browser.
[0007] This disclosure is made in view of the above circumstances and aims to provide a program monitoring system, an engineering support program, a programmable logic controller, and a program monitoring method that can shorten the time required to acquire device values from a PLC.
[0008] To achieve the above objective, the program monitor system relating to this disclosure comprises a development support device and a programmable logic controller, the development support device comprises HTML data generation means for generating HTML data for displaying a control program to be executed by the programmable logic controller on a web browser of a monitoring terminal, and data transmission means for transmitting the control program and the HTML data to the programmable logic controller, the HTML data generation means, when generating the HTML data from the control program, generates a device code which is the corresponding binary code for each device used in the control program by referring to a variable type conversion table and an offset management table, and embeds the generated device code in the HTML data where the current value of the device is obtained, the variable type conversion table is a table that associates different binary codes for each type of device, the offset management table is a table that associates each device whose name is defined by the user with an offset address which is the difference between the address of the device memory provided by the programmable logic controller where the value of the device is stored and the starting address of the memory area corresponding to the type of device in the device memory, The device code is a combination of the starting address and the offset address, and the programmable logic controller includes: control program storage means for storing a control program received from the development support device; HTML data storage means for storing HTML data received from the development support device; device memory; control program execution means for executing the control program; HTML data transmission means for transmitting the HTML data to the monitoring terminal; and web server means for sending and receiving data with the web browser.The system includes: an address acquisition means that obtains the address of the device memory where the current value of the device is stored by referring to a device memory management table that associates binary code, device type, and starting address with the device code included in the current value acquisition request received from the web browser, obtaining the starting address corresponding to the device type, and obtaining the offset address from the device code; a current value acquisition means that obtains the current value of the device from the acquired address; and a current value transmission means that transmits the acquired current value to the web browser.
[0009] According to this disclosure, it is possible to reduce the time required to obtain device values from a programmable logic controller.
[0010] A diagram showing the overall configuration of the PLC system according to Embodiment 1. A block diagram showing the hardware configuration of the development support device according to Embodiment 1. A block diagram showing the hardware configuration of the PLC according to Embodiment 1. A block diagram showing the hardware configuration of the monitoring terminal according to Embodiment 1. A block diagram showing the functional configuration of the development support device and PLC according to Embodiment 1. A diagram showing an example of a variable type conversion table according to Embodiment 1. A diagram showing an example of an offset management table according to Embodiment 1. A diagram showing an example of a device memory management table according to Embodiment 1. A diagram showing an example of the GV area of the device memory according to Embodiment 1. A block diagram showing the functional configuration of the monitoring terminal according to Embodiment 1. A diagram showing an example of a program monitor screen according to Embodiment 1. A flowchart showing the procedure for setting the current value acquisition function according to Embodiment 1. Flowchart showing the procedure for acquiring the current value according to Embodiment 1 Block diagram showing the functional configuration of the development support device according to Modification 1 of Embodiment 1 Diagram showing an example of the program monitor screen according to Modification 1 of Embodiment 1 Diagram showing how the display program selection field is operated on the program monitor screen according to Modification 1 of Embodiment 1 Block diagram showing the functional configuration of the development support device according to Modification 2 of Embodiment 1 Diagram showing the overall configuration of the PLC system according to Embodiment 2 Block diagram showing the functional configuration of the development support device according to Embodiment 2 Block diagram showing the functional configuration of the PLC according to Embodiment 2 Diagram showing an example of the program monitor screen according to Embodiment 2 Diagram showing an example of the matching result notification screen (when they match) according to Embodiment 2 Diagram showing an example of the matching result notification screen (when they do not match) according to Embodiment 2
[0011] Embodiments of this disclosure will be described in detail below with reference to the drawings.
[0012] (Embodiment 1) Figure 1 is a diagram showing the overall configuration of a PLC system 1 according to Embodiment 1. The PLC system 1 is an example of a program monitoring system according to the present disclosure. The PLC system 1 comprises a development support device 2, a PLC 3, and a monitoring terminal 4. The development support device 2, the PLC 3, and the monitoring terminal 4 are connected to each other so as to be able to communicate via a network 5. The network 5 is a network such as a LAN (Local Area Network), CAN (Campus Area Network), MAN (Metropolitan Area Network), WAN (Wide Area Network), or the Internet.
[0013] In Figure 1, the PLC system 1 is shown to consist of one development support device 2, one PLC 3, and one monitoring terminal 4. However, there is no limit to the number of development support devices 2, PLC 3, and monitoring terminals 4 in the PLC system 1; one or more of each are sufficient.
[0014] <Hardware Configuration of Development Support Device 2> Development support device 2 is an example of a development support device according to this disclosure, and is a device for supporting the development of a control program to be executed by a PLC 3. Development support device 2 is installed, for example, in a room in a building where a program developer works. As shown in Figure 2, the hardware configuration of development support device 2 includes a CPU (Central Processing Unit) 20, an operation reception unit 21, a display 22, a communication unit 23, a ROM (Read-Only Memory) 24, a RAM (Random-Access Memory) 25, and an auxiliary storage device 26. These components are interconnected via a bus 27.
[0015] The CPU 20 comprehensively controls the development support device 2. Details of the functions of the development support device 2 realized by the CPU 20 will be described later. The operation reception unit 21 is composed of one or more input devices such as a keyboard, mouse, push button, touch panel, and touchpad, and receives operation input from the user and outputs signals related to the received operation to the CPU 20. The display 22 is composed of display devices such as a CRT display, liquid crystal display, and organic EL (electroluminescence) display. Under the control of the CPU 20, the display 22 displays various screens, etc., according to the user's operation.
[0016] The communication unit 23 is a communication interface for communicating with the PLC 3 and the monitoring terminal 4 via the network 5. The ROM 24 is a storage device that stores programs that cannot be rewritten, such as the BIOS (Basic Input / Output System). The RAM 25 is a storage device used as the working area of the CPU 20. The auxiliary storage device 26 is a storage device composed of read-write non-volatile semiconductor memory, an HDD (Hard Disk Drive), etc. Examples of read-write non-volatile semiconductor memory include EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), and flash memory. The auxiliary storage device 26 stores application software known as engineering tools, data used when executing engineering tools, and data generated by the execution of engineering tools.
[0017] The above-mentioned engineering tool is an example of an engineering support program related to this disclosure. The development support device 2 can obtain the engineering tool or an update program for updating the engineering tool from a server, terminal, etc. (not shown) via communication and install it on itself. These programs can also be stored and distributed on computer-readable recording media such as CD-ROM (Compact Disc Read-Only Memory), DVD (Digital Versatile Disc), magneto-optical disk, USB memory, HDD, SSD (Solid-State Drive), and memory card. When such a recording media is directly or indirectly attached to the development support device 2, it can also read the engineering tool or update program from the recording media and install it on itself.
[0018] <Hardware Configuration of PLC3> PLC3 is an example of a programmable logic controller according to this disclosure. PLC3 is installed in a factory and executes a control program received from the development support device 2 to control controlled devices (not shown), such as field devices like sensors and actuators. As shown in Figure 3, the hardware configuration of PLC3 includes a CPU 30, an operation reception unit 31, a communication unit 32, an output unit 33, a ROM 34, a RAM 35, and an auxiliary storage device 36. These components are interconnected via a bus 37.
[0019] The CPU 30 comprehensively controls the PLC 3. Details of the functions of the PLC 3 implemented by the CPU 30 will be described later. The operation reception unit 31 is configured to include one or more input devices such as limit switches and push buttons, and receives operation input from the user and outputs signals related to the received operation to the CPU 30. The communication unit 32 is a communication interface for communicating with the development support device 2 and the monitoring terminal 4 via the network 5. The output unit 33 is connected to the controlled device via a cable (not shown) and outputs control signals to the controlled device generated by the CPU 30. The ROM 34 is a storage device that stores programs that cannot be rewritten, such as the BIOS. The RAM 35 is a storage device used as the CPU 30's workspace.
[0020] The auxiliary storage device 36 is a storage device composed of read-write non-volatile semiconductor memory, HDD, etc. Examples of read-write non-volatile semiconductor memory include EPROM, EEPROM, flash memory, etc. The auxiliary storage device 36 stores control programs and HTML data received from the development support device 2, a program for functioning as a web server, a program for analyzing request data from the monitoring terminal 4 and generating response data, values for each device, a table for managing device memory, and the like.
[0021] <Hardware Configuration of Monitoring Terminal> Monitoring terminal 4 is an example of a monitoring terminal according to this disclosure, and is a device for monitoring a control program written to a PLC 3. Monitoring terminal 4 is installed, for example, near a PLC 3 in a factory. As shown in Figure 4, the hardware configuration of monitoring terminal 4 includes a CPU 40, an operation reception unit 41, a display 42, a communication unit 43, a ROM 44, a RAM 45, and an auxiliary storage device 46. These components are interconnected via a bus 47.
[0022] The CPU 40 comprehensively controls the monitoring terminal 4. Details of the functions of the monitoring terminal 4 implemented by the CPU 40 will be described later. The operation reception unit 41 is configured to include one or more input devices such as a keyboard, mouse, push button, touch panel, and touchpad, and receives operation input from the user and outputs signals related to the received operation to the CPU 40. The display 42 is configured to include a display device such as a CRT display, liquid crystal display, or organic EL display. Under the control of the CPU 40, the display 42 displays various screens, etc., in response to user operations.
[0023] The communication unit 43 is a communication interface for communicating with the development support device 2 and the PLC 3 via the network 5. The ROM 44 is a storage device that stores programs that cannot be rewritten, such as the BIOS. The RAM 45 is a storage device used as the working area of the CPU 40. The auxiliary storage device 46 is a storage device composed of read-write non-volatile semiconductor memory, HDD, etc. Examples of read-write non-volatile semiconductor memory include EPROM, EEPROM, flash memory, etc. The auxiliary storage device 46 stores a web browser and various application software, HTML data received from the PLC 3, etc.
[0024] <Functional Configuration of Development Support Device 2 and PLC3> As shown in Figure 5, the development support device 2 has an interface (I / F) unit 200 and an HTML data generation unit 201 as its functional configuration. These functional units of the development support device 2 are realized by the CPU 20 of the development support device 2 executing the above-mentioned engineering tools stored in the auxiliary storage device 26. The PLC3 has an interface (I / F) unit 300, a control program execution unit 301, a web server unit 302, a request data analysis unit 303, and a response data generation unit 304 as its functional configuration. These functional units of the PLC3 are realized by the CPU 30 of the PLC3 executing the above-mentioned programs stored in the auxiliary storage device 36.
[0025] In the development support device 2, the I / F unit 200 transmits and receives data with the PLC 3. For example, the I / F unit 200 transmits a control program stored in the control program storage unit 260 and HTML data stored in the HTML data storage unit 261 to the PLC 3. Both the control program storage unit 260 and the HTML data storage unit 261 are memory areas provided by the auxiliary storage device 26. In this embodiment, when the I / F unit 200 receives a control program writing instruction from the user, it transmits the control program stored in the control program storage unit 260 to the PLC 3, and when the transmission of the control program is completed, it transmits the HTML data stored in the HTML data storage unit 261 to the PLC 3. The I / F unit 200 is an example of a data transmission means according to this disclosure.
[0026] The HTML data generation unit 201 is an example of an HTML data generation means according to this disclosure. Based on the control program stored in the control program storage unit 260, the variable type conversion table 262, and the offset management table 263, the HTML data generation unit 201 generates HTML data for displaying the control program on a web browser.
[0027] The control program is the program necessary for the PLC 3 to control the controlled device, and is created by the user using engineering tools. The variable type conversion table 262 is an example of a variable type conversion table according to this disclosure. As shown in Figure 6, the variable type conversion table 262 is a table that associates variable types (in other words, device types) with binary codes, and is stored in the auxiliary storage device 26. Among the variable types, "GV" indicates the type of variable (i.e., device) whose name is arbitrarily defined by the user. Variable types other than "GV" indicate the types of variables predetermined by the specifications of the PLC 3.
[0028] The offset management table 263 is an example of an offset management table according to this disclosure. As shown in Figure 7, the offset management table 263 is a table that associates label names with offset addresses and is stored in the auxiliary storage device 26. The label name is a variable name (i.e., a device name) arbitrarily defined by the user. The offset address is the difference between the address in the device memory 362 of the PLC 3 (described later) where the value of the device is stored and the starting address of the memory area (e.g., the GV area) corresponding to the type of device. The GV area is a memory area where the value of a variable of type "GV" (i.e., a device to which a label name has been assigned) is stored. In this embodiment, the starting address of the GV area is 10000 (decimal). The offset management table 263 is created by the user using an engineering tool.
[0029] When generating HTML data from a control program, the HTML data generation unit 201 generates the corresponding binary code (hereinafter referred to as "device code") for each device with variable type "GV" used in the control program by referring to the variable type conversion table 262 and the offset management table 263. Specifically, the HTML data generation unit 201 refers to the variable type conversion table 262 to obtain the binary code "110" corresponding to variable type "GV". The HTML data generation unit 201 also refers to the offset management table 263 to obtain the offset address (in this example, "40000") corresponding to the device (for example, "gLabel_sample_20000").
[0030] The HTML data generation unit 201 then combines the acquired binary code "110" and the acquired offset address "40000" to generate a device code ("11040000") corresponding to the device. Once the HTML data generation unit 201 has generated the device code, it embeds it in the HTML data where the current value of the device is obtained. In other words, the HTML data generation unit 201 sets the generated device code as a parameter of the current value acquisition function corresponding to the device included in the HTML data. In this way, the HTML data generation unit 201 embeds the device code of each device whose variable type used in the control program is "GV" in the HTML data where the current value of the device is obtained.
[0031] Similarly to the above, the HTML data generation unit 201 generates corresponding device codes for devices other than those of variable type "GV," and embeds the generated device codes in the HTML data where the current value of the device is obtained (i.e., sets the device code as a parameter of the current value acquisition function corresponding to the device). The names of devices other than those of variable type "GV" are predetermined by the PLC3 specifications to be a combination of variable type and offset address (for example, "D1000").
[0032] When the HTML data generation unit 201 generates HTML data, it stores the generated HTML data in the HTML data storage unit 261.
[0033] In the PLC 3, the I / F unit 300 is an example of the HTML data transmission means according to this disclosure. The I / F unit 300 transmits and receives data with the development support device 2 and the monitoring terminal 4. For example, the I / F unit 300 receives a control program from the development support device 2 and stores the received control program in the control program storage unit 360. The control program storage unit 360 is an example of the control program storage means according to this disclosure and is a memory area provided by the auxiliary storage device 36. The I / F unit 300 also receives HTML data from the development support device 2 and stores the received HTML data in the HTML data storage unit 361. The HTML data storage unit 361 is an example of the HTML data storage means according to this disclosure and is a memory area provided by the auxiliary storage device 36. The I / F unit 300 also transmits HTML data to the monitoring terminal 4. The I / F unit 300 also receives request data from the monitoring terminal 4 and transmits response data corresponding to the request data.
[0034] The control program execution unit 301 is an example of a control program execution means according to this disclosure. The control program execution unit 301 executes a control program stored in the control program storage unit 360 to control the controlled device. When controlling the controlled device, the control program execution unit 301 reads and uses the necessary device values from the device memory 362 and stores the device values indicating the control result in the device memory 362. The device memory 362 is an example of a device memory according to this disclosure. The device memory 362 is a memory area provided by the auxiliary storage device 36 and stores the values of each device used in the control program. The Web server unit 302 is an example of a Web server means according to this disclosure. The Web server unit 302 sends and receives data with a Web browser in accordance with HTTP (Hypertext Transfer Protocol).
[0035] The request data analysis unit 303 is an example of an address acquisition means related to this disclosure. The request data analysis unit 303 analyzes the request data from the web browser (an example of a current value acquisition request related to this disclosure) and notifies the response data generation unit 304 of the results of the analysis. Specifically, the request data analysis unit 303 obtains the starting address by referring to the device memory management table 363 from the device code included in the received request data. Then, the request data analysis unit 303 obtains the address of the device memory 362 corresponding to the device (i.e., the address of the device memory 362 in which the value of the device is stored) from the obtained starting address and the offset address included in the device code. The request data analysis unit 303 notifies the response data generation unit 304 of the obtained address as an analysis result.
[0036] As shown in Figure 8, the device memory management table 363 is a table that associates binary code, variable type, starting address, and size, and is stored in the auxiliary storage device 36. In the device memory management table 363, the starting address is the starting address (decimal) of the area in the device memory 362 corresponding to the variable type, and the size is the size of that area (in bytes).
[0037] For example, if the device code in the request data is "11040000", the request data analysis unit 303 refers to the device memory management table 363 and obtains the starting address "10000" corresponding to the binary code "110" indicating the variable type. The request data analysis unit 303 also obtains the offset address "40000" from the device code. Then, the request data analysis unit 303 obtains the address of the device memory 362 where the value of the device is stored from the obtained starting address and offset address. For example, if the starting address is "10000" and the offset address is "40000", the request data analysis unit 303 obtains the address of the device memory 362 "50000".
[0038] The response data generation unit 304 is an example of a current value acquisition means according to this disclosure. The response data generation unit 304 generates response data to the Web browser. Specifically, the response data generation unit 304 accesses the address of the device memory 362 notified by the request data analysis unit 303 and acquires the current value of the device. For example, the response data generation unit 304 acquires a value of 2 bytes from the address "50000" of the device memory 362, i.e., the current value of "gLabel_sample_20000" (see Figure 9). The response data generation unit 304 notifies the Web server unit 302 of the response data containing the acquired current value of the device. The Web server unit 302 transmits the response data to the requesting Web browser (i.e., the Web browser of the monitoring terminal 4) via the I / F unit 300. The Web server unit 302 and the I / F unit 300 are examples of a current value transmission means according to this disclosure.
[0039] <Functional Configuration of Monitoring Terminal 4> As shown in Figure 10, the monitoring terminal 4 has an I / F unit 400 and a Web browser processing unit 401 as its functional configuration. These functional units of the monitoring terminal 4 are realized by the CPU 40 of the monitoring terminal 4 executing a Web browser stored in the auxiliary storage device 46. The I / F unit 400 transmits and receives data with the PLC 3. For example, the I / F unit 400 receives HTML data from the PLC 3 and stores the received HTML data in the HTML data storage unit 460. The HTML data storage unit 460 is a memory area provided by the auxiliary storage device 46. The I / F unit 400 also transmits request data to the PLC 3 and receives response data from the PLC 3.
[0040] The Web browser processing unit 401 executes the HTML data stored in the HTML data storage unit 460, and displays a program monitor screen 420 (see FIG. 11) on which the control program is displayed on the display 42. The program monitor screen 420 is provided with a program display field 421 and a display update cycle setting button 422. The program display field 421 is an area for displaying the control program. The display update cycle setting button 422 is a GUI (Graphical User Interface) button for accepting a setting of the display update cycle from a user. The user can set a desired display update cycle, that is, a cycle for updating the value of each device used in the control program, via a dialog (not shown) displayed by pressing the display update cycle setting button 422.
[0041] The user can monitor the control program being executed by the PLC 3 and the current value of each device via the program monitor screen 420.
[0042] <Current Value Acquisition Function Setting Processing> FIG. 12 is a flowchart showing a procedure of current value acquisition function setting processing executed by the development support device 2. The development support device 2 executes the current value acquisition function setting processing when generating HTML data.
[0043] (Step S101) The development support device 2 selects one device used in the control program. Thereafter, the processing of the development support device 2 proceeds to step S102.
[0044] (Step S102) The development support device 2 refers to the variable type conversion table 262 and the offset management table 263 to generate a device code corresponding to the device. Thereafter, the processing of the development support device 2 proceeds to step S103.
[0045] (Step S103) The development support device 2 sets the generated device code as a parameter of a current value acquisition function corresponding to the device. In other words, the development support device 2 embeds the device code at a position for acquiring the current value of the device in the HTML data. Thereafter, the processing of the development support device 2 proceeds to step S104.
[0046] (Step S104) The development support device 2 determines whether or not the setting of the current value acquisition function has been completed for all devices. When the setting of the current value acquisition function has been completed for all devices (Step S104; YES), the development support device 2 terminates the current value acquisition function setting process. On the other hand, when the setting of the current value acquisition function has not been completed for all devices (Step S104; NO), the process of the development support device 2 returns to Step S101.
[0047] <Current Value Acquisition Process> FIG. 13 is a flowchart showing the procedure of the current value acquisition process executed by the PLC 3. When receiving request data from the Web browser of the monitoring terminal 4, the PLC 3 executes the current value acquisition process.
[0048] (Step S201) The PLC 3 refers to the device memory management table 363 from the device code included in the received request data to acquire the start address, and extracts and acquires the offset address from the relevant device code. Thereafter, the process of the PLC 3 proceeds to Step S202.
[0049] (Step S202) The PLC 3 acquires the address of the device memory 362 from the acquired start address and offset address. Thereafter, the process of the PLC 3 proceeds to Step S203.
[0050] (Step S203) The PLC 3 acquires the data value stored at the acquired address. Thereafter, the process of the PLC 3 proceeds to Step S204.
[0051] (Step S204) The PLC 3 transmits the acquired data value as response data to the Web browser of the monitoring terminal 4. Thereafter, the PLC 3 terminates the current value acquisition process for the relevant request data.
[0052] As described above, in the PLC system 1 according to this embodiment, the development support device 2 includes an HTML data generation unit 201 that generates HTML data for displaying the control program on the Web browser of the monitoring terminal 4, and an I / F unit 200 that transmits the control program and HTML data to the PLC 3. When the HTML data generation unit 201 generates HTML data from the control program, it generates a corresponding device code for each device used in the control program by referring to the variable type conversion table 262 and the offset management table 263, and embeds the generated device code in the location in the HTML data where the current value of the device is obtained. The variable type conversion table 262 is a table that associates different binary codes for each type of device, and the offset management table 263 is a table that associates each device whose name is defined by the user with an offset address which is the difference between the address of the device memory 362 of the PLC 3 where the value of the device is stored and the starting address of the memory area (GV area) corresponding to the type of device in the device memory 362.
[0053] The PLC 3 includes a control program storage unit 360 that stores a control program received from the development support device 2, an HTML data storage unit 361 that stores HTML data received from the development support device 2, a device memory 362, a control program execution unit 301 that executes the control program, an I / F unit 300 that transmits HTML data to the monitoring terminal 4, a Web server unit 302 that sends and receives data with a Web browser, a request data analysis unit 303 that obtains the address of the device memory 362 where the current value of the device is stored by referring to a device memory management table 363 that associates binary code, device type, and starting address from the device code included in the request data received from the Web browser, and obtaining the starting address corresponding to the device type and obtaining the offset address from the device code, and a response data generation unit 304 that obtains the current value of the device from the obtained address.
[0054] With the above configuration, when the PLC 3 obtains the current value of a device in response to a request from a web browser, it can immediately obtain the address of the device memory 362 corresponding to that device. This significantly reduces the time required to obtain the current value of a device, thereby improving user convenience.
[0055] (Modification 1) The control program may be displayed in a divided manner on the Web browser of the monitoring terminal 4 (i.e., on the program monitor screen 420). Figure 14 is a block diagram showing the functional configuration of the development support device 2 according to this modification. The development support device 2 according to this modification has the configuration of the development support device 2 according to Embodiment 1 (see Figure 5), and further includes a divided display setting reception unit 202. The divided display setting reception unit 202 is an example of the divided display setting reception means according to this disclosure. The divided display setting reception unit 202 receives from the user the setting of conditions for displaying the control program in a divided manner on the program monitor screen 420 of the monitoring terminal 4 (hereinafter referred to as "divided display conditions").
[0056] In detail, the split display setting reception unit 202 displays a split display setting screen (not shown) on the display 22, which is a screen for receiving settings of split display conditions from the user. The user sets the split display conditions (for example, how many steps to divide into) via the split display setting screen. The HTML data generation unit 201 generates multiple HTML data from the control program according to the split display conditions set by the user. For example, if the control program has 900 steps and the split display condition is set to divide into 300-step intervals, the HTML data generation unit 201 generates HTML data corresponding to steps 0 to 299, HTML data corresponding to steps 300 to 599, and HTML data corresponding to steps 600 to 899. The generated multiple HTML data are transmitted to the PLC 3 and stored in the HTML data storage unit 361 of the PLC 3.
[0057] As shown in Figure 15, the program monitor screen 420 of this modified example is provided with a display program selection field 423. The user of the monitoring terminal 4 can operate the display program selection field 423 to select the HTML data they want to display from among the multiple divided HTML data (see Figure 16).
[0058] For example, when generating HTML data for a control program with 900 steps and 600 devices, one HTML file containing 900 steps is generated. When this is displayed in a web browser, only a few dozen steps can be displayed on one screen due to screen size limitations. However, since the HTML data being loaded contains 900 steps, it is necessary to retrieve the values of all 600 devices from the PLC3. In this case, if, for example, the time required to retrieve the current values of all devices from the PLC3 is 900 milliseconds, the refresh cycle of the web page will take more than 900 milliseconds.
[0059] On the other hand, in this modified configuration, for example, if HTML data corresponding to steps 0-299, HTML data corresponding to steps 300-599, and HTML data corresponding to steps 600-899 are generated, and the number of devices for each HTML data is 150, 250, and 200, then the time required to obtain the current values for all devices in each HTML data will be 225 milliseconds, 375 milliseconds, and 300 milliseconds, respectively, and the update cycle of the web page can be shortened from 900 milliseconds to 225-375 milliseconds. In this way, this modified configuration allows for the reduction of the update cycle of the display in the web browser by limiting the target of current value acquisition through division of the HTML data and shortening the processing time.
[0060] (Modification 2) The development support device 2 may be configured to receive instructions from the user on whether or not to write HTML data after writing the control program to the PLC 3, and to generate HTML data and write it to (i.e., transmit) it to the PLC 3 if the user gives an instruction to write HTML data. Figure 17 is a block diagram showing the functional configuration of the development support device 2 according to this modification. The development support device 2 according to this modification has the configuration of the development support device 2 according to Embodiment 1 (see Figure 5), and further includes an HTML data writing instruction receiving unit 203. The HTML data writing instruction receiving unit 203 is an example of the HTML data writing instruction receiving means according to this disclosure.
[0061] When the HTML data writing instruction receiving unit 203 has finished writing the control program to the PLC3, it displays a data writing instruction receiving screen (not shown) on the display 22 to receive instructions from the user on whether or not to write HTML data. The user can instruct whether or not to write HTML data by operating through the data writing instruction receiving screen. If the user instructs to write HTML data, the HTML data writing instruction receiving unit 203 instructs the HTML data generation unit 201 to generate HTML data and instructs the I / F unit 200 to send the generated HTML data to the PLC3. The HTML data writing instruction receiving unit 203 may also receive instructions from the user on whether or not to write HTML data when the writing of the control program to the PLC3 begins.
[0062] When frequently updating the control program during debugging or other tasks that do not require HTML data, generating and writing HTML data each time increases the overall writing time and reduces work efficiency. However, with this modified configuration, for example, during debugging, it becomes possible to skip the generation and writing of HTML data and execute the generation and writing of HTML data when writing the final version of the control program, thereby shortening the writing time to the PLC3 during debugging and other tasks.
[0063] (Modification 3) All or part of the functional unit of the development support device 2 (see Figure 5) may be implemented with dedicated hardware. Also, all or part of the functional unit of the PLC 3 (see Figure 5) may be implemented with dedicated hardware. Also, all or part of the functional unit of the monitoring terminal 4 (see Figure 10) may be implemented with dedicated hardware. Dedicated hardware includes, for example, a single circuit, a composite circuit, a programmed processor, an ASIC (Application-Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a combination thereof.
[0064] The technical concepts related to each of the above modifications may be implemented individually or in combination as appropriate.
[0065] (Embodiment 2) Next, Embodiment 2 of the present disclosure will be described. In the following description, components and the like that are common to Embodiment 1 will be denoted by the same reference numerals, and their descriptions will be omitted.
[0066] Figure 18 shows the overall configuration of the PLC system 1A according to Embodiment 2. The PLC system 1A is an example of a program monitoring system according to the present disclosure. The PLC system 1A comprises a development support device 2A, a PLC 3A, and a monitoring terminal 4. The development support device 2A, the PLC 3A, and the monitoring terminal 4 are connected to each other so as to be able to communicate via a network 5. The development support device 2A is an example of a development support device according to the present disclosure and is a device for supporting the development of a control program to be executed by the PLC 3A. The hardware configuration of the development support device 2A is the same as that of the development support device 2 according to Embodiment 1 (see Figure 2).
[0067] PLC3A is an example of a programmable logic controller according to this disclosure. PLC3A is installed in a factory and executes a control program received from the development support device 2A to control controlled devices (not shown), which are field devices such as sensors and actuators. The hardware configuration of PLC3A is the same as that of PLC3 according to Embodiment 1 (see Figure 3).
[0068] The PLC system 1A according to this embodiment has the feature that, when the user of the monitoring terminal 4 performs a program verification operation using a web browser, the PLC 3A verifies the control program written to the PLC 3A with the control program displayed on the web browser and notifies the user of the verification result. These features will be described in detail below.
[0069] <Functional Configuration of Development Support Device 2A> As shown in Figure 19, the development support device 2A comprises an I / F unit 200, an HTML data generation unit 201, and an error detection information file generation unit 204 as its functional configuration. These functional units of the development support device 2A are realized by the CPU 20 of the development support device 2A executing an engineering tool, which is an example of an engineering support program according to this disclosure, stored in the auxiliary storage device 26.
[0070] The functional configuration of the development support device 2A differs from that of the development support device 2 according to Embodiment 1 (see Figure 5) in that it includes an error detection information file generation unit 204, but the functional configurations of both are the same in other respects. The error detection information file generation unit 204 is an example of an error detection information file generation means according to this disclosure. When HTML data is generated by the HTML data generation unit 201, the error detection information file generation unit 204 extracts error detection information from the control program and generates an error detection information file in which the extracted error detection information is stored. The error detection information is a CRC (Cyclic Redundancy Check) value and is stored in the footer of the control program, etc. The error detection information is a numerical value for error detection calculated from the entire control program, and if even one bit of the data in the control program changes, the error detection information also changes.
[0071] The error detection information file generation unit 204 stores the generated error detection information file in the error detection information file storage unit 264. The error detection information file storage unit 264 is a memory area provided by the auxiliary storage device 26. The error detection information file stored in the error detection information file storage unit 264 may be written to the PLC 3A at the same time that HTML data is written to (i.e., transmitted to) the PLC 3A, or, as in the modified example 2 of Embodiment 1, it may be written to the PLC 3A only when the user instructs the execution of writing HTML data.
[0072] <Functional Configuration of PLC3A> As shown in Figure 20, the functional configuration of PLC3A includes an I / F unit 300, a control program execution unit 301, a Web server unit 302, a request data analysis unit 303A, a response data generation unit 304A, and a verification unit 305. These functional units of PLC3A are realized by the CPU 30 of PLC3A executing a program stored in the auxiliary storage device 36 for functioning as a Web server, a program for analyzing request data from the monitoring terminal 4 and generating response data, etc. The functional configuration of PLC3A differs from that of PLC3 in Embodiment 1 (see Figure 5) in that it includes a request data analysis unit 303A, a response data generation unit 304A, and a verification unit 305 instead of a request data analysis unit 303 and a response data generation unit 304, but the functional configurations of both are the same in all other respects.
[0073] The request data analysis unit 303A analyzes the request data from the Web browser and notifies the response data generation unit 304A or the matching unit 305 of the analysis results. Specifically, if the received request data indicates the acquisition of the current value of a device, the request data analysis unit 303A performs the same processing as the request data analysis unit 303 in Embodiment 1 and notifies the response data generation unit 304A of the address of the device memory 362, which is the analysis result. Upon receiving such notification, the response data generation unit 304A accesses the address and acquires the current value of the device. The response data generation unit 304A notifies the Web server unit 302 of the response data containing the acquired current value of the device, and the Web server unit 302 transmits the response data to the requesting Web browser (i.e., the Web browser of the monitoring terminal 4) via the I / F unit 300.
[0074] On the other hand, if the received request data indicates a program matching request, the request data analysis unit 303A notifies the matching unit 305 of this fact. In this case, the request data is an example of a program matching request related to this disclosure. As shown in Figure 21, in this embodiment, the program monitor screen 420 displayed on the display 42 of the monitoring terminal 4 is provided with a GUI button, which is a program matching button 424. When the program matching button 424 is pressed by the user, request data requesting a program matching request is sent to the Web server unit 302 of the PLC 3A.
[0075] The matching unit 305 is an example of a matching means according to the present disclosure. When the matching unit 305 receives the above notification from the request data analysis unit 303A, it compares the error detection information extracted from the control program stored in the control program storage unit 360 with the error detection information stored in the error detection information file stored in the error detection information file storage unit 364. The error detection information file storage unit 364 is an example of an error detection information file storage means according to the present disclosure. The error detection information file storage unit 364 is a memory area provided by the auxiliary storage device 36 and stores the error detection information file received from the development support device 2A. The matching unit 305 notifies the response data generation unit 304A of the matching result (match or mismatch). The response data generation unit 304A generates response data according to the matching result of the matching unit 305 and notifies the Web server unit 302 of the generated response data. The Web server unit 302 transmits the response data to the requesting Web browser (i.e., the Web browser of the monitoring terminal 4) via the I / F unit 300. The Web server unit 302 and the I / F unit 300 are examples of the matching result transmission means according to this disclosure.
[0076] When the web browser of the monitoring terminal 4 receives response data indicating the program matching result, it displays a matching result notification screen 425 on the program monitor screen 420, as shown in Figures 22 and 23.
[0077] As described above, the PLC system 1A according to this embodiment can notify the user whether or not the control program displayed on the program monitor screen 420 matches the control program stored in the control program storage unit 360 of the PLC 3A.
[0078] For example, as in Modification 2 of Embodiment 1, if the control program and HTML data are written to the PLC 3A at different times, it is possible that the displayed control program and the control program stored in the PLC 3A's control program storage unit 360 may not match. In this embodiment, the user can check at any time whether the control program displayed on the program monitor screen 420 matches the control program stored in the PLC 3A's control program storage unit 360. Therefore, only in the event of a mismatch, the user can contact the operator of the development support device 2A and have them write the HTML data to the PLC 3A. As a result, it is no longer necessary to write the HTML data each time the control program is written to the PLC 3A, reducing the number of times HTML data is written and improving work efficiency.
[0079] (Modification 1) In the PLC 3A, the control program storage unit 360 may store multiple different control programs, and the HTML data storage unit 361 may store multiple HTML data corresponding to these control programs. Therefore, the user may be able to specify one or more pairs of control programs and HTML data via the program monitor screen 420, and request data requesting program verification for each pair may be sent to the PLC 3A's Web server unit 302. In this case, the verification unit 305 performs program verification for each specified pair. Then, response data showing the verification result for each pair is sent to the Web browser of the monitoring terminal 4, and a verification result notification screen 425 showing the verification result is displayed on the program monitor screen 420.
[0080] (Modification 2) All or part of the functional unit of the development support device 2A (see Figure 19) may be implemented with dedicated hardware. Also, all or part of the functional unit of the PLC 3A (see Figure 20) may be implemented with dedicated hardware. Dedicated hardware may be, for example, a single circuit, a composite circuit, a programmed processor, an ASIC, an FPGA, or a combination thereof.
[0081] (Modification 3) The configurations of Modifications 1 and 2 of Embodiment 1 can also be applied to the PLC system 1A in this embodiment.
[0082] The technical concepts related to each of the above modifications may be implemented individually or in combination as appropriate.
[0083] This disclosure can be implemented in various forms and variations without departing from its broad spirit and scope. Furthermore, the embodiments described above are for illustrative purposes only and do not limit the scope of this disclosure. In other words, the scope of this disclosure is indicated by the claims, not by the embodiments. Various variations implemented within the scope of the claims and the equivalent significance of the disclosure are considered to be within the scope of this disclosure.
[0084] This disclosure can be suitably adopted in systems that include a PLC.
[0085] 1, 1A PLC system, 2, 2A Development support device, 3, 3A PLC, 4 Monitoring terminal, 5 Network, 20, 30, 40 CPU, 21, 31, 41 Operation reception unit, 22, 42 Display, 23, 32, 43 Communication unit, 24, 34, 44 ROM, 25, 35, 45 RAM, 26, 36, 46 Auxiliary storage device, 27, 37, 47 Bus, 33 Output unit, 200, 300, 400 I / F unit, 201 HTML data generation unit, 202 Split display setting reception unit, 203 HTML data write instruction reception unit, 204 Error detection information file generation unit, 260, 360 Control program storage unit, 261, 361, 460 HTML data storage unit, 262 Variable type conversion table, 263 Offset management table, 264, 364 Error detection information file storage unit, 301 Control program execution unit, 302 Web server unit, 303, 303A Request data analysis unit, 304, 304A Response data generation unit, 305 Verification unit, 362 Device memory, 363 Device memory management table, 401 Web browser processing unit, 420 Program monitor screen, 421 Program display field, 422 Display update cycle setting button, 423 Display program selection field, 424 Program verification button, 425 Verification result notification screen
Claims
1. The system comprises a development support device and a programmable logic controller, wherein the development support device includes HTML data generation means for generating HTML data for displaying a control program to be executed by the programmable logic controller on a monitoring terminal's web browser, and data transmission means for transmitting the control program and the HTML data to the programmable logic controller, wherein when generating the HTML data from the control program, the HTML data generation means generates a device code, which is a corresponding binary code, for each device used in the control program by referring to a variable type conversion table and an offset management table, and embeds the generated device code in the HTML data where the current value of the device is obtained, wherein the variable type conversion table is a table that associates different binary codes for each type of device, the offset management table is a table that associates each device whose name is defined by the user with an offset address, which is the difference between the address of the device memory provided by the programmable logic controller where the value of the device is stored and the starting address of the memory area corresponding to the type of device in the device memory, and the device code is a combination of the starting address and the offset address. The programmable logic controller includes: control program storage means for storing a control program received from the development support device; HTML data storage means for storing HTML data received from the development support device; device memory; control program execution means for executing the control program; HTML data transmission means for transmitting the HTML data to the monitoring terminal; and web server means for sending and receiving data with the web browser.A program monitor system comprising: an address acquisition means that obtains the address of the device memory in which the current value of the device is stored by referring to a device memory management table that associates binary code, device type, and starting address with the device code included in the current value acquisition request received from the web browser, and obtaining the starting address corresponding to the device type and the offset address from the device code; a current value acquisition means that obtains the current value of the device from the acquired address; and a current value transmission means that transmits the acquired current value to the web browser.
2. The program monitor system according to claim 1, further comprising a split display setting receiving means for receiving settings from a user for split display conditions when the control program is displayed in a split manner on the web browser, wherein the HTML data generation means generates a plurality of HTML data from the control program according to the split display conditions.
3. The program monitor system according to claim 1 or 2, further comprising an HTML data writing instruction receiving means for receiving instructions from a user on whether or not to write the HTML data to the programmable logic controller, wherein when the user instructs to write the HTML data, the HTML data generation means generates the HTML data, and the data transmission means transmits the generated HTML data to the programmable logic controller.
4. The program monitoring system according to any one of claims 1 to 3, wherein the development support device further comprises error detection information file generation means for extracting error detection information from the control program and generating an error detection information file containing the extracted error detection information when the HTML data is generated by the HTML data generation means, the data transmission means further transmits the error detection information file to the programmable logic controller, the programmable logic controller comprises error detection information file storage means for storing the error detection information file received from the monitoring terminal, a comparison means for comparing the error detection information extracted from the control program stored in the control program storage means with the error detection information stored in the error detection information file stored in the error detection information file storage means when a program comparison request is received from the Web browser, and a comparison result transmission means for transmitting the comparison result of the comparison means to the Web browser.
5. An engineering support program comprising: a computer that functions as an HTML data generation means for generating HTML data for displaying a control program to be executed by a programmable logic controller on a monitoring terminal's web browser; a data transmission means for transmitting the control program and the HTML data to the programmable logic controller; the HTML data generation means, when generating the HTML data from the control program, generates a device code, which is a corresponding binary code, for each device used in the control program by referring to a variable type conversion table and an offset management table, and embeds the generated device code in the HTML data where the current value of the device is obtained; the variable type conversion table is a table that associates different binary codes for each type of device; the offset management table is a table that associates each device whose name is defined by the user with an offset address, which is the difference between the address of the device memory provided by the programmable logic controller where the value of the device is stored and the starting address of the memory area corresponding to the type of device in the device memory; and the device code is a combination of the starting address and the offset address.
6. Control program storage means for storing a control program received from a development support device; HTML data storage means for storing HTML data received from the development support device for displaying the control program on a web browser of a monitoring terminal; device memory for storing the current values of each device used in the control program; control program execution means for executing the control program; HTML data transmission means for transmitting the HTML data to the monitoring terminal; web server means for sending and receiving data with the web browser; address acquisition means for obtaining the address of the device memory where the current value of the device is stored by referring to a device memory management table that associates binary codes with device types and starting addresses from a device code, which is a binary code corresponding to the device, included in a current value acquisition request received from the web browser, obtaining the starting address corresponding to the device type, and obtaining an offset address, which is the difference between the address of the device memory where the device value is stored and the starting address corresponding to the device type, from the device code; current value acquisition means for obtaining the current value of the device from the acquired address. A programmable logic controller comprising: a current value transmission means for transmitting the acquired current value to the web browser.
7. The development support device generates HTML data for displaying a control program to be executed by the programmable logic controller on the web browser of a monitoring terminal, transmits the control program and the HTML data to the programmable logic controller, generates a device code which is the corresponding binary code for each device used in the control program by referring to a variable type conversion table and an offset management table, and embeds the generated device code in the HTML data where the current value of the device is obtained, the variable type conversion table is a table that associates different binary codes for each type of device, the offset management table is a table that associates each device whose name is defined by the user with an offset address which is the difference between the address of the device memory provided by the programmable logic controller where the value of the device is stored and the starting address of the memory area corresponding to the type of device in the device memory, the device code is a combination of the starting address and the offset address, the programmable logic controller stores the control program received from the development support device in the control program storage means. A program monitoring method comprising: storing HTML data received from the development support device in an HTML data storage means; executing the control program; transmitting the HTML data to the monitoring terminal; obtaining the address of the device memory where the current value of the device is stored by referring to a device memory management table that associates binary code, device type, and starting address from the device code included in the current value acquisition request received from the web browser, and obtaining the starting address corresponding to the device type and the offset address from the device code; obtaining the current value of the device from the obtained address; and transmitting the obtained current value to the web browser.