Information processing device, method and program
Patent Information
- Application Number
- JP2021076108
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-04-28
- Publication Date
- 2025-02-19
- Estimated Expiration
- 2041-04-28
Smart Images

Figure 0007632034000001 
Figure 0007632034000002 
Figure 0007632034000003
Abstract
Description
[Technical field]
[0001] The present disclosure relates to an information processing device, a method, and a program, and more particularly to an information processing device, a method, and a program aimed at developing an application program for controlling an object. [Background technology]
[0002] In a factory automation (FA) production site, an environment is provided in which control data is exchanged between multiple network-connected control devices according to a publish-subscribe communication protocol. For example, in JP 2019-080164 A (Patent Document 1), a programmable logic controller (PLC) includes a publisher section and a subscriber section, and data is exchanged between the PLCs. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2019-080164 A Summary of the Invention [Problem to be solved by the invention]
[0004] In the development environment for PLC application programs, there is a demand for making program development more efficient by dividing application programs into modules for each function, i.e., by dividing them into unit programs.
[0005] The present disclosure aims to provide an efficient development environment for application programs including publish / subscribe type communication programs executed on a control device that controls a target. [Means for solving the problem]
[0006] An information processing device having a library storing unit programs constituting an application program executed by a control device that controls an object according to one example of the present disclosure, the control device being connected to a server via a network, the unit programs of the library including unit programs constituting a publish / subscribe type communication program included in the application program, the unit programs constituting the communication program including a publisher unit program that outputs a request to send a publish message of control related data, a subscriber unit program that outputs a request to send a subscribe message of control related data, a connection monitoring unit program that outputs a request to send a ping command message that monitors network connections, and a client unit program that transmits message transmission requests from each unit program to a server via the network, the information processing device further including an operation receiving means for receiving user operations on the information processing device, and a means for creating an application program including call commands for each unit program constituting the communication program based on the user operations received by the operation receiving means.
[0007] According to this disclosure, the communication program for the control device can be provided as a library of unit programs corresponding to the functions provided by publish / subscribe communication. Furthermore, by assigning the function of network connection establishment and communication to only the unit program for connection monitoring among these unit programs, it becomes relatively easy to develop other unit programs.
[0008] This allows the user to subdivide the functions provided by publish / subscribe communication into four functions when operating an information processing device to develop (create) an application program that links control with communication. Therefore, the user can develop the application program more efficiently than when the functions of publish / subscribe communication are provided integrally without being subdivided.
[0009] In the above disclosure, the information processing device further includes means for setting a priority for each unit program of the communication program so that the unit program is executed in preference to other unit programs during a control period.
[0010] According to this disclosure, it is possible to set a priority for each of the above-mentioned unit programs constituting the communication program when the program is executed by the control device.
[0011] In the above disclosure, among the above communication programs, at least the unit program of the client is set to have a higher priority than the other unit programs.
[0012] According to this disclosure, a unit program of a client that communicates with a server via a network is executed with high priority, so that a message can be transferred to the network within a control period.
[0013] In the above disclosure, the priority of a unit program for connection monitoring indicates that the unit program is executed every N control periods.
[0014] According to this disclosure, a unit program for connection monitoring is executed not every control cycle but every N control cycles, so that even if a ping command message is transferred to the network by the unit program for connection monitoring, an increase in the load on the network can be suppressed.
[0015] In the above disclosure, the client unit program includes instruction code for monitoring network connections.
[0016] According to this disclosure, the client's unit program can cooperate with the connection monitoring unit program to perform the function of monitoring network connections.
[0017] In the above disclosure, the server includes a message delivery server of Message Queuing Telemetry Transport (MQTT). According to this disclosure, publish / subscribe communication using the MQTT protocol is possible.
[0018] In this disclosure, a plurality of the above-mentioned control devices are connected to a server via a network, and the plurality of control devices are configured to control an object by distributed control. Therefore, the above-mentioned features can be applied to communication between each control device constituting the distributed control of the object and the server.
[0019] In the above disclosure, the connection monitoring unit program measures the time from outputting a request to send a ping command message to receiving a response. Therefore, the connection monitoring unit program measures the time required from outputting a request to send a ping command message to receiving a response, and can monitor the health of traffic on the network from the required time.
[0020] According to one example of the present disclosure, there is provided a program development support method in an information processing device having a library storing unit programs constituting an application program executed by a control device that controls a target, the control device being connected to a server via a network, the unit programs of the library including unit programs constituting a publish / subscribe type communication program included in the application program, the unit programs constituting the communication program including a publisher unit program that outputs a request to send a publish message of control related data, a subscriber unit program that outputs a request to send a subscribe message of control related data, a connection monitoring unit program that outputs a request to send a ping command message that monitors network connections, and a client unit program that transmits a message transmission request from each unit program to a server via the network, and the program development support method includes the steps of accepting a user operation and creating an application program including a call command for each unit program constituting the communication program based on the accepted user operation.
[0021] By implementing the method according to this disclosure, the communication program of the control device can be provided as a library of unit programs corresponding to the functions provided by publish / subscribe communication. Furthermore, by assigning the function of network connection establishment and communication to only the unit program for connection monitoring among these unit programs, it becomes relatively easy to develop other unit programs.
[0022] This allows the user to subdivide the functions provided by publish / subscribe communication into four functions when operating an information processing device to develop (create) an application program that links control with communication. Therefore, the user can develop the application program more efficiently than when the functions of publish / subscribe communication are provided integrally without being subdivided.
[0023] In another example of the present disclosure, a development support program for causing a processor to execute the above program development support method is provided. Effect of the Invention
[0024] According to an example of the present disclosure, it is possible to provide an efficient development environment for application programs including publish / subscribe type communication programs executed in a control device that controls a target. [Brief description of the drawings]
[0025] [Figure 1] FIG. 1 is a schematic diagram showing a system according to an embodiment of the present invention. [Diagram 2] 2 is a schematic diagram showing a hardware configuration of a processing unit of the PLC according to the present embodiment. FIG. [Diagram 3] FIG. 2 is a schematic diagram illustrating an example of a hardware configuration of a support device according to the present embodiment. [Figure 4] 2 is a schematic diagram showing an example of a software configuration implemented in a processing unit of the PLC according to the present embodiment. FIG. [Diagram 5] 1 is a diagram illustrating an example of a program development environment in a support device according to an embodiment of the present invention. [Figure 6] 4 is a flowchart showing an example of an outline process of program development according to the present embodiment. [Figure 7] 4 is a diagram showing an example of task control information according to the present embodiment; FIG. [Figure 8] FIG. 2 is a diagram showing a model of Pub / Sub communication according to the present embodiment. [Figure 9] FIG. 2 is a diagram showing an example of a model of Pub / Sub communication configured in a PLC according to the present embodiment. [Figure 10] FIG. 2 is a diagram showing a basic structure of a message packet according to the present embodiment. [Figure 11] FIG. 2 is a diagram showing a configuration of a packet to be published according to the present embodiment. [Figure 12]FIG. 2 is a diagram showing the structure of a subscribed packet according to the present embodiment. [Figure 13] 4 is a diagram showing a structure of a message packet of a PING command according to the present embodiment. FIG. [Figure 14] 1 shows an example of a Client-FB according to the present embodiment. [Figure 15] 15 is a timing chart of Client-FB in FIG. 14 . [Figure 16] 15 is a timing chart of Client-FB in FIG. 14 . [Figure 17] 2 shows an example of a Sub-FB according to the present embodiment. [Figure 18] 18 is a timing chart of CSub-FB in FIG. 17. [Figure 19] 2 shows an example of a Pub-FB according to the present embodiment. [Figure 20] 20 is a timing chart of Pub-FB in FIG. 19 . [Figure 21] 13 shows an example of Ping-FB according to the present embodiment. [Figure 22] 22 is a timing chart of Ping-FB in FIG. 21. [Figure 23] 22 is a timing chart of Ping-FB in FIG. 21. [Figure 24] 2 is a diagram showing a schematic diagram of a part of a communication program in an application program according to the present embodiment. FIG. [Diagram 25] 2 is a diagram showing a schematic diagram of a part of a communication program in an application program according to the present embodiment. FIG. [Figure 26] FIG. 2 is a diagram illustrating an execution period of a task in a PLC according to the present embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0026] The present embodiment will now be described in detail with reference to the drawings, in which the same or corresponding parts are designated by the same reference characters and description thereof will not be repeated.
[0027] <A. Application Example> First, referring to FIG. 5, an example of a scenario to which the present invention is applied will be described. FIG. 5 is a diagram schematically showing an example of a program development environment in the support device 200 according to the present embodiment. The support device 200 provides an environment for assisting in the development of application programs. The application program constitutes a user program including a control program for PLC. The application program to be developed may include, for example, a program conforming to the international standard IEC61131-3. In the international standard IEC61131-3, as programming languages for PLC applications including control programs, five types are defined: ladder diagram (LD), function block diagram (FBD), sequential function chart (SFC), instruction list (IL), and structured text (ST).
[0028] The application program according to the present embodiment includes a ladder diagram program, but may be a program described in any programming language. Hereinafter, as a typical example, a program described in a ladder diagram will be described.
[0029] The support device 200 includes, for example, a notebook or desktop PC (Personal Computer), a tablet terminal, a smartphone, or other information processing devices.
[0030] The application program of a PLC includes a control program for controlling a target and a communication program for the PLC to communicate with other devices including other PLCs. In this embodiment, the PLC communicates with other devices according to a publish / subscribe communication method. In this embodiment, the MQTT (Message Queuing Telemetry Transport) communication protocol is used as a communication protocol for data distribution that realizes this publish / subscribe communication model. Hereinafter, the publish / subscribe communication is abbreviated as Pub / Sub communication.
[0031] A development support program 250 is installed in the support device 200. The development support program 250 is an application for supporting the development of a control program for a PLC. A user can design an application program for a PLC and install the designed application program in the PLC by operating various tools provided by the development support program 250.
[0032] The application program includes a periodic execution type control program. Periodic execution type refers to an execution form in which the control program is repeatedly executed from the first line to the last line at a predetermined period. In other words, in a periodic execution type control program, the program execution period is guaranteed. Typical examples of periodic execution type programming languages include ladder diagram and structured text languages.
[0033] The development support program 250 generates an application program while manipulating various data in a data storage unit 270 configured by a RAM (Random Access Memory), a HDD (Hard Disc Drive), etc. The data storage unit 270 includes a library 245 that configures an area in which FBs (Function Blocks) and FUNs (Functions) that are examples of unit programs that configure the application program are stored. The library 245 includes an MQTT library 26 that stores FBs for realizing Pub / Sub communication according to the MQTT communication protocol.
[0034] The MQTT library 26 includes Client-FB31, Sub-FB32, Pub-FB33, and Ping-FB34 in association with various functions provided by Pub / Sub communication. Client-FB31 has a command code of a client that has a function of establishing a network connection between the PLC and another device (another PLC) that exchanges control-related data.
[0035] Sub-FB32 has a publisher instruction code that outputs a request to send a publish message of control data to the network to a client. Pub-FB33 has a subscriber instruction code that outputs a request to send a subscribe message of control data to the network to a client.
[0036] The Ping-FB 34 has an instruction code for a connection monitor that has the function of outputting to a client a request to send a PING command message to the network for monitoring the state of the network connection.
[0037] The development support program 250 has an editor 252 that edits a source program 271 written in source code 272 in accordance with a user operation on the support device 200, and a compiler 212 that compiles the source program 271 and converts it into an executable program 273. The development support program 250 further has a debugger 213 for debugging the program, a simulator 214 for verifying the operation of the program, a builder 215, and a GUI (Graphical User Interface) tool 216 that provides a GUI environment for program development.
[0038] The editor 252 includes a code editor 254 for editing the code of the application program, a variable editor 253 for editing variables used in the program and generating variable data 274, and a task setting editor 255. When the source program 271 is executed in the PLC, the task setting editor 255 sets, based on a user operation, task control information 275 indicating the degree to which the task is executed with priority over other tasks, for each of one or more tasks configured by the source program 271. The task control information 275 includes a priority 133 for each task, as described later.
[0039] The code editor 254 edits the code of a source program 271, which is an application program, and writes a call instruction code for calling an FB in the library 245 into the source program 271 in accordance with a user operation.
[0040] When the source program 271 is edited, the compiler 212 compiles the source code 272 of the edited source program 271 to generate an executable program 273. The builder 215 links the executable program 273 with the FBs in the library 245 that are called by the source program 271, to generate an executable application program 170, and transfers (installs) it to the PLC 100 by the transfer module 211.
[0041] The PLC executes the installed executable application program 170. When this is executed, the control program and communication programs 171 (Client-FB31, Sub-FB32, Pub-FB33, and Ping-FB34) are executed. As a result, during the periodic execution of the control program, the PLC can perform Pub / Sub communication according to the MQTT protocol to exchange data with other devices (other PLCs).
[0042] As described above, the support device 200 provides the communication program 171 of the PLC as unit programs (Client-FB31, Sub-FB32, Pub-FB33, and Ping-FB34) corresponding to the respective functions provided by the Pub / Sub communication according to the MQTT protocol as the MQTT library 26. Also, among these four FBs, by having only Client-FB31 responsible for establishing network connections and communication functions, the development of other FBs becomes relatively easy.
[0043] As a result, when the user operates the support device 200 to develop (create) the application program 170 that coordinates control with communication, the functions provided by the Pub / Sub communication can be handled by being subdivided into four functions. Therefore, compared with the case where the functions of the Pub / Sub communication are provided integrally without being subdivided, the user can efficiently develop the application program 170 of the PLC.
[0044] Hereinafter, as a more specific application example of the present invention, a more detailed configuration and processing of the support device 200 according to the present embodiment will be described.
[0045] <B. System Configuration> First, a system including a PLC supported by the support device 200 according to the present embodiment will be described.
[0046] Fig. 1 is a schematic diagram showing a system 1 according to the present embodiment. The system 1 according to the present embodiment includes a plurality of PLCs (PLC1, PLC2, PLC3) that are network-connected via a network 410. The plurality of PLCs communicate with a server 300 via a network 400. The server 300 includes a cloud-based external server or an on-premise server. In Fig. 1, the system 1 has three PLCs, but the number of PLCs is not limited to three and may be any number.
[0047] Each PLC in the system 1 corresponds to an industrial controller that controls an arbitrary control target (for example, a target such as a manufacturing device or facility of an FA). One or more field devices are connected to the PLC. Each of the one or more field devices includes an actuator 7 that exerts some kind of physical action on a production line or the like including a production process (hereinafter collectively referred to as the "field"), and an input / output device 6 that includes a sensor that exchanges information with the field.
[0048] System 1 in FIG. 1 includes, for example, multiple types of processes (e.g., a screw tightening process, a soldering process, and an assembly process), and a PLC is provided for each of these processes. Workpieces flowing through the production line are passed through the processes in this order to manufacture a product. In the processes, multiple types of work are performed on the workpieces by field devices. Note that the types and number of processes included in system 1 are not limited to these, and may change according to the type of product to be produced or the product specifications.
[0049] In this way, the system 1 constitutes a distributed control system in which a PLC is provided for each process. The PLC of each process is connected to networks 400 and 4102 to exchange data related to control with other PLCs.
[0050] Each PLC includes a processing unit 10 which is the main body for executing programs, a power supply unit 12 for supplying power to the processing unit 10 and the like, and an IO (Input / Output) unit 14 for sending and receiving signals from the field. The IO unit 14 is connected to the processing unit 10 via the system bus 11. Typically, the IO unit 14 acquires input signals from the input / output device 6 which is a field device, and drives the actuator 7 which is a field device according to the execution result of the program in the processing unit 10. The input / output device 6 detects, for example, the control amount of the actuator. The input / output device 6 and the actuator 7 constitute the devices "targeted" by the PLC for control.
[0051] The support device 200 provides an environment for developing application programs executed by the PLC, and has a function of monitoring the operating state of the destination PLC, values of various data, and the like.
[0052] <C. Hardware Configuration> Next, the hardware configurations of the PLC and the support device 200 constituting the system 1 shown in FIG. 1 will be described.
[0053] (c1: Hardware Configuration of PLC) FIG. 2 is a schematic diagram showing the hardware configuration of the processing unit 10 of the PLC according to the present embodiment. Referring to FIG. 2, the processing unit 10 includes a processor 100, a chipset 102, a main memory 104, a non-volatile memory 106, a system timer 108, a system bus controller 120, a network controller 149, and a USB connector 110. The chipset 102 and other components are respectively coupled via various buses.
[0054] The processor 100 and the chipset 102 are typically configured according to a general-purpose computer architecture. That is, the processor 100 interprets and executes instruction codes sequentially supplied from the chipset 102 in accordance with an internal clock. The chipset 102 exchanges internal data with various components connected thereto, and generates instruction codes required for the processor 100. Furthermore, the chipset 102 has a function of caching data obtained as a result of the execution of arithmetic processing by the processor 100.
[0055] The processing unit 10 includes, as memories, a main memory 104 and a non-volatile memory 106 .
[0056] The main memory 104 is a volatile storage area, and stores various programs to be executed by the processor 100 after power is applied to the processing unit 10. The main memory 104 is also used as a working memory when the processor 100 executes various programs. As such a main memory 104, a device such as a DRAM (Dynamic Random Access Memory) or an SRAM (Static Random Access Memory) is used.
[0057] The non-volatile memory 106 stores in a non-volatile manner a real-time OS (Operating System), system programs, application programs installed from the support device 200, and various types of information.
[0058] These programs and data are copied to the main memory 104 so that they can be accessed by the processor 100 as necessary.
[0059] The processing unit 10 has, as communication interfaces, a system bus controller 120 and a network controller 149. These communication interfaces transmit output data and receive input data.
[0060] System bus controller 120 controls data exchange via system bus 11. More specifically, system bus controller 120 includes a DMA (Dynamic Memory Access) control circuit 122, a system bus control circuit 124, and a buffer memory 126. System bus controller 120 is internally connected to system bus 11 via a system bus connector 130.
[0061] The network controller 149 includes a dynamic memory access (DMA) control circuit 148 , a network control circuit 147 , and a buffer memory 146 in order to control data exchange with other PLCs via the network 410 .
[0062] The network control circuit 147 performs a process of transmitting output data from the buffer memory 146 to other PLCs connected to the network 410 and a process of receiving input data and storing it in the buffer memory 146 .
[0063] The USB connector 110 is a communication interface for connecting the support device 200 and the processing unit 10. Typically, a program executable by the processor 100 of the processing unit 10 and the like transferred from the support device 200 is loaded into the PLC via the USB connector 110.
[0064] (c2: Hardware configuration of the supported device) Fig. 3 is a schematic diagram showing an example of a hardware configuration of support device 200 according to the present embodiment. Referring to Fig. 3, support device 200 is typically configured with a general-purpose computer. From the viewpoint of maintainability, support device 200 may be configured with a notebook-type personal computer having excellent portability.
[0065] Referring to FIG. 3, the support device 200 includes a CPU 201 that executes various programs including an OS, a ROM (Read Only Memory) 202 that stores BIOS and various data, a memory RAM 203 that provides a work area for storing data necessary for program execution by the CPU 201, and a hard disk (HDD) 204 that non-volatilely stores programs executed by the CPU 201 and the like.
[0066] The HDD 204 constitutes a data storage unit 270. The HDD 204 stores a development support program 250 and a developed source program 271. In addition, the HDD 204 stores a library 245 including an MQTT library 26.
[0067] The support device 200 further includes a keyboard 205 and a mouse 206 corresponding to an operation unit that receives operations from a user, and a monitor 207 for displaying information to the user. The support device 200 includes a communication interface (IF) 209 for communicating with a PLC (processing unit 10) and the like.
[0068] Various programs executed by the support device 200 are stored and distributed on a CD-ROM 301. The program stored on this CD-ROM 301 is read by a CD-ROM (Compact Disk-Read Only Memory) drive 208 and stored in a hard disk (HDD) 204 or the like. Alternatively, it may be configured to download a program from an upper host computer or the like through a network 400 or 410.
[0069] <D. Software Configuration> Next, the software configuration for the PLC (processing unit 10) to provide various functions will be described.
[0070] Fig. 4 is a schematic diagram showing an example of a software configuration implemented in the processing unit 10 of the PLC according to this embodiment. The instruction code included in the software shown in Fig. 4 is read at an appropriate timing and provided to the processor 100 of the processing unit 10 for execution.
[0071] 4, in the processing unit 10, a program required for processing in the PLC is implemented on a real-time OS 190.
[0072] The real-time OS 190 is designed according to the computer architecture of the processing unit 10, and provides a basic execution environment for the processor 100 to execute programs required for processing in the PLC. More specifically, the real-time OS 190 cooperates with the scheduler 160 to realize a multitask execution unit 191. The multitask execution unit 191 provides an environment for switching and executing tasks realized by a plurality of programs over time. The scheduler 160 switches the tasks assigned to the processor 100 according to the task priority or cycle indicated by the task control information 275. As a result, the processor 100 executes tasks according to the task priority or cycle indicated by the task control information 275.
[0073] More specifically, the processing unit 10 is implemented with a scheduler 160, an application program 170, an input processing module 172, an output processing module 174, a communication processing module 176, other system modules 178, an instruction execution module 180, and a memory manager 184. The memory manager 184 manages data stored in the main memory 104. More specifically, it manages the reading and writing by the application program 170 of variable data 274 that defines various variables used in the application program 170.
[0074] In relation to multitasking control, the scheduler 160 controls the execution start timing and processing interruption for the application program 170 , the input processing module 172 , the output processing module 174 , and the communication processing module 176 in accordance with task control information 275 .
[0075] The application program 170 is created by the user according to the control purpose. That is, it is a program that is arbitrarily designed according to the line (process) to be controlled using the system 1. The application program 170 corresponds to a program module in an executable format generated by the support device 200, and includes a communication program 171.
[0076] The application program 170 may include a control program for sequence processing, motion calculation, etc. The application program 170 is executed by the command execution module 180 to realize various control processes and Pub / Sub communication according to the MQTT protocol.
[0077] Input processing module 172 rearranges input data received by system bus controller 120 into a format suitable for use by application programs 170. Output processing module 174 rearranges output data generated by the execution of application programs 170 into a format suitable for transfer to system bus controller 120.
[0078] The communication processing module 176 controls communication processing with other PLCs by the network controller 149 or communication with the support device 200. Communication processing with other PLCs is realized in cooperation with the execution of a communication program 171.
[0079] Other system modules 178 are a collection of one or more modules for realizing various functions of the PLC 1 other than the programs individually shown in FIG.
[0080] <E. Program Development Process> FIG. 6 is a flowchart showing an example of the general process of program development according to the present embodiment. Referring to FIG. 6, in the support device 200, when generating (modifying) the application program 170 from the source program 271, the editor 252 edits (edits) the source program 271 according to the user operation content received via the keyboard 205 or the mouse 206 (step S1).
[0081] In the edit, based on the user operation, the editor 252 describes in the source program 271 the instruction codes for calling each FB of the Pub / Sub communication of the communication program 171. More specifically, instruction codes for calling Client-FB31, Sub-FB32, Pub-FB33, and Ping-FB34 are described (steps S12, S13, S14, S15). In the present embodiment, the number of Pub / Sub communication connections is set according to the number of other PLCs with which the PLC communicates. In the case of the system 1 in FIG. 1, two connections are set for each PLC. In FIG. 6, the user specifies the number of connections from the configuration information of the system 1 (step S11), and while incrementing the variable N by 1 for the number of acquired connections (NO in step S16, step S17), the processes of steps S12 to S15 are repeated. When the processes of steps S12 to S15 are completed for all connections (YES in step S16), the edit process of the source program 271 ends, and the source program 271 is stored (step S18).
[0082] Compiler 212 compiles the source program 271 (more specifically, the source code 272) to generate an executable program 273 (step S2). Builder 215 performs a build process on the executable program 273 and the FB of library 245 to generate an executable application program 170 (step S3). At this time, task control information 275 is also created (step S4), and transfer module 211 transfers the executable application program 170 and task control information 275 to the PLC (step S5).
[0083] In this embodiment, the development environment of the application program is configured in support device 200, which is a device independent of the PLC. However, the development environment of the application program may also be implemented in the PLC. For example, the PLC is equipped with a real-time OS for executing the control program and a general-purpose OS for the development environment of the application program, and the development environment of the application program is configured under the general-purpose OS.
[0084] <F. Task Control Information> A "task" is a unit of processing executed by processor 100, and a task includes one or more programs. The "real-time property" of a task indicates that the execution is completed within a predetermined time after the task starts execution. A "control task" is a task for real-time controlling the target to be controlled among the field device group. A "non-control task" is a task that is not directly involved in real-time control unlike the "control task", but requires real-time property and is a task for performing the processing related to the above real-time control. The "priority" of a task indicates the relative order in which the task is executed by the processor earlier than other tasks. If the priority is high, the execution order is earlier, and if the priority is low, the execution order is later.
[0085] PLCs achieve real-time control of equipment by executing control tasks that control equipment, such as control programs that control equipment installed at production sites, at predetermined intervals. Here, the predetermined intervals are called "control intervals."
[0086] In a control device such as a PLC, as various functions are added, it is required to execute non-control tasks that are not directly involved in device control while maintaining the above-mentioned real-time control (fixed periodicity). In this embodiment, the tasks of such added functions include the tasks of the communication program 171, that is, Client-FB31, Sub-FB32, Pub-FB33, and Ping-FB34.
[0087] Fig. 7 is a diagram showing an example of task control information 275 according to the present embodiment. With reference to Fig. 7, a user sets the priority of a task in task control information 275 when developing an application program for a PLC.
[0088] 7, the task control information 275 includes a task name 132 and priority information (priority 133 and execution condition 134) corresponding to each task. The task name 132 is the task name of the control program and the name of a unit program constituting the communication program 171, i.e., an FB, and includes Client, Sub, Pub, and Ping corresponding to Client-FB31, Sub-FB32, Pub-FB33, and Ping-FB34, respectively. In this embodiment, the priority of the control task is set to the highest, "1". Among the tasks of the communication program 171, the priority of Client is set to the highest, and the priorities 133 of the tasks of Client, Sub, and Pub are set to, for example, "2", "4", and "6", and the priority 133 of the task of Ping is set to a lower value, for example, "15". Moreover, regarding the execution condition 134 of the priority information, Client and Sub are set as "resident type" that are executed unconditionally in each control cycle, and Ping is set as "start type" that is executed when a predetermined condition is satisfied, for example, once in N (where N≧1) control cycles. Furthermore, the task Pub is started in each control cycle, but is configured to execute the subscribe process only when a predetermined publish condition is satisfied when it is executed, so the execution condition 134 is indicated as "resident / start type". In this embodiment, among the tasks of the communication program 171, the client is set to the highest priority, but the setting method is not limited to this, and multiple tasks of the communication program 171, for example, all tasks, may be set to the same priority.
[0089] According to the task control information 275, the priority 133 and execution conditions can be set individually for each of the four tasks that constitute the Pub / Sub communication function that is not directly related to the control of the device. Therefore, even if Pub / Sub communication is added, it is easy to maintain the regular periodicity of the control described above.
[0090] When executing the application program 170 , the scheduler 160 controls the execution cycle of each task, Client, Sub, Pub and Ping, of the communication program 171 in accordance with the task control information 275 .
[0091] <An example of the Pub / Sub communication model> FIG. 8 is a diagram showing the Pub / Sub communication model according to the present embodiment. With reference to FIG. 8, the Pub / Sub communication model will be described for the connection between PLC1 and PLC2. The data published by the publisher PLC1 is provided to the subscriber PLC2 via the server 300 responsible for message distribution as an MQTT broker.
[0092] The publisher sends data with the topic of the server 300 as the destination. The publisher defines a topic as the destination in the message format having data related to control, and sends it to the server 300.
[0093] The subscriber applies to the server 300 for the distribution of topic information, and receives from the server 300 the distribution of the message registered in the applied topic. The subscriber can execute, for example, the application program 170 including the control program using the data related to control sent from the publisher.
[0094] The server 300 mediates the data exchange between the publisher and the subscriber. The subscriber registers with the server 300 to request topic data. Also, the publisher sends a message including the topic and data to the server 300.
[0095] The server 300 manages the topics applied for distribution by the subscriber. For example, when the server 300 receives a message including the topic and data from the publisher, it stores the topic message and distributes it to the subscriber who requests the data of the topic.
[0096] Note that the description of FIG. 8 is also applicable to the case where the data published by PLC2 is provided to the subscriber PLC1 via the server 300.
[0097] <Pub / Sub Communication Model According to H.MQTT> FIG. 9 is a diagram showing an example of a Pub / Sub communication model configured in the PLC according to the present embodiment. In the figure, the exchange of data between Client-FB31 and Sub-FB32, Pub-FB33, and Ping-FB34 is shown.
[0098] Client-FB31 holds transmission / reception data and client states, and receives data transmission requests SR1, SR2, and SR3 from Sub-FB32, Ping-FB34, and Pub-FB33. Sub-FB32, Ping-FB34, and Pub-FB33 acquire received data RD1, RD2, and RD3, and client states SD1, SD2, and SD3 from Client-FB31 in response to data transmission requests SR1, SR2, and SR3. Client-FB31 exchanges data transmission request SR0, received data RD, and client state SD with Sub-FB32, Ping-FB34, and Pub-FB33 via variables commonly set between FBs, such as structure variables.
[0099] Client-FB31 performs, for example, secure socket communication with the server 300. Client-FB31 manages the IP address and port number of the server 300 (see FIG. 8). Therefore, Sub-FB32, Pub-FB33, and Ping-FB34 can perform data publishing, data subscribing, and PING command transmission by data transmission request SR without the identification information of the server 300 serving as the broker.
[0100] (h1. Packet Format) Describe the format of messages exchanged between the FBs of the MQTT library 26. Referring to FIG. 10, the basic configuration 70 of the message packet includes a fixed header 71, a variable header 72, and a payload 73. The fixed header 71 contains information about the type of the packet and the length of the packet. The variable header 72 contains the packet ID, and the payload 73 contains a message such as data to be communicated.
[0101] Referring to FIG. 11, the published packet 70A includes the topic name in the variable header 72 and a message such as the data to be published in the payload 73. Referring to FIG. 12, the subscribed packet 70B includes the packet ID in the variable header 72 and a topic filter indicated by the topic name in the payload 73.
[0102] Referring to FIG. 13, the message packet of the PING command (hereinafter also referred to as the PING packet) includes the type of the packet of the PING command in the fixed header 71.
[0103] <I.Configuration of the FBs of the MQTT Library> Describe each FB of the MQTT library.
[0104] (i1.Configuration of the Client-FB) The Client-FB 31 controls the connection with the server 300 and performs the transmission of the messages generated in the Sub-FB 32, Pub-FB 33, and Ping-FB 34 to the server 300 and the reception of the messages from the server 300.
[0105] FIG. 14 shows an example of the Client-FB 31 according to the present embodiment. FIGS. 15 and 16 are the timing charts of the Client-FB 31 in FIG. 14.
[0106] 14, Client-FB31 has, as input variables, an input variable Enable for an execution trigger, a variable Settings for connection settings, a variable KeepAlive for a keep alive timer, and a variable Timeout for a timeout, and, as output variables, a variable Connected indicating a connection to the MQTT server 300, a variable Busy indicating an execution in progress, a variable Error indicating an error, a variable ErrorID for an error code, and a variable ErrorIDEx indicating an extended error code.
[0107] Fig. 15 and Fig. 16 show timing charts showing the operation of Client-FB31 in Fig. 14. The scheduler 160 sets the input of the variable Enable to High (rising edge) every control period in accordance with the task control information 275 so that Client-FB31 is executed in a resident mode.
[0108] 15, when Client-FB31 detects a rising edge by differentially processing the "Enable" (executing) signal while "Busy" (executing) is FALSE, it sets "Busy" (executing) to TRUE. After that, when a connection with the server 300 is established, Client-FB31 sets "Connected" (server connected) to TRUE, and continues to set "Busy" (executing) to TRUE even after the connection with the server 300 is established.
[0109] 16, when "Enable" (executing) becomes FALSE during connection processing in which "Connected" (connected to server) is TRUE, disconnection processing with the server 300 is started and "Connected" (connected to server) is set to FALSE. After that, when disconnection processing with the server 300 is completed, Client-FB31 sets "Busy" (executing) to FALSE.
[0110] In addition, even if "Enable" (running) goes down while "Connected" (connected to server) is FALSE and "Busy" (running) is TRUE, "Busy" (running) does not immediately become FALSE but remains TRUE. When the disconnection process with the MQTT server is completed, "Busy" (running) is set to FALS.
[0111] Regarding error handling, if an abnormality is detected while "Connected" (connected to the server) is TRUE, Client-FB31 sets "Connected" (connected to the server) to FALSE, and after completing the disconnection process with the server 300, sets "Error" to TRUE and sets values indicating the cause of the abnormality to "ErrorID" (error code) and "ErrorIDEx" (extended error code).
[0112] (i1-1. Network connection and connection monitoring) Client-FB31 monitors the health of the network connection with the server 300. More specifically, when the value of the variable "Enable" rises from FALSE to TRUE, Client-FB31 executes a connection request to the server 300 according to the settings specified in the variable "Settings".
[0113] After Client-FB 31 establishes a connection with server 300 in response to a connection request, it transmits messages generated by Sub-FB 32, Pub-FB 33, and Ping-FB 34 and receives messages from server 300.
[0114] Client-FB 31 includes a command code for monitoring a network connection. That is, Client-FB 31 monitors the connection while the connection with the server 300 is established. More specifically, it executes a keep-alive to check whether or not the connection with the server 300 is established.
[0115] When Client-FB31 detects that no message is sent from the client within the time specified by the variable KeepAlive while connected to the server 300, Client-FB31 sends a PING packet. It measures the time elapsed from sending the PING packet to receiving a PINGRESP packet containing the response, and if it detects that the PINGRESP packet is not received even when the measured elapsed time exceeds a predetermined time, it disconnects the connection with the server 300. When the variable KeepAlive is set to 0, Client-FB31 does not send a PING packet.
[0116] (i2.Sub-FB32 configuration) Fig. 17 shows an example of Sub-FB32 according to this embodiment. Fig. 18 is a timing chart of CSub-FB32 in Fig. 17. Sub-FB32 subscribes (receives) a specified topic and reads a message portion from a published message of the received specified topic.
[0117] 17, Sub-FB32 includes, as input variables, an input variable Enable for triggering execution, a variable Topic specifying the topic for which subscription is requested, and a variable Message in the message part of the published message of the specified topic. Also, as output variables, it has a flag variable Subscribed indicating whether or not subscribing is in progress, a variable Status indicating the execution status of Sub-FB32 as a numerical value, a variable Received indicating completion of reception, a variable Error indicating an error occurrence, a variable ErrorID indicating an error code, a variable ErrorIDEx indicating an extended error code, a variable Message indicating the received message, and a variable Topic indicating the topic to which the received message belongs.
[0118] The operation of Sub-FB 32 in Fig. 17 will be described with reference to the timing chart in Fig. 18. Sub-FB 32 is started by the scheduler 160 in accordance with the task control information 275 for each control period.
[0119] 18, when "Status" (execution state) is 0 (execution stopped), if "Enable" rises from FALSE to TRUE by scheduler 160, Sub-FB32 detects the rise of "Enable" by differential processing and sets "Status" (execution state) to 1 (subscribe request in progress). This starts up Sub-FB32.
[0120] If the subscription is successful, Sub-FB32 sets "Status" (execution state) to 2 (subscribing) and sets "Subscribed" (subscribe request completed) to TRUE.
[0121] When Sub-FB32 detects that it has received a publish message that belongs to a topic that matches "Topic" and "Status" (execution state) is 2 (subscribed), it sets "Received" to TRUE.
[0122] When Sub-FB32 detects that "Enable" has fallen from TRUE to FALSE while "Status" (execution state) is showing 1 (subscribe request in progress) or 2 (subscribed), it sets "Status" (execution state) to 3 (unsubscribing) and sets "Subscribed" (subscribe request completed) to FALSE.
[0123] After that, when the unsubscription is completed, Sub-FB32 sets "Status" (execution state) to 0 (execution stopped).
[0124] In addition, when "Status" (execution state) indicates 2 (subscribing), if Sub-FB32 detects that the connection with server 300 has been lost, it sets "Status" (execution state) to 4 (waiting for reconnection) and sets "Subscribed" (subscribe request completed) to FALSE.
[0125] If Sub-FB32 detects an abnormality in the FB itself during execution, it sets "Error" to TRUE and sets values that identify the abnormality to "ErrorID" (error code) and "ErrorIDEx" (extended error code).
[0126] (i3.Pub-FB configuration) Fig. 19 shows an example of Pub-FB 33 according to this embodiment. Fig. 20 is a timing chart of Pub-FB 33 in Fig. 19. Pub-FB 33 generates a message to be published, and transmits it to the server 300 via Client-FB 31.
[0127] 19, Pub-FB33 has, as input variables, a variable Execute for receiving a start trigger, a variable Topic for specifying a topic name to be published, a variable Message for indicating a message to be published to the specified topic, and a variable Settings for publishing settings. Also, as output variables, it has a variable Done for indicating completion of processing execution, a variable Busy for indicating processing is in progress, a variable Message for indicating a message to be published, a variable Error for indicating an error occurrence, a variable ErrorID for indicating an error code, and a variable ErrorIDEx for indicating an extended error code.
[0128] The operation of Pub-FB33 will be described with reference to Fig. 20. For example, when the variable "Execute" (start) is set to True by the output from the control program being executed, that is, when the publish condition is satisfied, Pub-FB33 detects the rising edge of the variable "Execute" by differential processing or the like, and sets "Busy" (running) to TRUE in response to the detection. Pub-FB33 sets the packet of the publish message specified by the input variable Settings to the output variable Message. As a result, the message to be published is output to Client-FB31.
[0129] The published message is output to Client-FB31, and when the message exchange is complete, Pub-FB33 sets "Done" to TRUE and "Busy" to FALSE.
[0130] If an error is detected in the FB processing itself while Pub-FB33 is running, Pub-FB33 sets "Error" to TRUE and "Busy" to FALSE. "ErrorID" (error code) and "ErrorIDEx" (extended error code) are set to values according to the error.
[0131] (i4.Ping-FB configuration) Fig. 21 shows an example of Ping-FB34 according to this embodiment. Fig. 21 and Fig. 23 are timing charts of Ping-FB34 in Fig. 21. Ping-FB34 has a command code for transmitting a PING packet of Fig. 13, which is a ping command message, via Client-FB31 in order to check the soundness of the network connection established between Client-FB31 and server 300, and measuring the time until a response is returned from server 300.
[0132] 21 has as input variables Execute, which accepts a start trigger, and a variable Timeout, which indicates a threshold time for waiting for a response from server 300. Also, as output variables, there are a variable Done, which indicates the end of processing, a variable Busy, which indicates processing is in progress, a variable Error, which indicates an error has occurred, a variable ErrorID, which indicates an error code, a variable ErrorIDEx, which indicates an extended error code, and a variable ElapseTime, which measures the time from when a PING packet of a PINGREQ message is sent to when a response PINGRESP message is received, and in which the measured time is set. The PINGRESP message also has the packet configuration of FIG.
[0133] Referring to FIG. 22, when the variable "Execute" (start) is set to TRUE while Client-FB31 is connected to server 300, Ping-FB34 sets "Busy" (executing) to TRUE. That is, in response to the variable "Execute" being set to TRUE every N control cycles by scheduler 160, Ping-FB34 executes the logic within the FB to generate PINGREQ packet 70C, issues a transmission request for PINGREQ packet 70C, and receives a PINGRESP packet that is the response to PINGREQ packet 70C. Also, by executing the logic within the FB, Ping-FB34 measures the time required from when the transmission request for PINGREQ packet 70C is output until the PINGRESP packet is received, and sets the measured required time to variable ElapseTime. When the process ends, variable Done is set to TRUE.
[0134] Referring to FIG. 23, Ping-FB34 compares the time required from when the transmission request for PINGREQ packet 70C is output until the PINGRESP packet is received, that is, the measured time set to variable ElapseTime, with the threshold time indicated by input variable Timeout. When it determines that the condition (measured time > threshold time) is satisfied based on the comparison result, it detects a timeout and sets variable Error to TRUE. Ping-FB34 sets the timeout information to "ErrorID" (error code) and "ErrorIDEx" (extended error code).
[0135] In this way, Ping-FB34 can measure the time required from when the transmission request for the ping command message is output until the response is received, monitor the health such as traffic on the network from the measured required time, and output the monitoring result.
[0136] <An Example of a Communication Program> 24 and 25 are diagrams showing a schematic representation of a portion of a communication program 171 in an application program 170 according to this embodiment. 24 and 25 show a ladder program, for example, the communication program 171 displayed on the monitor 207 by the GUI tool 216.
[0137] Referring to FIG. 24, in the editor process (step S1) of the communication program 171, a call command 310 for Client-FB31, a call command 340 for Ping-FB34, and a call command 330 for Pub-FB33 are written in the program based on user operation, and the FB corresponding to each call command is placed at the position of each call command.
[0138] In the communication program 171, Client-FB31 is connected to block 311 which sets a value to the input variable Enable, Ping-FB34 is connected to blocks 311 and 341 which set a value to the input variable Execute, and Pub-FB33 is connected to blocks 311 and 331 which set a value to the input variable Execute.
[0139] The block 331 is set to ON for each control period by the scheduler 160. When the block 331 is set to ON, the variable Enable of the Client-FB 31 that receives the output of the block 331 rises to High, and in response, the Client-FB 31 starts processing.
[0140] Block 341 is set to ON every N control cycles by scheduler 160. Therefore, at the timing when block 331 is set to ON and block 341 is set to ON, that is, every N control cycles, a trigger is set for the variable Execute of Ping-FB34 which receives the output of block 341, and Ping-FB34 is started in response to the input of the trigger and starts processing the Ping command.
[0141] Block 331 is set to ON when an output of a control program, for example, a request for publishing control data, is output. Therefore, when the publishing condition is satisfied in this way, Block 331 is set to ON, and at the timing when Block 331 is set to ON, that is, when a publishing request is output from the control program in each control cycle, a trigger of the variable Execute of Pub-FB33 that receives the output of Block 331 is set, and Pub-FB33 is activated according to the input of the trigger to start the publishing process.
[0142] The communication program 171 in FIG. 25 changes Pub-FB33 of the communication program 171 in FIG. 24 to Sub-FB32. Since other programs are the same as those in FIG. 24, the description will not be repeated. Referring to FIG. 25, in the editor process (step S1) of the communication program 171, a call instruction 310 of Client-FB31, a call instruction 340 of Ping-FB34, and a call instruction 320 of Sub-FB32 are described in the program, and at the position of each call instruction, an FB corresponding to the call instruction is arranged.
[0143] In the communication program 171 of FIG. 25, blocks 311 and 321 for setting a value to the input variable Enable are connected to Sub-FB32. Block 321 is set to ON every control cycle by the scheduler 160. Therefore, when Block 311 is set to ON and at the timing when Block 321 is set to ON, the variable Enable of Sub-FB32 is set to High, and Pub-FB33 starts the subscription process.
[0144] <An example of the execution cycle of the K task> FIG. 26 is a diagram showing a model of the execution period of a task in a PLC according to the present embodiment. The scheduler 160 causes the CPU 110 to execute a task as shown in FIG. 26 according to the task control information 275. In FIG. 26, the task 141 of the control program is executed in each control period T. This maintains the fixed periodicity of the control program. In addition, in the free time of the control period T, the tasks 141 and 142 of the Client-FB31 and Sub-FB32 of the communication program 171 are executed. In addition, the task 143 of the Pub-FB33 is also started in the free time of each control period, and is executed only when the publishing condition is satisfied. In FIG. 26, since the publishing condition is not satisfied in the period (n+2), it is shown that the task 143 is not executed.
[0145] Furthermore, the scheduler 160 executes the task 144 of Ping-FB34, for example, once every two control periods T in a spare time based on its low priority 133. In Fig. 26, it is executed only in period (n+2) out of periods n to n+3. Since the task 144 is executed every two control periods T, the fixed periodicity of the control programs, Client-FB31, Sub-FB32, and Pub-FB33 can be maintained even if the task 144 of Ping-FB34, which is a process of monitoring a network connection for Pub / Sub communication, is executed.
[0146] In addition, since the network connection monitoring process is performed by the task of Client-FB31 executed in each control period T, even if the monitoring process of Ping-FB34 is executed once per N control periods T, it is possible to guarantee that the monitoring process is executed in each control period T.
[0147] Also, when a publish is requested by a user program including a control program, the user program may be configured to start Ping-FB34. After this start, when the user program determines that the network integrity is ensured based on the output variable Error of Ping-FB34, the user program may be configured to start Pub-FB33 so as to send a publish message. For example, when there is a large amount of network traffic, Ping-FB34 detects a timeout and sets TRUE to the variable Error.
[0148] The above publish condition may include a condition that it is detected that the network is sound based on the value of the variable Error of Ping-FB34. When the publish condition including the network integrity is satisfied, the user program can start Pub-FB33 so as to send a publish message, and thus the degree of freedom in timing selection for enabling reliable message transmission can be obtained. In the present embodiment, this advantage can be obtained because the startup type Ping-FB34 provides the monitoring function independent of the network connection monitoring function of Client-FB31.
[0149] <L. Program and Recording Medium> A development support program 250 that provides a development support environment for an application program 170 including the communication program 171 shown in the present embodiment is stored in the storage unit 201 of the support device 200. The CPU 202 can realize the development environment shown in the present embodiment by reading out and executing the development support program 250 from the storage unit 201.
[0150] The development support program 250 can also be provided as a program product by recording it on a computer-readable recording medium including a flexible disk, a CD-ROM (Compact Disk - Read Only Memory) 300, a ROM, a RAM, or other recording media attached to the support device 200. The recording medium is a medium that stores information such as programs recorded on a computer or other devices and machines by means of electrical, magnetic, optical, mechanical, or chemical actions so that the information can be read.
[0151] Also, the development support program 250 can be provided by recording it on a recording medium such as the HDD 204 built into the support device 200. Also, the program can be provided by downloading it from a network via a communication interface.
[0152] <M. Supplementary Note> The above-described embodiment includes the following technical ideas. [Configuration 1] An information processing device (200) having a library (245) for storing unit programs that make up an application program (170) executed by a control device (PLC) for controlling objects (6, 7), wherein the control device is network-connected to a server (300), the unit programs in the library include unit programs (31, 32, 33, 34) that make up a publish / subscribe type communication program (171) included in the application program, the unit programs that make up the communication program are a unit program (33) of a publisher that outputs a transmission request for a publish message of data related to the control, a unit program (32) of a subscriber that outputs a transmission request for a subscribe message of data related to the control, a unit program (34) for connection monitoring that outputs a transmission request for a ping command message for monitoring the network connection a client unit program (31) for transmitting a request to transmit the message from each of the unit programs to the server via the network; The information processing device further includes: an operation receiving means (205, 206) for receiving a user operation on the information processing device; an information processing apparatus comprising: a means (252) for creating the application program including a call command for each unit program constituting the communication program based on a user operation received by the operation receiving means. [Configuration 2] 2. The information processing apparatus according to configuration 1, further comprising means (255) for setting a priority (132) for each unit program of the communication program so that the unit program is executed in priority over other unit programs during a control period. [Configuration 3] 3. The information processing apparatus according to configuration 2, wherein, among the communication programs, at least the unit program of the client is set to have a higher priority than other unit programs. [Configuration 4] 4. The information processing device according to configuration 2 or 3, wherein the priority of the unit program for connection monitoring indicates that the unit program is executed every N control periods (T). [Configuration 5] 5. The information processing device according to any one of configurations 1 to 4, wherein the unit program of the client includes an instruction code for monitoring the network connection. [Configuration 6] The information processing device according to any one of configurations 1 to 5, wherein the server includes a message delivery server of MQTT (Message Queuing Telemetry Transport). [Configuration 7] A plurality of the control devices (PLC1, PLC2, PLC3) are connected to the server through a network; The information processing device of any one of configurations 1 to 6, wherein the plurality of control devices are configured to control the target by distributed control. [Configuration 8] 8. The information processing device according to any one of configurations 1 to 7, wherein the unit program for connection monitoring measures a time from when a request to send the ping command message is output until a response is received. [Configuration 9] A program development support method for an information processing device (200) including a library (245) for storing unit programs constituting an application program (170) executed by a control device (PLC) that controls an object (6, 7), comprising: The control device is connected to a server (300) via a network, the unit programs of the library include unit programs constituting a publish / subscribe communication program (171) included in the application program, The unit programs constituting the communication program are a publisher unit program (33) that outputs a request to transmit a publish message of the data related to the control; a subscriber unit program that outputs a transmission request for a subscribe message of the control-related data; a connection monitoring unit program (34) for outputting a request to send a ping command message for monitoring the network connection; a client unit program (31) for transmitting a request to transmit the message from each of the unit programs to the server via the network; The program development support method includes: receiving a user operation; creating the application program including a call command for each unit program constituting the communication program based on a received user operation. [Configuration 10] A development support program (250) for causing a processor to execute the program development support method according to configuration 9.
[0153] The embodiments disclosed herein should be considered to be illustrative and not restrictive in all respects. The scope of the present invention is defined by the claims, not the above description, and is intended to include all modifications within the scope and meaning equivalent to the claims. [Explanation of symbols]
[0154] 1 system, 6 input / output device, 7 actuator, 10 processing unit, 11 system bus, 12 power supply unit, 26 MQTT library, 70 basic configuration, 70A, 70B, 70C, ID packet, 71 fixed header, 72 variable header, 73 payload, 100 processor, 132 task name, 133 priority, 134 execution condition, 141, 142, 143, 144 task, 160 scheduler, 170 application program, 171 communication program, 191 multitasking execution unit, 200 support device, 211 transfer module, 212 compiler, 213 debugger, 214 simulator, 215 builder, 250 development support program, 252 editor, 271 source program, 272 source code, 273 executable program, 275 task control information, 300 Server, 310, 320, 330, 340 Call command, 400, 410 Network, SD Client state, SR Data transmission request, T Control period.
Claims
1. An information processing device including a library for storing unit programs constituting an application program executed by a control device for controlling an object, The control device is networked to a server; the unit programs of the library include unit programs constituting a publish / subscribe communication program included in the application program, The unit programs constituting the communication program are a publisher unit program that outputs a transmission request for a publish message of the data related to the control; a subscriber unit program that outputs a transmission request for a subscribe message of the control-related data; a connection monitoring unit program that outputs a transmission request for a ping command message that monitors the network connection; a client unit program that transmits a request to send the message from each of the unit programs to the server via the network; The information processing device further includes: an operation receiving means for receiving a user operation on the information processing device; an information processing apparatus comprising: means for creating the application program including a call command for each unit program constituting the communication program based on a user operation received by the operation receiving means;
2. 2. The information processing apparatus according to claim 1, further comprising: a unit program setting unit program priority for each unit program of the communication program so that the unit program is executed in preference to other unit programs during a control period.
3. 3. The information processing apparatus according to claim 2, wherein, of said communication programs, at least said unit program of said client is set to have a higher priority than other unit programs.
4. 4. The information processing apparatus according to claim 2, wherein the priority of the unit program for connection monitoring indicates that the unit program is executed every N control periods.
5. 5. The information processing apparatus according to claim 1, wherein the unit program of the client includes an instruction code for monitoring the network connection.
6. The information processing device according to claim 1 , wherein the server includes a message delivery server of Message Queuing Telemetry Transport (MQTT).
7. A plurality of the control devices are connected to the server through a network; The information processing device according to claim 1 , wherein the plurality of control devices are configured to control the target by distributed control.
8. 8. The information processing apparatus according to claim 1, wherein the unit program for monitoring connection measures a time period from when a request to send the ping command message is output until a response is received.
9. A program development support method for an information processing device having a library for storing unit programs constituting an application program executed by a control device that controls an object, comprising: The control device is networked to a server; the unit programs of the library include unit programs constituting a publish / subscribe communication program included in the application program, The unit programs constituting the communication program are a publisher unit program that outputs a transmission request for a publish message of the data related to the control; a subscriber unit program that outputs a transmission request for a subscribe message of the control-related data; a connection monitoring unit program that outputs a transmission request for a ping command message that monitors the network connection; a client unit program that transmits a request to send the message from each of the unit programs to the server via the network; The program development support method includes: Receiving a user operation; creating the application program including a call command for each unit program constituting the communication program based on a received user operation.
10. A development support program for causing a processor to execute the program development support method according to claim 9.