COMMUNICATION DURATION DETERMINATION DEVICE, COMMUNICATION DURATION DETERMINATION METHOD AND COMMUNICATION DURATION DETERMINATION PROGRAM

The communication duration determination apparatus addresses the challenge of setting appropriate communication durations for target equipment accessed rarely by analyzing counter variables and branch instructions in the control program, ensuring efficient and accurate communication.

DE112021007633B4Active Publication Date: 2025-06-12MITSUBISHI ELECTRIC CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
DE112021007633
Authority / Receiving Office
DE · DE
Patent Type
Patents
Current Assignee / Owner
Filing Date
2021-06-28
Publication Date
2025-06-12
Estimated Expiration
2041-06-28

AI Technical Summary

Technical Problem

Determining an appropriate communication duration for target equipment accessed only once during multiple executions of a control program is burdensome for users, as it requires checking the execution frequency of processing for each I/O variable.

Method used

A communication duration determination apparatus that searches for counter variables, remaining operations, and branch instructions in the control program to identify the communication duration for target equipment accessed only once, by multiplying the execution period of the control program by the divisor of the residual operation.

Benefits of technology

This approach allows for an appropriate communication duration to be determined for target equipment accessed infrequently, reducing data exchange and ensuring accurate control program operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

Communication duration determining device (100), comprising: a counter variable search unit (121) for finding, from a control program for controlling one or more pieces of the target equipment, a counter variable for counting the number of executions of the control program; a remainder operation search unit (122) for determining from the control program a remainder operation in which the counter variable is a dividend and a constant is a divisor; a branch instruction search unit (123) for determining from the control program a conditional branch instruction whose branch condition is a match between a remainder of the remainder operation and a constant; an input / output variable extraction unit (124) for extracting an input / output variable from a branch target block of the conditional branch instruction; a target equipment identification unit (125) for identifying, from the one or more pieces of target equipment, a piece of target equipment into or from which a value of the extracted input / output variable is input or output; and a communication duration determining unit (126) for determining a period obtained by multiplying an execution period of the control program by the divisor of the remainder operation as a communication duration of the identified piece of target equipment when the extracted input / output variable is accessed in only one branch target block.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELDThe present disclosure relates to a technique for determining a communication duration of devices controlled by a control program.PRIOR ARTA control system generally includes a controller and target equipment. The control device executes a control program. The controller and the destination equipment are connected via an FA network.FA is an abbreviation for Factory Automation (dt. Factory Automation).The target equipment includes, for example, remote input equipment and remote output equipment.The remote input equipment inputs the state of a switch or sensor to the controller.The remote output equipment drives a solenoid and a lamp according to an output of the controller.Hereinafter, the remote input equipment and the remote output equipment are collectively referred to as remote input / output equipment when there are no problems.The control system also includes a setting device. The setting means sets, in the control means, for example, the control program or information for operating the FA network. The information is input by a user.The adjusting device is connected to the control device as required.The control program is a program in which the control operations desired by the user are written.In the control program, instruction lines are arranged, each specifying a processing target, an output target for a processing result, and the content of the processing.The controller receives an I / O (I / O) variable list together with the control program. I / O(I / O) is the abbreviation for input / output.I / O variables are variables used in the control program, and each I / O variable corresponds to a portion of the remote input / output equipment.In the I / O variable list, an I / O variable and a corresponding part of the remote input / output equipment are specified for each I / O variable.Some FA networks have a periodic communication function using a time division communication technique.In the periodic communication function using the time division communication technique, the communication band of a network is divided in time, and time frames of a communication duration having a predetermined time length are provided to perform communication, details of which are predetermined.When periodic communication does not occur, other types of communication may utilize the network.The values of the input / output variables are updated by periodic communication.The periodic communication takes place independently of the execution of the control program.In the periodic communication, the input data acquired from the remote input equipment is stored in a temporary storage means in the control means, and the value of the input data is referenced by the control program as a value of an input / output variable. Moreover, the value of an input / output variable used by the control program is stored in the temporary storage device and transmitted to the remote output equipment by periodic communication.If the period of the periodic communication is too short relative to that assumed by the control program, a situation occurs in which the control program does not refer to the input data in the periodic communication even if the input data from the remote input equipment is stored in the temporary storage device. It may also occur that output data not used by the control program is transmitted to the remote output equipment by periodic communication.In such a case, although no control problems occur, the network band is wasted.On the other hand, if the duration of the periodic communication actually performed is too long as compared with the period assumed by the control program, a situation occurs in which the control program refers to the value of an legacy I / O variable. It may also occur that the value of an I / O variable used by the control program is not reproduced in the remote output equipment.In such a case, a problem arises in control.Therefore, the period of the periodic communication must be set to an appropriate value that matches the assumptions of the control program.According to the conventional art, the execution period of the control program is set according to the communication duration.Patent Literature 1 discloses a servo system.In the servo system, a host device and a plurality of servo amplifiers are connected by synchronous serial communication means. In synchronous serial communication, data related to operation commands, etc. are exchanged with a fixed communication period. The host device serves as a control device. The duration of the operations performed in the host device is synchronized to 1 / n times (where n is an integer) the communication duration.Patent Literature 2 discloses a wireless communication device configured to wirelessly transmit predetermined information possessed by the wireless communication device to a corresponding master device at predetermined transmission intervals, wherein the wireless transmission is performed according to a predetermined time division scheme.Patent Literature 3 discloses a process control system including a high-speed backbone serial communication network connecting a plurality of microprocessor-based nodes each functioning as a master for a high-speed serial branch network consisting of device controllers such as airflow valve controllers and converters. The primary network may be operated in a time division mode wherein a node acting as a synchronization station regularly issues a synchronization signal instructing each node to execute a branch network control sequence during which each node collects and processes the data collected by the device controllers within its branch network and, based thereon, issues commands to the branch network.REFERENCE LISTPATENT LITERATUREPatent Literature 1: JP 2008-176673 APatent Literature 2: US 2018 0 212 697 A1Patent Literature 3: U.S. Pat. No. 5,831,848SUMMARY OF THE INVENTIONTECHNICAL PROBLEMThe control program is generally executed repeatedly with a fixed duration.The control program may include processes executed at each execution of the control program, and processes executed only once while the control program is executed multiple times.When an appropriate communication period is set for devices corresponding to an I / O variable according to the execution frequency of the processing of the I / O variables in the control program, the amount of data exchanged in the periodic communication is reduced.However, it is a great burden for the user to check the execution frequency of the processing for each I / O variable and determine an appropriate communication duration for the devices corresponding to each I / O variable.The object of the present disclosure is to obtain an appropriate communication duration for target equipment accessed only once while a control program is executed multiple times.SOLUTION OF PROBLEMA communication duration determination apparatus according to the present disclosure includes a counter variable search unit for finding, from a control program for controlling one or more pieces of target equipment, a counter variable for counting the number of executions of the control program; a remaining operation search unit for determining, from the control program, a remaining operation in which the counter variable is a divisor and a constant is a divisor; a branch instruction search unit for determining, from the control program, a conditional branch instruction whose branch condition is a match between a remaining of the remaining operation and a constant; an input / output variable extraction unit for extracting an input / output variable from a branch target block of the conditional branch instruction; a target equipment identifying unit for identifying, from the one or more pieces of target equipment, a piece of target equipment in or from which a value of the extracted input / output variable is input or output; and a communication duration determining unit for determining a period obtained by multiplying an execution period of the control program by the divisor of the residual operation as a communication duration of the identified target equipment when the extracted input / output variable is accessed in only one branch target block.ADVANTAGEOUS EFFECTS OF THE INVENTIONAccording to the present disclosure, an appropriate communication duration can be determined for the target equipment accessed only once while a control program is executed multiple times.BRIEF DESCRIPTION OF THE DRAWINGSFIG. 1 is a configuration diagram of a control system 200 in Embodiment 1; FIG. 2 is a configuration diagram of a communication duration determiner 100 in Embodiment 1; FIG. 3 is a flowchart of a communication duration determination method in Embodiment 1; FIG. 4 is a figure showing an example of a control program 191 in Embodiment 1; FIG. 5 is a figure showing an example of an input / output variable list 192 in Embodiment 1; FIG. 6 is a flowchart of step S 120 in Embodiment 1; FIG. 7 is a flowchart of step S 120 in Embodiment 1; FIG. 8 is a figure showing an example of a counter variable list 193 in Embodiment 1; FIG. 9 is a flowchart of step S 130 in Embodiment 1; FIG. 10 is a figure showing an example of a remaining variable list 194 in Embodiment 1; FIG. 11 is a flowchart of step S 140 in Embodiment 1; FIG. 12 is a flowchart of step S 140 in Embodiment 1; FIG. 13 is a figure showing an example of a remaining branch block list 195 in Embodiment 1; FIG. 14 is a flowchart of step S 150 in Embodiment 1; FIG. 15 is a flowchart of step S 150 in Embodiment 1; FIG. 16 is a figure showing an example of a branch-remaining access destination list 196 in Embodiment 1; FIG. 17 is a figure for describing the periodic communication in Embodiment 1; FIG. 18 is a figure for describing the periodic communication in Embodiment 1; FIG. 19 is a figure for supplementary description of a control program in Embodiment 1; FIG. 20 is a figure for supplementary description of the control program in Embodiment 1; FIG. 21 is a flowchart of a communication duration determination method in Embodiment 2; FIG. 22 is a configuration diagram of the communication duration determiner 100 in Embodiment 3; FIG. 23 is a flowchart of a communication duration determination method in Embodiment 3; FIG. 24 is a figure showing an example of a specified variable list 197 in Embodiment 3; FIG. 25 is a configuration diagram of the communication duration determiner 100 in Embodiment 4; FIG. 26 is a flowchart of a communication duration determination method in Embodiment 4; FIG. 27 is a figure showing an example of a specified branch list 198 in Embodiment 4; FIG. 28 is a figure showing an example of a flowchart of a control program in Embodiment 4; FIG. 29 is a figure showing an example of a flowchart of a control program in Embodiment 4; and FIG. 30 is a hardware configuration diagram of the communication duration determiner 100 in the embodiments.DESCRIPTION OF EMBODIMENTSIn the embodiments and drawings, the same or corresponding elements are denoted by the same reference numeral. The description of an element denoted by the same reference sign as an element already described is omitted or simplified as appropriate. Arrows in representations indicate primarily data or processing flows.Embodiment 1.A control system 200 will be described with reference to Figs. 1 to 20.*** Description of configurations ***Based on FIG. 1, a configuration of the control system 200 will be described.A specific example of the control system 200 is factory automation (FA).The control system 200 is composed of a controller 210, one or more target equipments 220, and a setter 230.The setting device 230 and the control device 210 are connected via a network 201.The controller 210 and one or more portions of the target equipment 220 are connected via a network 202. The network 202 is a communication line that operates in a time division manner. Real-time performance is provided between the controller 210 and one or more portions of the target equipment 220. In FIG. 1, the controller 210 and two portions of the target equipment ( 220A, 220B) are connected in a concatenation manner, but the controller 210 and one or more portions of the target equipment 220 may also be connected to other topologies, e.g., in a tree or star shape.A sensor 221, a switch 222, a lamp 223, a solenoid 224, and the like are connected to a part of the target equipment 220.The controller 210 is a computer including hardware such as a processor, a memory, an auxiliary storage device, a communication device, and an input / output interface.The controller 210 controls one or more pieces of target equipment 220 by executing a control program according to the operating parameters.Each of the pieces of target equipment 220 is a device controlled by the controller 210. The target equipment 220A is a so-called remote input device, and the target equipment 220B is a so-called remote output device.The target equipment 220A acquires state data indicating a state of each of the sensors 221 and the switch 222, and inputs the acquired state data to the controller 210.The target equipment 220B controls the lamp 223 and the solenoid 224 according to the instruction input data input from the controller 210.The setting device 230 is a device that sets the control program and the operation parameters in the control device 210. The setting device 230 functions as a communication duration determination device 100.The communication duration determiner 100 determines the communication duration of each of one or more pieces of the target equipment 220. The communication duration is one of the operating parameters.With reference to FIG. 2, a configuration of the communication duration determiner 100 will be described.The communication duration determiner 100 is a computer including hardware such as a processor 101, a memory 102, an auxiliary storage device 103, a communication device 104, and an input / output interface 105. These hardware components are connected to each other by signal lines.The processor 101 is an IC that performs operational processing and controls other hardware components. The processor 101 is, for example, a CPU.IC is an abbreviation for Integrated Circuit (dt).CPU is an abbreviation for Central Processing Unit (dt. central processing unit).The memory 102 is a volatile or nonvolatile memory device. The memory 102 is also referred to as a main memory device or a main memory. The working memory 102 is, for example, a RAM. Data stored in the working memory 102 is saved in the auxiliary storage device 103 as needed.RAM is an abbreviation for Random Access Memory (dt. Random Access Memory).The auxiliary storage device 103 is a nonvolatile storage device. For example, the auxiliary storage device 103 is a ROM, an HDD, or a flash memory. Data stored in the auxiliary storage device 103 is loaded into the working memory 102 as needed.ROM is an abbreviation for Read Only Memory (dt. Read-Only Memory).HDD is an abbreviation for Hard Disk Drive (Hard Disk Drive).The communication device 104 is a receiver and a transmitter. The communication device 104 is, for example, a communication chip or a NIC. Communication of the communication duration determination device 100 takes place via the communication device 104.NIC is an abbreviation for Network Interface Card (dt. Network Interface Card).The input / output interface 105 is a port to which an input device and an output device are connected. For example, the input / output interface 105 is a USB port, the input device is a keyboard and a mouse, and the output device is a display. The input and output to and from the communication duration determination device 100 is performed via the input / output interface 105.USB is an abbreviation for Universal Serial Bus (dt. Universal Serial Bus).The processor 101 includes elements such as an accepting unit 110, a determining unit 120, and a setting unit 130. The determination unit 120 includes elements such as a counter variable search unit 121, a remaining operation search unit 122, a branch instruction search unit 123, an input / output variable extraction unit 124, a target equipment identification unit 125, and a communication duration determination unit 126. These elements are realized by software.The auxiliary storage device 103 stores a communication duration determination program for causing a computer to function as the acceptance unit 110, the determination unit 120, and the setting unit 130. The communication duration determination program is loaded into the memory 102 and executed by the processor 101.The auxiliary storage device 103 further stores an OS. At least a part of the OS is loaded into the working memory 102 and executed by the processor 101.The processor 101 executes the communication duration determination program while executing the operating system.OS is an abbreviation for Operating System (dt. Operating System).Input data and output data of the communication duration determination program are stored in a storage unit 190.The working memory 102 functions as the storage unit 190. However, a storage device such as the auxiliary storage device 103, a register in the processor 101, and a cache memory in the processor 101 may operate as the storage unit 190 instead of the working memory 102 or together with the working memory 102.The communication duration determiner 100 may include a plurality of processors, alternatively to the processor 101.The communication duration determination program may be recorded (stored) in a computer readable format in a nonvolatile recording medium such as an optical disk or a flash memory.*** Description of a Mode of Operation ***A method for operating the communication duration determination device 100 corresponds to a communication duration determination method. The method for operating the communication duration determination device 100 also corresponds to a method for processing by the communication duration determination program.Referring to FIG. 3, the communication duration determination method will be described.In step S 110, the accepting unit 110 accepts a control program 191 and an input / output variable list 192.For example, a user inputs the control program 191 to the communication duration determiner 100, and the accepting unit 110 accepts the input control program 191.The control program 191 has the following characteristics. (1) The control program 191 is written without syntax and rule violations.(2) The execution period of the control program 191 is equal to a basic communication period. The basic communication duration is referred to as "periodic communication duration" and is represented by "T". (3) The control program 191 does not include an endless loop. This property (3) is related to the property (2). (4) In the control program 191, a branch is composed of a "branch instruction", a "start instruction", and an "end instruction". The branch instruction is an instruction that determines whether or not a branch condition is satisfied. The start instruction denotes the start of a branch target block. The end instruction denotes the end of the branch target block. (5) In the control program 191, one or more instructions are sequentially written. Thus, an "nth instruction" uniquely identifies a location in the control program 191. "n" is a positive integer.The input / output variable list 192 displays, for each input / output variable, the target equipment 220 corresponding to the input / output variable.The value of the input / output variable is input to and output from the target equipment 220 according to the input / output variable.FIG. 4 shows an example of the control program 191.In the control program 191, instruction lines each specifying a processing target, an output target of a processing result, and the content of the processing are arranged.FIG. 5 shows an example of the input / output variable list 192.The input / output variable list 192 includes, for each input / output variable, a set of input / output variables, the target equipment 220, and a variable type.The column of the target equipment 220 indicates the name of the target equipment 220 as well as the name of an input / output interface to which the input / output variable is input.The variable type is a type of the input / output variable (input or output).In step S 120, the counter variable search unit 121 finds a counter variable in the control program 191.The counter variable is a variable for counting the execution frequency of the control program 191.Referring to FIGS. 6 and 7, a method for step S 120 will be described.In step S 1211, the counter variable search unit 121 sets an initial value 1 to a temporary variable i and sets an initial value 0 to a temporary variable f.In steps S 1212 to S 1216, the counter variable search unit 121 uses the temporary variable f to determine whether an ith instruction in the control program 191 is an instruction that is executed only once.A branch start instruction and a branch end instruction are not instructions that are executed only once.In step S 1212, the counter variable search unit 121 selects the i-th instruction from the control program 191.Then, the counter variable search unit 121 determines whether the ith instruction is a branch start instruction. That is, the counter variable search unit 121 determines whether the ith instruction denotes the start of a branch target block.When the ith instruction is a branch start instruction, the processing proceeds to step S 1213.When the ith instruction is not a branch start instruction, the processing proceeds to step S 1214.In step S 1213, the counter variable search unit 121 adds 1 to the value of the temporary variable f.After step S 1213, the processing proceeds to step S 1214.In step S 1214, the counter variable search unit 121 determines whether the ith instruction is a branch end instruction. That is, the counter variable search unit 121 determines whether the ith instruction denotes the end of a branch target block.When the ith instruction is a branch end instruction, the processing proceeds to step S 1215.When the ith instruction is not a branch end instruction, the processing proceeds to step S 1216.In step S 1215, the counter variable search unit 121 subtracts 1 from the value of the temporary variable f.After step S 1215, the processing proceeds to step S 1216.In step S 1216, the counter variable search unit 121 determines whether the value of the temporary variable f is 0.If the value of the temporary variable f is 0, the flow proceeds to step S 1217.If the value of the temporary variable f is not 0, the flow proceeds to step S1241.In step S 1217, the counter variable search unit 121 determines whether the ith instruction is an addition instruction.When the ith instruction is an addition instruction, the processing proceeds to step S 1218.When the ith instruction is not an addition instruction, the processing proceeds to step S 1241.In step S 1218, the counter variable search unit 121 determines whether the ith instruction is an addition instruction of a variable X and a constant. The variable X is any variable.When the ith instruction is an addition instruction for the variable X and a constant, the processing proceeds to step S1221.When the ith instruction is not an addition instruction for the variable X and a constant, the processing proceeds to step S 1241.In step S1221, the counter variable search unit 121 sets an initial value 1 to a temporary variable j.In step S1222, the counter variable search unit 121 determines whether a j-th instruction changes the value of the variable X.When the j-th instruction changes the value of the variable X, the processing proceeds to step S 1223.When the j-th instruction does not change the value of the variable X, the processing proceeds to step S 1224.In step S 1223, the counter variable search unit 121 compares the value of the temporary variable j with the value of the temporary variable i.When the value of the temporary variable j is equal to the value of the temporary variable i, the processing proceeds to step S 1224.If the value of the temporary variable j is different from the value of the temporary variable i, the processing proceeds to step S1241.In step S 1224, the counter variable search unit 121 determines whether the j-th instruction is the last instruction of the control program 191.When the j-th instruction is the last instruction of the control program 191, the processing proceeds to step S 1231.When the j-th instruction is not the last instruction of the control program 191, the processing proceeds to step S 1225.In step S 1225, the counter variable search unit 121 adds 1 to the value of the temporary variable j.After step S 1225, the processing proceeds to step S1222.In step S 1231, the counter variable search unit 121 inserts the variable X in the i-th instruction as a counter variable into a counter variable list 193.FIG. 8 shows an example of the counter variable list 193.The counter variable list 193 contains one or more counter variables. "D1" and "D2" are each the name of a counter variable.Referring back to FIG. 7, the description proceeds from step S 1241.In step S 124, the counter variable search unit 121 determines whether the ith instruction is the last instruction of the control program 191.When the ith instruction is the last instruction of the control program 191, the processing ends.When the ith instruction is not the last instruction of the control program 191, the processing proceeds to step S 1242.In step S 1242, the counter variable search unit 121 adds 1 to the value of the temporary variable i.After step S 1242, the processing proceeds to step S 1212.Referring back to FIG. 3, the description will be continued.In step S 120, the counter variable list 193 is created.When a variable for counting the number of executions of the control program 191 is defined in advance, the counter variable search unit 121 also inserts this variable into the counter variable list 193.In step S 130, the remaining operation search unit 122 finds a remaining operation on a counter variable from the control program 191.A remainder operation with a counter variable is a remainder operation in which the counter variable is a divisor and a constant is a divisor.A remainder operation is an operation (instruction) for obtaining a remainder.Referring to FIG. 9, a method for step S 130 will be described.In step S 131, the remaining operation search unit 122 sets an initial value 1 in the temporary variable i.In step S 132, the remaining operation search unit 122 selects the i-th instruction from the control program 191.Then, the remaining operation search unit 122 determines whether the ith instruction is a remaining operation.If the ith instruction is a residual operation, the flow proceeds to step S133.If the ith instruction is not a residual operation, the flow proceeds to step S136.In step S 133, the remaining operation search unit 122 determines whether a divisor P in the i-th instruction is a constant.When the divisor P in the i-th instruction is a constant, the processing proceeds to step S134.If divisor P in the i-th instruction is not a constant, the method continues with step S136.In step S 134, the remaining operation search unit 122 determines whether the dividend in the i-th instruction is a counter variable.That is, the remaining operation search unit 122 determines whether the dividend in the i-th instruction is a variable indicated in the counter variable list 193.When the dividend in the i-th instruction is a counter variable, the processing proceeds to step S 153.If the dividend in the i-th instruction is not a counter variable, processing proceeds to step S136.In step S 135, the remaining operation search unit 122 inserts information on the remaining operation, which is the ith instruction, into a remaining variable list 194.Specifically, the remaining operation search unit 122 inserts a set of the name of the counter variable (dividend), the name of a remaining variable, the divisor, and an operation position into the remaining variable list 194.The remainder variable is a variable to which a remainder is assigned.The operation position is the position of the remaining operation in the control program 191. The value of the temporary variable i is set to the operation position.FIG. 10 shows an example of the remaining variable list 194.The remaining variable list 194 includes, as information on each remaining operation, a counter variable (dividend), a remaining variable, a divisor, and an operation position.Referring again to FIG. 9, the description proceeds from step S 136.In step S 136, the remaining operation search unit 122 determines whether the ith instruction is the last instruction of the control program 191.When the ith instruction is the last instruction of the control program 191, the processing ends.When the ith instruction is not the last instruction of the control program 191, the processing proceeds to step S 137.In step S 137, the remaining operation search unit 122 adds 1 to the value of the temporary variable i.After step S 137, the processing proceeds to step S 132.Referring back to FIG. 3, the description will be continued.In step S 130, the remaining variable list 194 is created.In step S 140, the branch instruction search unit 123 finds a conditional branch instruction for a remainder of the control program 191.A conditional branch instruction to a remainder is a conditional branch instruction concerning the remainder of a remainder operation found in step S130, and the branch condition of which is a match between the remainder and a constant.Referring to FIGS. 11 and 12, a method for step S 140 will be described.In step S 1411, the branch instruction search unit 123 sets an initial value 1 in the temporary variable i.In step S 141, the branch instruction search unit 123 acquires ith information from the remaining variable list 194.Specifically, the branch instruction search unit 123 acquires the name of a counter variable (X), a name of a remaining variable (Y), a divisor P, and an operation position J.Then, the branch instruction search unit 123 sets the operation position J in the temporary variable j as an initial value.In step S 1413, the branch instruction search unit 123 selects the j-th instruction from the control program 191.Then, the branch instruction search unit 123 determines whether the j-th instruction is a conditional branch instruction.If the j-th instruction is a conditional branch instruction, the processing proceeds to step S1414.If the jth instruction is not a conditional branch instruction, the flow proceeds to step S1451.In step S 1414, the branch instruction search unit 123 determines whether the branch condition in the jth instruction is a match between a residual variable Y and a constant N.When the branch condition in the j-th instruction coincides with the remaining variable Y and the constant N, the processing proceeds to step S 1421.When the branch condition in the j-th instruction does not match the remaining variable Y and the constant N, the processing proceeds to step S 1451.In step S 1421, the branch instruction search unit 123 adds 1 to the value of the temporary variable j.In step S 1422, the branch instruction search unit 123 selects the j-th instruction from the control program 191.Then, the branch instruction search unit 123 determines whether the j-th instruction is the start instruction for the conditional branch instruction found in step S 1413.That is, the branch instruction search unit 123 determines whether the j-th instruction denotes the start of a branch target block.When the j-th instruction is the start instruction for the conditional branch instruction found in step S1413, the processing proceeds to step S1431.If the j-th instruction is not the start instruction for the conditional branch instruction found in step S 1413, the processing proceeds to step S 1421.In step S 1431, the branch instruction search unit 123 sets the value of the temporary variable j to a temporary variable k.In step S 1432, the branch instruction search unit 123 adds 1 to the value of the temporary variable j.In step S 1433, the branch instruction search unit 123 selects the j-th instruction from the control program 191.Then, the branch instruction search unit 123 determines whether the j-th instruction is the end instruction for the conditional branch instruction found in step S 1413.That is, the branch instruction search unit 123 determines whether the j-th instruction denotes the end of a branch target block.If the j-th instruction is the end instruction for the conditional branch instruction found in step S1413, the processing proceeds to step S1441.If the j-th instruction is not the end instruction for the conditional branch instruction found in step S1413, the processing proceeds to step S1432.In step S1441, the branch instruction search unit 123 adds information about a residual branch block to a residual branch block list 195.The residual branch block is the branch block for the conditional branch instruction found in step S1413.Specifically, the branch instruction search unit 123 sets a set of a name of the counter variable (dividend) X, a remaining variable name Y, a divisor P, an operation position J, a constant N, a start position k, and an end position j in the remaining branch block list 195.The constant N is referred to as a comparison constant.The start position k is the start position of the branch target block in the control program 191.The end position j is the end position of the branch target block in the control program 191.FIG. 13 shows an example of the remaining branch block list 195.The residual branch block list 195 includes, as information on each residual branch block, a counter variable (dividend), a residual variable, a divisor, an operation position, a comparison constant, a start position, and an end position.Referring back to FIG. 12, the description proceeds from step S 1451.In step S 145, the branch instruction search unit 123 adds 1 to the value of the temporary variable j.In step S 145, the branch instruction search unit 123 selects the j-th instruction from the control program 191.Then, the branch instruction search unit 123 determines whether the j-th instruction is the last instruction of the control program 191.When the j-th instruction is the last instruction of the control program 191, the processing proceeds to step S 1453.When the j-th instruction is not the last instruction of the control program 191, the processing proceeds to step S 1413.In step S 1453, the branch instruction search unit 123 determines whether the ith information is the latest information in the remaining variable list 194.When the ith information is the latest information in the remaining variable list 194, the processing ends.If the ith information is not the last information in the remaining variable list 194, the processing proceeds to step S1454.In step S1454, the branch instruction search unit 123 adds 1 to the value of the temporary variable i.After step S 1454, the processing proceeds to step S 1412.Referring back to FIG. 3, the description will be continued.In step S 140, the remaining branch block list 195 is created.In step S 150, the input / output variable extraction unit 124 extracts an input / output variable from the branch target block of the conditional branch instruction.At this time, the input / output variable extraction unit 124 determines whether the branch target block includes a bypass instruction. When the branch target block does not include a bypass instruction, the input / output variable extraction unit 124 extracts an input / output variable.The target equipment identifying unit 125 identifies the target equipment 220 corresponding to the extracted input / output variables.The identified target equipment 220 is the target equipment 220 to or from which the value of the extracted input / output variable is input or output.Referring to FIGS. 14 and 15, a method for step S 150 will be described.In step S 1511, the input / output variable extraction unit 124 sets an initial value 1 in the temporary variable i.In step S 151, the input / output variable extraction unit 124 acquires the ith information from the residual branch block list 195.Specifically, the input / output variable extraction unit 124 acquires the name of the counter variable (X), the constant N, the start position, and the end position.Then, the input / output variable extraction unit 124 sets the start position in the temporary variable k and the end position in the temporary variable j.In step S 1513, the input / output variable extraction unit 124 selects a k-th instruction from the control program 191.Then, the input / output variable extraction unit 124 determines whether the k-t instruction is an instruction including execution instruction bridging.If the kth instruction is an instruction including execution instruction bridging, the processing proceeds to step S 1551.If the kth instruction is not an instruction including execution instruction bridging, the processing proceeds to step S 1514.In step S 1514, the input / output variable extraction unit 124 adds 1 to the value of the temporary variable k.In step S 1515, the input / output variable extraction unit 124 compares the value of the temporary variable k with the value of the temporary variable j.When the value of the temporary variable k is equal to the value of the temporary variable j, the processing proceeds to step S 1521.If the value of the temporary variable k is different from the value of the temporary variable j, the processing proceeds to step S 1513.In step S 1521, the input / output variable extraction unit 124 acquires an i-th start position from the residual branch block list 195. Then, the input / output variable extraction unit 124 sets the i-th start position in the temporary variable k.In step S 1522, the input / output variable extraction unit 124 selects the k-th instruction from the control program 191.Then, the input / output variable extraction unit 124 determines whether an input / output variable indicated in the input / output variable list 192 is included in the k-th instruction as an operand.When an input / output variable indicated in the input / output variable list 192 is included in the k-th instruction as an operand, the processing proceeds to step S 1531.When an input / output variable indicated in the input / output variable list 192 is not included as an operand in the k-th instruction, the processing proceeds to step S 1541.In step S 1531, the target equipment identifying unit 125 refers to the input / output variable list 192 to identify the target equipment 220 corresponding to the input / output variable in the k-th instruction.Then, the target equipment identifying unit 125 inserts information on a remaining branch access destination into a remaining branch access destination list 196.Specifically, the target equipment identifying unit 125 inserts a set of the name of the counter variable (dividend) X, the name of the remaining variable Y, the divisor P, the operation position J, the constant N, the start position k, the end position j, and an access target into the remaining branch access target list 196.The access destination denotes the name of the destination equipment 220 corresponding to the input / output variable n in the k-th instruction.Figure 16 shows the Branch Remainder Access Destination List 196.The remaining branch access destination list 196 includes, as information about each remaining branch access destination, a counter variable (dividend), a remaining variable, a divisor, an operation position, a comparison constant, a start position, an end position, and an access destination.Referring back to FIG. 15, the description proceeds from step S 1541.In step S 154, the input / output variable extraction unit 124 adds a 1 to the value of the temporary variable k.In step S 154, the input / output variable extraction unit 124 compares the value of the temporary variable k with the value of the temporary variable j.When the value of the temporary variable k is equal to the value of the temporary variable j, the processing proceeds to step S 1551.If the value of the temporary variable k is different from the value of the temporary variable j, the process proceeds to step S 1522.In step S 1551, the input / output variable extraction unit 124 determines whether the ith information is the latest information in the remaining branch block list 195.When the ith information is the latest information in the remaining branch block list 195, the processing ends.If the ith information is not the last information in the remaining branch block list 195, the processing proceeds to step S 1552.In step S 1552, the input / output variable extraction unit 124 adds a 1 to the value of the temporary variable i.After step S 1552, the processing proceeds to step S 1512.Referring back to FIG. 3, the description will be continued.In step S150, the remaining branch access destination list 196 is created.In step S 160, the communication duration determination unit 126 determines a communication duration for each part of the target equipment 220.At this time, the communication duration determination unit 126 determines whether the input / output variable is accessed only in a branch target block. Then, when the input / output variable is accessed only in one branch target block, the communication duration determination unit 126 determines a period obtained by multiplying the execution period of the control program 191 by the divisor of the residual operation as the communication duration of the target equipment 220 corresponding to the input / output variable. Moreover, the communication duration determination unit 126 determines the communication duration of the remaining target equipment 220 as the execution period of the control program 191.Specifically, the communication duration determination unit 126 determines the communication duration of each part of the target equipment 220 as described below. "T" represents a periodic basic communication duration. The periodic communication period T is equal to the execution period of the control program 191.The communication duration determination unit 126 identifies the target equipment 220 specified only in a single information in the remaining branch access target list 196, and determines the divisor P from the information on the identified target equipment 220. Then, the communication duration determination unit 126 determines the periodic communication duration of the identified target equipment 220 as a value "T×P".The communication duration determination unit 126 determines the periodic communication duration of the remaining target equipment 220 as "T".In step S 170, the setting unit 130 communicates with the controller 210 to set the control program 191 and the communication duration for each part of the target equipment 220 in the controller 210.*** Effects of Embodiment 1 ***Embodiment 1 makes it possible to obtain an appropriate communication time for the target equipment 220 that is accessed once while the control program 191 is executed P times.*** Supplement to Embodiment 1 ***The periodic communication will be described with reference to FIGS. 17 and 18.Some FA networks have a periodic communication function using a time division communication technique.In the periodic communication function using the time division communication technique (see FIG. 17 ), the communication band of a network is time-divided, and time frames of a communication duration having a predetermined time length are provided to perform communication, details of which are predetermined.When periodic communication does not occur, other types of communication may utilize the network.The values of the input / output variables are updated by periodic communication.The periodic communication takes place independently of the execution of a control program (see FIG. 18 ).In the periodic communication, input data acquired from remote input equipment is stored in a memory within a controller, and the value of the input data is referenced by the control program as a value of an input / output variable. Moreover, the value of an input / output variable used by the control program is stored in the memory and transmitted to the remote output equipment by periodic communication.The control program is described in addition on the basis of FIGS. 19 and 20.The control program is generally executed repeatedly with a fixed duration.The control program may include processes executed at each execution of the control program, and processes executed only once while the control program is executed multiple times.FIG. 19 shows an example of a flowchart of the control program.For example, when the control program is executed, processing A is always executed. In contrast, the processing B(1) is executed only when the remainder of dividing the value of a variable n by P is 1. The processing B(2) is executed only when the remainder of dividing the value of the variable n by P is 2. The processing B(P-1) is executed only when the remainder of the division of the value of the variable n by P is (P-1). The processing B(P) is executed only when the remainder of dividing the value of the variable n by P is 0.The value of the variable n is increased by 1 at each execution of the control program. In this case, each of the processes B( 1) to B(P) is executed once during each period in which the control program is executed P times.FIG. 20 shows an example of configuration of remote input / output equipment.It is assumed that there are remote input / output equipments A and remote input / output equipments B(1) to remote input / output equipments B(P). Processing A processes the input / output variable of the remote input / output equipment A. Similarly, processing B( 1) processes the input / output variable of the remote input / output equipment (B 1), processing B( 2) processes the input / output variable of the remote input / output equipment B( 2), and processing B(P) processes the input / output variable of the remote input / output equipment B(P).In this case, the input / output variable of the remote input / output equipment A is referenced or used by the processing A. The input / output variable of the remote input / output equipment A needs to be updated each time the control program is executed.On the other hand, the input / output variables of the remote input / output equipment B( 1) to the remote input / output equipment B(P) are referenced from the processing B( 1) to the processing B(P). The input / output variables of the remote input / output equipment B( 1) to the remote input / output equipment B(P) must be updated every P execution of the control program.In other words, it can be said that the period of the periodic communication suitable for the remote input / output equipment B( 1) to the remote input / output equipment B(P) is P times the period of the periodic communication suitable for the remote input / output equipment A.Thus, when the communication duration of the remote input / output equipment B( 1) to the remote input / output equipment B(P) is set to be P times the communication duration of the remote input / output equipment A, the amount of data exchanged in the periodic communication decreases.Embodiment 2.Regarding an embodiment in which the periodic communication duration of the target equipment 220 indicated in a plurality of information in the remaining branch access target list 196 is set to be longer than the periodic communication duration T, the differences from Embodiment 1 will be mainly described with reference to FIG. 21.*** Description of configuration ***The configuration of the control system 200 and the configuration of the communication duration determiner 100 are the same as the configurations in Embodiment 1.*** Description of a Mode of Operation ***Referring to FIG. 21, a communication duration determination method will be described.Steps S 210 to S 250 are the same as steps S 110 to S 150 in Embodiment 1.Step S 260 is partially different from step S 160 in Embodiment 1.Step S 270 is the same as step S 170 in Embodiment 1.Step S 260 will be described later.In step S 260, the communication duration determination unit 126 determines a communication duration for each part of the target equipment 220.At this time, the communication duration determination unit 126 determines whether an input / output variable is accessed in two or more branch target blocks. When accessing the input / output variable in two or more branch target blocks, the communication duration determination unit 126 determines the communication duration of the target equipment 220 corresponding to the input / output variable based on the execution period of the control program 191, the divisor of the residual operation, and two or more constants of two or more branch conditions corresponding to the two or more branch target blocks.Specifically, the communication duration determination unit 126 determines the communication duration of each part of the target equipment 220 as described below. "T" represents the period of the periodic basic communication duration. The periodic communication period T is equal to the execution period of the control program 191.The communication duration determination unit 126 identifies the target equipment 220 indicated only in information in the remaining branch access target list 196. The identified target equipments 220 are hereinafter referred to as target equipments (1).The communication duration determination unit 126 determines the divisor P from the information on the target equipment ( 1).The communication duration determiner 126 determines the periodic communication duration of the target equipment ( 1) as a value "T×P".The communication duration determination unit 126 identifies the target equipment 220 indicated in a plurality of information in the remaining branch access destination list 196. The identified target equipment 220 is referred to as target equipment (2) below.The communication duration determination unit 126 determines whether a plurality of remaining variables indicated in the plurality of information of the target equipment ( 2) are the same. When the plurality of remaining variables indicated in the plurality of information about the target equipment ( 2) are the same, the target equipment ( 2) is referred to as target equipment ( 2A). For the target equipment (2A), there are k comparison constants N and the divisor is "P".The communication duration determiner 126 determines whether each element R i of a sequence R is a positive integer with respect to an element S i of a sequence S, based on the k comparison constants (N 1, N 2,..., N k), which are arranged in ascending order. If each element R i of the sequence R is a positive integer, the target equipment (2A) is referred to as target equipment (2B).The communication duration determination unit 126 determines a periodic communication duration C c of the target equipment ( 2B) as indicated below.The communication duration determination unit 126 determines the periodic communication duration of the remaining target equipment 220 as "T".Effects of Embodiment 2 ***In Embodiment 1 described above, the periodic communication duration of the target equipment 220 determined only in one line in the remaining branch access target list 196 is determined.However, there may be a case where the periodic communication duration of the target equipment 220 indicated in a plurality of lines in the remaining branch access target list 196 may be set to be longer than the execution period of the control program 191.In such a case, with Embodiment 2, it is possible to determine a periodic communication period that is longer than the execution period of the control program 191 for the target equipment 220 indicated in a plurality of lines in the branch-remaining access target list 196.Embodiment 3.With respect to an embodiment in which variables in which constants are set are taken into consideration, the differences from Embodiments 1 and 2 will be described mainly with reference to Figs. 22 to 24.*** Description of configuration ***The configuration of the control system 200 corresponds to the configuration in Embodiment 1.Referring to FIG. 22, the configuration of the communication duration determiner 100 will be described.The communication duration determiner 100 also includes a processing unit 140.The communication duration determination program further causes a computer to function as the processing unit 140.*** Description of a Mode of Operation ***Referring to FIG. 23, a communication duration determination method will be described.In step S 310, the accepting unit 110 accepts a specified variable list 197 in addition to the control program 191 and the input / output variable list 192.The specified variable list 197 is a list of the specified variables.A specified variable is a variable in which a constant is set and which is specified by a user.FIG. 24 shows an example of the specified variable list 197.The specified variable list 197 contains a specified variable and a constant for each specified variable.The communication duration determiner 100 may include a graphical user interface to assist in creating the specified variable list 197.Referring back to FIG. 23, the description proceeds from step S 320.In step S 320, the processing unit 140 edits the control program 191 based on the specified variable list 197.Specifically, the processing unit 140 finds each specified variable from the control program 191 and replaces each specified variable in the control program 191 with a constant.In steps S 330 to S 370, the processed control program 191 is used.Steps S 330 to S 380 are the same as steps S 120 to S 170 in Embodiment 1 or steps S 220 to S 270 in Embodiment 2.*** Effects of Embodiment 3 ***The above Embodiment 1 includes processing whose condition is that the operand of an instruction and the target of comparison are constants.However, there may be a case where the control program 191 is created using a variable representing a value corresponding to a constant, and the value of this variable is set to a certain value at the beginning of the control program 191 or by a separate definition.In such a case, in Embodiment 3, when the user individually specifies variables to which values to be treated as constants are assigned, these variables can be treated in the same manner as constants.Embodiment 4.With respect to an embodiment taking into consideration branch instructions whose branch results are determined, the differences from Embodiments 1 and 2 will be described mainly with reference to Figs. 25 to 28.*** Description of configuration ***The configuration of the control system 200 corresponds to the configuration in Embodiment 1.Referring to FIG. 25, the configuration of the communication duration determiner 100 will be described.The communication duration determiner 100 also includes a processing unit 150.The communication duration determination program further causes a computer to function as the processing unit 150.*** Description of a Mode of Operation ***Referring to FIG. 26, a communication duration determination method will be described.In step S 410, the controller 210 accepts a specified branch list 198 in addition to the control program 191 and the input / output variable list 192.The specified branch list 198 is a list of specified branch instructions.A specified branch instruction is a branch instruction whose branch result is set and specified by the user.FIG. 27 shows an example of the specified branch list 198.The specified branch list 198 indicates a branch instruction location and a set branch result for each specified branch instruction.A branch instruction location is the location of a specified branch instruction in the control program 191.A fixed branch result is a fixed branch result.The communication duration determiner 100 may include a graphical user interface to assist in creating the specified branch list 198.Referring again to FIG. 26, the description proceeds from step S 420.In step S 420, the processing unit 150 processes the control program 191 based on the specified branch list 198.Specifically, the processing unit 150 finds each specified branch instruction from the control program 191 and sets the branching result of each specified branch instruction in the control program 191 to disable it.In steps S 430 to S 470, the processed control program 191 is used.Steps S 430 to S 480 are the same as steps S 120 to S 170 in Embodiment 1 or steps S 220 to S 270 in Embodiment 2.*** Effects of Embodiment 4 ***FIGS. 28 and 29 each show an example of a flow chart of a control program.In FIG. 28, the control program includes a branch instruction in expectation of an unstable state, and the control processing is executed only when an emergency stop switch is turned on.Such a control program has no instruction which is executed only once, and the counter variable list is empty. If the counter variable list is empty, the embodiments cannot be applied.In such a situation, in Embodiment 4, the branch result of a branch instruction specified by the user is set to a result. This results in the specified branch instruction being virtually disabled.By setting the branching result of the branching instruction "IS THE EMERGENCY STOP SWITCH OFF?" to "NO" in FIG. 28, it is practically possible to display the control program as shown in FIG. 29.*** Supplement to Embodiment 4 ***Embodiment 4 can be combined with Embodiment 3. That is, the communication duration determiner 100 may include the processing unit 140 and the processing unit 150, and the control program 191 may be processed by the processing unit 140 and the processing unit 150.*** Supplement to Embodiments ***Referring to FIG. 30, a hardware configuration of the communication duration determiner 100 will be described.The communication duration determiner 100 includes a processing circuit 109.The processing circuit 109 is hardware that realizes the acquisition unit 110, the determination unit 120, the setting unit 130, the setting unit 140, and the processing unit 150.The processing circuit 109 may be dedicated hardware or may be the processor 101 that executes programs stored in the memory 102.When the processing circuit 109 is dedicated hardware, the processing circuit 109 is, for example, a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, an ASIC, an FPGA, or a combination thereof. ASIC is the abbreviation for Application-specific integrated circuit (application-specific integrated circuit).FPGA is an abbreviation for Field Programmable Gate Array (dt. Field programmable gate array).The communication duration determiner 100 may include a plurality of processing circuits, alternatively to the processing circuits 109.In the processing circuit 109, some functions may be realized by dedicated hardware, and the remaining functions may be realized by software or firmware.As described above, the functions of the communication duration determiner 100 may be realized by hardware, software, firmware, or a combination thereof.Each of the embodiments is an example of a preferred embodiment and is not intended to limit the technical scope of the present disclosure. Each of the embodiments may also be implemented only partially or may be implemented in combination with another embodiment. The methods described in the flowcharts or the like may be changed as needed.The communication duration determiner 100 may be realized by two or more apparatuses.Each "unit" that is an element of the communication duration determiner 100 may be interpreted as a "process", "step", "circuit", or "circuit".LIST OF REFERENCE CHARACTERS100: Communication duration determiner 101: processor 102: memory 103: auxiliary storage device 104: communication device 105: input / output interface, 109: processing circuit, 110: acceptance unit, 120: determination unit, 121: counter variable search unit, 122: remaining operation search unit, 123: branch instruction search unit, 124: input / output variable extraction unit, 125: target equipment identification unit, 126: communication duration determination unit, 130: setting unit, 140: processing unit, 150: processing unit, 190: storage unit, 191: control program, 192: input / output variable list, 193: counter variable list, 194: remaining variable list, 195: remaining branch block list, 196: remaining branch access target list, 197: specified variable list, 198: specified branch list, 200: control system, 201: network, 202: network, 210: controller, 220: target equipment, 221: sensor, 222: switch, 223: lamp, 224: solenoid, 230: setting device.

Claims

A communication duration determiner (100) comprising: a counter variable search unit (121) for finding, from a control program for controlling one or more pieces of target equipment, a counter variable for counting the number of executions of the control program; a residual operation search unit (122) for determining, from the control program, a residual operation in which the counter variable is a divisor and a constant is a divisor; a branch instruction search unit (123) for determining, from the control program, a conditional branch instruction whose branch condition is a match between a residual of the residual operation and a constant; an input / output variable extraction unit (124) for extracting an input / output variable from a branch target block of the conditional branch instruction; a target equipment identifying unit (125) for identifying, from the one or more pieces of target equipment, a piece of target equipment to or from which a value of the extracted input / output variable is input or output; and a communication duration determining unit (126) for determining a time period obtained by multiplying an execution time period of the control program by the divisor of the residual operation as a communication duration of the identified piece of target equipment when the extracted input / output variable is accessed in only one branch target block.The communication duration determination apparatus (100) according to claim 1, wherein the communication duration determination unit (126) determines a communication duration of each remaining part of the target equipment of the one or more parts of the target equipment as an execution period.The communication duration determination device (100) according to claim 1 or claim 2, wherein the input / output variable extraction unit (124) determines whether the branch target block includes a bridging instruction, and extracts the input / output variable when the branch target block does not include the bridging instruction.The communication duration determination device (100) according to any one of claims 1 to 3, wherein, when the extracted input / output variable is accessed in two or more branch target blocks, the communication duration determination unit (126) determines a communication duration of the identified part of the target equipment based on the execution period, the divisor, and two or more constants of two or more branch conditions corresponding to the two or more branch target blocks.The communication duration determination device (100) according to claim 4, wherein the communication duration determination unit (126) determines whether each element R i of a sequence R is a positive integer with respect to an element S i of a sequence S based on the two or more constants, N 1 to N k, arranged in ascending order, and determines a communication duration C c of the identified part of the target equipment when each element R i is a positive integer, and wherein the element S i, determines the element R i, and the communication duration C c as indicated below, are S i = { N i + P - N i .. (i = k ) N i + 1 - N i .. (1 ≤ i < k ) R i = S i '1 ≤ j ≤ k S j C c = T × P '1 ≤ j ≤ k S j. The communication duration determination device (100) according to any one of claims 1 to 5, further comprising a processing unit (140) to determine, from the control program, a specified variable specified as a variable in which a constant is set, and edit the control program by replacing the specified variable in the control program with the constant to be set in the specified variable, wherein a communication duration of the identified part of the target equipment is determined using the processed control program.The communication duration determination device (100) according to any one of claims 1 to 5, further comprising an operation unit (150) to determine, from the control program, a specified branch instruction specified as a branch instruction whose branch result is set, and operate the control program so as to set the branch result of the specified branch instruction in the control program, wherein a communication duration of the identified part of the target equipment is determined using the operated control program.The communication duration determination device (100) according to any one of claims 1 to 5, further comprising: a first processing unit (140) to determine, from the control program, a specified variable specified as a variable in which a constant is set and to process the control program by replacing the specified variable in the control program with the constant to be set in the specified variable; and a second processing unit (150) to find, from the control program, a specified branch instruction specified as a branch instruction whose branch result is set, and to process the control program so that the branch result of the specified branch instruction is set in the control program, wherein a communication duration of the identified part of the target equipment is determined using the processed control program.A communication duration determination method comprising: obtaining a counter variable from a control program for controlling one or more pieces of target equipment to count the number of executions of the control program; obtaining a residual operation from the control program in which the counter variable is a dividend and a constant is a divisor; obtaining a conditional branch instruction from the control program whose branch condition is a match between a residual of the residual operation and a constant; extracting an input / output variable from a branch target block of the conditional branch instruction; identifying a part of the target equipment among the one or more pieces of the target equipment to or from which a value of the extracted input / output variables is input or output; determining a time period obtained by multiplying an execution time period of the control program by the divisor of the residual operation as a communication duration of the identified part of the target equipment when the extracted input / output variable is accessed in only one branch target block.A communication duration determination program for causing a computer to execute: a counter variable search process for obtaining a counter variable from a control program for controlling one or more pieces of target equipment to count the number of execution times of the control program; a remaining operation search process for finding, from the control program, a remaining operation in which the counter variable is a dividend and a constant is a divisor; a branch instruction search process for obtaining, from the control program, a conditional branch instruction whose branch condition is a match between a remaining of the remaining operation and a constant; an input / output variable extraction process for extracting an input / output variable from a branch target block of the conditional branch instruction; a target equipment identifying process in which, from the one or more pieces of target equipment, a piece of target equipment into or from which a value of the extracted input / output variable is input or output is identified; and a communication duration determining process for determining a period obtained by multiplying an execution period of the control program by the divisor of the residual operation as a communication duration of the identified piece of target equipment when the extracted input / output variable is accessed in only a branch target block.

Citation Information

Patent Citations

  • Wireless communication device, wireless information collection system, and wireless communication method

    US20180212697A1

  • Distributed environmental process control system

    US5831848A