Processing method, program, and processing system
Patent Information
- Application Number
- PCT/JP2024/027509
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-05
- Filing Date
- 2024-08-01
- Publication Date
- 2025-03-13
Smart Images

Figure JP2024027509_13032025_PF_FP_ABST
Abstract
Description
Processing method, program, and processing system
[0001] The present disclosure relates to a processing method, a program, and a processing system, and more particularly to a processing method, a program, and a processing system for inputting and outputting data to and from an external device.
[0002] Japanese Patent Laid-Open No. 2006-129994 discloses a control device including a processor that executes multiple tasks and a multitasking execution unit that causes the processor to execute the tasks in an order based on the priority of each task. The control device is connected to a group of field devices via a first field network. The control device periodically performs an I / O refresh process (data update process) that includes a process of acquiring input data from the group of field devices (input process) and a process of outputting output data to the group of field devices (output process).
[0003] Japanese Patent Application Laid-Open No. 2018-181315
[0004] An object of the present disclosure is to provide a processing method, a program, and a processing system that can reduce the processing load due to data update processing.
[0005] A processing method according to one aspect of the present disclosure is a processing method for a processing system including an I / O unit having a plurality of terminals and a processing unit. The processing method includes task processing, which executes a task of processing data stored in input variables and storing the processing result in an output variable, and data update processing. The data update processing includes at least one of input processing, which stores data input to the I / O unit in the input variables, and output processing, which outputs data of the output variables to the I / O unit. The processing method performs the data update processing on the first terminal at least either before or after execution of the task based on assignment information. The assignment information is information that assigns the data update processing of a first terminal among the plurality of terminals to the task, and does not assign the data update processing of a second terminal other than the first terminal to the task.
[0006] A program according to one aspect of the present disclosure is a program for causing a computer system to execute the processing method.
[0007] A processing system according to one aspect of the present disclosure includes an I / O unit having a plurality of terminals and a processing unit. The processing unit performs task processing, which executes a task of processing data stored in input variables and storing the processing results in output variables, and data update processing. The data update processing includes at least one of input processing, which stores data input to the I / O unit in the input variables, and output processing, which outputs data of the output variables to the I / O unit. The processing unit performs the data update processing on the first terminal at least either before or after execution of the task, based on assignment information. The assignment information is information that assigns the data update processing of a first terminal among the plurality of terminals to the task, and does not assign the data update processing of a second terminal other than the first terminal to the task.
[0008] FIG. 1 is a schematic system configuration diagram of a processing system according to an embodiment of the present disclosure. FIG. 2 is a time chart showing an operation example 1 of the processing system. FIG. 3 is a time chart showing an operation example 2 of the processing system. FIG. 4 is a time chart showing an operation example of the processing system of Modification 1. FIG. 5 is a time chart showing an operation example of the processing system of Modification 1. FIG. 6 is a time chart showing an operation example of the processing system of Modification 1. FIG. 7 is a time chart showing an operation example of the processing system of Modification 2. FIG. 8 is a time chart showing an operation example of the processing system of Modification 2. FIG. 9 is a time chart showing an operation example of the processing system of Modification 2.
[0009] Hereinafter, a processing system and a processing method thereof according to an embodiment will be described in detail with reference to the drawings. However, the configurations described in the following embodiments are merely examples of the present disclosure. The present disclosure is not limited to the following embodiments, and various modifications are possible depending on the design, etc., as long as the effects of the present disclosure can be achieved.
[0010] (Embodiment) (1) Overview A processing system 1 according to this embodiment includes an I / O unit 70 having a plurality of terminals, and a processing unit 11 .
[0011] The processing unit 11 executes task processing and data update processing.
[0012] In task processing, a task is executed to process data stored in input variables and store the processing results in output variables.
[0013] In the data update process, at least one of an input process for storing data input to the I / O unit 70 in an input variable and an output process for outputting data of an output variable to the I / O unit 70 is executed.
[0014] The processing unit 11 performs data update processing on the first terminal at least either before or after the execution of the task based on assignment information that assigns data update processing on a first terminal among multiple terminals to a task and does not assign data update processing on a second terminal other than the first terminal to a task.
[0015] Here, if the allocation information assigns data update processing for the first terminal to a task, the processing unit 11 performs data update processing for the first terminal at least before and after the execution of the task. On the other hand, if the allocation information does not assign data update processing for the second terminal to a task, the processing unit 11 does not perform data update processing for the second terminal before and after the execution of the task. Therefore, if the allocation information sets a terminal that does not require data update processing before and after the execution of a certain task as the second terminal, data update processing for the second terminal is not performed before and after the execution of the task. Therefore, compared to when the processing unit 11 performs data update processing for all of the multiple terminals, the processing load of the processing unit 11 can be reduced by not performing data update processing for the second terminal. Another advantage is that not performing data update processing for the second terminal shortens the time required for task processing and data update processing.
[0016] (2) Details The processing system 1 according to this embodiment and the processing method thereof will be described in detail below with reference to the drawings.
[0017] (2.1) Configuration The processing system 1 of this embodiment is applied to a control system using a PLC (Programmable Logic Controller) that controls equipment to be controlled (e.g., a motor) in accordance with a control program created in advance, for example, in a factory.
[0018] 1, the processing system 1 includes a CPU unit 10, a plurality of (e.g., three) input / output units 20, an HLS master unit 31, and a communication unit 40. The CPU unit 10, the plurality of input / output units 20 each having a plurality of terminals, the HLS master unit 31, and the communication unit 40 are configured to be connectable, for example, side-by-side. With the CPU unit 10, the plurality of input / output units 20, the HLS master unit 31, and the communication unit 40 connected, the CPU unit 10, the plurality of input / output units 20, the HLS master unit 31, and the communication unit 40 are configured to be able to communicate with each other via an internal bus BS1.
[0019] Here, the processing system 1 of this embodiment includes an I / O unit 70 and a communication unit 40 as an interface unit that performs at least one of input and output of data. The processing system 1 also includes, as the I / O unit 70, an input / output unit 20 that is connected to the CPU unit 10 directly or via another unit, and a remote I / O unit 30 that is composed of an HLS master unit 31 and an HLS slave unit 32. It is not essential that the processing system 1 include both the input / output unit 20 and the remote I / O unit 30 as the I / O unit 70, and the processing system 1 may include only one of the input / output unit 20 and the remote I / O unit 30.
[0020] A plurality of (e.g., three) HLS slave units 32 are connected to the HLS master unit 31 via a communication line L1. Each of the plurality of HLS slave units 32 includes an input terminal section 322 having a plurality of input terminals and an output terminal section 323 having a plurality of output terminals. The HLS master unit 31 communicates with each of the plurality of HLS slave units 32, thereby performing input processing of the input terminal section 322 and output processing of the output terminal section 323 of each of the plurality of HLS slave units 32. In other words, the HLS master unit 31 has the function of remotely performing input processing and output processing of the input terminal section 322 and output terminal section 323 of each of the plurality of HLS slave units 32. Here, the HLS master unit 31 and the plurality of HLS slave units 32 constitute a remote I / O unit 30.
[0021] A scanner 41 and an adapter 42 are also connected to the communication unit 40 via a communication line L2. By communicating with each of the scanner 41 and the adapter 42, the communication unit 40 can perform at least one of the following processes: acquiring data from each of the scanner 41 and the adapter 42, and transmitting data to each of the scanner 41 and the adapter 42. The scanner 41 is a communication device that functions as a master in a master-slave system, and the adapter 42 is a communication device that functions as a scanner in the master-slave system.
[0022] Furthermore, a setting terminal 50 used to create a control program to be stored in the CPU unit 10 is detachably connected to the CPU unit 10 via a communication line L3.
[0023] The configuration of each part of the processing system 1 will be described below with reference to the drawings, etc. In the following description, when the multiple input / output units 20 are described separately, they will be referred to as input / output units 20A, 20B, 20C, etc. In addition, when the multiple HLS slave units 32 are described separately, they will be referred to as HLS slave units 32A, 32B, 32C, etc. In addition, multiple adapters 42 are connected to the communication unit 40 via communication line L2, and when the multiple adapters 42 are described separately, they will be referred to as adapters 42A, 42B, etc. In addition, although only one scanner 41 is connected to the communication unit 40 via communication line L2 in FIG. 1, multiple scanners 41 may be connected.
[0024] (2.1.1) CPU Unit The CPU unit 10 includes a processing unit 11 , a storage unit 12 , and a communication unit 13 .
[0025] The storage unit 12 includes a nonvolatile memory such as an EEPROM (Electrically Erasable and Programmable Read-Only Memory). The storage unit 12 stores, for example, a ladder program created by the setting terminal 50 and a control program obtained by compiling the ladder program. The storage unit 12 also has storage areas for a plurality of input variables that store data acquired by input processing (also referred to as input data) and a plurality of output variables that store data output from the interface unit to the outside (also referred to as output data). The input variables are assigned variable names such as WIn (n is a natural number), and the output variables are assigned variable names such as WOm (m is a natural number).
[0026] The setting terminal 50 is detachably connected to the communication unit 13 via a communication line L3. The communication unit 13 has a communication module that communicates using a serial communication method such as RS485 or USB, and exchanges data with the setting terminal 50.
[0027] The processing unit 11 mainly comprises, for example, a computer system having one or more processors and a memory. The processor of the computer system executes a program recorded in the memory of the computer system, thereby realizing the functions of the processing unit 11. The program may be recorded in the memory, or may be provided via a telecommunications line such as the Internet, or may be recorded on a non-transitory recording medium such as a memory card and provided.
[0028] The processing unit 11 can exchange data with the input / output units 20A to 20C, the HLS master unit 31, and the communication unit 40 via the internal bus BS1. The processing unit 11 can also exchange data with the setting terminal 50 via the communication unit 13.
[0029] The processing unit 11 executes task processing and data update processing.
[0030] The data update process includes at least one of input processing and output processing. In the input processing, data input from an external device to the interface unit (I / O unit 70 or communication unit 40) is stored in the input variable WIn. In the output processing, data of the output variable WOm is output from the interface unit (I / O unit 70 or communication unit 40) to the external device. The external device may be, for example, a controlled device such as a motor, or various sensors. As described above, the processing system 1 of this embodiment includes, as interface units, the input / output units 20A to 20C, the remote I / O unit 30, and the communication unit 40. Therefore, the storage unit 12 is provided with storage areas for multiple input variables WIn that store data acquired from the multiple input terminals of the input terminal units 22 of the multiple input / output units 20 and the multiple input terminals of the input terminal units 322 of the multiple HLS slave units 32, as well as received data received by the communication unit 40 from the scanner 41 or the adapter 42. In addition, the memory unit 12 has memory areas for a plurality of output variables WOm that respectively store data to be output to a plurality of output terminals provided by the output terminal sections 23 of a plurality of input / output units 20, and a plurality of output terminals provided by the output terminal sections 323 of a plurality of HLS slave units 32, as well as transmission data that the communication unit 40 sends to the scanner 41 and adapter 42.
[0031] Here, the processing unit 11 performs the data update process on the first terminal but not on the second terminal based on assignment information that assigns a first terminal to perform the data update process among the multiple terminals of the I / O unit 70. Therefore, compared to when data update processing is performed on all of the multiple terminals of the I / O unit 70, the processing load on the processing unit 11 can be reduced by the amount of data update processing not performed on the second terminal, and the time required for task processing and data update processing can be shortened.
[0032] Task processing is processing that executes multiple types of tasks. The processing unit 11 is capable of multitasking processing, which executes multiple types of tasks in parallel. In each of the multiple types of tasks, for example, data stored in an input variable WIn is read by input processing, and after performing a predetermined process, the processing result is stored in an output variable WOm. The data stored in the output variable WOm is output from the interface unit to an external device by performing output processing.
[0033] Here, the tasks executed by the processing unit 11 are classified into four types, for example, a primary task, a periodic task, an event task, and a system task.
[0034] The primary task is a basic task among a plurality of types of tasks executed by the processing unit 11. The processing unit 11 executes the primary task at regular intervals or repeatedly without interruption.
[0035] The periodic task is a process that the processing unit 11 repeatedly executes at a preset period.
[0036] An event task is a task that is executed by the processing unit 11 when a predetermined event occurs.
[0037] The system task is a task that is executed when the CPU unit 10 is started up or when an error occurs in the CPU unit 10 or the like.
[0038] Priorities may be set for multiple types of tasks, and when an execution request to execute multiple tasks simultaneously occurs, the processing unit 11 executes the multiple tasks in descending order of priority.
[0039] (2.1.2) Input / Output Units Since the input / output units 20A to 20C have the same configuration, the input / output unit 20A will be used as an example for explanation, and illustration and explanation of the input / output units 20B and 20C will be omitted.
[0040] The input / output unit 20A includes a processing unit 21, an input terminal unit 22, and an output terminal unit 23.
[0041] The input terminal unit 22 includes a plurality of input terminals (for example, 32 terminals). Input signals from external devices can be input to each of the plurality of input terminals included in the input terminal unit 22. The plurality of input terminals included in the input terminal unit 22 are divided into a plurality of input terminal groups, for example, in units of one word, and each of the plurality of input terminal groups is assigned a terminal number, for example, WXn (n is a natural number).
[0042] The output terminal unit 23 includes a plurality of output terminals (e.g., 32 terminals). The output format of the output terminal unit 23 is, for example, a transistor output system. Each of the plurality of output terminals included in the output terminal unit 23 can be connected to an external device, and output signals are output from the plurality of output terminals to the external device. The plurality of output terminals included in the output terminal unit 23 are divided into a plurality of output terminal groups, for example, in units of one word, and each of the plurality of output terminal groups is assigned a terminal number, for example, WYm (m is a natural number).
[0043] The processing unit 21 mainly comprises, for example, a computer system having one or more processors and a memory. The functions of the processing unit 21 are realized by the processor of the computer system executing a program recorded in the memory of the computer system. The program may be recorded in the memory, or may be provided via a telecommunications line such as the Internet, or may be recorded on a non-transitory recording medium such as a memory card and provided.
[0044] The processing unit 21 can send and receive commands and data to and from the processing unit 11 of the CPU unit 10 via the internal bus BS1.
[0045] In response to a data input request from the CPU unit 10, the processing unit 21 performs a process of outputting data input to multiple input terminals of the input terminal unit 22 to the CPU unit 10. The CPU unit 10 stores data input from the input / output unit 20A in input variables WIn corresponding to the input terminals of the input terminal unit 22. In response to a data input request from the CPU unit 10, the processing unit 21 may output data from all of the input terminals of the input terminal unit 22 to the CPU unit 10, or may output data from some of the input terminals (for example, word-by-word or bit-by-bit) to the CPU unit 10. In other words, the processing unit 21 simply performs input processing before executing the task to retrieve data from input terminals with a number of bits corresponding to the input variables used in the task, and performs output processing after executing the task to output data to output terminals with a number of bits corresponding to the output variables that store the processing results of the task, thereby reducing the processing load required for data update processing. For example, when a data input request for data of a specific input terminal group WXn is input from the CPU unit 10 to the processing unit 21, the processing unit 21 simply performs processing to output the data of the specified input terminal group WXn to the CPU unit 10.
[0046] In response to a data output request from the CPU unit 10, the processing unit 21 performs processing to output data of the output variable WOm to the output terminal of the output terminal unit 23 corresponding to the output variable WOm. Note that in response to a data output request from the CPU unit 10, the processing unit 21 may output data of the output variable WOm corresponding to all output terminals provided in the output terminal unit 23, or may output data of the output variable WOm corresponding to a portion (for example, word-by-word or bit-by-bit) of the output terminals. For example, when a data output request to output data to a specific output terminal group WYm is input from the CPU unit 10 to the processing unit 21, the processing unit 21 may perform processing to output the data of the output variable WOm to the specific output terminal group WYm.
[0047] (2.1.3) Remote I / O Unit The remote I / O unit 30 includes an HLS master unit 31 connected to the CPU unit 10 via an internal bus BS1, and one or more HLS slave units 32 connected to the HLS master unit 31 via a communication line L1 in a multi-drop system. In the example of Fig. 1, three HLS slave units 32A to 32C are connected to the HLS master unit 31.
[0048] <HLS Slave Unit> The HLS slave unit 32 includes a processing unit 321 , an input terminal unit 322 , an output terminal unit 323 , and a communication unit 324 .
[0049] The input terminal unit 322 includes a plurality of input terminals (e.g., 32 terminals). Input signals from external devices can be input to each of the plurality of input terminals included in the input terminal unit 322. The plurality of input terminals included in the input terminal unit 322 are divided into a plurality of input terminal groups, for example, in units of one word, and each of the plurality of input terminal groups is assigned a terminal number, for example, WXn (n is a natural number). Here, the plurality of input terminal groups included in the input terminal unit 322 and the plurality of input terminal groups included in the input terminal unit 22 of the input / output unit 20 are assigned a unique terminal number WXn.
[0050] The output terminal unit 323 includes multiple (e.g., 32) output terminals. The output format of the output terminal unit 323 is, for example, relay contact output. Each of the multiple output terminals included in the output terminal unit 323 can be connected to an external device, and output signals are output from the multiple output terminals to the external device. The multiple output terminals included in the output terminal unit 323 are divided into multiple output terminal groups, for example, in units of one word, and each of the multiple output terminal groups is assigned a terminal number, for example, WYm (m is a natural number). Here, the multiple input terminal groups included in the output terminal unit 323 and the multiple output terminal groups included in the output terminal unit 23 of the input / output unit 20 are assigned a unique terminal number WYm.
[0051] The communication unit 324 communicates with the HLS master unit 31 using a communication method conforming to the High-Speed Link System (HLS) method, for example. The HLS master unit 31 and the HLS slave unit 32 communicate using a master-slave method, with the HLS master unit 31 acting as the master and the HLS slave unit 32 acting as the slave.
[0052] The processing unit 321 is mainly composed of, for example, a computer system having one or more processors and a memory. The functions of the processing unit 321 are realized by the processor of the computer system executing a program recorded in the memory of the computer system. The program may be recorded in the memory, or may be provided via a telecommunications line such as the Internet, or may be recorded on a non-transitory recording medium such as a memory card and provided.
[0053] When the communication unit 324 receives an input request from the HLS master unit 31, the processing unit 321 causes the communication unit 324 to transmit data of an input terminal specified in the input request from among the multiple input terminals of the input terminal unit 322 to the HLS master unit 31. In response to the input request from the HLS master unit 31, the processing unit 321 may output data of all input terminals of the input terminal unit 322 to the HLS master unit 31, or may output data of some (for example, word-by-word or bit-by-bit) of the input terminals to the HLS master unit 31. For example, when an input request requesting data of a specific input terminal group WXn is input from the HLS master unit 31 to the HLS slave unit 32, the processing unit 321 may perform processing to output the data of the specified input terminal group WXn to the HLS master unit 31 from the communication unit 324.
[0054] When the communication unit 324 receives an output request from the HLS master unit 31, the processing unit 321 performs processing to output data from the output terminal of the output terminal unit 323. Here, the output request from the HLS master unit 31 includes data of the output variable WOm. In response to the output request from the HLS master unit 31, the processing unit 321 performs processing to output the data of the output variable WOm from the corresponding output terminal. In response to the output request from the HLS master unit 31, the processing unit 321 may output the data of the output variable WOm corresponding to all output terminals of the output terminal unit 323, or may output the data of the output variable WOm corresponding to a portion of the output terminals (for example, word-by-word or bit-by-bit). For example, when an output request to output data to a specific output terminal group WYm is input from the HLS master unit 31 to the HLS slave unit 32, the processing unit 321 may perform processing to output the data of the output variable WOm corresponding to the specified output terminal group WYm.
[0055] <HLS Master Unit> The HLS master unit 31 includes a processing unit 311 and a communication unit 312 .
[0056] The communication unit 312 communicates with the HLS slave unit 32 in a master-slave manner, for example, using a communication method conforming to the HLS method.
[0057] The processing unit 311 is mainly composed of, for example, a computer system having one or more processors and a memory. The functions of the processing unit 311 are realized by the processor of the computer system executing a program recorded in the memory of the computer system. The program may be recorded in the memory, or may be provided via a telecommunications line such as the Internet, or may be recorded on a non-transitory recording medium such as a memory card and provided.
[0058] The processing unit 311 can send and receive commands and data to and from the processing unit 11 of the CPU unit 10 via the internal bus BS1.
[0059] In response to a data input request from the CPU unit 10, the processing unit 311 outputs an input request to the HLS slave unit 32 requesting the transmission of data input to the input terminal unit 322. The data input request from the CPU unit 10 includes information on the input terminal from which data is to be acquired. In response to the data input request from the CPU unit 10, the processing unit 311 causes the communication unit 312 to transmit the input request to the HLS slave unit 32 having the input terminal from which data is to be acquired. When the communication unit 312 receives data transmitted from the HLS slave unit 32 in response to the input request, the processing unit 311 outputs the data received from the HLS slave unit 32 to the CPU unit 10. The CPU unit 10 stores the data input from the HLS master unit 31 in an input variable WIn corresponding to the input terminal of the input terminal unit 322. In response to a data input request from the CPU unit 10, the processing unit 311 may request the HLS slave unit 32 to transmit data from all of the input terminals of the input terminal unit 322, or may request the HLS slave unit 32 to transmit data from a portion of the input terminals (for example, in word units or bit units).
[0060] Furthermore, in response to a data output request from the CPU unit 10, the processing unit 311 outputs an output request to output data from an output terminal of the output terminal unit 323 included in the HLS slave unit 32. The data output request from the CPU unit 10 includes the output variable WOm to be output and the data stored in the output variable WOm. In response to the data output request from the CPU unit 10, the processing unit 311 causes the communication unit 312 to transmit the output request to the HLS slave unit 32 having the output terminal corresponding to the output variable WOm to be output. When the communication unit 324 of the HLS slave unit 32 receives the output request, the processing unit 321 controls the output transistor corresponding to the output variable WOm to be output, turning on or off, to output the output data stored in the output variable WOm. Note that in response to a data output request from the CPU unit 10, the processing unit 311 may output data from all output terminals included in the output terminal unit 323, or may output data from some of the output terminals (for example, in word units or bit units).
[0061] (2.1.4) Communication Unit The communication unit 40 includes a processing unit 401 and a communication unit 402 .
[0062] The communication unit 402 is connected to the scanner 41 and the adapter 42 via a communication line L2. The communication unit 402 performs communication using a communication method that complies with the Ethernet (registered trademark) standard, for example.
[0063] In communication between the communication unit 402 and the adapter 42, the adapter 42 operates as a slave in a master-slave system, and the communication unit 402 operates as a master in the master-slave system. The communication unit 402 transmits commands to the adapter 42 periodically or irregularly. When the adapter 42 receives a command from the communication unit 402, it transmits a response signal to the communication unit 402.
[0064] In communication between the communication unit 402 and the scanner 41, the scanner 41 operates as the master in a master-slave system, and the communication unit 402 operates as the slave in the master-slave system. The scanner 41 periodically or irregularly transmits commands to the communication unit 402. When the communication unit 402 receives a command from the scanner 41, it transmits a response signal to the scanner 41.
[0065] The processing unit 401 mainly comprises, for example, a computer system having one or more processors and a memory. The functions of the processing unit 401 are realized by the processor of the computer system executing a program recorded in the memory of the computer system. The program may be recorded in the memory, or may be provided via a telecommunications line such as the Internet, or may be recorded on a non-transitory recording medium such as a memory card and provided.
[0066] The processing unit 401 can send and receive commands and data to and from the processing unit 11 of the CPU unit 10 via the internal bus BS1.
[0067] When the processing unit 401 receives a data input request from the CPU unit 10, it outputs an input request from the communication unit 402 to the scanner 41 or the adapter 42 to request transmission of data.
[0068] When an input request is sent from the communication unit 402 to the scanner 41, upon receiving a command from the scanner 41, the communication unit 402 sends the input request to the scanner 41 in the form of a response to the command. Upon receiving the input request from the communication unit 402, the scanner 41 sends the data requested in the input request to the communication unit 402. When the communication unit 402 receives data from the scanner 41, the processing unit 401 outputs the received data to the CPU unit 10, and the CPU unit 10 stores the data input from the communication unit 402 in the corresponding input variable WIn.
[0069] When an input request is sent from the communication unit 402 to the adapter 42, the processing unit 401 causes the communication unit 402 to send the input request at a predetermined transmission timing to the adapter 42. When the adapter 42 receives the input request from the communication unit 402, it sends the data requested in the input request to the communication unit 402 in response to the input request. When the communication unit 402 receives data from the adapter 42, the processing unit 401 outputs the received data to the CPU unit 10, and the CPU unit 10 stores the data input from the communication unit 402 in the corresponding input variable WIn.
[0070] Furthermore, the processing unit 401 causes the communication unit 402 to transmit output data to the scanner 41 or the adapter 42 in response to a data output request from the CPU unit 10. When transmitting output data from the communication unit 402 to the scanner 41, upon receiving a command from the scanner 41, the communication unit 402 transmits the output data to the scanner 41 in response to this command. When transmitting output data from the communication unit 402 to the adapter 42, the processing unit 401 causes the communication unit 402 to transmit the output data to the adapter 42 at a predetermined transmission timing.
[0071] (2.1.5) Setting Terminal The setting terminal 50 is a computer terminal used to set, for example, a ladder program in the CPU unit 10. The setting terminal 50 may be a notebook-type personal computer or a tablet-type computer terminal.
[0072] Application software for creating programs such as ladder programs to be set in the CPU unit 10 is pre-installed on the setting terminal 50. A user can use the application software installed on the setting terminal 50 to create programs to be set in the CPU unit 10.
[0073] The setting terminal 50 includes a processing unit 51, a communication unit 52, a display unit 53, an input unit 54, a storage unit 55, and the like.
[0074] The processing unit 51 mainly comprises, for example, a computer system having one or more processors and a memory. The functions of the processing unit 51 are realized by the processor of the computer system executing a program recorded in the memory of the computer system. The program may be recorded in the memory, or may be provided via a telecommunications line such as the Internet, or may be recorded on a non-transitory recording medium such as a memory card and provided.
[0075] The communication unit 52 communicates with the communication unit 13 via the communication line L3.
[0076] The display unit 53 has a display device such as a liquid crystal display.
[0077] The input unit 54 includes input devices such as a keyboard, a mouse, a touchpad, etc. The display unit 53 and the input unit 54 may be realized by a touch panel display.
[0078] The storage unit 55 includes memories such as a read-only memory (ROM) and a random access memory (RAM). The storage unit 55 may also include an external storage device such as a solid-state drive (SSD). The storage unit 55 stores data such as ladder program data created by the user.
[0079] A user can create a program, such as a ladder program, to be set in the CPU unit 10 using application software installed on the setting terminal 50. When the setting terminal 50 and the CPU unit 10 are connected via communication line L3 and the user issues a transfer command on the setting terminal 50, the created ladder program is transferred from the setting terminal 50 to the CPU unit 10 and stored in the storage unit 12 of the CPU unit 10. When the processing unit 11 in the CPU unit 10 executes a compilation process for the ladder program, a control program is created by compiling the ladder program, and the created control program is stored in the storage unit 12. The processing unit 11 can execute the control program stored in the storage unit 12 to perform the above-described task processing and data update processing. After compiling the ladder program on the setting terminal 50, the compiled control program may be transferred from the setting terminal 50 to the CPU unit 10.
[0080] (2.2) Description of Operation The operation of the processing system 1 of this embodiment will be described with reference to FIG. 2 and other figures. Note that FIG. 2 is a schematic timing chart of the tasks and data update processing executed by the processing unit 11 of the CPU unit 10, and the time lengths of the tasks and data update processing do not necessarily reflect the actual processing times. Note that, when describing the data update processing of the I / O unit 70 below, the input / output unit 20 will be used as an example. The data update processing of the remote I / O unit 30 is similar to the data update processing of the input / output unit 20 except that the HLS master unit 31 is interposed between the CPU unit 10 and the HLS slave unit 32, and therefore a description thereof will be omitted.
[0081] (2.2.1) Operation Example 1 An operation example 1 of the processing system 1 will be described with reference to FIG.
[0082] In operation example 1, when data update processing of the multiple terminals of the input / output unit 20 is assigned to a task, it is set for each input terminal in a predetermined unit (for example, in units of words) whether it is a first terminal that executes data update processing or a second terminal that does not execute data update processing. In other words, the multiple terminals of the I / O unit 70 are divided into multiple terminal groups (input terminal groups and output terminal groups) in units of a predetermined number of bits, and the assignment information includes information that sets each of the multiple terminal groups as a first terminal or a second terminal.
[0083] The processing unit 11 of the CPU unit 10 executes a primary task PT at a fixed cycle and executes an event task IT when a predetermined event occurs. In the example of Figure 2, the primary task PT is executed at time t11, and the event task IT is executed at time t12 when the predetermined event occurs.
[0084] Here, the primary task PT is created to execute processing using input data from the input terminal groups WX0 and WX1 of the input / output unit 20A, input data from the input terminal group WX10 of the input / output unit 20B, and input data from the input terminal groups WX20, WX21, and WX22 of the input / output unit 20C. The primary task PT is also created to output the processing results to the output terminal groups WY0 and WY1 of the input / output unit 20A, the output terminal groups WY10, WY11, and WY12 of the input / output unit 20B, and the output terminal group WY22 of the input / output unit 20C, respectively.
[0085] Therefore, the user uses the setting terminal 50 to set in the CPU unit 10 allocation information that assigns to the primary task PT the input processes IN(WX0) and IN(WX1) that take in input data from the input terminal group WX0 and WX1 of the input / output unit 20A, the input process IN(WX10) that takes in input data from the input terminal group WX10 of the input / output unit 20B, and the input processes IN(WX20), IN(WX21), and IN(WX22) that take in input data from the input terminal group WX20, WX21, and WX22 of the input / output unit 20C. In addition, the user uses the setting terminal 50 to set in the CPU unit 10 allocation information that assigns to the primary task PT output processes OUT(WY0) and OUT(WY1) that output output data to the output terminal group WY0 and WY1 of the input / output unit 20A, output processes OUT(WY10), OUT(WY11), and OUT(WY12) that output output data to the output terminal group WY10, WY11, and WY12 of the input / output unit 20B, and output process OUT(WY22) that output output data to the output terminal group WY22 of the input / output unit 20C.
[0086] Table 1 shows allocation information for data update processes assigned to input / output units 20A, 20B, and 20C. In input processes executed before the execution of the primary task PT, the input terminal group WX0 and WX1 of input / output unit 20A, the input terminal group WX10 of input / output unit 20B, and the input terminal group WX20, WX21, and WX22 of input / output unit 20C are first terminals, and the other terminals are second terminals. In output processes executed when the primary task PT is executed, the output terminal group WY0 and WY1 of input / output unit 20A, the output terminal group WY10, WY11, and WY12 of input / output unit 20B, and the output terminal group WY22 of input / output unit 20C are first terminals, and the other terminals are second terminals.
[0087]
[0088] At this time, when the processing unit 11 of the CPU unit 10 executes the primary task PT, before executing the primary task PT, it executes input processes IN(WX0) and IN(WX1) that take in input data from the input terminal group WX0 and WX1 of the input / output unit 20A, input process IN(WX10) that takes in input data from the input terminal group WX10 of the input / output unit 20B, and input processes IN(WX20), IN(WX21), and IN(WX22) that take in input data from the input terminal group WX20, WX21, and WX22 of the input / output unit 20C. Then, after executing the primary task PT, the processing unit 11 executes, based on the processing results of the primary task PT, output processes OUT(WY0) and OUT(WY1) that output output data to the output terminal group WY0 and WY1 of the input / output unit 20A, output processes OUT(WY10), OUT(WY11), and OUT(WY12) that output output data to the output terminal group WY10, WY11, and WY12 of the input / output unit 20B, and output process OUT(WY22) that output output data to the output terminal group WY22 of the input / output unit 20C.
[0089] Furthermore, when a predetermined event occurs, the processing unit 11 executes an event task IT, but since input processing and output processing are not assigned to the event task IT, data update processing is not executed before or after the execution of the event task IT. Note that a first terminal to which data update processing is to be executed may be assigned to the event task IT, and data update processing for the first terminal may be executed at least either before or after the execution of the event task IT.
[0090] In this way, the processing unit 11 can perform input processing for the input terminals of the input / output units 20A to 20C that are set as first terminals based on the assignment information before executing the task, and can execute the task using the data in the input processing. Furthermore, the processing unit 11 does not perform input processing for the input terminals of the input / output units 20A to 20C that are set as second terminals based on the assignment information, thereby eliminating unnecessary input processing and reducing the processing load required for data update processing. Furthermore, the time required for input processing can be shortened compared to reading input data from all input terminals, thereby reducing the execution time of the control program. Furthermore, the processing unit 11 can perform output processing for the output terminals of the output terminals of the input / output units 20A to 20C that are set as first terminals based on the assignment information after executing the task, and does not perform output processing for the output terminals that are set as second terminals based on the assignment information. This reduces the processing load required for output processing and shortens the time required for output processing compared to outputting output data to all output terminals.
[0091] The processing system 1 of this embodiment includes a plurality of I / O units 70, and the allocation information described in Operation Example 1 includes information for setting, for each of the plurality of I / O units 70, whether each of the plurality of terminals of the I / O unit 70 is a first terminal or a second terminal. That is, the plurality of terminals of one I / O unit 70 may include both a first terminal and a second terminal. As a result, data update processing for the terminal set as the second terminal in each of the plurality of I / O units 70 by the allocation information is not performed before or after task execution, thereby reducing the processing load required for the data update processing and shortening the time required for the data update processing.
[0092] In this operation example, input processing of a group of input terminals in units of words is assigned to a task, but input processing of individual terminals (i.e., terminals in units of 1 bit) may be assigned to a task, or input processing of terminals with a predetermined number of bits may be assigned to a task. Also, in this operation example, output processing of a group of output terminals in units of words is assigned to a task, but output processing of individual terminals (i.e., terminals in units of 1 bit) may be assigned to a task, or output processing of terminals with a predetermined number of bits may be assigned to a task.
[0093] In this embodiment, the data update process includes an input process and an output process. Therefore, the allocation information can be used to set a first terminal on which the data update process is to be executed and a second terminal on which the data update process is not to be executed, for each of the input process and the output process. Therefore, the input process is not executed on the terminal set as the second terminal in the input process, and the output process is not executed on the terminal set as the second terminal in the output process. This reduces the processing load of the data update process and shortens the time required for the data update process.
[0094] In the data update process, input processing is performed before the task is executed, and output processing is performed after the task is executed. This allows the processing unit 11 to execute the task using data that was taken into the input variables in the input processing performed before the task is executed. Furthermore, the processing unit 11 can output data of the output variables that store the execution results of the task in the output processing performed after the task is executed. This has the advantage of improving the real-time nature of the processing performed by the processing unit 11.
[0095] (2.2.2) Operation Example 2 An operation example 2 of the processing system 1 will be described with reference to FIG.
[0096] In the processing system 1 of this embodiment, the processing unit 11 performs task processing to execute multiple types of tasks. In this case, the allocation information may include information that sets, for each of the multiple types of tasks, whether multiple terminals are to be first terminals or second terminals.
[0097] The CPU unit 10 executes a primary task PT at a fixed cycle T1, and executes an event task IT when a predetermined event occurs. In the example of Figure 3, the primary task PT is executed at times t1, t3, and t5, and the event task IT is executed at times t2 and t4 when the predetermined event occurs. Note that since the event task IT is executed when the predetermined event occurs, it is not guaranteed that it will be executed within one cycle of executing the primary task PT.
[0098] Here, the primary task PT is assumed to be created as a task that uses input data input to the group of input terminals WX0-WX9 of the input / output unit 20A and outputs the processing results to the group of output terminals WY0-WY9 of the input / output unit 20A. Also, the event task IT is assumed to be created as a task that uses input data input to the group of input terminals WX10-WX19 of the input / output unit 20B and outputs the processing results to the group of output terminals WY10-WY19 of the input / output unit 20B.
[0099] Therefore, the user uses the setting terminal 50 to set in the CPU unit 10 allocation information that assigns to the primary task PT an input process IN1 that reads input data from the group of input terminals WX0-WX9 of the input / output unit 20A and an output process OUT1 that outputs output data to the group of output terminals WY0-WY9. The user also uses the setting terminal 50 to set in the CPU unit 10 allocation information that assigns to the event task IT an input process IN2 that reads input data from the group of input terminals WX10-WX19 of the input / output unit 20B and an output process OUT2 that outputs output data to the group of output terminals WY10-WY19. Table 2 shows the allocation information for the data update processes that are assigned to the input / output units 20A and 20B.
[0100]
[0101] At this time, when executing the primary task PT, the processing unit 11 of the CPU unit 10 executes an input process IN1 that reads input data from the group of input terminals WX0-WX9 of the input / output unit 20A and stores the input data in the corresponding input variable WIn before executing the primary task PT. Then, after executing the primary task PT, the processing unit 11 executes an output process OUT1 that outputs data of the corresponding output variable WOm to the group of output terminals WY0-WY9 of the input / output unit 20A based on the processing result of the primary task PT.
[0102] Furthermore, when a predetermined event occurs, the processing unit 11 executes an event task IT, but before executing the event task IT, it executes an input process IN2 that reads input data from the input terminal group WX10-WX19 of the input / output unit 20B and stores the input data in the corresponding input variable WIn. After executing the event task IT, the processing unit 11 executes an output process OUT2 that outputs data of the corresponding output variable WOm to the output terminal group WY10-WY19 of the input / output unit 20B based on the processing result of the event task IT.
[0103] In this way, the input data of the input terminal group WX0-WX9 of the input / output unit 20A used by the primary task PT is acquired immediately before the primary task PT is executed, thereby improving the real-time performance of the data update process. Furthermore, when the primary task PT is executed, input processing of the input terminal group WX10-WX19 of the input / output unit 20B that is not used by the primary task PT is not performed, thereby reducing the time required for input processing.
[0104] Furthermore, the input data of the input terminal group WX10-WX19 of the input / output unit 20B used in the event task IT is acquired immediately before the event task IT is executed, thereby improving the real-time nature of the data update process. Furthermore, when the event task IT is executed, input processing of the input terminal group WX0-WX9 of the input / output unit 20A that is not used in the event task IT is not performed, thereby reducing the time required for input processing.
[0105] In the assignment information described in Operation Example 2, the multiple terminals of each of the input / output units 20A to 20C are collectively set as either first terminals that perform data update processing or second terminals that do not perform data update processing. In other words, the assignment information may include information for each of the multiple I / O units 70 that collectively sets the multiple terminals of the I / O unit 70 as either first terminals or second terminals. In this case, data update processing is not performed on the multiple terminals of the I / O unit 70 that are set as second terminals, so the processing load required for data update processing can be reduced, and the time required for data update processing can be shortened.
[0106] (3) Modifications The above embodiment is merely one of various embodiments of the present disclosure. Various modifications are possible to the above embodiment depending on the design, etc., as long as the object of the present disclosure can be achieved. Furthermore, functions similar to those of the processing system 1 may be embodied as a processing method of the processing system 1, a computer program, a non-transitory recording medium on which a program is recorded, or the like. One aspect of the processing method is a processing method for a processing system 1 including an I / O unit 70 having multiple terminals and a processing unit 11. This processing method includes task processing, which executes a task that processes data stored in input variables and stores the processing results in output variables, and data update processing. The data update processing executes at least one of input processing, which stores data input to the I / O unit 70 in input variables, and output processing, which outputs data of output variables to the I / O unit 70. In this processing method, the data update processing is performed on the first terminal at least before and after task execution based on assignment information that assigns data update processing of a first terminal among multiple terminals to a task and does not assign data update processing of a second terminal other than the first terminal to a task. A (computer) program according to one aspect is a program for causing a computer system to execute the above processing method.
[0107] Modifications of the above embodiment are listed below. The modifications described below can be applied in appropriate combinations. Note that the above embodiment may also be referred to as the basic configuration below.
[0108] The processing system 1 or the executing entity of the processing method in the present disclosure includes a computer system. The computer system is primarily composed of a processor and memory as hardware. The processor executes a program stored in the memory of the computer system to realize the functions of the processing system 1 or the executing entity of the processing method in the present disclosure. The program may be pre-recorded in the memory of the computer system, provided via a telecommunications line, or provided in a non-transitory recording medium readable by the computer system, such as a memory card, optical disk, or hard disk drive. The processor of the computer system is composed of one or more electronic circuits including a semiconductor integrated circuit (IC) or a large-scale integrated circuit (LSI). The integrated circuits, such as ICs or LSIs, are referred to by different names depending on the degree of integration, and include integrated circuits called system LSIs, very large-scale integrations (VLSIs), or ultra-large-scale integrations (ULSIs). Furthermore, field-programmable gate arrays (FPGAs), which are programmed after the LSI is manufactured, or logic devices that allow the reconfiguration of internal connections or internal circuit partitions of the LSI, can also be used as processors. The electronic circuits may be integrated into one chip or distributed across multiple chips. The chips may be integrated into one device or distributed across multiple devices. The computer system referred to here includes a microcontroller having one or more processors and one or more memories. Therefore, the microcontroller is also composed of one or more electronic circuits including a semiconductor integrated circuit or a large-scale integrated circuit.
[0109] Furthermore, it is not essential for the processing system 1 that multiple functions are concentrated in one housing, and the components of the processing system 1 may be distributed across multiple housings. Also, in the above embodiment, the functions of the interface unit are distributed across multiple housings, but some or all of the interface unit may be concentrated in one housing together with the processing unit 11. Furthermore, at least some of the functions of the processing system 1 (for example, the functions of the processing unit 11) may be realized by the cloud (cloud computing) or the like.
[0110] (3.1) Modification 1 The operation of the processing system 1 according to Modification 1 will be described with reference to Figures 4 to 6. Note that Figures 4 to 6 are schematic timing charts of the tasks and data update processes executed by the processing unit 11 of the CPU unit 10, and the durations of the tasks and data update processes do not necessarily reflect the actual processing times.
[0111] In the above-described operation examples 1 and 2, the processing unit 11 performs input processing before executing the task and performs output processing after executing the task, but the timing of executing the input processing and output processing can be changed as appropriate depending on the processing content of the task, etc.
[0112] For example, the processing unit 11 may perform input processing and output processing consecutively after executing a task. In the example of Fig. 4, the processing unit 11 performs input processing IN1 and output processing OUT1 consecutively after executing a primary task PT. Note that the processing unit 11 may perform input processing and output processing consecutively after executing an event task IT. Furthermore, the processing unit 11 may perform output processing and then input processing after executing a task (primary task PT, event task IT, etc.).
[0113] Furthermore, the processing unit 11 may perform input processing and output processing consecutively before executing a task. That is, the processing unit 11 may perform input processing and output processing and then execute a task. In the example of FIG. 5 , the processing unit 11 performs input processing IN1 and output processing OUT1, and then executes the primary task PT. Note that the processing unit 11 may perform input processing and output processing consecutively before executing the event task IT. Furthermore, the processing unit 11 may perform output processing and input processing in order, and then execute a task.
[0114] Alternatively, the processing unit 11 may perform output processing before executing a task and perform input processing after executing the task. In the example of Fig. 6, the processing unit 11 performs output processing OUT1 before executing a primary task PT and performs input processing IN1 after executing the primary task PT. Note that the processing unit 11 may perform output processing before executing an event task IT and perform input processing after executing the event task IT.
[0115] In this way, the timing of executing input processing and output processing can be either before or after the execution of the task to which the input processing and output processing are assigned, and can be changed as appropriate depending on the processing content of the task, etc., thereby increasing the flexibility in the timing of executing input processing and output processing.
[0116] (3.2) Modification 2 The operation of the processing system 1 according to Modification 2 will be described with reference to Figures 7 to 9. Note that Figures 7 to 9 are schematic timing charts of the tasks and data update processes executed by the processing unit 11 of the CPU unit 10, and the durations of the tasks and data update processes do not necessarily reflect the actual processing times.
[0117] In the above-described operation example 1, when performing data update processing for three I / O units 20A to 20C, the data update processing (at least one of input processing and output processing) for the first terminals of each of the I / O units 20A, 20B, and 20C is performed in ascending order of the unit number. However, this order can be changed as appropriate. That is, when data update processing for the first terminals of two or more I / O units 70 is assigned to one task, the assignment information may further include execution order information regarding the order in which the data update processing is performed for the first terminals of the two or more I / O units 70 assigned to one task. The processing unit 11 executes the data update processing for the first terminals of the two or more I / O units 70 assigned to one task in the order based on the execution order information. This allows the data update processing for the first terminals of the two or more I / O units 70 assigned to one task to be executed in a desired order, thereby increasing the flexibility in the timing of data update processing execution.
[0118] Furthermore, in the first operational example, when data update processing is performed for multiple terminal groups (input terminal groups and output terminal groups) included in each of the input / output units 20A to 20C, the data update processing for the multiple terminal groups is performed in ascending order of terminal number, but this order can be changed as appropriate. That is, when data update processing for two or more terminal groups (input terminal group WXn or output terminal group WYm) is assigned to one task, the assignment information may further include execution order information regarding the order in which the data update processing is performed for the two or more terminal groups assigned to one task. The processing unit 11 executes the data update processing for the two or more terminal groups assigned to one target task in the order based on the execution order information. This allows the data update processing for the two or more terminal groups (input terminal group WXn or output terminal group WYm) assigned to one target task to be executed in the desired order, thereby increasing the flexibility in the timing of executing the data update processing.
[0119] Here, the operation when the processing unit 11 performs data update processing for the two input / output units 20A and 20B will be described.
[0120] For example, using the setting terminal 50, the user sets in the CPU unit 10 allocation information that assigns input processes IN(WX0), IN(WX1), IN(WX2) that take in input data from the input terminal group WX0, WX1, WX2 of the input / output unit 20A, and output processes OUT(WY0), OUT(WY1), OUT(WY2) that output output data to the output terminal group WY0, WY1, WY2 of the input / output unit 20A to the primary task PT. In addition, the user uses the setting terminal 50 to set in the CPU unit 10 allocation information that assigns to the primary task PT input processes IN(WX10), IN(WX11), IN(WX12) that take in input data from the input terminal group WX10, WX11, WX12 of the input / output unit 20B, and output processes OUT(WY10), OUT(WY11), OUT(WY12) that output output data to the output terminal group WY10, WY11, WY12 of the input / output unit 20B.
[0121] Table 3 shows allocation information for data update processes allocated to the input / output units 20A and 20B. Here, in input processes executed before the execution of the primary task PT, the input terminal group WX0, WX1, and WX2 of the input / output unit 20A and the input terminal group WX10, WX11, and WX12 of the input / output unit 20B become first terminals, and the other terminals become second terminals. Also, in output processes executed after the execution of the primary task PT, the output terminal group WY0, WY1, and WY2 of the input / output unit 20A and the output terminal group WY10, WY11, and WY12 of the input / output unit 20B become first terminals, and the other terminals become second terminals.
[0122]
[0123] It is also assumed that the allocation information includes execution order information for executing data update processing in the order of the input / output units 20A, 20B, which are allocated to the primary task PT.
[0124] In this case, as shown in FIG. 7, before executing the primary task PT, the processing unit 11, based on the allocation information including the execution order information, sequentially executes input processes IN(WX10), IN(WX11), IN(WX12) that take in input data from the input terminal group WX10, WX11, WX12 of the input / output unit 20B, and input processes IN(WX0), IN(WX1), IN(WX2) that take in input data from the input terminal group WX0, WX1, WX2 of the input / output unit 20A. Then, after executing the primary task PT, the processing unit 11 sequentially executes output processes OUT(WY10), OUT(WY11), OUT(WY12) that output output data to the output terminal groups WY10, WY11, WY12 of the input / output unit 20B, and output processes OUT(WY0), OUT(WY1), OUT(WY2) that output output data to the output terminal groups WY0, WY1, WY2 of the input / output unit 20A, based on allocation information including execution order information.
[0125] The execution order information included in the allocation information can be changed as appropriate depending on the processing content of the task, etc. For example, when data update processing of two or more input / output units 20 is assigned to a task, the data update processing may be performed in ascending order of the numbers assigned to the input / output units 20, and the order in which data update processing is performed for multiple terminals provided in each input / output unit 20 may be changeable, for example, on a word-by-word basis.
[0126] For example, as shown in FIG. 8, before executing the primary task PT, the processing unit 11 sequentially executes input processes IN(WX0), IN(WX2), and IN(WX1) that take in input data from the input terminal groups WX0, WX2, and WX1 of the input / output unit 20A, and then sequentially executes input processes IN(WX11), IN(WX10), and IN(WX12) that take in input data from the input terminal groups WX11, WX10, and WX12 of the input / output unit 20B.
[0127] After executing the primary task PT, the processing unit 11 sequentially executes output processes OUT(WY1), OUT(WY2), and OUT(WY0) that output output data to the output terminal group WY1, WY2, and WY0 of the input / output unit 20A, and then sequentially executes output processes OUT(WY12), OUT(WY10), and OUT(WY11) that output output data to the output terminal group WY12, WY10, and WY11 of the input / output unit 20B.
[0128] In addition, the execution order information included in the allocation information may include information specifying both the order in which data update processing is executed for two or more input / output units 20 assigned to the target task, and the order in which data update processing is executed for multiple terminals provided on each input / output unit 20.
[0129] For example, as shown in FIG. 9, before executing the primary task PT, the processing unit 11, based on the allocation information including the execution order information, sequentially executes input processes IN(WX10), IN(WX12), IN(WX11) that take in input data from the input terminal groups WX10, WX12, WX11 of the input / output unit 20B, and then sequentially executes input processes IN(WX1), IN(WX0), IN(WX2) that take in input data from the input terminal groups WX1, WX0, WX2 of the input / output unit 20A.
[0130] Then, based on the allocation information including the execution order information, after executing the primary task PT, the processing unit 11 sequentially executes output processes OUT(WY11), OUT(WY12), and OUT(WY10) that output output data to the output terminal groups WY11, WY12, and WY10 of the input / output unit 20B, and then sequentially executes output processes OUT(WY0), OUT(WY1), and OUT(WY2) that output output data to the output terminal groups WY0, WY1, and WY2 of the input / output unit 20A.
[0131] In this way, based on allocation information including execution order information, the order in which data update processing is performed for two or more input / output units 20 and the order in which data update processing is performed for the multiple terminals provided in each input / output unit 20 can be changed to the desired order, thereby increasing the freedom in the timing of executing the data update processing.
[0132] (3.3) Other Modifications The configuration of the processing system 1 shown in Fig. 1 is an example and can be modified as appropriate. In the basic configuration, the processing unit 11 performs data update processing for the first terminal at least either before or after execution of a task based on assignment information that assigns data update processing for a first terminal among the multiple terminals of the input / output unit 20 to a task and does not assign data update processing for the second terminal to a task. The same applies to the remote I / O unit 30. That is, it is sufficient that the processing unit 11 performs data update processing for the first terminal at least either before or after execution of a task based on assignment information that assigns data update processing for a first terminal among the multiple terminals of the HLS slave unit 32 constituting the remote I / O unit 30 to a task and does not assign data update processing for the second terminal to a task.
[0133] In addition, in the basic configuration, the I / O unit 70 includes an input / output unit 20 and a remote I / O unit 30, but it is not necessary to include all of the input / output unit 20 and the remote I / O unit 30, and they can be omitted as appropriate.
[0134] In the basic configuration, the case where the data update process of the first terminal is assigned to the primary task PT and the event task IT has been described, but the tasks to which the data update process of the first terminal is assigned are not limited to the primary task PT and the event task IT. The data update process may be assigned to a task such as a periodic task or a system task.
[0135] Furthermore, in the basic configuration and variants 1 and 2, when the processing unit 11 executes task processing, it refers to the allocation information and executes the data update processing if the data update processing is assigned to the task to be executed. This allows for easy response to changes in the allocation information. The allocation information may also be reflected in the control program executed by the processing unit 11. That is, when the processing unit 11 compiles a program created on the setting terminal 50, the control program may be created so that the data update processing is executed based on the allocation information at least before and after the task is executed. This eliminates the need for the processing unit 11 to refer to the allocation information and determine whether to execute the data update processing before executing the task. In this case, the compiled control program is written to execute the data update processing at least before and after the task is executed. Therefore, by executing the control program, the processing unit 11 can execute the data update processing in conjunction with the execution of the task.
[0136] In addition, in the basic configuration and variants 1 and 2, input processing and output processing are performed at the timing when the task assigned to the data update processing of the first terminal is executed (for example, before or after the execution of the task), but only one of the input processing and output processing of the first terminal may be executed.
[0137] (Summary) The above-described embodiments and the like disclose the following aspects.
[0138] A first aspect of the processing method is a processing method for a processing system (1) including an I / O unit (70) having a plurality of terminals and a processing unit (11). The processing method includes task processing for executing a task that processes data stored in input variables and stores the processing results in output variables, and data update processing. The data update processing executes at least one of input processing for storing data input to the I / O unit (70) in input variables and output processing for outputting data of output variables to the I / O unit (70). The processing method executes data update processing for the first terminal at least either before or after task execution, based on assignment information that assigns data update processing for a first terminal among the plurality of terminals to the task and does not assign data update processing for a second terminal other than the first terminal to the task.
[0139] According to this aspect, the processing load due to the data update process can be reduced.
[0140] In the processing method of the second aspect, in the first aspect, the multiple terminals are divided into multiple terminal groups in units of a predetermined number of bits, and the allocation information includes information that sets whether each of the multiple terminal groups is a first terminal or a second terminal.
[0141] According to this aspect, by setting the terminal group that does not require data update processing in the allocation information as the second terminal, it is possible to reduce the processing load due to the data update processing.
[0142] In a processing method of a third aspect, in the first or second aspect, the processing system (1) includes a plurality of I / O units (70). The allocation information includes information for setting, for each of the plurality of I / O units (70), whether a plurality of terminals of the I / O unit (70) are collectively designated as first terminals or second terminals.
[0143] According to this aspect, it is possible to set whether or not to perform data update processing for each I / O unit (70) using the allocation information.
[0144] In a fourth aspect of the processing method, in any one of the first to third aspects, the processing system (1) includes a plurality of I / O units (70). The allocation information includes information for each of the plurality of I / O units (70) that sets whether each of a plurality of terminals included in the I / O unit (70) is a first terminal or a second terminal.
[0145] According to this aspect, it is possible to set whether or not to perform data update processing for each of the plurality of terminals that the I / O unit (70) has, using the allocation information.
[0146] In a fifth aspect of the processing method according to any one of the first to fourth aspects, a plurality of types of tasks are executed in the task processing, and the assignment information includes information for setting, for each of the plurality of types of tasks, whether a plurality of terminals is to be a first terminal or a second terminal.
[0147] According to this aspect, it is possible to set whether or not to perform data update processing for each task using the allocation information.
[0148] In the processing method of the sixth aspect, in any one of the first to fifth aspects, the data update process includes an input process and an output process.
[0149] According to this aspect, since input processing and output processing are not performed on the terminal that is the second terminal, the processing load due to the data update processing can be reduced.
[0150] In the processing method of the seventh aspect, in the data update processing of the sixth aspect, input processing is performed before the execution of a task, and output processing is performed after the execution of the task.
[0151] According to this aspect, a task is executed using data that has been taken into an input variable in an input process performed before the task is executed, and data in an output variable that stores the execution result of the task can be output in an output process performed after the task is executed, which has the advantage of improving the real-time nature of processing.
[0152] The program of the eighth aspect is a program for causing a computer system to execute the processing method of any one of the first to seventh aspects.
[0153] According to this aspect, the processing load due to the data update process can be reduced.
[0154] A processing system (1) of a ninth aspect includes an I / O unit (70) having a plurality of terminals and a processing unit (11). The processing unit (11) performs task processing, which executes a task of processing data stored in input variables and storing the processing results in output variables, and data update processing. The data update processing executes at least one of input processing, which stores data input to the I / O unit (70) in input variables, and output processing, which outputs data of output variables to the I / O unit (70). The processing unit (11) performs the data update processing on the first terminal at least either before or after task execution, based on assignment information that assigns the data update processing of a first terminal among the plurality of terminals to the task and does not assign the data update processing of a second terminal other than the first terminal to the task.
[0155] According to this aspect, the processing load due to the data update process can be reduced.
[0156] Not limited to the above aspects, various configurations (including modified examples) of the processing system (1) according to the above embodiments can be embodied as a processing method of the processing system (1), a (computer) program, or a non-transitory recording medium on which a program is recorded, etc.
[0157] The configurations according to the second to seventh aspects are not essential for the processing method of the processing system (1) and can be omitted as appropriate.
[0158] 1 Processing system 11 Processing unit 70 I / O unit
Claims
1. A processing method for a processing system comprising an I / O unit having a plurality of terminals and a processing unit, the processing method including: a task processing that executes a task of processing data stored in an input variable and storing the processing result in an output variable; and a data update processing that executes at least one of an input processing that stores data input to the I / O unit in the input variable and an output processing that outputs data of the output variable to the I / O unit, the data update processing being performed on the first terminal at least one of before and after execution of the task based on assignment information that assigns the data update processing of a first terminal among the plurality of terminals to the task and does not assign the data update processing of a second terminal other than the first terminal to the task.
2. The processing method according to claim 1, wherein the plurality of terminals are divided into a plurality of terminal groups in units of a predetermined number of bits, and the allocation information includes information for setting each of the plurality of terminal groups as either the first terminal or the second terminal.
3. The processing method according to claim 1 or 2, wherein the processing system comprises a plurality of the I / O units, and the allocation information includes information for setting, for each of the plurality of the I / O units, whether the plurality of terminals of the I / O unit are collectively designated as the first terminal or the second terminal.
4. The processing method according to any one of claims 1 to 3, wherein the processing system comprises a plurality of the I / O units, and the allocation information includes information for setting, for each of the plurality of the I / O units, whether each of the plurality of terminals possessed by the I / O unit is the first terminal or the second terminal.
5. A processing method according to any one of claims 1 to 4, wherein the task processing executes a plurality of types of tasks, and the allocation information includes information for setting whether the plurality of terminals is the first terminal or the second terminal for each of the plurality of types of tasks.
6. The processing method according to any one of claims 1 to 5, wherein the data update process includes the input process and the output process.
7. The processing method according to claim 6, wherein in the data update process, the input process is performed before the execution of the task, and the output process is performed after the execution of the task.
8. A program for causing a computer system to execute the processing method according to any one of claims 1 to 7.
9. A processing system comprising: an I / O unit having a plurality of terminals; and a processing unit, wherein the processing unit performs task processing for executing a task of processing data stored in input variables and storing the processing result in an output variable; and data update processing for executing at least one of input processing for storing data input to the I / O unit in the input variable and output processing for outputting data of the output variable to the I / O unit, wherein the processing unit performs the data update processing on the first terminal at least one of before and after execution of the task based on assignment information that assigns the data update processing of a first terminal among the plurality of terminals to the task and does not assign the data update processing of a second terminal other than the first terminal to the task.
Citation Information
Patent Citations
Refresh processing system for sequencer
JP1989273106A
Refresh processing system for sequencer
JP1989273107A
PLC system, development support device for the same, and program
JP2012118715A
Control device, control device control method, information processing program, and recording medium
JP2019079256A