Programmable Logic Controller
By introducing the first and second execution engines for asynchronous execution into the programmable logic controller, the collection unit, the buffer and the transmission unit are used to solve the problem of untimely data collection and transmission caused by the different control cycles of the expansion unit and the basic unit, the data collection and transmission efficiency are improved, and the operating efficiency of industrial machines is improved.
Patent Information
- Application Number
- CN202011051992.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-06-29
- Filing Date
- 2020-09-29
- Publication Date
- 2025-08-19
- Estimated Expiration
- 2040-09-29
AI Technical Summary
In a programmable logic controller, the control cycle of the expansion unit and the basic unit is different, resulting in untimely data collection and transmission, which affects the operating efficiency of industrial machines.
By using the asynchronous operation of the first execution engine and the second execution engine, the monitoring object data is efficiently collected and transmitted by the collection unit, the buffer and the transmission unit, and the display data is generated by the processing unit and the generation unit, and provided to the external computer.
It realizes efficient collection and transmission of monitoring object data in programmable logic controllers, reduces the extension of scanning cycles, and improves the operating efficiency of industrial machines.
Smart Images

Figure CN112612239B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a programmable logic controller. Background Art
[0002] A programmable logic controller (PLC) is a controller used to control industrial machines such as manufacturing equipment, conveying equipment, and inspection equipment in factory automation (Japanese Patent 5661222 (Patent Document 1) and Japanese Patent Application Laid-Open No. 2018-097662 (Patent Document 2)).
[0003] The PLC executes a user program such as a ladder program created by a programmer to control various expansion units and controlled devices.
[0004] Incidentally, in order to monitor the operation of a programmable logic controller (PLC) and the industrial machinery it controls, it is desirable to collect and utilize the data held by the PLC. A PLC includes a base unit (CPU unit) and an expansion unit connected to the base unit. The base unit executes a user program, such as a ladder program, to control the expansion unit. The expansion unit controls the industrial machinery based on commands from the base unit and returns the control results to the base unit. To reduce the load on the base unit, the inventors envisioned connecting a data utilization unit to the base unit as one of the expansion units. However, since the control cycle of the expansion unit differs from the control cycle of the base unit (the scan cycle of the user program), various problems may arise. For example, when the expansion unit collects device values from the device memory of the base unit according to the control cycle of the expansion unit, the expansion unit will not be able to obtain data refreshed during each scan cycle of the base unit. In other words, the expansion unit can only collect one device value per multiple scan cycles. On the other hand, when the base unit collects and transmits device values during the end processing period at the end of a scan cycle, the base unit cannot transition to the next scan cycle until the collection and transmission of the device values are complete. In other words, the scan cycle is extended, and the operating efficiency of the industrial machinery decreases. Summary of the Invention
[0005] Therefore, an object of the present invention is to efficiently collect and transmit monitoring object data in a PLC.
[0006] The present invention, for example, provides a programmable logic controller, comprising: a first execution engine configured to repeatedly execute a first user program; a plurality of holding units, which are devices or variables configured to store data accessed by the first execution engine according to the first user program; a second execution engine configured to execute the second user program asynchronously with a scan cycle of the first user program; a bus configured to connect the first execution engine and the second execution engine; a collection unit configured to collect data stored in a collection target holding unit among the plurality of holding units in each scan cycle of the first user program according to a predetermined collection setting; a first buffer configured to accumulate time series data collected by the collection unit in each scan cycle; and a transmission unit configured to transmit the time series data stored in the first buffer to the second execution engine via the bus, wherein the second execution engine comprises: a processing unit configured to perform data processing on the time series data transmitted by the transmission unit according to a predetermined processing setting; a generation unit configured to generate display data for displaying the processing results of the data processing on a dashboard; and a providing unit configured to provide the display data to an external computer.
[0007] A programmable logic controller comprises: a basic unit; and an expansion unit connected to the basic unit, wherein the basic unit comprises: an execution engine configured to repeatedly execute a user program; a plurality of holding units, which are devices or variables configured to store data accessed by the execution engine according to the user program; a collection unit configured to collect data stored in a collection target holding unit among the plurality of holding units according to a predetermined collection setting in each scan cycle of the user program; a first buffer configured to accumulate time series data collected by the collection unit in each scan cycle; and a transmission unit configured to transmit the time series data stored in the first buffer to a data utilization unit, which is the expansion unit connected via a bus, wherein the data utilization unit comprises: a processing unit configured to perform data processing on the time series data transmitted by the transmission unit according to a predetermined processing setting; a generation unit configured to generate display data for displaying the processing results of the data processing on a dashboard; and a providing unit configured to provide the display data to an external computer.
[0008] According to the present invention, monitoring target data can be efficiently collected and transmitted in a PLC. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 A diagram showing a PLC system;
[0010] Figure 2 It is a diagram used to illustrate PC;
[0011] Figure 3 It is a diagram used to illustrate PC;
[0012] Figure 4 It is a diagram used to illustrate PLC;
[0013] Figure 5 is a diagram used to illustrate the basic unit;
[0014] Figure 6 is a diagram for explaining a data utilization unit;
[0015] Figure 7 is a diagram for explaining an expansion unit;
[0016] Figure 8 is a diagram used to illustrate the format of data records;
[0017] Figure 9 is a diagram for explaining transmission timing;
[0018] Figure 10 is a diagram used to illustrate the format of data records;
[0019] Figure 11 is a diagram used to illustrate information compression;
[0020] Figure 12 is a diagram showing an example of a dashboard;
[0021] Figure 13 is a flow chart illustrating a collection and transmission method;
[0022] Figure 14 is a flow chart illustrating a collection and transmission method;
[0023] Figure 15 is a flow chart illustrating a collection and transmission method;
[0024] Figure 16 FIG. 1 is a diagram for explaining an example of using a secondary buffer;
[0025] Figure 17 is a diagram illustrating a dashboard display screen used for status monitoring;
[0026] Figure 18 is a diagram illustrating a dashboard display screen used for setting;
[0027] Figure 19 is a flow chart illustrating a real-time monitoring method;
[0028] Figure 20 is a flowchart illustrating a reset method in a data utilization unit;
[0029] Figure 21is a flowchart illustrating a dynamic change process for a monitoring object; and
[0030] Figure 22 is a diagram showing collected data during a dynamic change of a monitoring target. DETAILED DESCRIPTION
[0031] The base unit 3 includes a display 5 and an operation unit 6. The display 5 can display, for example, the operating status of the expansion unit 4 attached to the base unit 3. The display 5 switches its display content based on the operation performed on the operation unit 6. The display 5 typically displays the current values (device values) of devices in the PLC 1, as well as information related to errors occurring in the PLC 1. "Device" is the name for an area in memory provided for storing device values (device data) and can also be referred to as "device memory." Device values are information representing the input status from input devices, the output status to output devices, and the status of internal relays (auxiliary relays), timers, counters, and data memory configured in the user program. Device value types include bit and word types. A bit device stores a 1-bit device value. A word device stores a 1-word device value. As collection targets for the data utilization program, described in detail below, not only devices but also variables can be specified. However, both devices and variables are components used to store information. Therefore, in the following description, "device" also refers to variables. Memory that stores devices can be referred to as "device memory." Memory that stores collected data can be referred to as "data memory."
[0032] The expansion unit 4a is a data collection unit that collects collection target data from the base unit 3 and the expansion unit 4b, executes a user program (data utilization program) such as a flow to apply data processing to the collection target data and create display target data, and creates display data (source data) for displaying the dashboard on the display unit 7 or the PC 2. The flow (flow program) described below is merely an example of a data utilization program. The base unit 3 is sometimes also referred to as a CPU unit. Note that a system including the PLC 1 and the PC 2 may be referred to as a programmable logic controller system.
[0033] PC 2a is a computer mainly operated by a programmer. On the other hand, PC 2b is a computer mainly operated by a person in charge of on-site management. PC 2a can also be referred to as a program creation support device (setting device). PC 2 is, for example, a personal computer or a smart phone of a portable notebook type or a tablet type, and is an external computer including a display unit 7 and an operating unit 8. The external computer is a computer existing outside of PLC 1. PC 2a is used to create a ladder program as an example of a user program for controlling PLC 1. The created ladder program is converted into mnemonics in PC 2a. PC 2 is connected to the basic unit 3 of PLC 1 via a communication cable 9 such as a USB (Universal Serial Bus) cable. For example, PC 2a sends the ladder program converted into mnemonics to basic unit 3. Basic unit 3 converts the ladder program into machine code and stores the machine code in a memory included in basic unit 3. Note that although the mnemonics are sent to basic unit 3, the present invention is not limited to this. For example, the PC 2 a may convert the mnemonic code into an intermediate code and transmit the intermediate code to the base unit 3 .
[0034] Program creation support device
[0035] Figure 2 2a is a block diagram for explaining the electrical structure of PC 2a. Figure 2 As shown, PC 2a includes a CPU 11a, a display unit 7a, an operating unit 8a, a storage device 12a, and a communication unit 13a. The display unit 7a, operating unit 8a, storage device 12a, and communication unit 13a are each electrically connected to the CPU 11a. The storage device 12a includes RAM, ROM, HDD, and SSD, and may also include a removable memory card. CPU is the abbreviation for Central Processing Unit. ROM is the abbreviation for Read Only Memory. RAM is the abbreviation for Random Access Memory. HDD is the abbreviation for Hard Disk Drive. SSD is the abbreviation for Solid State Drive.
[0036] The user of PC 2a causes CPU 11a to execute project editing program 14a stored in storage device 12a and edit project data 15 through operation unit 8a. CPU 11a executes project editing program 14a, thereby implementing project creation unit 16 and project transfer unit 17. Project creation unit 16 creates project data 15 based on user input. Project transfer unit 17 transfers project data 15 to PLC 1. Project data 15 includes one or more user programs (e.g., ladder diagram programs) and configuration information for the base unit 3 and expansion units 4. This configuration information includes information indicating the connection locations of multiple expansion units 4 to the base unit 3, the functions of the base unit 3 (e.g., communication and positioning functions), and the functions of the expansion units 4 (e.g., imaging functions). Editing project data 15 includes both creating and modifying (re-editing) project data 15. The user can read project data 15 stored in storage device 12a and modify it using project editing program 14a as needed. Communication unit 13a communicates with base unit 3 via communication cable 9a. The project transmitting unit 17 transmits the project data to the base unit 3 via the communication unit 13a. The communication unit 13a communicates with the extension unit 4a via the communication cable 9b.
[0037] PC used for dashboard display
[0038] Figure 3 2b is a block diagram for explaining the electrical structure of PC 2b. Figure 3 As shown, PC 2b includes CPU 11b, display unit 7b, operation unit 8b, storage device 12b, and communication unit 13b. Display unit 7b, operation unit 8b, storage device 12b, and communication unit 13b are electrically connected to CPU 11b. Storage device 12b includes RAM, ROM, HDD, and SSD, and may also include a removable memory card.
[0039] The CPU 11b executes the Web browser program 14d to realize the Web browser 18. The Web browser 18 accesses the setting page of the data utilization application provided by the extension unit 4a via the communication section 13b, and accesses a page of the dashboard.
[0040] PLC
[0041] Figure 4 This is a block diagram for explaining the electrical structure of PLC 1. Figure 4As shown, the basic unit 3 includes a CPU 31, a display unit 5, an operation unit 6, a storage device 32, and a communication unit 33. The display unit 5, the operation unit 6, the storage device 32, and the communication unit 33 are electrically connected to the CPU 31, respectively. The storage device 32 may include a RAM, a ROM, and a memory card. The storage device 32 includes a plurality of storage areas such as a device unit 34a and a project storage unit 35. The device unit 34a includes a bit device and a word device. These devices store device values. The project storage unit 35 stores project data input from the PC 2a. The storage device 32 also stores the control program used by the basic unit 3. Figure 4 As shown, the base unit 3 and the expansion unit 4 are connected via an expansion bus 90 which is a kind of communication bus. Figure 4 In the embodiment, the communication circuit related to the expansion bus 90 is implemented in the CPU 31, but may be implemented as a part of the communication unit 33. The communication unit 33 may include a network communication circuit. The CPU 31 receives the project data from the PC 2a via the communication unit 33.
[0042] The expansion bus 90 will be further described. The expansion bus 90 is a communication bus used for input and output refresh. Input and output refresh is a process for updating device values between the base unit 3 and the expansion unit 4. Input and output refresh is performed each time the ladder program is executed (i.e., in each scan). Note that one scan cycle includes the execution period for input and output refresh, the execution period for the user program, and the execution period for the end processing.
[0043] The CPU 41a of the expansion unit 4a, which serves as a data utilization unit, communicates with the PC 2b via the communication unit 43 and the cable 9b. The data utilization unit is an expansion unit that executes a data utilization application. The data utilization application includes a flow for collecting control data and performing data processing, as well as a dashboard that displays the execution results of the flow. Note that the function of collecting control data can be implemented by a user program other than the data utilization program. The flow can include an arithmetic operation block for collecting data, an arithmetic operation block for performing data processing, and an arithmetic operation block for creating display data. The dashboard includes a graphical display component and a numerical display component. These display components can be implemented using HTML data, CSS data, and JavaScript (registered trademark) code, etc. Note that the aggregation of HTML data, CSS data, and JavaScript (registered trademark) code can be referred to as a Web application. In this embodiment, the flow is implemented using a flow template. The flow template is prepared in advance for each application. The flow template includes one or more arithmetic operation blocks with user-specified parameters. The dashboard is also implemented using a template. The dashboard template includes one or more display components with user-specified parameters. These parameters are, for example, various information such as the name of the dashboard, the name of the device, a numerical value, and the name of a unit variable, etc. The unit variable is a variable used by the extension unit 4a to hold the execution result of the flow.
[0044] Functions implemented by the CPU of the basic unit
[0045] Figure 5The functions implemented by the CPU 31 regarding data utilization are shown. The execution engine 51a repeatedly executes the user program during each scan cycle. The execution engine 51a can be implemented by an ASIC or FPGA, etc., located outside the CPU 31. ASIC stands for Application-Specific Integrated Circuit. FPGA stands for Field-Programmable Gate Array. These dedicated circuits can generally perform specific data processing at a higher speed than a combination of a CPU and a program. The collection unit 52a collects the device values to be collected from the device unit 34a during the end processing period of the scan cycle, creates a data record, and stores the data record in the first buffer 37a. Note that data collection during the end processing period is not required. The description for collecting data (such as program code for trigger commands) can be included in the user program executed by the execution engine 51a. However, when data is collected through the end processing, there is an advantage in not requiring changes to the user program. The collection cycle can be a cycle specified by the collection settings 36a. By providing the first buffer 37a, the execution engine 51a is less susceptible to the effects of, for example, extended scan times due to the collection and transmission process. The device values to be collected are specified by the collection settings 36a. The collection settings 36a can be stored in the basic unit 3 by the PC 2a or the expansion unit 4a. The transmission unit 53a transmits one or more data records stored in the first buffer 37a to the expansion unit 4a via the expansion bus 90. Note that the transmission unit 53a performs the transmission process when the communication traffic in the expansion bus 90 is idle. Therefore, the transmission process is performed to avoid the time period when the execution engine 51a is performing input and output refresh, and the time period when data is read out from the buffer memory of the expansion unit 4 according to the read command described in the user program. Note that the communication traffic in the expansion bus 90 is monitored by the monitoring unit 54a. In order to reduce the transmission time of the data records, the compression engine 55a can compress multiple data records. The compression engine 55a does not need to be implemented by the CPU 31 and can be implemented by an ASIC or FPGA, etc. By adopting the first buffer 37a in this way, the transmission process and the user program can be executed asynchronously.
[0046] Functions of the data utilization unit
[0047] Figure 6 It is a diagram for explaining functions realized by the CPU 41a of the extension unit 4a.
[0048] The collection unit 52c is a function that collects data according to the collection settings 39. The collection unit 52c can be implemented by the CPU 41a executing a control program, such as a user program. The collection unit 52c configures the base unit 3 to collect device values specified by the collection settings 39 and transmits these device values to the second buffer 37b of the extension unit 4a. Note that the collection unit 52c can write the collection settings 36a of the base unit 3 included in the collection settings 39 to the storage device 32 of the base unit 3. The collection unit 52c and the data processing unit 73 can desirably operate substantially asynchronously. A buffer can be provided to achieve this.
[0049] The collection section 52c can set the extension unit 4b to collect the device value specified by the collection setting 39 and transfer the device value to the third buffer 37c of the extension unit 4a. By setting the second buffer 37b and the third buffer 37c, data can be collected even if the processing load of the data processing section 73 fluctuates. The collection section 52c can set the collection setting 36b ( Figure 7 ) is written into the memory 42b of the extension unit 4b. Note that these setting functions can be implemented by the setting unit 71. The setting unit 71 receives the collection settings 39, the processing settings 61 and the display settings 62 from PC 2a or PC 2b, and writes the collection settings 39, the processing settings 61 and the display settings 62 into the memory 42a. The processing settings 61 include a flow (program) for defining the data processing performed by the data processing unit 73 on the collected data. The display settings 62 include a template (HTML data, CSS or Java Script (registered trademark) code, etc.) of the dashboard that provides the data processing results to the Web browser 18 via the Web server 70. The generation unit 74 substitutes the data processing results into the template of the dashboard according to the display settings 62 for defining the display components of the dashboard to create the display data of the dashboard. The display data can be, for example, HTML data or image data, CSS (Cascading Style Sheets) or Java Script (registered trademark) code, etc. The display components include, for example, a pie chart component, a bar chart component, a line chart component or a numerical display component. When the web page of the dashboard is accessed through the web browser 18, the web server 70 transmits the display data of the dashboard to the web browser 18. The web browser 18 receives the display data and displays the dashboard.
[0050] Note that multiple data utilization applications may be provided. In such cases, the required data and readout timing may differ for each data utilization application. In such cases, a sub-buffer may be reserved in the memory 42a for each data utilization application. The collection unit 52c reads the data records stored in the second buffer 37b and stores the data for the first data utilization application in the first sub-buffer 38a. The collection unit 52c reads the data records stored in the second buffer 37b and stores the data for the second data utilization application in the second sub-buffer 38b. Note that the collection unit 52c can also read the data records stored in the third buffer 37c and store the data for the first data utilization application in the first sub-buffer 38a. The collection unit 52c can also read the data records stored in the third buffer 37c and store the data for the second data utilization application in the second sub-buffer 38b. The data processing unit 73 reads data from the first sub-buffer 38a based on the first data utilization application, performs data processing on the data, and generates a processing result. The data processing unit 73 reads data from the second sub-buffer 38b based on the second data utilization application, performs data processing on the data, and generates a processing result. The decompression engine 75 functions as a pair with the compression engine 55a of the base unit 3 and the compression engine 55b of the expansion unit 4b. The decompression engine 75 decompresses data compressed and transmitted by the base unit 3 and stores the data in the second buffer 37b. The decompression engine 75 decompresses data compressed and transmitted by the expansion unit 4b and stores the data in the third buffer 37c. This reduces traffic congestion on the expansion bus 90. The decompression engine 75 can be implemented using an ASIC or FPGA. In this manner, data is transferred between the base unit 3 and the expansion units 4a and 4b via the expansion bus 90.
[0051] Sometimes, multiple data are required for each data utilization application. In this case, the required multiple data are sometimes stored in the secondary buffer, and the blocks of data collected by scanning are maintained in the buffer. In addition, when the data is allocated to the secondary buffer, a time stamp or the like can be provided to the record. Figure 16As shown, the second buffer 37b (or third buffer 37c) holds blocks of collected data. A record includes a scan number, a timer value (timestamp), and the collected data. In this example, the collected data includes relays RL1 to RL3 and devices Dev1 and Dev2. The first data utilization application 1601 requires relays RL1 to RL3 from the collected data. Therefore, the scan number, timer value, and relays RL1 to RL3 are read from the second buffer 37b and stored in the first sub-buffer 38a. The first data utilization application 1601 reads the scan number, timer value, and relays RL1 to RL3 from the first sub-buffer 38a and creates a display screen (source data). The second data utilization application 1602 requires relay RL3 and devices Dev1 and Dev2 from the collected data. Therefore, the scan number, timer value, relay RL3, and devices Dev1 and Dev2 are read from the second buffer 37b and stored in the second sub-buffer 38b. The second data utilization application 1602 reads the scan number, the timer value, the relay RL3, and the devices Dev1 and Dev2 from the second secondary buffer 38b and creates a display screen (source data). By utilizing the secondary buffer in this manner, the original data can be maintained in the buffer without changing the original data. The original data retained in the buffer can be used for other purposes.
[0052] Functions of the extension unit 4b related to data utilization
[0053] Figure 7 It is a diagram for explaining functions realized by the CPU 41b of the extension unit 4b.
[0054] The execution engine 51b performs the basic functions of the expansion unit 4b (for example, executing the motion flow in the motion unit). The collection unit 52b collects the data specified by the collection setting 36b from the device unit 34b at the timing specified by the collection setting 36b and stores the data in the fourth buffer 37d. The transmission unit 53b reads out the data record stored in the fourth buffer 37d at the timing specified by the collection setting 36b or when the extension unit 4a receives a transmission request, and transmits the data record to the third buffer 37c of the extension unit 4a via the expansion bus 90. Note that the transmission unit 53b can execute the transmission of data records when the communication traffic of the expansion bus 90 monitored by the monitoring unit 54b is small. The compression engine 55b compresses the data records according to the collection setting 36b. In other words, the transmission unit 53b can transmit the data records compressed by the compression engine 55b to the expansion unit 4a. The compression engine 55b can be implemented by the CPU 41b. However, from the viewpoint of high-speed processing and the viewpoint of reducing the processing load of the CPU 41b, the compression engine 55b may be realized by an ASIC or an FPGA.
[0055] Example of data logging
[0056] Figure 8 : Data records 91 written into the first buffer 37a by the collection unit 52a are shown. The plurality of data records 91 are examples of time series data. In this example, the collection unit 52a collects device values with device names Dev0, Dev1, and Dev10 from the device unit 34a in each scanning cycle, adds the collection count and the time information obtained from the timer to the device value, creates a data record, and stores the data record in the first buffer 37a. Note that the collection object can be data stored in the buffer memory or a device assigned to the expansion unit 4b. In this example, the first buffer 37a is a FIFO (first in, first out) type buffer. The collection count is the count value of the counter that counts up each time a data record is collected. The collection count is a number given sequentially. Therefore, the collection count is useful for detecting omissions and compression of data records.
[0057] Moment information such as timestamps is useful, for example, when displaying data acquired by the base unit 3 and data acquired by the expansion unit 4b in a comparable manner on a dashboard. Typically, the collection timing in the base unit 3 is inconsistent with the collection timing in the expansion unit 4b. Therefore, in order to compare the operation of the base unit 3 and the operation of the expansion unit 4b, information is required to link the data of the base unit 3 and the data of the expansion unit 4b. Typically, the base unit 3 and the expansion units 4a and 4b can synchronize moment information via inter-unit synchronization, etc. Therefore, the base unit 3 and the expansion unit 4 each provide the moment information when the data record is collected to the data record. Therefore, the data processing unit 73 can match multiple data records acquired by different units on the time axis.
[0058] Transmission timing
[0059] Figure 9 is a diagram for explaining the transmission timing of data records. Figure 9As shown, PLC 1 repeatedly executes input and output refresh, user program, and end processing. In order to reduce the extension of the scan cycle, transfer processing is performed to avoid the time period of input and output refresh. Similarly, in order to reduce the extension of the scan cycle, transfer processing is performed to avoid the execution time period of UREAD and UWRIT. UREAD is a command for reading data from the buffer memory allocated to the expansion unit 4 and is described in the user program. Therefore, during the execution time period of the user program, the basic unit 3 accesses the expansion unit 4 and obtains data from the buffer memory according to UREAD. UWRIT is a command for writing data to the buffer memory allocated to the expansion unit 4 and is described in the user program. During the execution time period of the user program, the basic unit 3 accesses the expansion unit 4 and writes data to the buffer memory according to UWRIT.
[0060] like Figure 9 As shown, the transfer process is executed in the expansion bus 90 during the transferable period excluding input and output refresh, UREAD, and UWRIT. For example, it is assumed that the transfer process is set to be executed for every five data records using the collection setting 36a. In this case, the transfer section 53a executes the transfer process after the accumulation of five data records in the first buffer 37a is completed and during the first transferable period or when the extension unit 4a receives a transfer request.
[0061] Changes to collection settings
[0062] Data collection may be performed throughout the factory's operating hours, for example. In this case, the collection settings used in the morning and in the afternoon may differ. In this case, it would be convenient if it were possible to easily identify which of the multiple data records was acquired based on the first collection setting and which was acquired based on the second collection setting.
[0063] Figure 10The format of the data record 91 that can be adapted to mid-change of the collection setting is shown. In this example, identification information for distinguishing multiple collection settings is added to the data record 91. Identification information "1" corresponds to the first collection setting. In the first collection setting, the collection object devices are Dev1 and Dev10. Identification information "2" corresponds to the second collection setting. In the second collection setting, the collection object devices are Dev1, Dev10, and Dev11. When this format is adopted, the data processing section 73 is able to divide the data processing objects for each collection setting and perform data processing. For example, identification information "1" can correspond to the first data processing setting, and identification information "2" can correspond to the second data processing setting. The data processing section 73 can obtain the data processing setting corresponding to the identification information from the processing setting 61, and apply data processing to the data record according to the obtained data processing setting.
[0064] Information compression
[0065] Figure 11 This diagram illustrates information compression in data records. Data record group 92a indicates data records before information compression. Four relay devices RL1, RL2, RL3, and RL4 are designated as collection targets. The scan number is used as the collection counter. The counter can be time information acquired by a timer or the like (for example, a numerical value indicating the time interval from when a relay is turned on to when it is turned off). In data record group 92a, there is no relay device change point between the data record with scan number "1" and the data record with scan number "2." In other words, the data record with scan number "2" can be compressed (discarded or deleted). However, the relay device RL1 in the data record with scan number "3" is different from the relay device RL1 in the data record with scan number "1." Since scan number "3" has such a change point, the data record with scan number "3" is not compressed. Since there is no relay device change point between the data record with scan number "3" and the data record with scan number "4," the data record with scan number "4" can be compressed. Similarly, since there is no change point in the relay device between the data record with scan number "5" and the data record with scan number "6," the data record with scan number "6" can be compressed. By performing this information compression with a focus on change points, compressed data record group 92b is implemented. The data records that form compressed data record group 92b have change points.
[0066] like Figure 16As shown, the scan number, timer value, and relays RL1-RL3 can be read from the second buffer 37b (or third buffer 37c), compressed, and stored in the first sub-buffer 38a. During a period when there are no relay device change points, the scan number (e.g., 2), timer value (e.g., 450), and relays RL1-RL3 (e.g., on, off, off) may not be stored in the first sub-buffer 38a. When there are relay device change points, the scan number (e.g., 3), timer value (e.g., 560), and relays RL1-RL3 (e.g., off, off, off) can be read from the second buffer 37b (or third buffer 37c) and stored in the first sub-buffer 38a. The first data utilization application 1601 reads the scan number, timer value, and relays RL1-RL3 from the first sub-buffer 38a and creates a display screen (source data).
[0067] Example of a dashboard
[0068] Figure 12 The UI 130 of the web browser 18 is shown. UI 130 includes a URL input section 131 and a dashboard display area 105. The URL assigned to the dashboard is input into URL input section 131. Display area 105 displays the data processing results calculated by the data processing section 73 based on the collected data. In this example, waveforms for relay devices RL1 and RL2 are included. Since data records are collected every scan cycle, a large amount of data records can be collected if data collection continues throughout the day, for example. The data processing section 73 superimposes and displays multiple waveforms acquired for relay device RL1, using the rising timing of relay device RL1 as a reference. In this example, the falling timing of relay device RL1 is offset. For example, the data processing section 73 can calculate the average of the multiple waveforms and display the waveform corresponding to this average using a bold line. Regarding the offset in the falling timing, there may be an acceptable range dX1. If the timing of each falling timing is within the acceptable range dX1, the data processing section 73 can determine that the data processing is acceptable. The data processing section 73 can perform the same processing for relay device RL2. However, since the rising offset is not included in the acceptable range dX2 regarding the relay device RL2 , the data processing unit 73 can determine that the data processing is unacceptable.
[0069] When a failure occurs, the CPU 41a can send an error report email to a predetermined email address. The error report email may include a link to the URL of the dashboard. The recipient of the error report email clicks the link to start the web browser 18, display the dashboard, and confirm the waveform to eliminate the cause of the error.
[0070] Note that there is a motion unit as an extension unit 4b. The motion unit uses the base unit 3 to operate the industrial machine according to the command value and stores the operation results of the industrial machine. The command value can be, for example, the coordinates of the arm of an arm-type robot. The operation result (current value) can be the coordinates of the actual arm acquired by sensors, etc. The extension unit 4a can obtain the command value and the current value corresponding to the command value from the extension unit 4b as time series data, and display the deviation between the command value and the current value on the dashboard. The data processing unit 73 can calculate the difference between the command value and the current value and display a graph showing how the difference changes over time on the dashboard. By confirming such a waveform, the user can easily determine whether the cause of the error is the life of the consumable or an unexpected event imposed from the outside. For example, when the life of a consumable is approaching the end, the response from the waveform sometimes gradually delays. On the other hand, when an error occurs due to an unexpected event, the waveform changes only at the moment of the event. Therefore, the user will be able to find the cause of the error by observing the waveform and apply measures to the error.
[0071] flow chart
[0072] Extension unit 4a
[0073] Figure 13 4a is a flowchart showing the collection process executed by the CPU 41a of the extension unit 4a. When a specific relay device is turned on, the CPU 41a executes the following process.
[0074] In S1, the CPU 41a (setting unit 71) sets the base unit 3 and the extension unit 4b. For example, the CPU 41a transmits the collection settings 36a of the base unit 3 to the base unit 3. The base unit 3 stores the collection settings 36a in the storage device 32. The CPU 41a transmits the collection settings 36b of the extension unit 4b to the extension unit 4b. The extension unit 4b stores the collection settings 36b in the memory 42b.
[0075] In S2, the CPU 41a (data processing unit 73 or collection unit 52c) determines whether a predetermined amount of collected data is stored in the second buffer 37b or the third buffer 37c (the first sub-buffer 38a or the second sub-buffer 38b). This predetermined amount is defined by the processing settings 61. Only the buffer specified by the processing settings 61 needs to be checked. Not both the second buffer 37b and the third buffer 37c are always subject to checking. The CPU 41a remains on standby until the predetermined amount of data is stored in the buffer. When the predetermined amount of data is stored in the buffer, the CPU 41a proceeds to S3.
[0076] In S3, the CPU 41a (data processing section 73) performs data processing on a predetermined amount of data read from the buffer and calculates a data processing result. The content of the data processing is defined by the processing setting 61. The data processing result is held in the memory 42a.
[0077] In S4, the CPU 41a (generating unit 74) determines whether a display request (Web access) for the dashboard has been received from the Web browser 18 of the PC 2b. If no display request has been received, the CPU 41a proceeds to S2 and continues data collection and processing. If a display request has been received, the CPU 41a proceeds to S5.
[0078] In S5, the CPU 41a (generating unit 74) creates display data of the dashboard corresponding to the display request. For example, the CPU 41a substitutes the data processing result stored in the memory 42a into the template of the dashboard and creates the display data.
[0079] In S6, the CPU 41a (Web server 70) transmits the display data to the Web browser 18 of the PC 2b. Thus, the Web browser 18 of the PC 2b can display the dashboard.
[0080] Basic Unit 3
[0081] Figure 14 : is a flowchart showing the collection process executed by the CPU 31 of the base unit 3. When a specific relay device is turned on, the CPU 31 executes the following process.
[0082] In S11, the CPU 31 (collection unit 52a) determines whether the collection timing specified by the collection setting 36a (for example, every scanning cycle, every input of a trigger signal, or every predetermined cycle) has arrived. If the collection timing has arrived, the CPU 31 proceeds to S12.
[0083] In S12 , the CPU 31 (collection setting 52 a ) collects the collection target data specified by the collection setting 36 a from the device section 34 a , and stores the collection target data in the first buffer 37 a .
[0084] In S13, the CPU 31 (transfer unit 53a) determines whether the transfer condition specified by the collection setting 36a is satisfied. The transfer condition may be the number of data records accumulated in the first buffer 37a. If the transfer condition is not satisfied, the CPU 31 returns to S11 and continues collecting data. If the transfer condition is satisfied, the CPU 31 proceeds to S14.
[0085] In S14, the CPU 31 (monitoring unit 54a) determines whether the communication flow of the expansion bus 90 is small. If the communication flow is large, the CPU 31 returns to S11 and continues to collect data. If the communication flow is small, the CPU 31 proceeds to S15.
[0086] In S15, the CPU 31 (transfer unit 53a) reads a predetermined amount of data records from the first buffer 37a and transfers the predetermined amount of data records to the second buffer 37b. The predetermined amount is also defined by the collection setting 36a.
[0087] Extension unit 4b
[0088] Figure 15 4b is a flowchart showing the collection process executed by the CPU 41b of the extension unit 4b. When a specific relay device is turned on, the CPU 41b executes the following process.
[0089] In S21, the CPU 41b (collection section 52b) determines whether the collection timing specified by the collection setting 36b (for example, each input of a trigger signal or each predetermined period) has arrived. When the collection timing has arrived, the CPU 41b proceeds to S22.
[0090] In S22 , the CPU 41 b (collecting section 52 b ) collects the collection target data specified by the collection setting 36 a from the device section 34 a , and stores the collection target data in the fourth buffer 37 d .
[0091] In S23, the CPU 41b (transfer unit 53b) determines whether the transfer condition specified by the collection setting 36b is satisfied. The transfer condition may be, for example, the number of data records accumulated in the fourth buffer 37d. If the transfer condition is not satisfied, the CPU 41b returns to S21 and continues collecting data. If the transfer condition is satisfied, the CPU 41b proceeds to S24.
[0092] In S24, the CPU 41b (monitoring unit 54b) determines whether the communication flow of the expansion bus 90 is small. If the communication flow is large, the CPU 41b returns to S21 and continues to collect data. If the communication flow is small, the CPU 41b proceeds to S25.
[0093] In S25, the CPU 41b (transfer unit 53b) reads a predetermined amount of data records from the fourth buffer 37d and transfers the predetermined amount of data records to the third buffer 37c. The predetermined amount is also defined by the collection setting 36b.
[0094] Figure 17 An example of a dashboard 171 for real-time monitoring applications is shown. Figure 17In the example, the operation status display 172 shows the operation status of real-time monitoring. The display switching tab 173 is a tab button display for switching the dashboard to another dashboard corresponding to the application when multiple dashboards are set for the application. Figure 17 , the state in which the monitoring button is pressed is shown. In this state, when the trend tab is pressed, the dashboard switches to the trend display dashboard. When the history tab is pressed, the dashboard switches to the history display dashboard. Display columns 174a to 174g display the item name, margin, measurement value, caution value, warning value, judgment result, and a graph related to the measurement value for each monitoring item. The item name, caution value, and warning value are displayed based on the application setting data (display setting 62) of the project data 15. The measurement value indicates the time width from the start timing to the end timing determined by the start and end conditions of the application setting data. The margin indicates the margin of the measurement value of the monitoring item. For example, the margin can indicate the margin of the measurement value relative to the warning value or caution value. The judgment result is the judgment result calculated based on the measurement value and the valid warning value or caution value. The judgment result can indicate the status class of the monitored object, such as normal, caution, and warning. Even if the judgment result based on the latest measurement value is normal, the judgment result in the past may have been a caution or warning state. In this case, a state in which the warning level is high can be maintained in a predetermined judgment time period from the past to the present. When the clear button of the judgment display bar 174f is pressed, the displayed judgment result can be updated to the latest judgment result. The graph related to the measurement value is a visual graph of the measurement value. For example, a bar graph showing the time width from the start timing to the end timing can be displayed. Lines corresponding to the attention value and the warning value can be displayed at positions corresponding to the attention value and the warning value. For example, when the threshold line display check box of the graphic display bar 174g is selected, threshold lines corresponding to the effective attention value and the effective warning value are displayed. When the setting button of the graphic display bar 174g is pressed, the setting dashboard in the other dashboards corresponding to the application is displayed.
[0095] Figure 18 An example of a settings dashboard 181 for a real-time monitoring application is shown. Figure 17 When the settings button in the graphic display bar 174g is clicked, the settings dashboard 181 is displayed. Figure 18 In the display 182, the operation status of the real-time monitoring is displayed. The monitoring status conversion switch 183 is a switch for switching the monitoring state and the non-monitoring state of the real-time monitoring. The threshold overall setting button 184 is a button for switching to a setting screen for setting a plurality of thresholds set for each monitoring item as a whole. In the input fields 185a to 185f, the monitoring check box, item name, start condition, end condition, caution value, and warning value are displayed for each monitoring item. Figure 2 The input bar corresponding to the setting wizard of the application setting data of the project data 15 in is displayed. When the add button 186a is pressed, an input line for entering a new monitoring item is added. When the delete button 186b is pressed, the input line selected by the up and down buttons 186c is deleted. When the setting reflection button 187 is pressed, the updated setting content is reflected on the application setting data (display setting 62). Subsequently, the dashboard 171 used for the real-time monitoring application based on the updated application setting data (display setting 62) is displayed. When the cancel button 188 is pressed, the updated setting content is not reflected on the application setting data (display setting 62). The dashboard 171 used for the real-time monitoring application based on the application setting data (display setting 62) is displayed.
[0096] In S41, the CPU 41a (collection unit 52c) monitors the device or variable corresponding to the start signal and the end signal according to the application setting data (collection setting 39). The application setting data (collection setting 39) holds the name of the device or variable used as the start signal and the predetermined value stored in the device or variable. The timing when the value of the device or variable changes to the predetermined value is the start timing. Figure 18 As shown, the change of the device or variable can be set as a rising edge or a falling edge as a start condition. The same applies to the end signal. The CPU 41a executes (collection unit 50c) a data utilization program based on the application setting data (collection setting 39), thereby collecting the collection object device value specified by the application setting data (collection setting 39) and storing the device value as the collected data in the second buffer 37b. The collected data can be time series data collected at different times. A collection program for performing a collection operation according to the collection setting 39 can be provided in a manner separate from the data utilization program. In this case, the collection setting 39 is set according to the application setting data (processing setting 61). The collection object device value specified by the set collection setting 39 is collected. The collected data can be stored in the second buffer 37b.
[0097] In S42, the CPU 41a (data processing unit 73) executes the data utilization program specified by the utilization program template (processing setting 61). The CPU 41a (data processing unit 73) executes the data utilization program to determine the time information from the timing when the condition of the start signal is satisfied to the timing when the condition of the end signal is satisfied based on the collected data (device value). The CPU 41a (data processing unit 73) determines the time information from the timing when the condition of the start signal is satisfied to the timing when the condition of the end signal is satisfied. Figure 18 The start condition 185c in the monitoring object is used to monitor whether the device or variable set as the monitoring object meets the conditions such as the rising edge. The timing when the conditions are met, that is, the timing when the start signal conditions are met is monitored. Similarly, the CPU 41a (data processing unit 73) Figure 18The CPU 41a (data processing unit 73) monitors whether the device or variable set as the monitoring target meets a condition such as a rising edge based on the end condition 185d in the data processing unit. The timing when the condition is met, that is, the timing when the end signal condition is met, is monitored. The time information determined by the CPU 41a (data processing unit 73) can be the time width from the timing when the start signal condition is met to the timing when the end signal condition is met.
[0098] In S43, the CPU 41a (data processing unit 73) determines the status based on the time information determined in S42 and the judgment threshold set according to the application setting data (processing settings 61). The CPU 41a (data processing unit 73) executes a data utilization program to perform this judgment. The upper and lower limits of the caution and warning values are sometimes set as the judgment thresholds. In this case, the CPU 41a (data processing unit 73) determines whether the time information determined as the measured value is greater than the upper limit. The CPU 41a (data processing unit 73) determines whether the determined time information is less than the lower limit. The application setting data (processing settings 61) may include flags indicating whether the upper and lower limits are used as judgment thresholds. In this case, the CPU 41a (data processing unit 73) compares the upper and lower limits (where both flags included in the application setting data (processing settings 61) are checked) with the time information determined as the measured value to determine the status of the monitored object. The values of these flags can be set by the user through a UI such as a check box. The status of the monitored object may include normal, caution, and warning. The attention state and the warning state are distinguished based on the degree of deviation of the measured value relative to the normal state. The difference between the measured value in the normal state (normal value) and the measured value in the warning state (warning value) is greater than the difference between the measured value in the normal state and the measured value in the attention state (attention value). Therefore, the value that deviates further from the normal value than the attention value is set as the warning value. The attention value and the warning value are sometimes set as upper limit values respectively. In this case, when the determined time information is equal to or less than the attention value, the CPU 41a (data processing unit 73) judges the state of the monitored object as "normal". When the determined time information is greater than the attention value and equal to or less than the warning value, the CPU 41a (data processing unit 73) judges the state of the monitored object as "attention". When the determined time information is greater than the warning value, the CPU 41a (data processing unit 73) judges the state of the monitored object as "warning". Therefore, the analyzed data is created and saved in the memory.
[0099] The attention value and the warning value are sometimes set as lower limits, respectively. In this case, when the determined time information is equal to or greater than the attention value, the CPU 41a (data processing unit 73) determines the state of the monitored object to be "normal." When the determined time information is less than the attention value and equal to or greater than the warning value, the CPU 41a (data processing unit 73) determines the state of the monitored object to be "attention." When the determined time information is less than the warning value, the CPU 41a (data processing unit 73) determines the state of the monitored object to be "warning." Thus, the analyzed data is created and stored in the memory.
[0100] The attention value and the warning value are sometimes set by an upper limit value and a lower limit value, respectively. In this case, when the determined time information is equal to or greater than the lower limit attention value and equal to or less than the upper limit attention value, the CPU 41a (data processing unit 73) judges the state of the monitored object as "normal". When the determined time information is less than the upper limit warning value and equal to or greater than the upper limit attention value, the CPU 41a (data processing unit 73) judges the state of the monitored object as "attention". Similarly, when the determined time information is less than the lower limit attention value and equal to or greater than the lower limit warning value, the CPU 41a (data processing unit 73) judges the state of the monitored object as "attention". When the determined time information is less than the lower limit warning value or greater than the upper limit warning value, the CPU 41a (data processing unit 73) judges the state of the monitored object as "warning". Thus, the analyzed data is created and saved in the memory.
[0101] CPU 41a (data processing unit 73) can calculate the margin of the margin that the indication measured value has relative to the warning value or attention value. For example, the margin can be defined as 100 in a state with sufficient margin, 50 in an attention state, and 0 in a warning state. In this way, the margin can be defined so that the value changes step by step according to the distance (difference) between the attention value and the measured value. The margin is stored in the memory 42a as the analyzed data. When the measured value exceeds the warning value, CPU 41a (data processing unit 73) can generate a signal indicating that the measured value exceeds the warning value. For example, when the measured value exceeds the warning value, CPU 41a (data processing unit 73) changes the value of the device or variable indicating that the measured value exceeds the warning value. The device or variable indicating that the measured value exceeds the warning value can be assigned as a trigger. For example, the device or variable can be assigned to a log saving trigger (logging saving trigger). Therefore, the operation record of PLC1 is saved based on the timing when the warning is generated.
[0102] In S44, the CPU 41a (generating unit 74) generates source data of the dashboard 171 including the time information determined in S42, the judgment threshold, and the state of the monitored object judged in S43. The CPU 41a (generating unit 74) reflects the time information, the judgment threshold, and the state of the monitored object determined based on the dashboard template (display setting 62) on the variables assigned to the dashboard template (display setting 62). For example, the CPU 41a (generating unit 74) creates display data so that the measured value indicating the time width from the timing when the condition of the start signal is satisfied until the timing when the condition of the end signal is satisfied is displayed in the form of a bar graph. Figure 17 . The time and the time period from the timing when the condition of the start signal is satisfied until the timing when the condition of the end signal is satisfied can be displayed in a strip. Therefore, the following dashboard is displayed, which indicates not only the time width but also which timing operation the monitored object is performing within the cycle in the control of the cyclic operation. For example, the right end to the left end of the graphic display bar 174g can be equivalent to one cycle of the monitored object. The starting position of the band (the bar of the bar graph) is equivalent to the timing when the condition of the start signal in one cycle is satisfied. The ending position of the band is equivalent to the timing when the condition of the end signal in one cycle is satisfied. Therefore, the length of the band indicates the time width.
[0103] The margin can be displayed together with the measured value. The CPU 41a (generation unit 74) creates display data (e.g., HTML data) for displaying the dashboard 171 based on the variables assigned to the dashboard template (display settings 62). The CPU 41a (generation unit 74) can separately manage the screen data on which the dashboard 171 is based, and the data to be updated such as the measured value and status information. In this case, the CPU 41a (generation unit 74) separately manages the screen data to which the device or variable at the reference destination is assigned, and the display object data that is the value of the device or variable at the reference destination. The CPU 41a (generation unit 74) can periodically update the display object data to create the display data. The generation unit 74 uses the display object data such as the collected data and / or the analyzed data to create the display data.
[0104] In S45, CPU 41a (Web server 70) provides display data to PC 2b. CPU 41a can display the display data on the display of PLC 1. The display of PLC 1 can be incorporated into PLC 1, or can be connected to PLC 1 by wire or radio. CPU 41a (generation unit 74) sometimes manages screen data assigned to devices or variables at a reference destination, and display object data that are values of devices or variables at a reference destination, respectively. In this case, CPU 41a (Web server 70) selectively provides screen data and display object data in the display data according to the update request and update plan of dashboard 171. CPU 41a (Web server 70) provides display data including screen data and display object data according to the display request of dashboard 171. CPU 41a (Web server 70) selectively provides updated display object data as display data according to the display update request of dashboard 171.
[0105] In S51, the CPU 41a (generating unit 74) displays the dashboard 181 used for setting. For example, the generating unit 74 creates a dashboard for displaying Figure 18 The CPU 41a (Web server 70) supplies the display data for displaying the dashboard 181 for settings to the PC 2b.
[0106] In S52, the CPU 41a (setting unit 71) receives user input regarding the addition, deletion, and modification of monitoring targets and / or the setting of judgment thresholds. Upon detecting that the add button 186a has been pressed, the CPU 41a (setting unit 71) adds an input row for setting the new monitoring target. The CPU 41a (generation unit 74) creates display data to display the dashboard 181 for settings to which the input row for setting the new monitoring target has been added. The CPU 41a (web server 70) provides the display data for displaying the updated dashboard 181 for settings to the PC 2b. Upon detecting that the delete button 186b has been pressed, the CPU 41a (setting unit 71) deletes the selected input row. The CPU 41a (generation unit 74) creates display data to display the dashboard 181 for settings to which the selected input row has been deleted. The CPU 41a (web server 70) provides the display data for displaying the updated dashboard 181 for settings to the PC 2b. In this case, the selection operation of the input row using the up and down buttons 186c can be displayed. When the CPU 41a (setting unit 71) receives a change input to input fields 185a to 185d, the CPU 41a (generating unit 74) creates display data for displaying the dashboard 181 for settings that reflects the change input to input fields 185a to 185d. The CPU 41a (web server 70) provides the display data for displaying the updated dashboard 181 to the PC 2b. When the CPU 41a (setting unit 71) receives a change input to input fields 185e and 185f for the judgment threshold, the CPU 41a (generating unit 74) creates display data for displaying the dashboard 181 for settings that reflects the change input to input fields 185e and 185f for the judgment threshold. The CPU 41a (web server 70) provides the display data for displaying the updated dashboard 181 to the PC 2b.
[0107] In S53, the CPU 41a (setting unit 71) updates the application setting data (processing settings 61) corresponding to the user input based on the user input. When it is detected that the setting reflection button 187 has been pressed, the CPU 41a (setting unit 71) reflects the updated setting content on the application setting data (processing settings 61). On the other hand, when it is detected that the cancel button 188 has been pressed, the CPU 41a (setting unit 71) does not reflect the updated setting content on the application setting data (processing settings 61) and discards the updated setting content. The CPU 41a (generation unit 74) creates display data to display the dashboard 171 used for the real-time monitoring application based on the application setting data (processing settings 61) without reflecting the updated setting content. The CPU 41a (web server 70) provides the display data for displaying the dashboard 171 used for the real-time monitoring application to the PC 2b.
[0108] In S54, the CPU 41a (data processing unit 73) determines the status of the monitored object based on the application setting data (processing setting 61) updated in S53, the time information determined regarding the monitored object, and the set judgment threshold. The CPU 41a (data processing unit 73) determines the status of the monitored object in the same manner as in S43, based on the updated application setting data (processing setting 61), the time information determined in the same manner as in S42, and the judgment threshold set based on the updated application setting data (processing setting 61).
[0109] In S55, the CPU 41a (generating unit 74) creates display data for displaying the time information determined based on the updated application setting data (processing setting 61), the judgment threshold value set based on the updated application setting data (processing setting 61), and the state of the monitoring object judged in S54 on the display. Figure 18 The CPU 41a (Web server 70) supplies display data for displaying the dashboard 171 for status monitoring to the PC 2b.
[0110] Figure 21 FIG. 4 is a flowchart showing a dynamic change process for a monitoring object executed by the CPU 41a of the extension unit 4a. Figure 21In S61, the CPU 41a (setting unit 71) receives user input for setting changes including adding, deleting, and changing a monitored object. When it is detected that the add button 186a has been pressed, the CPU 41a (setting unit 71) adds an input row for setting a new monitored object. The CPU 41a (generation unit 74) creates display data to display the dashboard 181 for settings to which the input row for setting a new monitored object has been added. The CPU 41a (web server 70) provides the display data for displaying the dashboard 181 for settings after the update to the PC 2b. When it is detected that the delete button 186b has been pressed, the CPU 41a (setting unit 71) deletes the selected input row. The CPU 41a (generation unit 74) creates display data to display the dashboard 181 for settings with the selected input row deleted. The CPU 41a (web server 70) provides the display data for displaying the dashboard 181 for settings after the update to the PC 2b.
[0111] In S62, CPU 41a (setting unit 71) requests CPU 41a (collecting unit 52c) to change the collection object based on the received setting change. In S63, CPU 41a (collecting unit 52c) determines the timing for updating the collection object based on the request in S62. CPU 31a (collecting unit 52a) can determine the timing for updating the collection object based on the request in S62 via CPU41a (collecting unit 52c). The timing for updating the collection object can be the scan start time immediately after receiving the change request for the collection object, or the loop control start time immediately after receiving the change request for the collection object. "Immediately after receiving the change request for the collection object" can be determined in consideration of a predetermined time period from the receipt of the change request for the collection object until the change of the collection object is actually performed.
[0112] In S64, the CPU 41a (collecting unit 52c) performs an update of the collection object based on the update timing of the collection object determined in S63. The CPU 41a (collecting unit 52c) links the collection data from the updated collection object with the identification information and collects the collection data. The identification information is information used to identify that the collection data has been updated and can be referred to as updated identification information. The CPU 41a (collecting unit 52c) further links the time information related to the collection data as the monitoring object when the collection data was collected with the collection data and the identification information and collects the time information. The time information can be referred to as collection time information. The CPU 31a (collecting unit 52a) can link the collection data from the updated collection object with the updated identification information and collect the collection data. The CPU 31a (collecting unit 52a) can further link the collection time information related to the collection data as the monitoring object with the collection data and the identification information and collect the collection time information. Note that the update of the collection object can be performed in parallel with the collection operation without stopping the collection operation.
[0113] In S65, the CPU 41a (data processing unit 73) determines whether the collected data has been updated based on the identification information. When the determination result regarding the update of the collected data indicates that the collected data has not been updated, the CPU 41a (data processing unit 73) proceeds to S66. In S66, the CPU 41a (data processing unit 73) determines the state of the monitored object based on the collection time information related to the monitored object and the determination threshold value before the setting change. The CPU 41a (data processing unit 73) and Figure 19 In S42, the CPU 41a (generating unit 74) determines the time information from the timing when the condition of the start signal is satisfied until the timing when the condition of the end signal is satisfied based on the collected data of the monitored object, and in S43, determines the state of the monitored object based on the determined time information and the judgment threshold value before the setting change. In S67, the CPU 41a (generating unit 74) creates display data for displaying the measured value as the determined time information, the judgment threshold value, and the determined state of the monitored object on the display. Figure 18The CPU 41a (Web server 70) provides the display data for displaying the dashboard 171 for status monitoring to PC 2b. The CPU 41a (generation unit 74) can separately manage the image data that forms the basis of the dashboard 171, as well as data to be updated, such as measurement values and status information. In this case, the CPU 41a (generation unit 74) generates display data that includes the measurement value, judgment threshold, and the determined status of the monitored object as the determined time information. In response to the update request, the CPU 41a (Web server 70) provides the display data for displaying the dashboard 171 for status monitoring, including the measurement value, judgment threshold, and the determined status of the monitored object, to PC 2b. The CPU 41a (Web server 70) selectively provides the updated display object data to PC 2b as display data. Returning to S65 again, the CPU 41a (data processing unit 73) determines the update of the collected data based on the identification information.
[0114] When the result of the judgment on the update of the collected data indicates that the collected data has been updated, the CPU 41a (data processing unit 73) proceeds to S68. In S68, the CPU 41a (data processing unit 73) judges the state of the monitored object based on the collection time information related to the monitored object and the judgment threshold value after the setting change. Figure 19 As in S42 of the previous embodiment, the time information from the timing when the condition of the start signal is satisfied until the timing when the condition of the end signal is satisfied is determined based on the collected data of the monitored object, and as in S43, the state of the monitored object is determined based on the measured value as the determined time information and the judgment threshold value after the setting change. In S69, the CPU 41a (generating unit 74) creates display data for displaying the measured value as the determined time information, the judgment threshold value, and the judged state of the monitored object on the display. Figure 18The dashboard for status monitoring shown is displayed on the dashboard 171. The CPU 41a (Web server 70) provides the display data of the dashboard 171 for display status monitoring to PC 2b. The CPU 41a (generation unit 74) can manage the screen data and the display object data separately. In this case, in S67, the CPU 41a (generation unit 74) generates display data, which includes the measurement value, judgment threshold value and the status of the monitored object determined as the determined time information. In response to the update request, the CPU 41a (Web server 70) provides the display data of the dashboard 171 for display status monitoring, which includes the measurement value, judgment threshold value and the status of the monitored object determined as the determined time information, to PC 2b. The CPU 41a (Web server 70) selectively provides the updated display object data as display data to PC 2b.
[0115] Figure 22 37b (or third buffer 37c) during the dynamic change of the monitoring target and the device value in the device unit 34a. The CPU 41a (setting unit 71) requests the collection unit 52c to change the collection target based on the received setting change. The collection unit 52c determines the timing for updating the collection target based on the request. The collection unit 52c Figure 22 The collection object is updated in the time period from scan number 100 to scan number 101. The monitoring object is specified in the application setting data (processing setting 61). The monitoring objects before the setting change are MR001 and MR002. The monitoring objects after the setting change are MR001, MR003 and MR004. The collection objects of the application setting data (collection setting 39) are defined based on the application setting data (processing setting 61). Before the setting change, collection object 1 is MR001, collection object 2 is MR002, and collection object 3 is not set. After the setting change, collection object 1 is still MR001, collection object 2 is changed from MR002 to MR003, and MR004 is newly added to collection object 3. The CPU 41a (collecting unit 52c) links the scan number, timer value, identification flag and collection data corresponding to the collection object in the second buffer 37b for each data record 91, and records the scan number, timer value, identification flag and collection data. The CPU 41a (collection unit 52c) collects data based on the determined update timing and provides identification information corresponding to the update timing as an identification flag. As the identification flag, for example, the count value of the ring counter counted in each update can be used.
[0116] The CPU 41a (data processing unit 73) determines, based on the identification flag, whether the collected data recorded in the second buffer 37b is collected based on the application setting data (processing setting 61) before the update or based on the application setting data (processing setting 61) after the update. When the collection object is updated, the identification flag is set in the collected data as the monitoring object. Therefore, the data processing unit 73 can distinguish the collected data before the update from the collected data after the update based on the identification flag. The data processing unit 73 dynamically changes the application setting data (processing setting 61) applied to the collected data as the monitoring object based on the identification flag. Therefore, the PLC 1 can dynamically execute the update of the collection object without stopping the collection operation.
[0117] Summarize
[0118] Viewpoint 1
[0119] like Figure 5 As shown, CPU 31 and execution engine 51a are examples of a first execution engine that repeatedly executes a first user program. Device unit 34a is an example of a plurality of holding components, which are devices or variables for storing data accessed by the first execution engine based on the first user program. CPU 41a is an example of a second execution engine that executes a second user program asynchronously with the scan cycle of the first user program. Expansion bus 90 is an example of a bus that connects the first and second execution engines.
[0120] The collection unit 52a serves as a collection component for collecting data stored in the collection target holding components of the plurality of holding components according to predetermined collection settings for each scan cycle of the first user program. The first buffer 37a is an example of a first buffer that accumulates the time-series data collected by the collection component during each scan cycle. The transmission unit 53a is an example of a transmission component for transmitting the time-series data stored in the first buffer to the second execution engine via the expansion bus.
[0121] The data processing unit 73 is an example of a processing unit that processes the time-series data transmitted by the transmission unit according to predetermined processing settings. The generation unit 74 is an example of a generation unit that generates display data for displaying the results of the data processing on the dashboard. The web server 70 serves as a providing unit for providing display data to an external computer (e.g., PC 2b). By providing the first buffer 37a in this manner, the PLC 1 can efficiently collect and transmit monitoring target data.
[0122] Viewpoint 2
[0123] The monitoring unit 54a is an example of a monitoring component for monitoring the traffic on the expansion bus 90. The transmission unit 53a can transmit data to the second execution engine when the traffic on the expansion bus 90 is relatively low, and can suppress the transmission of time-series data to the second execution engine when the traffic on the expansion bus 90 is relatively high. Therefore, input and output refreshes via the expansion bus 90, and the execution of UREAD or UWRIT commands, are not hindered. This prevents the scanning cycle from being extended.
[0124] Note that the monitoring unit 54a can function as a monitoring component for monitoring the priority of information to be transmitted on the expansion bus 90. In this case, the transmitting unit 53a transmits the time-series data to the second execution engine when no information with a higher priority than the time-series data exists. The transmitting unit 53a refrains from transmitting the time-series data to the second execution engine when information with a higher priority than the time-series data exists. Note that information transmitted via refresh and bus communication requests using command words are assigned a higher priority. On the other hand, time-series data is assigned a lower priority.
[0125] Viewpoint 3
[0126] The transfer unit 53a can transfer the time series data while avoiding the period when the first execution engine is performing input and output refresh using the expansion bus 90. Therefore, the input and output refresh via the expansion bus 90 is not hindered, and the extension of the scanning cycle is suppressed.
[0127] Viewpoint 4
[0128] The compression engine 55a is an example of a compression component for compressing the time-series data stored in the first buffer 37a. This compression process can be performed in parallel with the execution of the first user program by the first execution engine. The transfer unit 53a can transfer the time-series data compressed by the compression component to the second execution engine. This allows for efficient data transfer. In particular, the probability of other transfer processes, such as input and output refresh and UREAD commands, conflicting with the transfer process used for data utilization on the expansion bus 90 is reduced.
[0129] Viewpoint 5
[0130] The time series data stored in the first buffer 37a may include a plurality of data records acquired in each scanning cycle in different scanning cycles. Figure 11As shown, if two consecutive data records among the plurality of data records are identical, the compression engine 55a may discard one of the two data records to retain the data record at the data change point among the plurality of data records. If three or more data records are temporally identical, only one of the three or more data records is maintained as the transfer target.
[0131] Viewpoint 6
[0132] Second buffer 37b is an example of a second buffer for storing time-series data transmitted by the transmission unit. CPU 41a, serving as the second execution engine, is configured to reference the time-series data stored in second buffer 37b. By preparing second buffer 37b in this manner, data storage in second buffer 37b and data processing in data processing unit 73 can be performed asynchronously.
[0133] Viewpoint 7
[0134] The transmission units 53a and 53b can be configured to obtain data from the holding component of the expansion unit 4b (e.g., the device unit 34b) and transmit the data to the second execution engine. The third buffer 37c is an example of a third buffer for accumulating data obtained from the holding component of the expansion unit 4b. The second execution engine can be configured to read out data from the third buffer 37c and perform data processing. Therefore, the storage of data in the third buffer 37c and the data processing in the data processing unit 73 can be performed asynchronously. Note that the transmission unit 53b can write data to the third buffer 37c via the transmission unit 53a. Such transmission processing can be achieved when the transmission unit 53a serves as a master device and the transmission unit 53b serves as a slave device.
[0135] Viewpoint 8
[0136] The fourth buffer 37d of the extension unit 4b functions as a fourth buffer that stores data acquired from the storage component of the extension unit 4b according to a predetermined control cycle that differs from the scanning cycle. The transmission units 53a and 53b can be configured to acquire data from the storage component of the extension unit 4b from the fourth buffer 37d. Therefore, the operation of the execution engine 51b and the data transmission processing can also be performed asynchronously in the extension unit 4b.
[0137] Viewpoint 9
[0138] As about Figure 11The time series data may include a first data record and a second data record acquired at different timings. The second execution engine (e.g., CPU 41a) may calculate the time interval between the timing at which the interest bit included in the first data record changes and the timing at which the interest bit included in the second data record changes.
[0139] Viewpoint 10
[0140] like Figure 12 As shown, the time series data may include first waveform data and second waveform data collected at different timings. Figure 12 As shown, the second execution engine (e.g., CPU 41a) can match the phase of the first waveform data and the phase of the second waveform data with the reference phase. The generation unit 74 can generate display data for displaying the first waveform data and the second waveform data matched with the reference phase on the instrument panel. As a result, the user can visually observe the difference in waveform and response characteristics.
[0141] Viewpoint 11
[0142] The data processing unit 73 can be configured to execute a first data utilization application and a second data utilization application. The collection unit 52c can function as a distribution component for distributing data used by the first data utilization application from the time-series data stored in the second buffer 37b to the first sub-buffer 38a, and for distributing data used by the second data utilization application from the time-series data stored in the second buffer 37b to the second sub-buffer 38b. The readout timing of the data used by the first data utilization application and the readout timing of the data used by the second data utilization application may differ. In such cases, by preparing sub-buffers for each application, multiple applications can acquire data at a timing suitable for those applications. This improves the operational efficiency of the applications.
[0143] Viewpoints 12 and 13
[0144] The transmission unit 53a can be configured to subdivide and transmit the time series data. Typically, time series data is large in volume. When a transmission request for other information with a high priority is generated during the transmission of the large volume of time series data, the transmission request for the other information with a high priority is kept pending. Therefore, by subdividing the time series data, the transmission request for the other information with a high priority can be executed at intervals between the subdivided time series data. This shortens the waiting time for the transmission request for the other information with a high priority.
[0145] The transmitting unit 53a may be configured to transmit the time series data in parallel to the first execution engine executing the first user program. Therefore, the time series data can be transmitted more efficiently.
Claims
1. A programmable logic controller comprising: a first execution engine configured to repeatedly execute a first user program; a plurality of holding units, which are devices or variables configured to store data accessed by the first execution engine according to the first user program; a second execution engine configured to execute a second user program asynchronously with a scan cycle of the first user program; a bus configured to connect the first execution engine and the second execution engine; a collecting unit configured to collect data stored in a collection target holding unit among the plurality of holding units in each scanning cycle of the first user program according to a predetermined collection setting; a first buffer configured to accumulate the time series data collected by the collection unit in each scanning period; as well as a transmitting unit configured to transmit the time series data stored in the first buffer to the second execution engine via the bus, Wherein, the second execution engine includes: a processing unit configured to perform data processing on the time series data transmitted by the transmitting unit according to a predetermined processing setting; a generating unit configured to generate display data for displaying a processing result of the data processing on a dashboard; and The web server is configured to provide the display data of the processing result of the data processing displayed on the dashboard to a web browser accessing a page of the dashboard on an external computer.
2. The programmable logic controller according to claim 1, further comprising a monitoring unit configured to monitor the priority of information to be transmitted in the bus, in, The transmission unit transmits the time series data to the second execution engine when there is no information with a priority higher than the priority of the time series data, and refrains from transmitting the time series data to the second execution engine when there is information with a priority higher than the priority of the time series data.
3. The programmable logic controller according to claim 2, wherein: The transfer section performs transfer of the time-series data while avoiding a period in which the first execution engine is performing input and output refresh using the bus.
4. The programmable logic controller according to claim 1 , further comprising a compression unit configured to compress the time series data stored in the first buffer in parallel with the first execution engine executing the first user program. in, The transmitting unit transmits the time series data compressed by the compressing unit to the second execution engine.
5. The programmable logic controller according to claim 4, wherein: The time series data stored in the first buffer includes multiple data records acquired in each scanning cycle, and When two consecutive data records among the plurality of data records coincide with each other, the compression section discards one of the two data records to leave the data record at the data change point among the plurality of data records.
6. The programmable logic controller according to claim 1 , further comprising a second buffer configured to store the time series data transmitted by the transmitting unit. in, The second execution engine is configured to refer to the time series data stored in the second buffer.
7. The programmable logic controller according to claim 1, wherein: The transmitting unit is configured to obtain data from the holding unit of the expansion unit and transmit the data to the second execution engine; The programmable logic controller further includes a third buffer configured to accumulate data acquired from the holding portion of the expansion unit, and The second execution engine is configured to read the data from the third buffer and perform data processing.
8. The programmable logic controller according to claim 7, wherein: The expansion unit includes a fourth buffer configured to store data acquired from a holding portion of the expansion unit according to a predetermined control cycle different from the scanning cycle, and The transmitting section is configured to acquire data of the holding section of the extension unit from the fourth buffer.
9. The programmable logic controller according to claim 1, wherein: The time series data includes a first data record and a second data record acquired at different timings, and The second execution engine calculates a time interval between a timing at which a care bit included in the first data record changes and a timing at which a care bit included in the second data record changes.
10. The programmable logic controller according to claim 1, wherein: The time series data includes first waveform data and second waveform data acquired at different timings. The second execution engine matches the phase of the first waveform data and the phase of the second waveform data with a reference phase, and The generating unit generates display data for displaying the first waveform data and the second waveform data matched with the reference phase on the instrument panel.
11. The programmable logic controller according to claim 6, wherein: The processing unit is configured to execute a first data utilizing application and a second data utilizing application, and The programmable logic controller further comprises: First secondary buffer zone; A second secondary buffer; and The distribution unit is configured to distribute the first data in the time series data stored in the second buffer to the first secondary buffer using data used by the application, and distribute the second data in the time series data stored in the second buffer to the second secondary buffer using data used by the application.
12. The programmable logic controller according to claim 1, wherein: The transmitting section is configured to re-divide and transmit the time-series data.
13. The programmable logic controller according to claim 1, wherein: The transmitting section is configured to transmit the time-series data in parallel with the first execution engine executing the first user program.
14. A programmable logic controller comprising: Basic unit; as well as an expansion unit, which is connected to the base unit, Wherein, the basic unit includes: an execution engine configured to repeatedly execute a user program; a plurality of holding units, which are devices or variables configured to store data accessed by the execution engine according to the user program; a collecting unit configured to collect data stored in a collection target holding unit among the plurality of holding units according to a predetermined collection setting during each scan cycle of the user program; a first buffer configured to accumulate the time series data collected by the collection unit in each scanning period; and a transmitting unit configured to transmit the time series data stored in the first buffer to a data utilizing unit as the expansion unit connected via a bus, Wherein, the data utilization unit includes: a processing unit configured to perform data processing on the time series data transmitted by the transmitting unit according to a predetermined processing setting; a generating unit configured to generate display data for displaying a processing result of the data processing on a dashboard; and The web server is configured to provide the display data of the processing result of the data processing displayed on the dashboard to a web browser accessing a page of the dashboard on an external computer.
Citation Information
Patent Citations
Index table
JP1981061222A
Control device, control program and control method
JP2018097662A
Controller and control method
US20160266563A1
controller
US20180285398A1