Program monitoring system, engineering support program, programmable logic controller, and program monitoring method
The program monitoring system addresses the inefficiencies in PLC monitoring by generating HTML data with device codes for quick value acquisition, improving user convenience and reducing unintended control risks.
Patent Information
- Application Number
- JP2025546000
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2025-04-18
- Publication Date
- 2025-10-20
- Estimated Expiration
- 2045-04-18
AI Technical Summary
Existing technologies for monitoring control programs in programmable logic controllers (PLCs) face challenges such as increased management workload and time required to obtain device values due to the need to manage device addresses and variable references, leading to potential unintended control and reduced user convenience.
A program monitoring system that utilizes a development support device to generate HTML data with device codes by referencing variable type conversion and offset management tables, embedding these codes in HTML data for quick device value acquisition, and a PLC to process these codes for immediate value transmission to a web browser.
Reduces the time required to obtain device values from a PLC, enhancing user convenience and minimizing the risk of unintended control.
Smart Images

Figure 0007756849000001 
Figure 0007756849000002 
Figure 0007756849000003
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to a program monitor system, an engineering support program, a programmable logic controller, and a program monitor method. [Background technology]
[0002] In recent years, a technique for monitoring a control program being executed in a programmable logic controller (PLC) using a web browser has become known. For example, Patent Document 1 describes a technique in which a PLC generates an HTML (HyperText Markup Language) file for displaying the control program on a web browser, transmits the HTML file to a client device equipped with a web browser in response to a request from the client device, and the client device displays the control procedure indicated by the control program and the current device status as a ladder diagram on its own screen. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Application Laid-Open No. 2002-189508 Summary of the Invention [Problem to be solved by the invention]
[0004] In the technology described in Patent Document 1, when a client device obtains the status of a device from a PLC, the client device specifies the device by its address, but in this case, the user must manage the device's purpose and data type for each address. As a result, there is concern that an increase in the number of devices in use could result in the following problems: (1) The amount of information to be managed increases, increasing the workload for users. (2) It takes time to identify the address that corresponds to the intended purpose. (3) There is a higher risk of accidentally specifying a different address, which in turn increases the risk of the PLC performing unintended control.
[0005] Patent Document 1 also describes that when a client device obtains the status of a device from a PLC, the device may be specified by a variable rather than by an address. In this case, the PLC references a variable memory to identify the address corresponding to the specified variable. However, as the number of devices used increases, the time required to reference the variable memory increases. As a result, the time required for the client device to obtain the device status increases, resulting in a problem of reduced user convenience.
[0006] For this reason, there is a demand for new technology that can shorten the time it takes to obtain device values from a PLC, in relation to technology for monitoring control programs executed on a PLC on a web browser.
[0007] The present disclosure has been made in consideration of the above-described situation, 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 obtain device values from a PLC. [Means for solving the problem]
[0008] In order to achieve the above object, the program monitor system according to the present disclosure comprises: A development support device and a programmable logic controller are provided, The development support device an HTML data generating 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; a data transmission means for transmitting the control program and the HTML data to the programmable logic controller; when generating the HTML data from the control program, the HTML data generation means refers to a variable type conversion table and an offset management table for each device used in the control program to generate a device code, which is a corresponding binary code, and embeds the generated device code in a location in the HTML data where a current value of the device is to be acquired; the variable type conversion table is a table in which different binary codes are associated with each type of device, the offset management table is a table that associates each device whose name is defined by a user with an offset address that is a difference value between an address of a device memory in the programmable logic controller where a value of the device is stored and a top address of a memory area in the device memory that corresponds to the type of the device, the device code is a combination of the start address and the offset address, The programmable logic controller a control program storage means for storing the control program received from the development support device; HTML data storage means for storing HTML data received from the development support device; the device memory; a control program execution means for executing the control program; HTML data transmission means for transmitting the HTML data to the monitoring terminal; a web server means for transmitting and receiving data to and from the web browser; The binary code is obtained from the device code included in the current reading request received from the web browser. and ahead an address acquisition means for acquiring the address of the device memory where the current value of the device is stored by referring to a device memory management table in which the device code is associated with a start address and acquiring the start address corresponding to the type of the device, and acquiring the offset address from the device code; a current value acquisition means for acquiring a current value of the device from the acquired address; and a current value transmission means for transmitting the acquired current value to the web browser. [Effects of the Invention]
[0009] According to the present disclosure, it is possible to reduce the time required to obtain device values from a programmable logic controller. [Brief explanation of the drawings]
[0010] [Figure 1] FIG. 1 is a diagram showing the overall configuration of a PLC system according to a first embodiment; [Figure 2] FIG. 1 is a block diagram showing a hardware configuration of a development support device according to a first embodiment. [Figure 3] 1 is a block diagram showing a hardware configuration of a PLC according to a first embodiment; [Figure 4] FIG. 1 is a block diagram showing a hardware configuration of a monitoring terminal according to a first embodiment. [Figure 5] FIG. 1 is a block diagram showing the functional configuration of a development support device and a PLC according to a first embodiment. [Figure 6] FIG. 10 is a diagram showing an example of a variable type conversion table according to the first embodiment; [Figure 7] FIG. 10 is a diagram showing an example of an offset management table according to the first embodiment. [Figure 8] FIG. 1 is a diagram showing an example of a device memory management table according to the first embodiment; [Figure 9] FIG. 1 is a diagram showing an example of a GV area of a device memory according to a first embodiment; [Figure 10] FIG. 1 is a block diagram showing a functional configuration of a monitoring terminal according to a first embodiment. [Figure 11] FIG. 10 is a diagram showing an example of a program monitor screen according to the first embodiment; [Figure 12] 1 is a flowchart showing a procedure for setting a current value acquisition function according to the first embodiment; [Figure 13] 1 is a flowchart showing a procedure for current value acquisition processing according to the first embodiment; [Figure 14] FIG. 1 is a block diagram showing a functional configuration of a development support device according to a first modification of the first embodiment. [Figure 15] FIG. 10 is a diagram showing an example of a program monitor screen according to Modification 1 of Embodiment 1. [Figure 16] FIG. 10 is a diagram showing a state in which a display program selection field is operated on a program monitor screen according to a first modification of the first embodiment; [Figure 17] FIG. 10 is a block diagram showing a functional configuration of a development support device according to a second modification of the first embodiment. [Figure 18] FIG. 10 is a diagram showing the overall configuration of a PLC system according to a second embodiment. [Figure 19] FIG. 10 is a block diagram showing the functional configuration of a development support device according to a second embodiment. [Figure 20] A block diagram showing the functional configuration of a PLC according to a second embodiment. [Figure 21] FIG. 10 is a diagram showing an example of a program monitor screen according to the second embodiment; [Figure 22] FIG. 10 is a diagram showing an example of a matching result notification screen (in the case of a match) according to the second embodiment; [Figure 23] FIG. 10 is a diagram showing an example of a matching result notification screen (when there is no match) according to the second embodiment; DETAILED DESCRIPTION OF THE INVENTION
[0011] Hereinafter, embodiments of the present disclosure will be described in detail with reference to the drawings.
[0012] (Embodiment 1) 1 is a diagram showing the overall configuration of a PLC system 1 according to a first embodiment. The PLC system 1 is an example of a program monitor system according to the present disclosure. The PLC system 1 includes 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 with each other via a network 5. The network 5 is a network such as a LAN (Local Area Network), a CAN (Campus Area Network), a MAN (Metropolitan Area Network), a WAN (Wide Area Network), or the Internet.
[0013] In FIG. 1, the PLC system 1 is shown as having one development support device 2, one PLC 3, and one monitoring terminal 4, but there is no limit to the number of development support devices 2, PLCs 3, and monitoring terminals 4 in the PLC system 1, as long as there is one or more of each.
[0014] <Hardware configuration of development support device 2> The development support device 2 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 3. The development support device 2 is installed, for example, in a room in a building where a program developer works. As shown in FIG. 2 , the development support device 2 includes, as its hardware configuration, 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. The functions of the development support device 2 realized by the CPU 20 will be described in detail later. The operation reception unit 21 includes one or more input devices such as a keyboard, mouse, push buttons, touch panel, touch pad, etc., and receives operation input from a user and outputs a signal related to the received operation to the CPU 20. The display 22 includes a display device such as a CRT display, a liquid crystal display, an organic EL (Electroluminescence) display, etc. Under the control of the CPU 20, the display 22 displays various screens etc. in response to user operations.
[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 non-rewritable programs such as a BIOS (Basic Input / Output System). The RAM 25 is a storage device used as a work area for the CPU 20. The auxiliary storage device 26 is a storage device configured with a readable / writable non-volatile semiconductor memory, an HDD (Hard Disk Drive), or the like. Examples of the readable / writable non-volatile semiconductor memory include an EPROM (Erasable Programmable Read-Only Memory), an EEPROM (Electrically Erasable Programmable Read-Only Memory), and a flash memory. The auxiliary storage device 26 stores application software known as an engineering tool, data used when the engineering tool is executed, data generated by the execution of the engineering tool, and the like.
[0017] The above engineering tool is an example of the engineering support program according to the present disclosure. The development support device 2 can obtain an engineering tool or an update program for updating the engineering tool from a server, a terminal, etc. (not shown) through communication and install it on itself. Also, these programs can be stored and distributed on a computer-readable recording medium such as a CD-ROM (Compact Disc Read-Only Memory), a DVD (Digital Versatile Disc), a magneto-optical disk, a USB memory, an HDD, a SSD (Solid-State Drive), a memory card, etc. When such a recording medium is directly or indirectly attached to the development support device 2, the development support device 2 can also read out the engineering tool or the update program from the recording medium and install it on itself.
[0018] <Hardware Configuration of PLC3> PLC3 is an example of the programmable logic controller according to the present disclosure. PLC3 is installed in a factory and executes the control program received from the development support device 2 to control a controlled device (not shown), which is a field device such as a sensor or an actuator. As shown in FIG. 3, as a hardware configuration, 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 performs overall control of the PLC 3. The functions of the PLC 3 realized by the CPU 30 will be described in detail later. The operation reception unit 31 includes one or more input devices such as limit switches and push buttons, receives operation inputs from a user, and outputs signals related to the received operations 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 generated by the CPU 30 for the controlled device. The ROM 34 is a storage device that stores programs that do not need to be rewritten, such as BIOS. The RAM 35 is a storage device used as a working area for the CPU 30.
[0020] The auxiliary storage device 36 is a storage device configured with a readable / writable nonvolatile semiconductor memory, an HDD, etc. Examples of the readable / writable nonvolatile semiconductor memory include an EPROM, an EEPROM, and a flash memory. The auxiliary storage device 36 stores the control program 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 of each device, a table for managing the device memory, etc.
[0021] <Monitoring terminal hardware configuration> The monitoring terminal 4 is an example of a monitoring terminal according to the present disclosure, and is a device for monitoring a control program written in the PLC 3. The monitoring terminal 4 is installed, for example, near the PLC 3 in a factory. As shown in FIG. 4 , the monitoring terminal 4 includes, as its hardware configuration, 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 connected to each other via a bus 47.
[0022] The CPU 40 performs overall control of the monitoring terminal 4. The functions of the monitoring terminal 4 realized by the CPU 40 will be described in detail later. The operation reception unit 41 includes one or more input devices such as a keyboard, a mouse, push buttons, a touch panel, a touch pad, etc., and receives operation input from a user and outputs a signal related to the received operation to the CPU 40. The display 42 includes a display device such as a CRT display, a liquid crystal display, an organic EL display, etc. 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 do not need to be rewritten, such as BIOS. The RAM 45 is a storage device used as a work area for the CPU 40. The auxiliary storage device 46 is a storage device that is configured from a readable / writable nonvolatile semiconductor memory, a HDD, or the like. Examples of the readable / writable nonvolatile semiconductor memory include an EPROM, an EEPROM, and a flash memory. The auxiliary storage device 46 stores a web browser, various application software, HTML data received from the PLC 3, and the like.
[0024] <Functional configuration of development support device 2 and PLC 3> 5, the development support device 2 has, as its functional configuration, an I / F (interface) unit 200 and an HTML data generation unit 201. These functional units of the development support device 2 are realized when the CPU 20 of the development support device 2 executes the above-mentioned engineering tools stored in the auxiliary storage device 26. The PLC 3 has, as its functional configuration, an 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. These functional units of the PLC 3 are realized when the CPU 30 of the PLC 3 executes 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 to and from the PLC 3. For example, the I / F unit 200 transmits a control program stored in a control program storage unit 260 and HTML data stored in an HTML data storage unit 261 to the PLC 3. The control program storage unit 260 and the HTML data storage unit 261 are both memory areas provided by the auxiliary storage device 26. In this embodiment, when the I / F unit 200 receives a control program write instruction from a user, it transmits the control program stored in the control program storage unit 260 to the PLC 3, and when 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 the present disclosure.
[0026] The HTML data generation unit 201 is an example of an HTML data generation means according to the present disclosure. The HTML data generation unit 201 generates HTML data for displaying the control program on a web browser 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.
[0027] The control program is a program required for the PLC 3 to control the controlled devices, and is created by the user using an engineering tool. The variable type conversion table 262 is an example of a variable type conversion table according to the present disclosure. As shown in FIG. 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 variable types that are predetermined by the specifications of the PLC 3.
[0028] The offset management table 263 is an example of an offset management table according to the present disclosure. As shown in FIG. 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. A label name is a variable name (i.e., a device name) arbitrarily defined by the user. An offset address is a difference value between an address where a value of a device is stored and the start address of a memory area (e.g., a GV area) corresponding to the type of the device, in a device memory 362 (described later) of the PLC 3. The GV area is a memory area where values of variables with a variable type of "GV" (i.e., devices with label names assigned) are stored. In this embodiment, the start 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 references the variable type conversion table 262 and the offset management table 263 to generate a corresponding binary code (hereinafter referred to as a "device code") for each device used in the control program and having a variable type of "GV." Specifically, the HTML data generation unit 201 references the variable type conversion table 262 to obtain the binary code "110" corresponding to the variable type "GV." Furthermore, the HTML data generation unit 201 references the offset management table 263 to obtain an offset address ("40000" in this example) corresponding to the device (for example, "gLabel_sample_20000").
[0030] Then, the HTML data generation unit 201 generates a device code ("11040000") corresponding to the device by combining the acquired binary code "110" with the acquired offset address "40000". After generating the device code, the HTML data generation unit 201 embeds the device code in the HTML data at a location where the current value of the device is to be acquired. In other words, the HTML data generation unit 201 sets the generated device code as a parameter of a current value acquisition function included in the HTML data and corresponding to the device. In this way, the HTML data generation unit 201 embeds the device code of each device whose variable type is "GV" and used in the control program in the HTML data at a location where the current value of the device is to be acquired.
[0031] Similarly to the above, the HTML data generation unit 201 generates corresponding device codes for devices other than those of the variable type "GV" and embeds the generated device codes in the HTML data at the locations where the current values of the devices are to be acquired (i.e., the device codes are set as parameters of the current value acquisition function corresponding to the devices). Note that the names of devices other than those of the variable type "GV" are predetermined according to the specifications of the PLC 3 to be combinations of variable types and offset addresses (for example, "D1000").
[0032] After generating the HTML data, the HTML data generating unit 201 stores the generated HTML data in the HTML data storage unit 261 .
[0033] In PLC 3, I / F unit 300 is an example of HTML data transmission means according to the present disclosure. I / F unit 300 transmits and receives data to and from development support device 2 and monitoring terminal 4. For example, I / F unit 300 receives a control program from development support device 2 and stores the received control program in control program storage unit 360. Control program storage unit 360 is an example of control program storage means according to the present disclosure and is a memory area provided by auxiliary storage device 36. I / F unit 300 also receives HTML data from development support device 2 and stores the received HTML data in HTML data storage unit 361. HTML data storage unit 361 is an example of HTML data storage means according to the present disclosure and is a memory area provided by auxiliary storage device 36. I / F unit 300 also transmits HTML data to monitoring terminal 4. I / F unit 300 also receives request data from 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 the present disclosure. The control program execution unit 301 executes a control program stored in the control program storage unit 360 to control a controlled device. When controlling a controlled device, the control program execution unit 301 reads and uses necessary device values from the device memory 362, and stores device values indicating the control results in the device memory 362. The device memory 362 is an example of a device memory according to the present 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 the present disclosure. The web server unit 302 transmits and receives data to and from 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 according to the present disclosure. The request data analysis unit 303 analyzes request data from a web browser (an example of a current value acquisition request according to the present disclosure) and notifies the response data generation unit 304 of the analysis result. In detail, the request data analysis unit 303 references the device memory management table 363 and acquires a starting address from the device code included in the received request data. Then, the request data analysis unit 303 acquires the address of the device memory 362 corresponding to the device (i.e., the address of the device memory 362 where the value of the device is stored) from the acquired 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 acquired address as the analysis result.
[0036] 8, the device memory management table 363 is a table that associates binary codes, variable types, starting addresses, and sizes, and is stored in the auxiliary storage device 36. In the device memory management table 363, the starting address is the starting address (decimal number) of an area in the device memory 362 that corresponds to the variable type, and the size is the size of the area (in bytes).
[0037] For example, if the device code in the request data is "11040000," the request data analysis unit 303 references the device memory management table 363 and acquires the starting address "10000" corresponding to the binary code "110" indicating the variable type. The request data analysis unit 303 also acquires the offset address "40000" from the device code. The request data analysis unit 303 then acquires the address in the device memory 362 where the value of the device is stored from the acquired 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 acquires the address "50000" in the device memory 362.
[0038] The response data generation unit 304 is an example of a current value acquisition means according to the present disclosure. The response data generation unit 304 generates response data for 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 two-byte value from address “50000” in the device memory 362, i.e., the current value of “gLabel_sample_20000” (see FIG. 9 ). The response data generation unit 304 notifies the web server unit 302 of response data containing the acquired current value of the device. The web server unit 302 transmits the response data via the I / F unit 300 to the web browser that originated the request (i.e., the web browser of the monitoring terminal 4). The web server unit 302 and the I / F unit 300 are an example of a current value transmission means according to the present disclosure.
[0039] <Functional configuration of monitoring terminal 4> 10, the monitoring terminal 4 has, as its functional configuration, an I / F unit 400 and a Web browser processing unit 401. 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 to and from 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 the display 42, on which the control program is displayed. 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 receiving a display update cycle setting from the user. The user can set a desired display update cycle, i.e., the cycle for updating the values of each device used in the control program, via a dialog box (not shown) that is 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 values of each device via the program monitor screen 420.
[0042] <Current value acquisition function setting process> 12 is a flowchart showing the procedure of the current value acquisition function setting process executed by the development support device 2. The development support device 2 executes the current value acquisition function setting process when generating HTML data.
[0043] (Step S101) The development support device 2 selects one device used in the control program, and then the process of the development support device 2 proceeds to step S102.
[0044] (Step S102) The development support device 2 generates a device code corresponding to the device by referring to the variable type conversion table 262 and the offset management table 263. After that, 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 the current value acquisition function corresponding to the device. In other words, the development support device 2 embeds the device code at a location in the HTML data where the current value of the device is to be acquired. 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. If the setting of the current value acquisition function has been completed for all devices (step S104; YES), the development support device 2 ends the current value acquisition function setting process. On the other hand, if the setting of the current value acquisition function has not been completed for all devices (step S104; NO), the processing of the development support device 2 returns to step S101.
[0047] <Current value acquisition process> 13 is a flowchart showing the procedure of the current reading acquisition process executed by the PLC 3. When the PLC 3 receives request data from the web browser of the monitoring terminal 4, it executes the current reading acquisition process.
[0048] (Step S201) The PLC 3 references the device memory management table 363 from the device code included in the received request data to obtain the start address, and also extracts and obtains the offset address from the device code. After that, the process of the PLC 3 proceeds to step S202.
[0049] (Step S202) The PLC 3 obtains an address in the device memory 362 from the obtained start address and offset address. After that, the process of the PLC 3 proceeds to step S203.
[0050] (Step S203) The PLC 3 acquires the data value stored in the acquired address, and then 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 ends the current value acquisition process for the requested 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 a control program on a web browser of the monitoring terminal 4, and an I / F unit 200 that transmits the control program and the HTML data to the PLC 3. When generating HTML data from the control program, the HTML data generation unit 201 references the variable type conversion table 262 and the offset management table 263 to generate a corresponding device code for each device used in the control program, and embeds the generated device code in the HTML data at a location where the current value of the device is to be acquired. The variable type conversion table 262 is a table that associates a different binary code with each device type, 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 in 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) in the device memory 362 that corresponds to the device type.
[0053] The PLC3 includes a control program storage unit 360 that stores the 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 the HTML data to the monitoring terminal 4, a web server unit 302 that sends and receives data to and from the web browser, a request data analysis unit 303 that acquires the start address corresponding to the type of device from the device code included in the request data received from the web browser by referring to a device memory management table 363 that associates binary codes, device types, and start addresses, and also acquires an offset address from the device code to acquire the address of the device memory 362 where the current value of the device is stored, and a response data generation unit 304 that acquires the current value of the device from the acquired address.
[0054] With the above configuration, when PLC3 obtains the current value of a device in response to a request from a web browser, it can instantly obtain the address of the device memory 362 corresponding to that device, thereby significantly reducing the time required to obtain the current value of the device and improving user convenience.
[0055] (Variation 1) The control program may be configured to be displayed in a split manner on the web browser of the monitoring terminal 4 (i.e., on the program monitor screen 420). FIG. 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 the first embodiment (see FIG. 5), and further includes a split display setting receiving unit 202. The split display setting receiving unit 202 is an example of the split display setting receiving means according to the present disclosure. The split display setting receiving unit 202 receives, from the user, settings of the conditions (hereinafter referred to as "split display conditions") for splitting and displaying the control program on the program monitor screen 420 of the monitoring terminal 4.
[0056] In detail, the split display setting receiving unit 202 displays a split display setting screen (not shown) on the display 22 as a screen for receiving split display condition settings from the user. The user sets the split display conditions (e.g., the number of steps to split into, etc.) via the split display setting screen. The HTML data generating unit 201 generates multiple HTML data from the control program in accordance with 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 split into 300 steps, the HTML data generating 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] 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 to be displayed from among the multiple divided HTML data (see FIG. 16).
[0058] For example, when HTML data is generated for a control program with 900 steps and 600 devices, one piece of HTML data for 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, but since the HTML data to be read is for 900 steps, it is necessary to obtain the values of 600 devices from PLC3. In this case, if it takes 900 milliseconds to obtain the current values of all devices from PLC3, for example, then the web page update cycle will take more than 900 milliseconds.
[0059] On the other hand, in the configuration of this modified example, for example, if 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 are generated and the number of devices in each HTML data is 150, 250, and 200, respectively, the time required to obtain the current values of all devices in each HTML data will be 225 milliseconds, 375 milliseconds, and 300 milliseconds, and the web page update cycle can be shortened from 900 milliseconds to 225 to 375 milliseconds.In this way, in this modified example, by dividing the HTML data, the targets for obtaining current values are limited, and the processing time is shortened, thereby shortening the display update cycle in the web browser.
[0060] (Variation 2) The development support device 2 may be configured to, after writing the control program to the PLC 3, receive an instruction from the user as to whether or not to write HTML data, and when receiving an instruction from the user to write HTML data, generate HTML data and write (i.e., transmit) it to the PLC 3. Fig. 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 the first embodiment (see Fig. 5) and further includes an HTML data write instruction receiving unit 203. The HTML data write instruction receiving unit 203 is an example of an HTML data write instruction receiving means according to the present disclosure.
[0061] When writing of the control program to PLC 3 is completed, HTML data write instruction receiving unit 203 displays a data write instruction receiving screen (not shown) on display 22 to receive an instruction from the user as to whether or not to write HTML data. The user can instruct whether or not to write HTML data by operating the data write instruction receiving screen. When the user instructs to write HTML data, HTML data write instruction receiving unit 203 instructs HTML data generation unit 201 to generate HTML data, and also instructs I / F unit 200 to transmit the generated HTML data to PLC 3. Note that HTML data write instruction receiving unit 203 may receive an instruction from the user as to whether or not to write HTML data when writing of the control program to PLC 3 begins.
[0062] When frequently updating a control program during work such as debugging that does not require HTML data, generating and writing HTML data each time increases the overall writing time and reduces work efficiency. However, with the configuration of this modified example, for example, it is possible to skip the generation and writing of HTML data during work such as debugging, and instead generate and write HTML data when writing the final version of the control program, thereby reducing the time required to write to the PLC 3 during work such as debugging.
[0063] (Variation 3) All or part of the functional units of the development support device 2 (see FIG. 5) may be realized by dedicated hardware. Also, all or part of the functional units of the PLC 3 (see FIG. 5) may be realized by dedicated hardware. Also, all or part of the functional units of the monitoring terminal 4 (see FIG. 10) may be realized by dedicated hardware. Dedicated hardware is, 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 ideas according to the above-described modifications may be realized independently or in appropriate combination.
[0065] (Embodiment 2) Next, a description will be given of embodiment 2 of the present disclosure. In the following description, components and the like common to embodiment 1 will be given the same reference numerals and descriptions thereof will be omitted.
[0066] FIG. 18 is a diagram showing the overall configuration of a PLC system 1A according to the second embodiment. The PLC system 1A is an example of a program monitor system according to the present disclosure. The PLC system 1A includes 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 communicably connected to each other 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 the first embodiment (see FIG. 2).
[0067] The PLC 3A is an example of a programmable logic controller according to the present disclosure. The PLC 3A is installed in a factory, executes a control program received from the development support device 2A, and controls controlled devices (not shown) that are field devices such as sensors and actuators. The hardware configuration of the PLC 3A is the same as that of the PLC 3 according to the first embodiment (see FIG. 3).
[0068] The PLC system 1A according to this embodiment has a feature in which, when a user of a monitoring terminal 4 performs a program comparison operation on a web browser, the PLC 3A compares the control program written in the PLC 3A with the control program displayed on the web browser and notifies the user of the comparison result. This feature will be described in detail below.
[0069] <Functional configuration of development support device 2A> As shown in FIG. 19, the development support device 2A includes, as a functional configuration, an I / F unit 200, an HTML data generation unit 201, and an error detection information file generation unit 204. These functional units of the development support device 2A are realized by executing an engineering tool, which is an example of the engineering support program according to the present disclosure, stored in the auxiliary storage device 26 by the CPU 20 of the development support device 2A.
[0070] The functional configuration of the development support device 2A is different from that of the development support device 2 (see FIG. 5) according to Embodiment 1 in that it includes an error detection information file generation unit 204, and the other points of the functional configurations of both are the same. The error detection information file generation unit 204 is an example of the error detection information file generation means according to the present disclosure. When the HTML data generation unit 201 generates HTML data, 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 or the like of the control program. The error detection information is a numerical value for error detection calculated from the entire control program, and the error detection information also changes when even 1 bit of the data of the control program 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 timing when the HTML data is written to (i.e., transmitted to) the PLC 3A, or may be written to the PLC 3A only when the user instructs the execution of writing of the HTML data as in Modified Example 2 of Embodiment 1.
[0072] <Functional Configuration of PLC 3A> 20, PLC 3A has, as its functional configuration, 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 collating unit 305. These functional units of PLC 3A are realized by CPU 30 of PLC 3A executing programs stored in auxiliary storage device 36, such as a program for functioning as a Web server and a program for analyzing request data from monitoring terminal 4 and generating response data. The functional configuration of PLC 3A differs from that of PLC 3 according to embodiment 1 (see FIG. 5) in that PLC 3A includes request data analysis unit 303A, response data generation unit 304A, and collating unit 305 instead of request data analysis unit 303 and response data generation unit 304, but in other respects the functional configurations of both are similar.
[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 collation unit 305 of the analysis result. In particular, when the received request data indicates acquisition of a device's current value, the request data analysis unit 303A performs the same process as the request data analysis unit 303 in the first embodiment and notifies the response data generation unit 304A of the address of the device memory 362, which is the analysis result. Upon receiving this notification, the response data generation unit 304A accesses the address and acquires the device's current value. The response data generation unit 304A notifies the web server unit 302 of the response data that stores the acquired device's current value, and the web server unit 302 transmits the response data via the I / F unit 300 to the web browser that originated the request (i.e., the web browser of the monitoring terminal 4).
[0074] On the other hand, if the received request data indicates program verification, the request data analysis unit 303A notifies the verification unit 305 of that fact. The request data in this case is an example of a program verification request according to the present disclosure. As shown in FIG. 21 , in this embodiment, a program monitor screen 420 displayed on the display 42 of the monitoring terminal 4 is provided with a program verification button 424, which is a GUI button. When the user presses the program verification button 424, request data requesting program verification is transmitted to the Web server unit 302 of the PLC 3A.
[0075] The collation unit 305 is an example of a collation means according to the present disclosure. Upon receiving the above notification from the request data analysis unit 303A, the collation unit 305 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 collation unit 305 notifies the response data generation unit 304A of the collation result (match or mismatch). The response data generation unit 304A generates response data according to the collation result of the collation unit 305 and notifies the web server unit 302 of the generated response data. Web server unit 302 transmits the response data to the requesting web browser (i.e., the web browser of monitoring terminal 4) via I / F unit 300. Web server unit 302 and I / F unit 300 are an example of a matching result transmission means according to the present disclosure.
[0076] When the web browser of the monitoring terminal 4 receives the response data indicating the program collation result, it displays a collation result notification screen 425 on the program monitor screen 420 as shown in FIGS.
[0077] As described above, according to the PLC system 1A of this embodiment, it is possible to notify the user whether 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 Variation 2 of Embodiment 1, if the control program and HTML data are written to PLC 3A at different times, it may happen that the displayed control program does not match the control program stored in control program storage unit 360 of PLC 3A. In this embodiment, the user can check at any time whether the control program displayed on program monitor screen 420 matches the control program stored in control program storage unit 360 of PLC 3A, and only if there is a mismatch can the user contact the operator of development support device 2A to have the HTML data written to PLC 3A. As a result, there is no need to write HTML data every time a control program is written to PLC 3A, and the number of times HTML data is written is reduced, improving work efficiency.
[0079] (Variation 1) In PLC 3A, control program storage unit 360 may store multiple different control programs, and HTML data storage unit 361 may store multiple HTML data corresponding to these control programs. Therefore, a user may be allowed to specify one or multiple pairs of control programs and HTML data via program monitor screen 420, and request data requesting program matching for each pair may be sent to PLC 3A's Web server unit 302. In this case, matching unit 305 executes program matching for each specified pair. Response data indicating the matching results for each pair is then sent to the Web browser of monitoring terminal 4, and matching result notification screen 425 indicating the matching results is displayed on program monitor screen 420.
[0080] (Variation 2) All or part of the functional units of the development support device 2A (see FIG. 19) may be realized by dedicated hardware. Also, all or part of the functional units of the PLC 3A (see FIG. 20) may be realized by dedicated hardware. Dedicated hardware is, for example, a single circuit, a composite circuit, a programmed processor, an ASIC, an FPGA, or a combination thereof.
[0081] (Variation 3) The configurations of the first and second modifications of the first embodiment can also be applied to the PLC system 1A in this embodiment.
[0082] The technical ideas according to the above-described modifications may be realized independently or in appropriate combination.
[0083] The present disclosure allows various embodiments and modifications without departing from the broad spirit and scope. Furthermore, the above-described embodiments are intended to explain the present disclosure and do not limit the scope of the present disclosure. In other words, the scope of the present disclosure is defined by the claims, not the embodiments. Various modifications made within the scope of the claims and within the meaning of the disclosure equivalent thereto are considered to be within the scope of the present disclosure. [Industrial Applicability]
[0084] The present disclosure can be suitably adopted in a system equipped with a PLC. [Explanation of symbols]
[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 matching 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 matching button, 425 matching result notification screen
Claims
1. A development support device and a programmable logic controller are provided, The development support device an HTML data generating 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; a data transmission means for transmitting the control program and the HTML data to the programmable logic controller; when generating the HTML data from the control program, the HTML data generation means refers to a variable type conversion table and an offset management table for each device used in the control program to generate a device code, which is a corresponding binary code, and embeds the generated device code in a portion of the HTML data where a current value of the device is to be acquired; the variable type conversion table is a table in which different binary codes are associated with each type of device, the offset management table is a table that associates each device whose name is defined by a user with an offset address that is a difference value between an address of a device memory in the programmable logic controller where a value of the device is stored and a top address of a memory area in the device memory that corresponds to the type of the device, the device code is a combination of the start address and the offset address, The programmable logic controller a control program storage means for storing the control program received from the development support device; an HTML data storage means for storing the HTML data received from the development support device; the device memory; a control program execution means for executing the control program; HTML data transmission means for transmitting the HTML data to the monitoring terminal; a web server means for transmitting and receiving data to and from the web browser; an address acquisition means for acquiring 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 start addresses from the device code included in the current value acquisition request received from the web browser and acquiring the start address corresponding to the type of the device, and acquiring the offset address from the device code; a current value acquisition means for acquiring a current value of the device from the acquired address; and a current value transmission means for transmitting the acquired current value to the web browser. Program monitor system.
2. a split display setting receiving means for receiving from a user a setting of a split display condition when the control program is to be split and displayed on the web browser; The HTML data generating means generates a plurality of pieces of HTML data from the control program in accordance with the split display conditions.
2. The program monitor system of claim 1.
3. further comprising an HTML data write instruction receiving means for receiving an instruction from a user as to whether or not to write the HTML data to the programmable logic controller; when a user instructs to write the HTML data, the HTML data generating means generates the HTML data, and the data transmitting means transmits the generated HTML data to the programmable logic controller.
3. A program monitor system according to claim 1 or 2.
4. the development support device further comprises an error-detection information file generation means for extracting error-detection information from the control program when the HTML data is generated by the HTML data generation means, and generating an error-detection information file in which the extracted error-detection information is stored; The data transmission means further transmits the error detection information file to the programmable logic controller; The programmable logic controller an error detection information file storage means for storing the error detection information file received from the monitoring terminal; a comparison means for comparing, when a program comparison request is received from the web browser, error detection information extracted from the control program stored in the control program storage means with error detection information stored in an error detection information file stored in the error detection information file storage means; a matching result sending means for sending the matching result of the matching means to the web browser; 3. A program monitor system according to claim 1 or 2.
5. Computer, an HTML data generating means for generating HTML data for displaying a control program to be executed by the programmable logic controller on a web browser of the monitoring terminal; a data transmission means for transmitting the control program and the HTML data to the programmable logic controller; when generating the HTML data from the control program, the HTML data generation means refers to a variable type conversion table and an offset management table for each device used in the control program to generate a device code, which is a corresponding binary code, and embeds the generated device code in a portion of the HTML data where a current value of the device is to be acquired; the variable type conversion table is a table in which different binary codes are associated with each type of device, the offset management table is a table that associates each device whose name is defined by a user with an offset address that is a difference value between an address of a device memory in the programmable logic controller where a value of the device is stored and a top address of a memory area in the device memory that corresponds to the type of the device, The device code is a combination of the start address and the offset address. Engineering assistance program.
6. a control program storage means for storing a control program received from the development support device; an 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; a device memory for storing current values of each device used in the control program; a control program execution means for executing the control program; HTML data transmission means for transmitting the HTML data to the monitoring terminal; a web server means for transmitting and receiving data to and from the web browser; an address acquisition means for acquiring 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 start addresses from a device code, which is a binary code corresponding to the device, included in the current value acquisition request received from the web browser, and acquiring from the device code an offset address that is the difference between the address of the device memory where the value of the device is stored and the start address corresponding to the type of the device; a current value acquisition means for acquiring a current value of the device from the acquired address; and a current value transmission means for transmitting the acquired current value to the web browser. Programmable logic controller.
7. Development support equipment, generating HTML data for displaying a control program to be executed by the programmable logic controller on a web browser of the monitoring terminal; transmitting the control program and the HTML data to the programmable logic controller; when generating the HTML data from the control program, for each device used in the control program, generating a device code, which is a corresponding binary code, by referring to a variable type conversion table and an offset management table, and embedding the generated device code in a portion of the HTML data where a current value of the device is to be acquired; the variable type conversion table is a table in which different binary codes are associated with each type of device, the offset management table is a table that associates each device whose name is defined by a user with an offset address that is a difference value between an address of a device memory in the programmable logic controller where a value of the device is stored and a top address of a memory area in the device memory that corresponds to the type of the device, the device code is a combination of the start address and the offset address, The programmable logic controller storing the control program received from the development support device in a control program storage means; storing the HTML data received from the development support device in an HTML data storage means; Execute the control program; Sending the HTML data to the monitoring terminal; a device memory management table that associates binary codes with start addresses and acquires a start address corresponding to the type of the device from the device code included in the current value acquisition request received from the Web browser, and acquires the offset address from the device code, thereby acquiring the address of the device memory where the current value of the device is stored; Obtaining the current value of the device from the obtained address; transmitting the acquired current value to the web browser; Program monitoring method.
Citation Information
Patent Citations
Control system for drive device
JP2013219974A
Industrial wireless system, primary radio node, and secondary radio node
JP2025001528A
Monitoring control device
WO2014188492A1
Controller and recording medium with its program recorded
JP2002189508A