WO2016207937A1 - Programmable controller and control method for programmable controller - Google Patents

Programmable controller and control method for programmable controller Download PDF

Info

Publication number
WO2016207937A1
WO2016207937A1 PCT/JP2015/067826 JP2015067826W WO2016207937A1 WO 2016207937 A1 WO2016207937 A1 WO 2016207937A1 JP 2015067826 W JP2015067826 W JP 2015067826W WO 2016207937 A1 WO2016207937 A1 WO 2016207937A1
Authority
WO
WIPO (PCT)
Prior art keywords
execution
programmable controller
service
time
processing program
Prior art date
Application number
PCT/JP2015/067826
Other languages
French (fr)
Japanese (ja)
Inventor
貴也 太田
輝明 田中
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to JP2015550878A priority Critical patent/JP5866082B1/en
Priority to PCT/JP2015/067826 priority patent/WO2016207937A1/en
Publication of WO2016207937A1 publication Critical patent/WO2016207937A1/en

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/05Programmable logic controllers, e.g. simulating logic interconnections of signals according to ladder diagrams or function charts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt

Definitions

  • the present technology relates to a programmable controller and a control method of the programmable controller, and in particular, a programmable controller and a programmable controller that exclusively execute a sequence processing program for controlling a device and a service process including a network communication process. It relates to a control method.
  • Programmable controllers are widely used as general-purpose control devices for controlling various machine facilities or plant facilities installed in factories and the like.
  • the network communication function is used when monitoring the operation status of the programmable controller from an external computer.
  • the file access function is used when outputting the operation data of the programmable controller or the execution information of the user program as a file to the built-in memory area or the removable external memory area.
  • a method for simultaneously executing a plurality of functions a method for executing processing by switching in a time division manner is known.
  • execution of a plurality of functions is performed simultaneously by switching execution of the sequence processing program and execution of the service processing at regular intervals.
  • Patent Document 1 discloses a programmable controller that simultaneously executes a sequence processing program and a communication process.
  • the time allocated to communication processing is dynamically changed according to the type of communication processing that has occurred.
  • the present technology is for solving the above-described problems, and relates to a programmable controller and a control method of the programmable controller that can suppress deterioration of response time to a communication request.
  • a programmable controller is a programmable controller that exclusively performs execution of a sequence processing program for controlling a device and execution of service processing including network communication processing, and requests execution of the service processing.
  • An accepting unit that accepts the service process and when the accepting unit accepts the execution request for the service process, if the sequence processing program is executed in the programmable controller, an elapsed time from when the request for executing the service process is accepted
  • a control unit that switches the execution of the sequence processing program from the execution of the sequence processing program and executes the service processing corresponding to the execution request when the predetermined threshold value is exceeded.
  • a programmable controller control method includes: a programmable controller that exclusively executes a sequence processing program for controlling a device and a service process including a network communication process; When the sequence processing program is executed in the programmable controller when the request is received and the execution request for the service process is received, an elapsed time from when the execution request for the service process is received is determined in advance. When the first threshold value is exceeded, the programmable controller switches from execution of the sequence processing program to execute the service process corresponding to the execution request.
  • a programmable controller is a programmable controller that exclusively performs execution of a sequence processing program for controlling a device and execution of service processing including network communication processing, and requests execution of the service processing.
  • An accepting unit that accepts the service process and when the accepting unit accepts the execution request for the service process, if the sequence processing program is executed in the programmable controller, an elapsed time from when the request for executing the service process is accepted
  • a control unit that switches the execution of the sequence processing program from the execution of the sequence processing program and executes the service processing corresponding to the execution request when the predetermined threshold value is exceeded.
  • the service process execution request is not waited longer than the first threshold time, and the response time to the communication request is improved.
  • a programmable controller control method includes: a programmable controller that exclusively executes a sequence processing program for controlling a device and a service process including a network communication process; When the sequence processing program is executed in the programmable controller when the request is received and the execution request for the service process is received, an elapsed time from when the execution request for the service process is received is determined in advance. When the first threshold value is exceeded, the programmable controller switches from execution of the sequence processing program to execute the service process corresponding to the execution request.
  • the service process execution request is not waited longer than the first threshold time, and the response time to the communication request is improved.
  • FIG. 3 is a diagram schematically illustrating a hardware configuration when actually operating the programmable controller illustrated in FIGS. 1 and 2 according to the embodiment.
  • FIG. 3 is a diagram schematically illustrating a hardware configuration when actually operating the programmable controller illustrated in FIGS. 1 and 2 according to the embodiment.
  • FIG. 5 It is a flowchart which illustrates operation
  • FIG. 7 It is a flowchart which illustrates operation
  • It is a figure which illustrates the implementation condition (pri 3) of the process switching in the process execution part when the communication request generate
  • FIG. 1 is a diagram conceptually showing the configuration of the programmable controller and other configurations related to this embodiment.
  • the programmable controller 1 includes a processing execution unit 2, a data holding unit 3 that is a rewritable storage device that stores a waiting time upper limit value 4, a ratio value 5, and a priority value 6, A priority setting unit 7 and a peripheral interface 8 for connecting to the computer device 9 are provided.
  • the process execution unit 2 performs execution of a sequence process program, execution of a service process, switching control between the sequence process and the service process, and the like.
  • Examples of data used by the processing execution unit 2 include a waiting time upper limit value 4, a ratio value 5, and a priority value 6.
  • the waiting time upper limit value 4 is data defining the waiting time for a service processing request.
  • the ratio value 5 is data defining the ratio between the execution time of the sequence processing program and the execution time of the service process.
  • the priority value 6 is data that defines how much priority is given to any of the execution of the sequence processing program and the execution of the service processing.
  • the priority setting unit 7 is a functional unit for setting the priority value 6 to be changeable from the outside.
  • the computer device 9 illustrated in FIG. 1 is disposed outside the programmable controller 1.
  • FIG. 2 is a diagram showing the configuration of the processing execution unit 2 shown in FIG. 1 in more detail.
  • the processing execution unit 2 includes a sequence processing unit 10, a service processing unit 11, a reception and measurement unit 13, a waiting time excess detection unit 14, a service processing excess detection unit 15, And a switching control unit 12.
  • the sequence processing unit 10 executes the sequence processing program and measures the execution time of the sequence processing program.
  • the service processing unit 11 executes the service process and measures the execution time of the service process.
  • the acceptance and measurement unit 13 accepts an execution request for service processing. In addition, the reception and measurement unit 13 measures an elapsed time from the time when the execution request is generated.
  • the waiting time excess detection unit 14 detects whether or not the elapsed time from the time when the reception and measurement unit 13 receives the service processing execution request exceeds a prescribed waiting time upper limit value 4.
  • the service process excess detection unit 15 detects whether or not the time when the service process is executed exceeds the upper limit value of the service process.
  • the switching control unit 12 performs process switching of the sequence process being executed or the service process being executed based on the information from the waiting time excess detection unit 14 and the information from the reception and measurement unit 13.
  • FIGS. 3 and 4 are diagrams schematically illustrating a hardware configuration when the programmable controller illustrated in FIGS. 1 and 2 is actually operated.
  • a processing circuit 102 a that performs an operation
  • a storage device 103 that can store information
  • input and output device 104 that can These configurations are the same in other embodiments described later.
  • FIG. 4 as a hardware configuration for realizing the programmable controller illustrated in FIGS. 1 and 2, a processing circuit 102 b that performs an operation and an input and output device 104 that can input and output information are illustrated. . These configurations are the same in other embodiments described later.
  • the data holding unit 3 is realized by the storage device 103.
  • the storage device 103 includes, for example, a hard disk (Hard disk drive, ie, HDD), random access memory (random access memory, ie, RAM), read only memory (read only memory, ie, ROM), flash memory, erasable programmable read only memory (ie, ROM). EPROM) and electrically erasable programmable read-only memory (EEPROM), etc., depending on memory (storage media) including volatile or non-volatile semiconductor memory, magnetic disk, flexible disk, optical disk, compact disk, mini disk, DVD, etc. Composed It composed of such as a memory (storage medium) containing Runado.
  • the processing circuit 102 a may execute a program stored in the storage device 103.
  • a central processing unit CPU
  • a microprocessor for example, a central processing unit (CPU), a microprocessor, a microcomputer, or a digital signal processor (DSP) may be used.
  • DSP digital signal processor
  • the processing execution unit 2 and the priority setting unit 7 are realized by software, firmware, or a combination of software and firmware. Note that these functions may be realized by, for example, cooperation of a plurality of processing circuits.
  • the processing circuit 102a implements the above functions by reading and executing a program stored in the storage device 103.
  • the storage device 103 stores a program that results in the above functions being executed by the processing circuit 102a.
  • processing circuit 102b may be dedicated hardware. That is, for example, a single circuit, a compound circuit, a programmed processor, a parallel programmed processor, an integrated circuit (application specific integrated circuit, that is, ASIC), a field-programmable gate array (FPGA), or a combination thereof. It may be.
  • ASIC application specific integrated circuit
  • FPGA field-programmable gate array
  • processing circuit 102b When the processing circuit 102b is dedicated hardware, the processing execution unit 2 and the priority setting unit 7 are realized by the processing circuit 102b operating. Note that these functions may be realized by separate circuits or may be realized by a single circuit.
  • processing execution unit 2 and the priority setting unit 7 described above are realized in the processing circuit 102a that partially executes a program stored in the storage device 103, and a part thereof is dedicated hardware. It may be realized in a certain processing circuit 102b.
  • peripheral interface 8 is realized by the input and output device 104.
  • FIG. 5 is a diagram exemplifying a process switching execution state in the process execution unit 2 when a communication request is generated 9 ms after the execution start of the sequence process program.
  • the vertical axis indicates the length of the waiting time for service processing
  • the horizontal axis indicates the time elapse of sequence processing or service processing.
  • FIG. 6 is a flowchart illustrating the operation of the process execution unit 2 in the case illustrated in FIG.
  • the communication request is a request that requires at least a response by service processing.
  • the switching control unit 12 determines whether or not a communication request has occurred (see step ST1 in FIG. 6). Specifically, it is determined whether the reception and measurement unit 13 has received a communication request. If it is determined that a communication request has occurred, the switching control unit 12 proceeds to step ST2 in FIG. On the other hand, when it is determined that a communication request has not occurred, the process returns to step ST1 in FIG.
  • the switching control unit 12 determines whether or not the waiting time from the time when the communication request is generated exceeds the time given by thres (3 ms in the above setting) (see step ST2 in FIG. 6). ). Specifically, the waiting time excess detection unit 14 determines whether or not it has detected that the elapsed time from the time when the service processing execution request is received exceeds the time given by thres. The elapsed time from when the service process execution request is received is measured by the reception and measurement unit 13. When the waiting time from the time when the communication request is generated exceeds the time given by thres, the switching control unit 12 switches the process from the sequence process to the service process (see step ST3 in FIG. 6). . On the other hand, when the waiting time from the time when the communication request is generated does not exceed the time given by thres, the process returns to step ST2 in FIG.
  • the point in time when the communication request is generated means the point in time when the communication request is received by the programmable controller.
  • the switching control unit 12 performs processing switching from the sequence processing to the service processing (see step ST3 in FIG. 6).
  • the switching control unit 12 determines whether or not the execution time of the service process exceeds the time obtained by multiplying the execution time of the sequence processing program executed until the process is switched and the ratio (see FIG. (Refer to step ST4 in 6). Specifically, the service processing excess detection unit 15 exceeds the time obtained by multiplying the execution time of the sequence processing program executed before switching the process and the ratio by the ratio. Is detected. And when the said time is exceeded, the switching control part 12 performs the process switching from a service process to a sequence process (refer step ST5 in FIG. 6). On the other hand, when the said time is not exceeded, it returns to step ST4 in FIG.
  • the sequence processing program is executed until the waiting time for the generated communication request exceeds the time given by thres. That is, the process returns to step ST1 in FIG.
  • the process can be switched using a method different from the above.
  • the switching control unit 12 may perform the process switching when the sum of the waiting times for the communication requests exceeds thres.
  • the waiting time upper limit value 4 is set to thres
  • the ratio value 5 is set to ratio.
  • FIG. 7 shows the execution of process switching in the process execution unit 2 when a first communication request is generated 9 ms after the start of execution of the sequence processing program and a second communication request is generated 12 ms after the start of execution of the sequence process program. It is a figure which illustrates a situation.
  • the vertical axis indicates the length of the waiting time for service processing
  • the horizontal axis indicates the time elapse of sequence processing or service processing.
  • FIG. 8 is a flowchart illustrating the operation of the process execution unit 2 in the case illustrated in FIG.
  • the switching control unit 12 determines whether or not a communication request has occurred (see step ST11 in FIG. 8). Specifically, it is determined whether the reception and measurement unit 13 has received a communication request. If it is determined that a communication request has occurred, the switching control unit 12 proceeds to step ST12 in FIG. On the other hand, when it is determined that a communication request has not occurred, the process returns to step ST11 in FIG.
  • the switching control unit 12 determines whether or not the waiting time from the time when the communication request is generated exceeds the time given by thres (7 ms in the above setting) for all communication requests generated at the present time. (See step ST12 in FIG. 8). Specifically, the waiting time excess detection unit 14 determines whether or not it has detected that the elapsed time from the time when the service processing execution request is received exceeds the time given by thres. The elapsed time from when the service process execution request is received is measured by the reception and measurement unit 13.
  • a time obtained by adding the waiting times of the plurality of communication requests is a time given by thres. The waiting time is to be compared.
  • the switching control unit 12 continues the sequence process. That is, the switching control unit 12 temporarily holds the response to the first communication request and the response to the second communication request, and does not perform process switching.
  • the switching control unit 12 switches the process from the sequence process to the service process (see step ST13 in FIG. 8). .
  • the process returns to step ST12 in FIG.
  • the switching control unit 12 switches the process from the sequence process to the service process.
  • first communication response in FIG. 7 When executing the service process, first, a response (first communication response in FIG. 7) is made with respect to the first communication request that is the request that has occurred first. Thereafter, a response (second communication response in FIG. 7) is made to the second communication request.
  • the responses are performed in the order in which the requests are generated.
  • a priority is set for each service processing type, and a response is performed from a service process with a high priority.
  • Other methods may be used to determine the order.
  • the switching control unit 12 determines whether or not the execution time of the service process exceeds the time obtained by multiplying the execution time of the sequence processing program executed until the process is switched and the ratio (see FIG. (See step ST14 in FIG. 8). Specifically, the service processing excess detection unit 15 exceeds the time obtained by multiplying the execution time of the sequence processing program executed before switching the process and the ratio by the ratio. Is detected. When the time is exceeded, the switching control unit 12 switches the process from the service process to the sequence process (see step ST15 in FIG. 8). On the other hand, when the said time is not exceeded, it returns to step ST14 in FIG.
  • the sequence processing program is executed until the waiting time for the generated communication request exceeds the time given by thres. That is, the process returns to step ST11 in FIG.
  • thres and ratio can be set based on the set priority value 6.
  • the priority value 6 can be set by the priority setting unit 7 or the computer device 9.
  • the process execution unit 2 has a function of writing the priority value 6 set by the computer device 9 to the data holding unit 3, and the priority value 6 is set by the computer device 9. If this happens, the priority value 6 is changed using this function.
  • a method for calculating the waiting time upper limit value 4 (thres) and the ratio value 5 (ratio) based on the priority value 6 set by the priority setting unit 7 or the computer device 9 will be described below.
  • FIG. 9 is a diagram illustrating a correspondence relationship between the priority value 6, the waiting time upper limit value 4 (thres), and the ratio value 5 (ratio).
  • the vertical axis represents the waiting time upper limit 4 (thres)
  • the horizontal axis represents the ratio value 5 (ratio).
  • FIG. 9 also shows that the priority value 6 is set.
  • the value of the waiting time upper limit value 4 (thres) and the value of the ratio value 5 (ratio) are determined in proportion to the priority value 6 will be described.
  • thres and ratio a maximum value and a minimum value that can be set are provided for thres and ratio, respectively. Further, the maximum value of thres is set as max t, and the minimum value of thres is set as min t . Further, the maximum value of ratio is set as max r, and the minimum value of ratio is set as min r .
  • the priority value 6 is pri
  • thres and ratio are calculated according to the following formula.
  • FIG. 10 and FIG. 11 are diagrams exemplifying the execution status of process switching in the process execution unit 2 when a communication request is generated.
  • the process switching from the sequence process to the service process is performed when the time (8 ms) set by thres is exceeded. Then, a response (first communication response in FIG. 10) is made during execution of the service process.
  • the service processing is a time obtained by multiplying the execution time of the sequence processing program by the ratio, that is, Only executed and switched to sequence processing.
  • the process switching from the sequence process to the service process is performed when the time (6 ms) set by thres is exceeded. Then, a response is made during the execution of the service process (first communication response in FIG. 11).
  • the service processing is a time obtained by multiplying the execution time of the sequence processing program by the ratio, that is, Only executed and switched to sequence processing.
  • the response time is shorter for both of the two communication requests than in the case illustrated in FIG.
  • the time that can be allocated to the sequence process is shorter than in the case illustrated in FIG.
  • the processing is switched from the sequence processing program to the service processing.
  • the service process is not waited longer than the value of thres, and the response time of the service process is improved. Also, the time for performing the service process can be adjusted by the set value of ratio.
  • thres and ratio can be calculated based on the priority value pri according to the calculation formula shown in the present embodiment. Therefore, when the priority value is set to service processing priority, the response time of service processing can be improved. Further, when the priority value is set to sequence processing priority, the time allocatable to the sequence processing can be increased.
  • a service process executed on the programmable controller 1 information related to the operation status of the programmable controller or information related to a sequence processing program is transmitted to and received from the externally connected computer device 9.
  • the service process executed on the programmable controller is not limited to this. That is, for example, a file writing process to a memory area connected to the programmable controller 1 or a file reading process from the memory area may be used.
  • Second Embodiment A programmable controller according to this embodiment will be described.
  • the same components as those described in the above embodiment are denoted by the same reference numerals, and detailed description thereof will be omitted as appropriate.
  • a calculation formula is used in which the waiting time upper limit value 4 and the ratio value 5 are determined in proportion to the priority value 6.
  • the following formulas (3) and (4) that can adjust the execution performance of the sequence processing program of the programmable controller 1 and the response performance of the service processing may be used in accordance with the user's intention. .
  • the value ratio next and the updated thres value thres next are as follows.
  • the above calculation formula is configured such that the execution time of the sequence program and the execution time of the service process are proportionally changed with respect to the variable of the priority value pri.
  • T svc is the average value of the service process execution time
  • S is the time required for the switching control unit 12 to switch the process executed on the process execution unit 2 from the sequence process to the service process or vice versa. The total value.
  • Equation (12) and Equation (13) are substituted into Equation (10). It becomes. Furthermore, by substituting Equation (13) and Equation (14) into Equation (11), Is obtained.
  • Equation (14) and Equation (16) Is obtained. Further, from the equations (15) and (17), Is obtained.
  • the amount of change in ratio is the amount of change in pri, It can be calculated by multiplying. Also, the amount of change in thres is the amount of change in pri, It can be calculated by multiplying.
  • equations (22) and (23) are respectively In the equations (22) and (23), Can be used to derive equations (3) and (4).
  • FIG. 12 and FIG. 13 are diagrams illustrating an example of a process switching execution state in the process execution unit 2 when a communication request is generated 9 ms after the execution start of the sequence processing program.
  • the process is switched from the sequence process to the service process when the time set by thres (11 ms) is exceeded. Then, a response (communication response in FIG. 12) is made during the execution of the service process.
  • the execution time of the service process can be calculated by multiplying the execution time of the sequence processing program and the ratio, It becomes.
  • the allocation time for sequence processing is shorter in the case illustrated in FIG. 13 than in the case illustrated in FIG.
  • the allocation time for service processing is longer in the case illustrated in FIG. 13 than in the case illustrated in FIG. 12. It will be adjusted.
  • the calculation formula for obtaining thres and ratio is configured such that the execution time of the sequence program and the execution time of the service process are changed in proportion to the variable of the priority value pri.
  • the process switching operation can be changed as intended by the user of the programmable controller.
  • thress next and ratio next are calculated using Expression (3) and Expression (4), but other calculation expressions may be used.
  • S may be derived using a calculation formula that is inversely proportional to thres.
  • the value is immediately applied to thres and ratio when the variation value (pri new -pri old ) of the priority value pri is changed to 1 or more. It was. However, when the change value of pri is changed to be 1 or more, the work of changing the value of thrs and the value of ratio with the change value of pri being 1 is changed by the actual change value at regular intervals. May be repeated.
  • the programmable controller includes the reception and measurement unit 13 as the reception unit and the switching control unit 12 as the control unit.
  • the acceptance and measurement unit 13 accepts an execution request for service processing.
  • the switching control unit 12 when the sequence processing program is being executed in the programmable controller 1 when the reception and measurement unit 13 receives the service process execution request, the elapsed time from when the service process execution request was received When thres exceeds a predetermined first threshold value thres, the programmable controller 1 switches from execution of the sequence processing program to execute service processing corresponding to the execution request.
  • the programmable controller includes the processing circuit 102a that executes the program and the storage device 103 that stores the program.
  • the programmable controller 1 switches the execution of the sequence processing program to execute the service process corresponding to the execution request.
  • the programmable controller includes the processing circuit 102b.
  • the processing circuit 102b performs the following operation.
  • the processing circuit 102b when the sequence processing program is executed in the programmable controller 1 when the service process execution request is received, the processing circuit 102b has a predetermined elapsed time from when the service process execution request is received. When the threshold value exceeds thres, the programmable controller 1 switches from execution of the sequence processing program to execute service processing corresponding to the execution request.
  • the switching control unit 12 is programmable when the time when the service process is executed after switching from the execution of the sequence processing program exceeds a predetermined second threshold value.
  • the controller 1 executes the sequence processing program.
  • the second threshold value is calculated by multiplying the execution time of the sequence processing program executed until the process is switched and the ratio.
  • the upper limit value is provided for the execution time of the service process, so that the ratio between the execution time of the sequence processing program and the execution time of the service process can be adjusted. Specifically, the ratio between the execution time of the sequence processing program and the execution time of the service process can be adjusted by changing the ratio value.
  • the execution time of the service process is suppressed from being increased depending on the contents of the service process, the execution time of the sequence processing program is suppressed from being shortened compared to the execution time of the service process.
  • the second threshold value is set as a predetermined third threshold value at the time when the sequence processing program is executed before switching to the service processing. The multiplied value.
  • the upper limit value is provided for the execution time of the service process, so that the ratio between the execution time of the sequence processing program and the execution time of the service process can be adjusted. Specifically, the ratio between the execution time of the sequence processing program and the execution time of the service process can be adjusted by changing the ratio value.
  • the execution time of the service process is suppressed from being increased depending on the contents of the service process, the execution time of the sequence processing program is suppressed from being shortened compared to the execution time of the service process.
  • the programmable controller is provided with the priority value setting part 7 which sets the priority value which shows the degree of giving priority to execution of a service process over execution of a sequence processing program so that change is possible from the outside. .
  • the priority value can be changed in the priority value setting unit 7.
  • the priority value can be set and changed from the computer device 9 externally connected to the programmable controller 1.
  • At least one of thres and ratio is predetermined based on the priority value.
  • the user can easily adjust the balance between the execution of the sequence processing program of the programmable controller 1 and the execution of the service processing according to the use environment.
  • Priority that defines the execution performance of the sequence processing program and the response performance of the communication processing is desirably adjustable after the programmable controller is attached to the equipment or mechanical system. For that purpose, it is necessary to be able to set the priority value using a functional unit attached to the programmable controller main body.
  • the programmable controller may be installed in a place where it cannot be directly touched by human hands. In this case, it is necessary that the priority value can be set from an external device connected to the programmable controller.
  • the priority value can be set and changed in the priority value setting unit 7. Further, according to the above embodiment, the priority value can be set and changed from the computer device 9 externally connected to the programmable controller 1. Therefore, the priority value can be easily adjusted even after the programmable controller is attached to the facility or mechanical system.
  • the programmable controller includes the sequence processing unit 10, the service processing unit 11, the waiting time excess detection unit 14, and the service processing excess detection unit 15.
  • the sequence processing unit 10 executes the sequence processing program and measures the time when the sequence processing program is executed.
  • the service processing unit 11 performs the service process and measures the time when the service process is performed.
  • the waiting time excess detection unit 14 detects that the elapsed time from the reception of the service processing execution request has exceeded thres.
  • the service process excess detection unit 15 detects that the time when the service process is executed exceeds the second threshold value.
  • the reception and measurement unit 13 measures the elapsed time from when the service processing execution request is received.
  • the switching control unit 12 detects the detection information and service processing in the waiting time excess detection unit 14. Based on the detection information in the excess detection unit 15, the service processing unit 11 executes service processing corresponding to the execution request by switching from execution of the sequence processing program.
  • the programmable controller 1 switches the execution of the sequence processing program to execute the service process corresponding to the execution request.
  • the service process corresponding to the execution request can be immediately executed. it can.
  • the programmable controller 1 switches from the execution of the sequence processing program and executes the service process corresponding to the execution request. Make it.
  • each service process execution request is not waited longer than the thres time, and the response time to the service process execution request is improved.
  • the second threshold value is calculated by multiplying the execution time of the sequence processing program executed until the process is switched and the ratio.
  • the upper limit value is provided for the execution time of the service process, so that the ratio between the execution time of the sequence processing program and the execution time of the service process can be adjusted. Specifically, the ratio between the execution time of the sequence processing program and the execution time of the service process can be adjusted by changing the ratio value.
  • the execution time of the service process is suppressed from being increased depending on the contents of the service process, the execution time of the sequence processing program is suppressed from being shortened compared to the execution time of the service process.
  • the second threshold is set to a predetermined ratio at the time when the sequence processing program is executed before switching to the execution of the service processing. The multiplied value.
  • the upper limit value is provided for the execution time of the service process, so that the ratio between the execution time of the sequence processing program and the execution time of the service process can be adjusted. Specifically, the ratio between the execution time of the sequence processing program and the execution time of the service process can be adjusted by changing the ratio value.
  • the execution time of the service process is suppressed from being increased depending on the contents of the service process, the execution time of the sequence processing program is suppressed from being shortened compared to the execution time of the service process.
  • At least one of thres and ratio is based on a priority value indicating a degree of giving priority to execution of service processing over execution of sequence processing program. Predetermined.
  • the user can easily adjust the balance between the execution of the sequence processing program of the programmable controller 1 and the execution of the service processing according to the use environment.
  • the time allocated to the execution of the communication process can be changed by editing a table that defines the execution time for each type of the communication process.
  • advanced knowledge about each communication process is required, so it is not possible to specify the time to execute for each communication type by a general programmable controller user Have difficulty.
  • the user can easily adjust the balance between the execution of the sequence processing program of the programmable controller 1 and the execution of the service processing according to the use environment.
  • thres and ratio can be determined simultaneously based on the priority value.
  • the user can easily adjust the balance between the execution of the sequence processing program of the programmable controller 1 and the execution of the service processing according to the use environment.
  • thres and ratio can be adjusted at the same time, and the ratio between the execution time of the sequence processing program and the execution time of the service processing can be adjusted.
  • thres and ratio are proportional to the priority value.
  • the user can easily adjust the balance between the execution of the sequence processing program of the programmable controller 1 and the execution of the service processing according to the use environment.
  • thres and ratio can be adjusted simultaneously, and the ratio between the execution time of the sequence processing program and the execution time of the service processing can be adjusted as intended by the user.
  • thres becomes smaller as the priority value becomes larger. Further, the ratio increases as the priority value increases.
  • the user can easily adjust the balance between the execution of the sequence processing program of the programmable controller 1 and the execution of the service processing according to the use environment.
  • thres and ratio can be adjusted simultaneously, and the ratio between the execution time of the sequence processing program and the execution time of the service processing can be adjusted as intended by the user.
  • each component is a conceptual unit, and one component consists of a plurality of structures, one component corresponds to a part of the structure, and a plurality of components. And the case where the component is provided in one structure.
  • Each component includes a structure having another structure or shape as long as the same function is exhibited.
  • each component described in the above embodiment is assumed to be software or firmware, or hardware corresponding thereto, and in both concepts, each component is a “unit” or “processing circuit” or the like. Called.
  • the present technology may be a case where each component is distributed and provided in a plurality of devices (that is, an aspect like a system).
  • the data holding unit 3 is illustrated as being mounted in the programmable controller 1 in FIG. 1, but may be an external functional unit. In that case, the function of the data holding unit 3 is achieved as a whole by interacting with other functional units in the programmable controller 1.
  • 1 programmable controller 2 processing execution unit, 3 data holding unit, 4 waiting time upper limit value, 5 ratio value, 6 priority value, 7 priority setting unit, 8 peripheral device interface, 9 computer device, 10 sequence processing unit, 11 Service processing unit, 12 switching control unit, 13 reception and measurement unit, 14 waiting time excess detection unit, 15 service processing excess detection unit, 102a, 102b processing circuit, 103 storage device, 104 input and output device.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • General Engineering & Computer Science (AREA)
  • Programmable Controllers (AREA)

Abstract

The present invention relates to a programmable controller and a control method therefor capable of minimizing increases in the time required to respond to a communication request. The programmable controller is provided with: a reception unit (13) which receives a service process execution request; and a control unit (12) which, if a sequence process program is running on the programmable controller when the reception unit receives the service process execution request, causes the programmable controller to delay switching from the execution of the sequence process program to the execution of the service process indicated by the service process execution request until the elapsed time since the reception of the service process execution request exceeds a predetermined first threshold value.

Description

プログラマブルコントローラおよびプログラマブルコントローラの制御方法Programmable controller and control method of programmable controller
 本技術は、プログラマブルコントローラおよびプログラマブルコントローラの制御方法に関し、特に、機器を制御するためのシーケンス処理プログラムの実行と、ネットワーク通信処理を含むサービス処理の実行とを排他的に行うプログラマブルコントローラおよびプログラマブルコントローラの制御方法に関するものである。 The present technology relates to a programmable controller and a control method of the programmable controller, and in particular, a programmable controller and a programmable controller that exclusively execute a sequence processing program for controlling a device and a service process including a network communication process. It relates to a control method.
 プログラマブルコントローラは、工場などに設置されている多様な機械設備またはプラント設備などを制御するための汎用制御装置として広く用いられる。 Programmable controllers are widely used as general-purpose control devices for controlling various machine facilities or plant facilities installed in factories and the like.
 近年のプログラマブルコントローラは、多機能化が進んでおり、主用途である機械設備または機械システムなどの制御を行うシーケンス処理プログラムの実行機能に加えて、ネットワーク通信機能またはファイルアクセス機能などのサービス処理の実行機能を搭載した製品が存在する。 In recent years, programmable controllers have become increasingly multifunctional, and in addition to the execution function of sequence processing programs that control machine equipment or machine systems, which are the main applications, service processing such as network communication functions or file access functions. There is a product with an execution function.
 ネットワーク通信機能は、外部コンピュータからプログラマブルコントローラの稼働状況をモニタリングする場合などに使用される。ファイルアクセス機能は、プログラマブルコントローラの稼働データまたはユーザープログラムの実行情報を、内蔵メモリ領域または取り外し可能な外部メモリ領域にファイルとして出力する場合などに使用される。 The network communication function is used when monitoring the operation status of the programmable controller from an external computer. The file access function is used when outputting the operation data of the programmable controller or the execution information of the user program as a file to the built-in memory area or the removable external memory area.
 複数の機能の同時実行を行う方式としては、処理を時分割で切り換えて実行する方式が知られる。この方式では、シーケンス処理プログラムの実行と、サービス処理の実行とを一定時間ごとに切り換えることによって、複数の機能の実行を同時に行う。 As a method for simultaneously executing a plurality of functions, a method for executing processing by switching in a time division manner is known. In this method, execution of a plurality of functions is performed simultaneously by switching execution of the sequence processing program and execution of the service processing at regular intervals.
 特許文献1では、シーケンス処理プログラムと、通信処理とを同時に実行するプログラマブルコントローラが開示される。特許文献1では、通信処理の応答時間を改善するために、通信処理に割り当てる時間を、発生した通信処理の種別に応じて動的に変更する。 Patent Document 1 discloses a programmable controller that simultaneously executes a sequence processing program and a communication process. In Patent Literature 1, in order to improve the response time of communication processing, the time allocated to communication processing is dynamically changed according to the type of communication processing that has occurred.
特開2011-134197号公報JP 2011-134197 A
 特許文献1に記載されたプログラマブルコントローラが用いられる場合、シーケンス処理プログラムの実行中に通信要求が発生すると、あらかじめ設定されたシーケンス処理プログラムの実行のための割り当て時間が経過した後に、通信要求に対する応答が行われる。よって、たとえば、当該通信要求がシーケンス処理プログラムの実行開始直後に発生した場合には、通信要求に対する応答が行われるまでに長い時間がかかってしまう。その結果として、通信要求に対する応答時間が悪化する。 When the programmable controller described in Patent Document 1 is used, if a communication request is generated during execution of the sequence processing program, a response to the communication request is made after the preset time for execution of the sequence processing program has elapsed. Is done. Therefore, for example, when the communication request is generated immediately after the execution of the sequence processing program is started, it takes a long time to respond to the communication request. As a result, the response time for the communication request is deteriorated.
 本技術は、上記のような問題を解決するためのものであり、通信要求に対する応答時間の悪化を抑制することができるプログラマブルコントローラおよびプログラマブルコントローラの制御方法に関するものである。 The present technology is for solving the above-described problems, and relates to a programmable controller and a control method of the programmable controller that can suppress deterioration of response time to a communication request.
 本技術の一態様に関するプログラマブルコントローラは、機器を制御するためのシーケンス処理プログラムの実行と、ネットワーク通信処理を含むサービス処理の実行とを排他的に行うプログラマブルコントローラであり、前記サービス処理の実行要求を受け付ける受け付け部と、前記受け付け部で前記サービス処理の実行要求を受け付けた時に前記プログラマブルコントローラにおいて前記シーケンス処理プログラムの実行が行われている場合、前記サービス処理の実行要求を受け付けた時からの経過時間があらかじめ定められた第1しきい値を超えた時点で、前記プログラマブルコントローラにおいて前記シーケンス処理プログラムの実行から切り換えて前記実行要求に対応する前記サービス処理の実行を行わせる制御部とを備える。 A programmable controller according to an aspect of the present technology is a programmable controller that exclusively performs execution of a sequence processing program for controlling a device and execution of service processing including network communication processing, and requests execution of the service processing. An accepting unit that accepts the service process and when the accepting unit accepts the execution request for the service process, if the sequence processing program is executed in the programmable controller, an elapsed time from when the request for executing the service process is accepted And a control unit that switches the execution of the sequence processing program from the execution of the sequence processing program and executes the service processing corresponding to the execution request when the predetermined threshold value is exceeded.
 本技術の一態様に関するプログラマブルコントローラの制御方法は、機器を制御するためのシーケンス処理プログラムの実行と、ネットワーク通信処理を含むサービス処理の実行とを排他的に行うプログラマブルコントローラにおいて、前記サービス処理の実行要求を受け付け、前記サービス処理の実行要求を受け付けた時に前記プログラマブルコントローラにおいて前記シーケンス処理プログラムの実行が行われている場合、前記サービス処理の前記実行要求を受け付けた時からの経過時間があらかじめ定められた第1しきい値を超えた時点で、前記プログラマブルコントローラにおいて前記シーケンス処理プログラムの実行から切り換えて前記実行要求に対応する前記サービス処理の実行を行わせる。 A programmable controller control method according to an aspect of the present technology includes: a programmable controller that exclusively executes a sequence processing program for controlling a device and a service process including a network communication process; When the sequence processing program is executed in the programmable controller when the request is received and the execution request for the service process is received, an elapsed time from when the execution request for the service process is received is determined in advance. When the first threshold value is exceeded, the programmable controller switches from execution of the sequence processing program to execute the service process corresponding to the execution request.
 本技術の一態様に関するプログラマブルコントローラは、機器を制御するためのシーケンス処理プログラムの実行と、ネットワーク通信処理を含むサービス処理の実行とを排他的に行うプログラマブルコントローラであり、前記サービス処理の実行要求を受け付ける受け付け部と、前記受け付け部で前記サービス処理の実行要求を受け付けた時に前記プログラマブルコントローラにおいて前記シーケンス処理プログラムの実行が行われている場合、前記サービス処理の実行要求を受け付けた時からの経過時間があらかじめ定められた第1しきい値を超えた時点で、前記プログラマブルコントローラにおいて前記シーケンス処理プログラムの実行から切り換えて前記実行要求に対応する前記サービス処理の実行を行わせる制御部とを備える。 A programmable controller according to an aspect of the present technology is a programmable controller that exclusively performs execution of a sequence processing program for controlling a device and execution of service processing including network communication processing, and requests execution of the service processing. An accepting unit that accepts the service process and when the accepting unit accepts the execution request for the service process, if the sequence processing program is executed in the programmable controller, an elapsed time from when the request for executing the service process is accepted And a control unit that switches the execution of the sequence processing program from the execution of the sequence processing program and executes the service processing corresponding to the execution request when the predetermined threshold value is exceeded.
 このような構成によれば、サービス処理の実行要求が第1しきい値の時間よりも待たされることがなくなり、通信要求に対する応答時間が改善される。 According to such a configuration, the service process execution request is not waited longer than the first threshold time, and the response time to the communication request is improved.
 本技術の一態様に関するプログラマブルコントローラの制御方法は、機器を制御するためのシーケンス処理プログラムの実行と、ネットワーク通信処理を含むサービス処理の実行とを排他的に行うプログラマブルコントローラにおいて、前記サービス処理の実行要求を受け付け、前記サービス処理の実行要求を受け付けた時に前記プログラマブルコントローラにおいて前記シーケンス処理プログラムの実行が行われている場合、前記サービス処理の前記実行要求を受け付けた時からの経過時間があらかじめ定められた第1しきい値を超えた時点で、前記プログラマブルコントローラにおいて前記シーケンス処理プログラムの実行から切り換えて前記実行要求に対応する前記サービス処理の実行を行わせる。 A programmable controller control method according to an aspect of the present technology includes: a programmable controller that exclusively executes a sequence processing program for controlling a device and a service process including a network communication process; When the sequence processing program is executed in the programmable controller when the request is received and the execution request for the service process is received, an elapsed time from when the execution request for the service process is received is determined in advance. When the first threshold value is exceeded, the programmable controller switches from execution of the sequence processing program to execute the service process corresponding to the execution request.
 このような構成によれば、サービス処理の実行要求が第1しきい値の時間よりも待たされることがなくなり、通信要求に対する応答時間が改善される。 According to such a configuration, the service process execution request is not waited longer than the first threshold time, and the response time to the communication request is improved.
 本技術に関する目的と、特徴と、局面と、利点とは、以下に示される詳細な説明と添付図面とによって、より明白となる。 The purpose, features, aspects, and advantages of the present technology will become more apparent from the detailed description and the accompanying drawings shown below.
実施形態に関する、プログラマブルコントローラの構成およびその他の構成を概念的に示す図である。It is a figure which shows notionally the structure of the programmable controller regarding an embodiment, and another structure. 実施形態に関する、図1に示された処理実行部の構成をさらに詳細に示す図である。It is a figure which shows further in detail the structure of the process execution part shown by FIG. 1 regarding embodiment. 実施形態に関する、図1および図2に例示されるプログラマブルコントローラを実際に運用する場合のハードウェア構成を概略的に示す図である。FIG. 3 is a diagram schematically illustrating a hardware configuration when actually operating the programmable controller illustrated in FIGS. 1 and 2 according to the embodiment. 実施形態に関する、図1および図2に例示されるプログラマブルコントローラを実際に運用する場合のハードウェア構成を概略的に示す図である。FIG. 3 is a diagram schematically illustrating a hardware configuration when actually operating the programmable controller illustrated in FIGS. 1 and 2 according to the embodiment. 実施形態に関する、シーケンス処理プログラムの実行開始から9ms後に通信要求が発生した場合の、処理実行部における処理切り換えの実施状況を例示する図である。It is a figure which illustrates the implementation condition of the process switching in a process execution part when a communication request | requirement generate | occur | produces 9 ms after the execution start of a sequence processing program regarding embodiment. 実施形態に関する、図5に例示される場合の、処理実行部の動作を例示するフローチャートである。It is a flowchart which illustrates operation | movement of the process execution part in the case illustrated in FIG. 5 regarding embodiment. 実施形態に関する、シーケンス処理プログラムの実行開始から9ms後に第1通信要求が発生し、さらにシーケンス処理プログラムの実行開始から12ms後に第2通信要求が発生した場合の、処理実行部における処理切り換えの実施状況を例示する図である。State of execution of process switching in the process execution unit when the first communication request is generated 9 ms after the start of execution of the sequence processing program and the second communication request is generated 12 ms after the start of execution of the sequence process program FIG. 実施形態に関する、図7に例示される場合の、処理実行部の動作を例示するフローチャートである。It is a flowchart which illustrates operation | movement of the process execution part in the case illustrated in FIG. 7 regarding embodiment. 実施形態に関する、優先度値、待ち時間上限値(thres)および比率値(ratio)の対応関係を例示する図である。It is a figure which illustrates the correspondence of a priority value, waiting time upper limit (thres), and ratio value (ratio) regarding embodiment. 実施形態に関する、通信要求が発生した場合の処理実行部における処理切り換えの実施状況(pri=3)を例示する図である。It is a figure which illustrates the implementation condition (pri = 3) of the process switching in the process execution part when the communication request generate | occur | produces regarding embodiment. 実施形態に関する、通信要求が発生した場合の処理実行部における処理切り換えの実施状況(pri=5)を例示する図である。It is a figure which illustrates the implementation condition (pri = 5) of the process switching in the process execution part when a communication request generate | occur | produces regarding embodiment. 実施形態に関する、シーケンス処理プログラムの実行開始から9ms後に通信要求が発生した場合の、処理実行部における処理切り換えの実施状況(pri=0)を例示する図である。It is a figure which illustrates the implementation condition (pri = 0) of the process switching in a process execution part when a communication request generate | occur | produces 9 ms after the execution start of a sequence processing program regarding embodiment. 実施形態に関する、シーケンス処理プログラムの実行開始から9ms後に通信要求が発生した場合の、処理実行部における処理切り換えの実施状況(pri=4)を例示する図である。It is a figure which illustrates the implementation condition (pri = 4) of the process switching in a process execution part when a communication request generate | occur | produces 9 ms after the execution start of a sequence processing program regarding embodiment.
 以下、添付される図面を参照しながら実施形態について説明する。なお、図面は模式的に示されるものであり、異なる図面にそれぞれ示されている画像の大きさと位置との相互関係は、必ずしも正確に記載されるものではなく、適宜変更され得るものである。また、以下に示される説明では、同様の構成要素には同じ符号を付して図示し、それらの名称と機能とについても同様のものとする。よって、それらについての詳細な説明を省略する場合がある。 Hereinafter, embodiments will be described with reference to the accompanying drawings. Note that the drawings are schematically shown, and the mutual relationship between the sizes and positions of the images shown in different drawings is not necessarily described accurately, and can be changed as appropriate. Moreover, in the description shown below, the same code | symbol is attached | subjected and shown in the same component, and it is the same also about those names and functions. Therefore, the detailed description about them may be omitted.
 <第1実施形態>
 <構成>
 以下、本実施形態に関する、機器を制御するためのシーケンス処理プログラムの実行と、ネットワーク通信処理を含むサービス処理の実行とを排他的に行うプログラマブルコントローラについて説明する。
<First Embodiment>
<Configuration>
Hereinafter, a programmable controller that exclusively performs execution of a sequence processing program for controlling devices and execution of service processing including network communication processing according to the present embodiment will be described.
 図1は、本実施形態に関するプログラマブルコントローラの構成およびその他の構成を概念的に示す図である。 FIG. 1 is a diagram conceptually showing the configuration of the programmable controller and other configurations related to this embodiment.
 図1に例示されるように、プログラマブルコントローラ1は、処理実行部2と、待ち時間上限値4、比率値5および優先度値6を記憶する書き換え可能な記憶装置であるデータ保持部3と、優先度設定部7と、コンピュータ装置9と接続するための周辺器インターフェイス8とを備えている。 As illustrated in FIG. 1, the programmable controller 1 includes a processing execution unit 2, a data holding unit 3 that is a rewritable storage device that stores a waiting time upper limit value 4, a ratio value 5, and a priority value 6, A priority setting unit 7 and a peripheral interface 8 for connecting to the computer device 9 are provided.
 処理実行部2は、シーケンス処理プログラムの実行、サービス処理の実行、および、シーケンス処理とサービス処理との間の切り換え制御などを行う。 The process execution unit 2 performs execution of a sequence process program, execution of a service process, switching control between the sequence process and the service process, and the like.
 処理実行部2が利用するデータとしては、待ち時間上限値4、比率値5および優先度値6が例示される。待ち時間上限値4は、サービス処理要求の待ち時間を規定するデータである。比率値5は、シーケンス処理プログラムの実行時間とサービス処理の実行時間との比率を規定するデータである。優先度値6は、シーケンス処理プログラムの実行とサービス処理の実行とのいずれの処理を、どの程度優先するかを規定するデータである。 Examples of data used by the processing execution unit 2 include a waiting time upper limit value 4, a ratio value 5, and a priority value 6. The waiting time upper limit value 4 is data defining the waiting time for a service processing request. The ratio value 5 is data defining the ratio between the execution time of the sequence processing program and the execution time of the service process. The priority value 6 is data that defines how much priority is given to any of the execution of the sequence processing program and the execution of the service processing.
 優先度設定部7は、優先度値6を外部から変更可能に設定するための機能部である。また、図1に例示されるコンピュータ装置9は、プログラマブルコントローラ1の外部に配置される。 The priority setting unit 7 is a functional unit for setting the priority value 6 to be changeable from the outside. In addition, the computer device 9 illustrated in FIG. 1 is disposed outside the programmable controller 1.
 以下、本実施形態に関するシーケンス処理とサービス処理との双方の処理を、時分割で実行する場合について説明する。 Hereinafter, a case where both the sequence processing and the service processing related to the present embodiment are executed in a time-sharing manner will be described.
 図2は、図1に示された処理実行部2の構成をさらに詳細に示す図である。 FIG. 2 is a diagram showing the configuration of the processing execution unit 2 shown in FIG. 1 in more detail.
 図2に例示されるように、処理実行部2は、シーケンス処理部10と、サービス処理部11と、受け付けおよび計測部13と、待ち時間超過検出部14と、サービス処理超過検出部15と、切り換え制御部12とを備える。 As illustrated in FIG. 2, the processing execution unit 2 includes a sequence processing unit 10, a service processing unit 11, a reception and measurement unit 13, a waiting time excess detection unit 14, a service processing excess detection unit 15, And a switching control unit 12.
 シーケンス処理部10は、シーケンス処理プログラムの実行を行うとともに、シーケンス処理プログラムの実行時間を計測する。サービス処理部11は、サービス処理の実行を行うとともに、サービス処理の実行時間を計測する。 The sequence processing unit 10 executes the sequence processing program and measures the execution time of the sequence processing program. The service processing unit 11 executes the service process and measures the execution time of the service process.
 受け付けおよび計測部13は、サービス処理の実行要求を受け付ける。また、受け付けおよび計測部13は、実行要求の発生時点からの経過時間を計測する。 The acceptance and measurement unit 13 accepts an execution request for service processing. In addition, the reception and measurement unit 13 measures an elapsed time from the time when the execution request is generated.
 待ち時間超過検出部14は、受け付けおよび計測部13がサービス処理の実行要求を受け付けた時点からの経過時間が、規定された待ち時間上限値4を超えたか否かを検出する。 The waiting time excess detection unit 14 detects whether or not the elapsed time from the time when the reception and measurement unit 13 receives the service processing execution request exceeds a prescribed waiting time upper limit value 4.
 サービス処理超過検出部15は、サービス処理の実行が行われた時間がサービス処理の上限値を超えたか否かを検出する。 The service process excess detection unit 15 detects whether or not the time when the service process is executed exceeds the upper limit value of the service process.
 切り換え制御部12は、待ち時間超過検出部14からの情報および受け付けおよび計測部13からの情報に基づいて、実行中のシーケンス処理または実行中のサービス処理の処理切り換えを行う。 The switching control unit 12 performs process switching of the sequence process being executed or the service process being executed based on the information from the waiting time excess detection unit 14 and the information from the reception and measurement unit 13.
 図3および図4は、図1および図2に例示されるプログラマブルコントローラを実際に運用する場合のハードウェア構成を概略的に示す図である。 3 and 4 are diagrams schematically illustrating a hardware configuration when the programmable controller illustrated in FIGS. 1 and 2 is actually operated.
 図3では、図1および図2に例示されるプログラマブルコントローラを実現するハードウェア構成として、演算を行う処理回路102aと、情報を記憶することができる記憶装置103と、情報を入力および出力することができる、入力および出力装置104とが示される。これらの構成は、後述する他の実施形態においても同様である。 3, as a hardware configuration for realizing the programmable controller illustrated in FIGS. 1 and 2, a processing circuit 102 a that performs an operation, a storage device 103 that can store information, and input and output of information. An input and output device 104 that can These configurations are the same in other embodiments described later.
 図4では、図1および図2に例示されるプログラマブルコントローラを実現するハードウェア構成として、演算を行う処理回路102bと、情報を入力および出力することができる、入力および出力装置104とが示される。これらの構成は、後述する他の実施形態においても同様である。 In FIG. 4, as a hardware configuration for realizing the programmable controller illustrated in FIGS. 1 and 2, a processing circuit 102 b that performs an operation and an input and output device 104 that can input and output information are illustrated. . These configurations are the same in other embodiments described later.
 データ保持部3は、記憶装置103によって実現される。記憶装置103は、たとえば、ハードディスク(Hard disk drive、すなわちHDD)、ランダムアクセスメモリ(random access memory、すなわちRAM)、リードオンリーメモリ(read only memory、すなわちROM)、フラッシュメモリ、erasable programmable read only memory(EPROM)およびelectrically erasable programmable read-only memory(EEPROM)などの、揮発性または不揮発性の半導体メモリ、磁気ディスク、フレキシブルディスク、光ディスク、コンパクトディスク、ミニディスクまたはDVDなどを含むメモリ(記憶媒体)などによって構成されるなどを含むメモリ(記憶媒体)などによって構成される。 The data holding unit 3 is realized by the storage device 103. The storage device 103 includes, for example, a hard disk (Hard disk drive, ie, HDD), random access memory (random access memory, ie, RAM), read only memory (read only memory, ie, ROM), flash memory, erasable programmable read only memory (ie, ROM). EPROM) and electrically erasable programmable read-only memory (EEPROM), etc., depending on memory (storage media) including volatile or non-volatile semiconductor memory, magnetic disk, flexible disk, optical disk, compact disk, mini disk, DVD, etc. Composed It composed of such as a memory (storage medium) containing Runado.
 処理回路102aは、記憶装置103に格納されたプログラムを実行するものであってもよい。すなわち、たとえば、中央演算処理装置(central processing unit、すなわちCPU)、マイクロプロセッサ、マイクロコンピュータ、デジタルシグナルプロセッサ(digital signal pocessor、すなわちDSP)であってもよい。 The processing circuit 102 a may execute a program stored in the storage device 103. In other words, for example, a central processing unit (CPU), a microprocessor, a microcomputer, or a digital signal processor (DSP) may be used.
 処理回路102aが記憶装置103に格納されたプログラムを実行するものである場合、処理実行部2と、優先度設定部7とは、ソフトウェア、ファームウェアまたはソフトウェアとファームウェアとの組み合わせにより実現される。なお、これらの機能は、たとえば、複数の処理回路が連携することによって実現されてもよい。 When the processing circuit 102a executes a program stored in the storage device 103, the processing execution unit 2 and the priority setting unit 7 are realized by software, firmware, or a combination of software and firmware. Note that these functions may be realized by, for example, cooperation of a plurality of processing circuits.
 ソフトウェアおよびファームウェアはプログラムとして記述され、記憶装置103に記憶される。処理回路102aは、記憶装置103に格納されたプログラムを読み出して実行することにより、上記の機能を実現する。すなわち、記憶装置103は、処理回路102aに実行されることにより、上記の機能が結果的に実現されるプログラムを記憶する。 Software and firmware are described as programs and stored in the storage device 103. The processing circuit 102a implements the above functions by reading and executing a program stored in the storage device 103. In other words, the storage device 103 stores a program that results in the above functions being executed by the processing circuit 102a.
 また、処理回路102bは、専用のハードウェアであってもよい。すなわち、たとえば、単一回路、複合回路、プログラム化されたプロセッサ、並列プログラム化されたプロセッサ、集積回路(application specific integrated circuit、すなわちASIC)、field-programmable gate array(FPGA)またはこれらを組み合わせた回路であってもよい。 Further, the processing circuit 102b may be dedicated hardware. That is, for example, a single circuit, a compound circuit, a programmed processor, a parallel programmed processor, an integrated circuit (application specific integrated circuit, that is, ASIC), a field-programmable gate array (FPGA), or a combination thereof. It may be.
 処理回路102bが専用のハードウェアである場合、処理実行部2と、優先度設定部7とは、処理回路102bが動作することにより実現される。なお、これらの機能は、別々の回路で実現されてもよいし、単一の回路で実現されてもよい。 When the processing circuit 102b is dedicated hardware, the processing execution unit 2 and the priority setting unit 7 are realized by the processing circuit 102b operating. Note that these functions may be realized by separate circuits or may be realized by a single circuit.
 なお、上記の処理実行部2および優先度設定部7の機能は、一部が記憶装置103に格納されたプログラムを実行するものである処理回路102aにおいて実現され、一部が専用のハードウェアである処理回路102bにおいて実現されてもよい。 The functions of the processing execution unit 2 and the priority setting unit 7 described above are realized in the processing circuit 102a that partially executes a program stored in the storage device 103, and a part thereof is dedicated hardware. It may be realized in a certain processing circuit 102b.
 また、周辺器インターフェイス8は、入力および出力装置104によって実現される。 Also, the peripheral interface 8 is realized by the input and output device 104.
 <作用>
 次に、処理実行部2の動作について、図5および図6を参照しつつ説明する。以下では、記述を簡単化するため、待ち時間上限値4をthres、比率値5をratioとする。
<Action>
Next, the operation of the process execution unit 2 will be described with reference to FIGS. 5 and 6. In the following, in order to simplify the description, the waiting time upper limit value 4 is set to thres and the ratio value 5 is set to ratio.
 図5は、シーケンス処理プログラムの実行開始から9ms後に通信要求が発生した場合の、処理実行部2における処理切り換えの実施状況を例示する図である。図5においては、縦軸がサービス処理の待ち時間の長さを示し、横軸がシーケンス処理またはサービス処理の時間経過を示す。 FIG. 5 is a diagram exemplifying a process switching execution state in the process execution unit 2 when a communication request is generated 9 ms after the execution start of the sequence process program. In FIG. 5, the vertical axis indicates the length of the waiting time for service processing, and the horizontal axis indicates the time elapse of sequence processing or service processing.
 また、図6は、図5に例示される場合の、処理実行部2の動作を例示するフローチャートである。 FIG. 6 is a flowchart illustrating the operation of the process execution unit 2 in the case illustrated in FIG.
 ここでは、たとえば、
Figure JPOXMLDOC01-appb-M000001
Figure JPOXMLDOC01-appb-M000002
 として説明する。
Here, for example,
Figure JPOXMLDOC01-appb-M000001
Figure JPOXMLDOC01-appb-M000002
Will be described.
 まず、シーケンス処理プログラムの実行中に通信要求が発生する状況を想定する。ここで、通信要求とは、少なくともサービス処理による応答が必要となる要求である。 First, assume a situation where a communication request occurs during the execution of a sequence processing program. Here, the communication request is a request that requires at least a response by service processing.
 次に、切り換え制御部12は、通信要求が発生したか否かを判断する(図6におけるステップST1を参照)。具体的には、受け付けおよび計測部13が通信要求を受け付けたか否かを判断する。そして、切り換え制御部12は、通信要求が発生したと判断される場合、図6におけるステップST2へ進む。一方で、通信要求が発生していないと判断される場合、図6におけるステップST1へ戻る。 Next, the switching control unit 12 determines whether or not a communication request has occurred (see step ST1 in FIG. 6). Specifically, it is determined whether the reception and measurement unit 13 has received a communication request. If it is determined that a communication request has occurred, the switching control unit 12 proceeds to step ST2 in FIG. On the other hand, when it is determined that a communication request has not occurred, the process returns to step ST1 in FIG.
 次に、切り換え制御部12は、当該通信要求が発生した時点からの待ち時間が、thresで与えられる時間(上記の設定では3ms)を超えたか否かを判断する(図6におけるステップST2を参照)。具体的には、待ち時間超過検出部14が、サービス処理の実行要求を受け付けた時からの経過時間がthresで与えられる時間を超えたことを検出したか否かを判断する。なお、サービス処理の実行要求を受け付けた時からの経過時間は、受け付けおよび計測部13において計測される。そして、当該通信要求が発生した時点からの待ち時間がthresで与えられる時間を超えた場合、切り換え制御部12は、シーケンス処理からサービス処理への処理切り換えを行う(図6におけるステップST3を参照)。一方で、当該通信要求が発生した時点からの待ち時間がthresで与えられる時間を超えない場合、図6におけるステップST2へ戻る。 Next, the switching control unit 12 determines whether or not the waiting time from the time when the communication request is generated exceeds the time given by thres (3 ms in the above setting) (see step ST2 in FIG. 6). ). Specifically, the waiting time excess detection unit 14 determines whether or not it has detected that the elapsed time from the time when the service processing execution request is received exceeds the time given by thres. The elapsed time from when the service process execution request is received is measured by the reception and measurement unit 13. When the waiting time from the time when the communication request is generated exceeds the time given by thres, the switching control unit 12 switches the process from the sequence process to the service process (see step ST3 in FIG. 6). . On the other hand, when the waiting time from the time when the communication request is generated does not exceed the time given by thres, the process returns to step ST2 in FIG.
 なお、通信要求が発生した時点とは、プログラマブルコントローラにおいて通信要求を受け付けた時点をいうものとする。 Note that the point in time when the communication request is generated means the point in time when the communication request is received by the programmable controller.
 図5に例示される例では、シーケンス処理プログラムの実行開始から12ms後に、切り換え制御部12は、シーケンス処理からサービス処理への処理切り換えを行う(図6におけるステップST3を参照)。 In the example illustrated in FIG. 5, after 12 ms from the start of execution of the sequence processing program, the switching control unit 12 performs processing switching from the sequence processing to the service processing (see step ST3 in FIG. 6).
 当該処理切り換えの後の、サービス処理の実行時間は、処理切り換えを行うまでに実行されたシーケンス処理プログラムの実行時間と、ratio(本例では1/3)とを掛け合わせることで算出される。上記にしたがうと、図5に例示される例では、12ms×ratio(すなわち1/3)=4msだけサービス処理が実行される。 The execution time of the service process after the process switching is calculated by multiplying the execution time of the sequence processing program executed until the process is switched and the ratio (1/3 in this example). According to the above, in the example illustrated in FIG. 5, the service process is executed for 12 ms × ratio (ie, 1/3) = 4 ms.
 次に、切り換え制御部12は、サービス処理の実行時間が、処理切り換えを行うまでに実行されたシーケンス処理プログラムの実行時間と、ratioとを掛け合わせた時間を超えたか否かを判断する(図6におけるステップST4を参照)。具体的には、サービス処理超過検出部15が、サービス処理の実行が行われた時間が、処理切り換えを行うまでに実行されたシーケンス処理プログラムの実行時間と、ratioとを掛け合わせた時間を超えたことを検出したか否かを判断する。そして、当該時間を超えた場合、切り換え制御部12は、サービス処理からシーケンス処理への処理切り換えを行う(図6におけるステップST5を参照)。一方で、当該時間を超えない場合、図6におけるステップST4へ戻る。 Next, the switching control unit 12 determines whether or not the execution time of the service process exceeds the time obtained by multiplying the execution time of the sequence processing program executed until the process is switched and the ratio (see FIG. (Refer to step ST4 in 6). Specifically, the service processing excess detection unit 15 exceeds the time obtained by multiplying the execution time of the sequence processing program executed before switching the process and the ratio by the ratio. Is detected. And when the said time is exceeded, the switching control part 12 performs the process switching from a service process to a sequence process (refer step ST5 in FIG. 6). On the other hand, when the said time is not exceeded, it returns to step ST4 in FIG.
 その後は、発生した通信要求に対する待ち時間がthresで与えられる時間を超えるまでシーケンス処理プログラムを実行する。すなわち、図6におけるステップST1に戻る。 After that, the sequence processing program is executed until the waiting time for the generated communication request exceeds the time given by thres. That is, the process returns to step ST1 in FIG.
 図5に例示される例では、シーケンス処理プログラムの実行中に発生した通信要求が1つである。しかし、シーケンス処理プログラムの実行中に発生する通信要求が複数である場合にも、同様の処理方式に基づいて対応することが可能である。 In the example illustrated in FIG. 5, there is one communication request generated during the execution of the sequence processing program. However, even when there are a plurality of communication requests generated during the execution of the sequence processing program, it is possible to respond based on the same processing method.
 また、複数の通信要求が発生した場合に、上記とは別の方式を用いて処理切り換えを行うこともできる。たとえば、各通信要求に対する待ち時間を合算した値がthresを超えた時点で、切り換え制御部12が処理切り換えを実施してもよい。 Also, when a plurality of communication requests are generated, the process can be switched using a method different from the above. For example, the switching control unit 12 may perform the process switching when the sum of the waiting times for the communication requests exceeds thres.
 次に、複数の通信要求が発生した場合の処理実行部2の動作について、図7および図8を参照しつつ説明する。以下では、記述を簡単化するため、待ち時間上限値4をthres、比率値5をratioとする。 Next, the operation of the processing execution unit 2 when a plurality of communication requests are generated will be described with reference to FIGS. In the following, in order to simplify the description, the waiting time upper limit value 4 is set to thres, and the ratio value 5 is set to ratio.
 図7は、シーケンス処理プログラムの実行開始から9ms後に第1通信要求が発生し、さらにシーケンス処理プログラムの実行開始から12ms後に第2通信要求が発生した場合の、処理実行部2における処理切り換えの実施状況を例示する図である。図7においては、縦軸がサービス処理の待ち時間の長さを示し、横軸がシーケンス処理またはサービス処理の時間経過を示す。 FIG. 7 shows the execution of process switching in the process execution unit 2 when a first communication request is generated 9 ms after the start of execution of the sequence processing program and a second communication request is generated 12 ms after the start of execution of the sequence process program. It is a figure which illustrates a situation. In FIG. 7, the vertical axis indicates the length of the waiting time for service processing, and the horizontal axis indicates the time elapse of sequence processing or service processing.
 また、図8は、図7に例示される場合の、処理実行部2の動作を例示するフローチャートである。 FIG. 8 is a flowchart illustrating the operation of the process execution unit 2 in the case illustrated in FIG.
 ここでは、
Figure JPOXMLDOC01-appb-M000003
Figure JPOXMLDOC01-appb-M000004
 として説明する。
here,
Figure JPOXMLDOC01-appb-M000003
Figure JPOXMLDOC01-appb-M000004
Will be described.
 まず、シーケンス処理プログラムの実行中に第1通信要求が発生し、さらに、第1通信要求が発生してから3ms後に、第2通信要求が発生する状況を想定する。 First, a situation is assumed in which a first communication request is generated during execution of the sequence processing program, and further, a second communication request is generated 3 ms after the first communication request is generated.
 次に、切り換え制御部12は、通信要求が発生したか否かを判断する(図8におけるステップST11を参照)。具体的には、受け付けおよび計測部13が通信要求を受け付けたか否かを判断する。そして、切り換え制御部12は、そして、通信要求が発生したと判断される場合、図8におけるステップST12へ進む。一方で、通信要求が発生していないと判断される場合、図8におけるステップST11へ戻る。 Next, the switching control unit 12 determines whether or not a communication request has occurred (see step ST11 in FIG. 8). Specifically, it is determined whether the reception and measurement unit 13 has received a communication request. If it is determined that a communication request has occurred, the switching control unit 12 proceeds to step ST12 in FIG. On the other hand, when it is determined that a communication request has not occurred, the process returns to step ST11 in FIG.
 次に、切り換え制御部12は、現時点で発生したすべての通信要求について、通信要求が発生した時点からの待ち時間がthresで与えられる時間(上記の設定では7ms)を超えたか否かを判断する(図8におけるステップST12を参照)。具体的には、待ち時間超過検出部14が、サービス処理の実行要求を受け付けた時からの経過時間がthresで与えられる時間を超えたことを検出したか否かを判断する。なお、サービス処理の実行要求を受け付けた時からの経過時間は、受け付けおよび計測部13において計測される。ここで、現時点で複数の通信要求(図7においては第1通信要求および第2通信要求)が発生している場合、複数の通信要求の待ち時間を合算した時間を、thresで与えられる時間と比較する待ち時間とする。 Next, the switching control unit 12 determines whether or not the waiting time from the time when the communication request is generated exceeds the time given by thres (7 ms in the above setting) for all communication requests generated at the present time. (See step ST12 in FIG. 8). Specifically, the waiting time excess detection unit 14 determines whether or not it has detected that the elapsed time from the time when the service processing execution request is received exceeds the time given by thres. The elapsed time from when the service process execution request is received is measured by the reception and measurement unit 13. Here, when a plurality of communication requests (the first communication request and the second communication request in FIG. 7) are currently generated, a time obtained by adding the waiting times of the plurality of communication requests is a time given by thres. The waiting time is to be compared.
 図7における、第1通信要求の発生から3msが経過した時点では、未だthresで与えられる時間(=7ms)を超えないため、切り換え制御部12は、シーケンス処理を続行させる。すなわち、切り換え制御部12は、第1通信要求に対する応答および第2通信要求に対する応答を一時的に保留して、処理切り換えを行わない。 In FIG. 7, when 3 ms elapses from the occurrence of the first communication request, since the time given by thres (= 7 ms) has not been exceeded, the switching control unit 12 continues the sequence process. That is, the switching control unit 12 temporarily holds the response to the first communication request and the response to the second communication request, and does not perform process switching.
 そして、当該通信要求が発生した時点からの待ち時間がthresで与えられる時間を超えた場合、切り換え制御部12は、シーケンス処理からサービス処理への処理切り換えを行う(図8におけるステップST13を参照)。一方で、当該通信要求が発生した時点からの待ち時間がthresで与えられる時間を超えない場合、図8におけるステップST12へ戻る。 When the waiting time from the time when the communication request is generated exceeds the time given by thres, the switching control unit 12 switches the process from the sequence process to the service process (see step ST13 in FIG. 8). . On the other hand, when the waiting time from the time when the communication request is generated does not exceed the time given by thres, the process returns to step ST12 in FIG.
 図7における、第2通信要求の発生から2msが経過した時点では、第1通信要求の待ち時間は5msとなり、第2通信要求の待ち時間は2msとなる。よって、第1通信要求の待ち時間と第2通信要求の待ち時間とを合算した値がthres(=7ms)を超えるため、切り換え制御部12は、シーケンス処理からサービス処理への処理切り換えを行う。 In FIG. 7, when 2 ms elapses from the occurrence of the second communication request, the waiting time for the first communication request is 5 ms, and the waiting time for the second communication request is 2 ms. Accordingly, since the sum of the waiting time for the first communication request and the waiting time for the second communication request exceeds thres (= 7 ms), the switching control unit 12 switches the process from the sequence process to the service process.
 当該処理切り換えの後の、サービス処理の実行時間は、処理切り換えを行うまでに実行されたシーケンス処理プログラムの実行時間と、ratio(本例では1/3)とを掛け合わせることで算出される。上記にしたがうと、図7に例示される例では、16ms×ratio(すなわち1/4)=4msだけサービス処理が実行される。 The execution time of the service process after the process switching is calculated by multiplying the execution time of the sequence processing program executed until the process is switched and the ratio (1/3 in this example). According to the above, in the example illustrated in FIG. 7, the service process is executed for 16 ms × ratio (ie, ¼) = 4 ms.
 サービス処理の実行に際しては、まず、先に発生した要求である第1通信要求に対して応答(図7における第1通信応答)が行われる。その後、第2通信要求に対して応答(図7における第2通信応答)が行われる。 When executing the service process, first, a response (first communication response in FIG. 7) is made with respect to the first communication request that is the request that has occurred first. Thereafter, a response (second communication response in FIG. 7) is made to the second communication request.
 なお、本実施形態では、要求が発生した順に応答を行うものとして説明されたが、たとえばサービス処理種別ごとに優先度を設けて、優先度の高いサービス処理から応答を行うなど、サービス処理の実行順序を決定するために他の方法が用いられてもよい。 In the present embodiment, it has been described that the responses are performed in the order in which the requests are generated. However, for example, a priority is set for each service processing type, and a response is performed from a service process with a high priority. Other methods may be used to determine the order.
 次に、切り換え制御部12は、サービス処理の実行時間が、処理切り換えを行うまでに実行されたシーケンス処理プログラムの実行時間と、ratioとを掛け合わせた時間を超えたか否かを判断する(図8におけるステップST14を参照)。具体的には、サービス処理超過検出部15が、サービス処理の実行が行われた時間が、処理切り換えを行うまでに実行されたシーケンス処理プログラムの実行時間と、ratioとを掛け合わせた時間を超えたことを検出したか否かを判断する。そして、当該時間を超えた場合、切り換え制御部12は、サービス処理からシーケンス処理への処理切り換えを行う(図8におけるステップST15を参照)。一方で、当該時間を超えない場合、図8におけるステップST14へ戻る。 Next, the switching control unit 12 determines whether or not the execution time of the service process exceeds the time obtained by multiplying the execution time of the sequence processing program executed until the process is switched and the ratio (see FIG. (See step ST14 in FIG. 8). Specifically, the service processing excess detection unit 15 exceeds the time obtained by multiplying the execution time of the sequence processing program executed before switching the process and the ratio by the ratio. Is detected. When the time is exceeded, the switching control unit 12 switches the process from the service process to the sequence process (see step ST15 in FIG. 8). On the other hand, when the said time is not exceeded, it returns to step ST14 in FIG.
 その後は、発生した通信要求に対する待ち時間がthresで与えられる時間を超えるまでシーケンス処理プログラムを実行する。すなわち、図8におけるステップST11に戻る。 After that, the sequence processing program is executed until the waiting time for the generated communication request exceeds the time given by thres. That is, the process returns to step ST11 in FIG.
 ここで、thresとratioとは、設定された優先度値6に基づいて設定することが可能である。また、当該優先度値6は、優先度設定部7またはコンピュータ装置9によって設定することができる。図2には図示されないが、処理実行部2は、コンピュータ装置9により設定された優先度値6をデータ保持部3に書き込む機能を有しており、コンピュータ装置9により優先度値6が設定された場合には、本機能を用いて優先度値6を変更する。 Here, thres and ratio can be set based on the set priority value 6. The priority value 6 can be set by the priority setting unit 7 or the computer device 9. Although not shown in FIG. 2, the process execution unit 2 has a function of writing the priority value 6 set by the computer device 9 to the data holding unit 3, and the priority value 6 is set by the computer device 9. If this happens, the priority value 6 is changed using this function.
 優先度設定部7またはコンピュータ装置9により設定された優先度値6に基づいて、待ち時間上限値4(thres)と比率値5(ratio)とを算出する方法について、以下説明する。 A method for calculating the waiting time upper limit value 4 (thres) and the ratio value 5 (ratio) based on the priority value 6 set by the priority setting unit 7 or the computer device 9 will be described below.
 図9は、優先度値6、待ち時間上限値4(thres)および比率値5(ratio)の対応関係を例示する図である。図9においては、縦軸が待ち時間上限値4(thres)を示し、横軸が比率値5(ratio)を示す。さらに、図9においては、優先度値6が設定されるようすも併せて示される。ここでは、優先度値6に比例させて、待ち時間上限値4(thres)の値および比率値5(ratio)の値を決定する場合について説明する。 FIG. 9 is a diagram illustrating a correspondence relationship between the priority value 6, the waiting time upper limit value 4 (thres), and the ratio value 5 (ratio). In FIG. 9, the vertical axis represents the waiting time upper limit 4 (thres), and the horizontal axis represents the ratio value 5 (ratio). Further, FIG. 9 also shows that the priority value 6 is set. Here, a case where the value of the waiting time upper limit value 4 (thres) and the value of the ratio value 5 (ratio) are determined in proportion to the priority value 6 will be described.
 thresとratioとには、それぞれ設定可能な最大値と最小値とが設けられるものとする。また、thresの最大値をmaxとし、thresの最小値をminとする。さらに、ratioの最大値をmaxとし、ratioの最小値をminとする。 It is assumed that a maximum value and a minimum value that can be set are provided for thres and ratio, respectively. Further, the maximum value of thres is set as max t, and the minimum value of thres is set as min t . Further, the maximum value of ratio is set as max r, and the minimum value of ratio is set as min r .
 また、優先度値6をpriとし、priのとりうる値は、0からn-1の実数であるとする(図9に例示される場合では、n=11)。また、priが0に近いほどシーケンス処理が優先されることを意味し、priがn-1に近いほどサービス処理が優先されることを意味するものとする。 Further, it is assumed that the priority value 6 is pri, and the possible value of pri is a real number from 0 to n−1 (n = 11 in the case illustrated in FIG. 9). Further, the closer pri is to 0, the higher priority is given to sequence processing, and the closer pri is to n-1, the higher priority is given to service processing.
 この場合、thresとratioとは、以下の計算式にしたがって算出される。 In this case, thres and ratio are calculated according to the following formula.
Figure JPOXMLDOC01-appb-M000005
Figure JPOXMLDOC01-appb-M000005
Figure JPOXMLDOC01-appb-M000006
Figure JPOXMLDOC01-appb-M000006
 本実施形態においては、具体例を示すために、上記のような計算式を用いてratioの算出方法およびthresの算出方法を説明するが、priに比例するような計算式、たとえば、a、b、cおよびdを任意の定数として、
Figure JPOXMLDOC01-appb-M000007
Figure JPOXMLDOC01-appb-M000008
 の一般式で表現することができるような計算式であれば、どのような計算式が用いられてもよい。
In this embodiment, in order to show a specific example, the ratio calculation method and the thres calculation method will be described using the above calculation formulas. However, calculation formulas proportional to pri, for example, a, b , C and d as arbitrary constants,
Figure JPOXMLDOC01-appb-M000007
Figure JPOXMLDOC01-appb-M000008
Any calculation formula may be used as long as it can be expressed by the general formula.
 図10および図11は、通信要求が発生した場合の、処理実行部2における処理切り換えの実施状況を例示する図である。 FIG. 10 and FIG. 11 are diagrams exemplifying the execution status of process switching in the process execution unit 2 when a communication request is generated.
 図10および図11において、
Figure JPOXMLDOC01-appb-M000009
Figure JPOXMLDOC01-appb-M000010
Figure JPOXMLDOC01-appb-M000011
Figure JPOXMLDOC01-appb-M000012
Figure JPOXMLDOC01-appb-M000013
 とする。また、図10および図11においては、シーケンス処理プログラムの実行開始から9ms後に第1通信要求が発生し、さらにシーケンス処理プログラムの実行開始から30ms後に第2通信要求が発生した場合の、処理実行部2における処理切り換えの実施状況が示される。
10 and 11,
Figure JPOXMLDOC01-appb-M000009
Figure JPOXMLDOC01-appb-M000010
Figure JPOXMLDOC01-appb-M000011
Figure JPOXMLDOC01-appb-M000012
Figure JPOXMLDOC01-appb-M000013
And 10 and 11, the processing execution unit in the case where the first communication request is generated 9 ms after the start of execution of the sequence processing program and the second communication request is generated 30 ms after the start of execution of the sequence processing program. The execution status of the process switching in 2 is shown.
 図10は、pri=3とした場合の実施状況を示すものであり、式(1)および式(2)にそれぞれ代入すると、
Figure JPOXMLDOC01-appb-M000014
Figure JPOXMLDOC01-appb-M000015
 となる。
FIG. 10 shows an implementation situation when pri = 3, and when substituting into formula (1) and formula (2), respectively,
Figure JPOXMLDOC01-appb-M000014
Figure JPOXMLDOC01-appb-M000015
It becomes.
 本実施形態においては、第1通信要求が発生した後、thresで設定された時間(8ms)を超えた時点でシーケンス処理からサービス処理への処理切り換えが実施される。そして、サービス処理の実行中に応答(図10における第1通信応答)が行われる。 In the present embodiment, after the first communication request is generated, the process switching from the sequence process to the service process is performed when the time (8 ms) set by thres is exceeded. Then, a response (first communication response in FIG. 10) is made during execution of the service process.
 サービス処理は、シーケンス処理プログラムの実行時間とratioとを掛け合わせた時間、すなわち、
Figure JPOXMLDOC01-appb-M000016
 だけ実行され、シーケンス処理に切り換えられる。
The service processing is a time obtained by multiplying the execution time of the sequence processing program by the ratio, that is,
Figure JPOXMLDOC01-appb-M000016
Only executed and switched to sequence processing.
 第2通信要求が発生した際にはシーケンス処理プログラムが実行中であるため、即座に応答を行うことはできない。しかし、thresで設定された時間(8ms)を超えた時点でシーケンス処理からサービス処理への処理切り換えが実施され、応答(図10における第2通信応答)が行われる。 When the second communication request occurs, the sequence processing program is being executed, so it is not possible to respond immediately. However, when the time set by thres (8 ms) is exceeded, processing switching from sequence processing to service processing is performed, and a response (second communication response in FIG. 10) is performed.
 図11は、pri=5とした場合、すなわち、図10に例示される場合よりもサービス処理を優先とした場合の実施状況を例示する図であり、式(1)および式(2)にそれぞれ代入すると、
Figure JPOXMLDOC01-appb-M000017
Figure JPOXMLDOC01-appb-M000018
 となる。
FIG. 11 is a diagram illustrating an implementation situation when pri = 5, that is, when service processing is prioritized over the case illustrated in FIG. 10. Expressions (1) and (2) Substituting
Figure JPOXMLDOC01-appb-M000017
Figure JPOXMLDOC01-appb-M000018
It becomes.
 本実施形態においては、第1通信要求が発生した後、thresで設定された時間(6ms)を超えた時点でシーケンス処理からサービス処理への処理切り換えが実施される。そして、サービス処理の実行中に応答が行われる(図11における第1通信応答)。 In the present embodiment, after the first communication request is generated, the process switching from the sequence process to the service process is performed when the time (6 ms) set by thres is exceeded. Then, a response is made during the execution of the service process (first communication response in FIG. 11).
 サービス処理は、シーケンス処理プログラムの実行時間とratioとを掛け合わせた時間、すなわち、
Figure JPOXMLDOC01-appb-M000019
 だけ実行され、シーケンス処理に切り換えられる。
The service processing is a time obtained by multiplying the execution time of the sequence processing program by the ratio, that is,
Figure JPOXMLDOC01-appb-M000019
Only executed and switched to sequence processing.
 第2通信要求が発生した際にはサービス処理が実行中であるため、即座に応答を行うことができる(図11における第2通信応答)。 When the second communication request is generated, since the service process is being executed, a response can be made immediately (second communication response in FIG. 11).
 このように、図11に例示される場合では、図10に例示される場合に比べて、2つの通信要求いずれに対しても応答時間が短くなる。一方で、図11に例示される場合では、シーケンス処理に割り当て可能な時間は、図10に例示される場合よりも短くなる。 In this way, in the case illustrated in FIG. 11, the response time is shorter for both of the two communication requests than in the case illustrated in FIG. On the other hand, in the case illustrated in FIG. 11, the time that can be allocated to the sequence process is shorter than in the case illustrated in FIG.
 このように、本実施形態においては、サービス処理に対し処理の実行を要求する通信要求が発生した時点からの待ち時間がthresを超えた時点において、シーケンス処理プログラムからサービス処理に処理切り換えを行う。 As described above, in the present embodiment, when the waiting time from the time when a communication request for requesting execution of processing to the service processing occurs exceeds thres, the processing is switched from the sequence processing program to the service processing.
 また、本実施形態においては、サービス処理の実行中にその実行時間が、シーケンス処理プログラムの実行時間とratioとを掛け合わせた時間を超えた時点で、シーケンス処理プログラムの実行に処理切り換えを行う。 In the present embodiment, when the execution time of the service processing exceeds the time obtained by multiplying the execution time of the sequence processing program by the ratio, the processing is switched to the execution of the sequence processing program.
 このように処理することで、サービス処理がthresの値よりも待たされることがなくなり、サービス処理の応答時間が改善される。また、ratioの設定値によって、サービス処理を行う時間を調整することができる。 By processing in this way, the service process is not waited longer than the value of thres, and the response time of the service process is improved. Also, the time for performing the service process can be adjusted by the set value of ratio.
 さらに、本実施形態に示された計算式にしたがって、優先度値priに基づいてthresおよびratioを算出することができる。よって、優先度値をサービス処理優先に設定した場合には、サービス処理の応答時間を改善することができる。また、優先度値をシーケンス処理優先に設定した場合には、シーケンス処理への割り当て可能な時間を増加させることができる。 Furthermore, thres and ratio can be calculated based on the priority value pri according to the calculation formula shown in the present embodiment. Therefore, when the priority value is set to service processing priority, the response time of service processing can be improved. Further, when the priority value is set to sequence processing priority, the time allocatable to the sequence processing can be increased.
 本実施形態では、プログラマブルコントローラ1上で実行されるサービス処理として、外部接続されたコンピュータ装置9との間で、プログラマブルコントローラの稼働状況に関する情報、または、シーケンス処理プログラムなどに関する情報を送受信するための通信処理が示されたが、プログラマブルコントローラ上で実行されるサービス処理はこれに限定されるものではない。すなわち、たとえば、プログラマブルコントローラ1に接続されたメモリ領域へのファイル書き込み処理、または、当該メモリ領域からのファイル読み出し処理などであってもよい。 In the present embodiment, as a service process executed on the programmable controller 1, information related to the operation status of the programmable controller or information related to a sequence processing program is transmitted to and received from the externally connected computer device 9. Although the communication process is shown, the service process executed on the programmable controller is not limited to this. That is, for example, a file writing process to a memory area connected to the programmable controller 1 or a file reading process from the memory area may be used.
 <第2実施形態>
 本実施形態に関するプログラマブルコントローラについて説明する。以下では、上記の実施形態で説明された構成と同様の構成については同じ符号を付して図示し、その詳細な説明については適宜省略する。
Second Embodiment
A programmable controller according to this embodiment will be described. In the following, the same components as those described in the above embodiment are denoted by the same reference numerals, and detailed description thereof will be omitted as appropriate.
 上記の実施形態では、優先度値6に比例して、待ち時間上限値4および比率値5が決定される計算式が用いられた。しかし、使用者の意図に沿うように、プログラマブルコントローラ1のシーケンス処理プログラムの実行性能およびサービス処理の応答性能を調整可能となる、下記の式(3)および式(4)が用いられてもよい。 In the above embodiment, a calculation formula is used in which the waiting time upper limit value 4 and the ratio value 5 are determined in proportion to the priority value 6. However, the following formulas (3) and (4) that can adjust the execution performance of the sequence processing program of the programmable controller 1 and the response performance of the service processing may be used in accordance with the user's intention. .
 すなわち、ratiocurとthrescurをそれぞれratioとthresの現在値、Tseqをシーケンス処理プログラムの実行時間の平均値とすると、優先度値priをprioldからprinewに変更した場合、更新後のratioの値rationextと、更新後のthresの値thresnextはそれぞれ次のようになる。 That is, the current value of the ratio and thres the ratio cur and thres cur respectively, when the average value of the execution time of the sequence program to T seq, if you change the priority value pri from pri old in pri new new, updated ratio The value ratio next and the updated thres value thres next are as follows.
Figure JPOXMLDOC01-appb-M000020
Figure JPOXMLDOC01-appb-M000020
Figure JPOXMLDOC01-appb-M000021
Figure JPOXMLDOC01-appb-M000021
 上記計算式は、優先度値priの変量に対して、シーケンスプログラムの実行時間と、サービス処理の実行時間とが比例的に変更されるように、構成したものである。 The above calculation formula is configured such that the execution time of the sequence program and the execution time of the service process are proportionally changed with respect to the variable of the priority value pri.
 以下、式(3)および式(4)の算出方法について説明する。ここで、Tsvcをサービス処理実行時間の平均値、Sを、切り換え制御部12が、処理実行部2上で実行される処理をシーケンス処理からサービス処理またはその逆に切り換える際に必要な時間の合計値とする。 Hereinafter, the calculation method of Formula (3) and Formula (4) is demonstrated. Here, T svc is the average value of the service process execution time, S is the time required for the switching control unit 12 to switch the process executed on the process execution unit 2 from the sequence process to the service process or vice versa. The total value.
 thresを小さくすると、処理の切り換え頻度が高くなる関係があるため、Sはthresの関数となる。 Since there is a relation that the frequency of process switching increases when thres is reduced, S is a function of thres.
 本実施形態においては、
Figure JPOXMLDOC01-appb-M000022
 として説明されるが、Sをthresに反比例となるように構成するなど、これ以外の関数としてもよい。
In this embodiment,
Figure JPOXMLDOC01-appb-M000022
However, other functions such as a configuration in which S is inversely proportional to thres may be used.
 処理実行部2上で実行される処理が、シーケンス処理、サービス処理、およびこれら処理の切り換えのみであると仮定すれば、Cを定数として、
Figure JPOXMLDOC01-appb-M000023
 が成り立つ。式(5)より、その変分は以下であることが分かる。
Assuming that the processing executed on the processing execution unit 2 is only sequence processing, service processing, and switching between these processings, let C be a constant,
Figure JPOXMLDOC01-appb-M000023
Holds. From equation (5) it can be seen that the variation is:
Figure JPOXMLDOC01-appb-M000024
Figure JPOXMLDOC01-appb-M000024
 また、サービス処理実行時間は、シーケンス処理プログラムの実行時間に対してratioを掛け合わせることで算出されるので、
Figure JPOXMLDOC01-appb-M000025
 であり、式(7)よりTsvcの変分を求めると、
Figure JPOXMLDOC01-appb-M000026
 が得られる。
In addition, since the service processing execution time is calculated by multiplying the execution time of the sequence processing program by the ratio,
Figure JPOXMLDOC01-appb-M000025
When the variation of T svc is obtained from equation (7),
Figure JPOXMLDOC01-appb-M000026
Is obtained.
 ここで、
Figure JPOXMLDOC01-appb-M000027
 であるので、
Figure JPOXMLDOC01-appb-M000028
 となる。
here,
Figure JPOXMLDOC01-appb-M000027
So
Figure JPOXMLDOC01-appb-M000028
It becomes.
 以上より、式(6)に、式(8)および式(9)を代入し、整理すると、
Figure JPOXMLDOC01-appb-M000029
 が得られる。また、式(6)に式(9)を代入することで、
Figure JPOXMLDOC01-appb-M000030
 が得られる。
From the above, substituting and rearranging equation (8) and equation (9) into equation (6),
Figure JPOXMLDOC01-appb-M000029
Is obtained. Also, by substituting equation (9) into equation (6),
Figure JPOXMLDOC01-appb-M000030
Is obtained.
 ratioおよびthresは、優先度値priにより算出される変数とみなせるため、priの関数となり、それぞれratio=f(pri)、thres=g(pri)とすれば、変分値は、
Figure JPOXMLDOC01-appb-M000031
Figure JPOXMLDOC01-appb-M000032
 となる。
Since ratio and thres can be regarded as variables calculated by the priority value pri, they become functions of pri. If ratio = f (pri) and thres = g (pri), respectively, the variation value is
Figure JPOXMLDOC01-appb-M000031
Figure JPOXMLDOC01-appb-M000032
It becomes.
 ここで、式(10)に式(12)および式(13)を代入することで、
Figure JPOXMLDOC01-appb-M000033
 となる。さらに、式(11)に式(13)および式(14)を代入することで、
Figure JPOXMLDOC01-appb-M000034
 が得られる。
Here, by substituting Equation (12) and Equation (13) into Equation (10),
Figure JPOXMLDOC01-appb-M000033
It becomes. Furthermore, by substituting Equation (13) and Equation (14) into Equation (11),
Figure JPOXMLDOC01-appb-M000034
Is obtained.
 優先度値priの変量に対して、シーケンスプログラムの実行時間と、サービス処理の実行時間とが比例的に変更されるためには、ΔTseqおよびΔTsvcがΔpriに比例して変動する必要がある。よって、αとβを任意の定数とすれば、
Figure JPOXMLDOC01-appb-M000035
Figure JPOXMLDOC01-appb-M000036
 とならなければならない。
In order for the execution time of the sequence program and the execution time of the service process to be proportionally changed with respect to the variable of the priority value pri, ΔT seq and ΔT svc need to change in proportion to Δpri. . Therefore, if α and β are arbitrary constants,
Figure JPOXMLDOC01-appb-M000035
Figure JPOXMLDOC01-appb-M000036
Must be.
 ここで、式(14)および式(16)より、
Figure JPOXMLDOC01-appb-M000037
 が得られる。また、式(15)および式(17)より、
Figure JPOXMLDOC01-appb-M000038
 が得られる。
Here, from Equation (14) and Equation (16),
Figure JPOXMLDOC01-appb-M000037
Is obtained. Further, from the equations (15) and (17),
Figure JPOXMLDOC01-appb-M000038
Is obtained.
 式(18)および式(19)を解くことにより、
Figure JPOXMLDOC01-appb-M000039
Figure JPOXMLDOC01-appb-M000040
 が得られる。
By solving equation (18) and equation (19),
Figure JPOXMLDOC01-appb-M000039
Figure JPOXMLDOC01-appb-M000040
Is obtained.
 以上より、式(20)および式(21)をそれぞれ式(12)と式(13)とに代入すると、
Figure JPOXMLDOC01-appb-M000041
Figure JPOXMLDOC01-appb-M000042
 となる。
From the above, substituting Equation (20) and Equation (21) into Equation (12) and Equation (13), respectively,
Figure JPOXMLDOC01-appb-M000041
Figure JPOXMLDOC01-appb-M000042
It becomes.
 よって、ratioの変化量は、priの変化量に対して、
Figure JPOXMLDOC01-appb-M000043
 を掛けることで算出することができる。また、thresの変化量は、priの変化量に対して、
Figure JPOXMLDOC01-appb-M000044
 を掛けることで算出することができる。
Therefore, the amount of change in ratio is the amount of change in pri,
Figure JPOXMLDOC01-appb-M000043
It can be calculated by multiplying. Also, the amount of change in thres is the amount of change in pri,
Figure JPOXMLDOC01-appb-M000044
It can be calculated by multiplying.
 α=-2、β=1、および、γ=1とした場合、式(22)および式(23)はそれぞれ、
Figure JPOXMLDOC01-appb-M000045
Figure JPOXMLDOC01-appb-M000046
 となり、式(22)および式(23)において、
Figure JPOXMLDOC01-appb-M000047
Figure JPOXMLDOC01-appb-M000048
Figure JPOXMLDOC01-appb-M000049
Figure JPOXMLDOC01-appb-M000050
 と置けば、式(3)および式(4)を導くことができる。
When α = −2, β = 1, and γ = 1, equations (22) and (23) are respectively
Figure JPOXMLDOC01-appb-M000045
Figure JPOXMLDOC01-appb-M000046
In the equations (22) and (23),
Figure JPOXMLDOC01-appb-M000047
Figure JPOXMLDOC01-appb-M000048
Figure JPOXMLDOC01-appb-M000049
Figure JPOXMLDOC01-appb-M000050
Can be used to derive equations (3) and (4).
 次に、処理実行部2の動作について、図12および図13を参照しつつ説明する。 Next, the operation of the process execution unit 2 will be described with reference to FIGS.
 図12および図13は、シーケンス処理プログラムの実行開始から9ms後に通信要求が発生した場合の、処理実行部2における処理切り換えの実施状況を例示する図である。 FIG. 12 and FIG. 13 are diagrams illustrating an example of a process switching execution state in the process execution unit 2 when a communication request is generated 9 ms after the execution start of the sequence processing program.
 図12は、pri=0の場合を示す。このとき、
Figure JPOXMLDOC01-appb-M000051
Figure JPOXMLDOC01-appb-M000052
 となる。
FIG. 12 shows the case where pri = 0. At this time,
Figure JPOXMLDOC01-appb-M000051
Figure JPOXMLDOC01-appb-M000052
It becomes.
 通信要求が発生した後、thresで設定された時間(11ms)を超えた時点でシーケンス処理からサービス処理への処理切り換えが実施される。そして、サービス処理の実行中に応答(図12における通信応答)が行われる。 After the communication request is generated, the process is switched from the sequence process to the service process when the time set by thres (11 ms) is exceeded. Then, a response (communication response in FIG. 12) is made during the execution of the service process.
 また、サービス処理の実行時間は、シーケンス処理プログラムの実行時間(=20ms)とratioとを掛け合わせることで算出され、
Figure JPOXMLDOC01-appb-M000053
 となる。
The execution time of the service process is calculated by multiplying the execution time (= 20 ms) of the sequence processing program and the ratio,
Figure JPOXMLDOC01-appb-M000053
It becomes.
 図13は、優先度値をpri=0からpri=4に変更した場合、すなわち、図12に例示される場合よりもサービス処理を優先とした場合の実施状況を示すものであり、式(1)および式(2)にそれぞれ代入して変更後のratioの値とthresの値とをそれぞれ算出すると、
Figure JPOXMLDOC01-appb-M000054
Figure JPOXMLDOC01-appb-M000055
 となる。
FIG. 13 shows an implementation status when the priority value is changed from pri = 0 to pri = 4, that is, when service processing is prioritized over the case illustrated in FIG. ) And formula (2), respectively, and calculating the changed ratio value and thres value respectively,
Figure JPOXMLDOC01-appb-M000054
Figure JPOXMLDOC01-appb-M000055
It becomes.
 図13に例示される場合では、通信要求が発生した時間から7ms後にthresを超えるため、その時点でシーケンス処理からサービス処理への処理切り換えが実施される。そして、サービス処理の実行中に応答が行われる(図13における通信応答)。 In the case illustrated in FIG. 13, since thres is exceeded after 7 ms from the time when the communication request is generated, processing switching from sequence processing to service processing is performed at that time. Then, a response is made during the execution of the service process (communication response in FIG. 13).
 また、サービス処理の実行時間は、シーケンス処理プログラムの実行時間とratioを掛け合わせることで算出することができ、
Figure JPOXMLDOC01-appb-M000056
 となる。
In addition, the execution time of the service process can be calculated by multiplying the execution time of the sequence processing program and the ratio,
Figure JPOXMLDOC01-appb-M000056
It becomes.
 以上より、図12に例示される場合よりも図13に例示される場合の方が、シーケンス処理への割り当て時間が短くなる。一方逆に、図12に例示される場合よりも図13に例示される場合の方が、サービス処理への割り当て時間が長くなっているため、よりサービス処理を優先するようにthresとratioとを調整したことになる。 From the above, the allocation time for sequence processing is shorter in the case illustrated in FIG. 13 than in the case illustrated in FIG. On the other hand, in the case illustrated in FIG. 13, the allocation time for service processing is longer in the case illustrated in FIG. 13 than in the case illustrated in FIG. 12. It will be adjusted.
 本実施形態では、thresとratioを求める計算式が、優先度値priの変量に対して、シーケンスプログラムの実行時間とサービス処理の実行時間とが比例的に変更されるように構成された。このことにより、プログラマブルコントローラの使用者が意図した通りに、処理切り換えの動作を変更させることができる。 In this embodiment, the calculation formula for obtaining thres and ratio is configured such that the execution time of the sequence program and the execution time of the service process are changed in proportion to the variable of the priority value pri. As a result, the process switching operation can be changed as intended by the user of the programmable controller.
 なお、本実施形態においては、式(3)および式(4)を用いて、thresnextおよびrationextを計算されたが、これ以外の計算式を用いてもよい。 In the present embodiment, thress next and ratio next are calculated using Expression (3) and Expression (4), but other calculation expressions may be used.
 たとえば、本実施形態では、式(3)および式(4)を導出する過程で、
Figure JPOXMLDOC01-appb-M000057
 として計算したが、Sをthresに反比例するような計算式を用いて導出してもよい。
For example, in the present embodiment, in the process of deriving Expression (3) and Expression (4),
Figure JPOXMLDOC01-appb-M000057
However, S may be derived using a calculation formula that is inversely proportional to thres.
 また、本実施形態においては、優先度値priの変動値(prinew-priold)が1以上となるように変更された場合において、即座にthresおよびratioに値が適用されるものとして説明された。しかし、priの変動値が1以上となるように変更された場合には、priの変動値を1としてthresの値とratioの値とを変更する作業を、実際の変動値分だけ一定時間ごとに繰り返し実施してもよい。 Further, in the present embodiment, it is assumed that the value is immediately applied to thres and ratio when the variation value (pri new -pri old ) of the priority value pri is changed to 1 or more. It was. However, when the change value of pri is changed to be 1 or more, the work of changing the value of thrs and the value of ratio with the change value of pri being 1 is changed by the actual change value at regular intervals. May be repeated.
 <効果>
 以下に、上記の実施形態による効果を例示する。
<Effect>
Below, the effect by said embodiment is illustrated.
 上記の実施形態によれば、プログラマブルコントローラが、受け付け部としての受け付けおよび計測部13と、制御部としての切り換え制御部12とを備える。 According to the above embodiment, the programmable controller includes the reception and measurement unit 13 as the reception unit and the switching control unit 12 as the control unit.
 受け付けおよび計測部13は、サービス処理の実行要求を受け付ける。 The acceptance and measurement unit 13 accepts an execution request for service processing.
 切り換え制御部12は、受け付けおよび計測部13でサービス処理の実行要求を受け付けた時にプログラマブルコントローラ1においてシーケンス処理プログラムの実行が行われている場合、サービス処理の実行要求を受け付けた時からの経過時間があらかじめ定められた第1しきい値としてのthresを超えた時点で、プログラマブルコントローラ1においてシーケンス処理プログラムの実行から切り換えて実行要求に対応するサービス処理の実行を行わせる。 The switching control unit 12, when the sequence processing program is being executed in the programmable controller 1 when the reception and measurement unit 13 receives the service process execution request, the elapsed time from when the service process execution request was received When thres exceeds a predetermined first threshold value thres, the programmable controller 1 switches from execution of the sequence processing program to execute service processing corresponding to the execution request.
 また、上記の実施形態によれば、プログラマブルコントローラは、プログラムを実行する処理回路102aと、プログラムを記憶する記憶装置103とを備える。 In addition, according to the above embodiment, the programmable controller includes the processing circuit 102a that executes the program and the storage device 103 that stores the program.
 そして、処理回路102aがプログラムを実行することによって、以下の動作が実現される。 And the following operation | movement is implement | achieved when the processing circuit 102a runs a program.
 すなわち、サービス処理の実行要求を受け付けた時にプログラマブルコントローラ1においてシーケンス処理プログラムの実行が行われている場合、サービス処理の実行要求を受け付けた時からの経過時間があらかじめ定められたthresを超えた時点で、プログラマブルコントローラ1においてシーケンス処理プログラムの実行から切り換えて実行要求に対応するサービス処理の実行を行わせる。 That is, when a sequence processing program is being executed in the programmable controller 1 when a service process execution request is received, a time when the elapsed time from the reception of the service process execution request exceeds a predetermined thres Thus, the programmable controller 1 switches the execution of the sequence processing program to execute the service process corresponding to the execution request.
 また、上記の実施形態によれば、プログラマブルコントローラは、処理回路102bを備える。 In addition, according to the above embodiment, the programmable controller includes the processing circuit 102b.
 そして、処理回路102bは、以下の動作を行う。 The processing circuit 102b performs the following operation.
 すなわち、処理回路102bは、サービス処理の実行要求を受け付けた時にプログラマブルコントローラ1においてシーケンス処理プログラムの実行が行われている場合、サービス処理の実行要求を受け付けた時からの経過時間があらかじめ定められたthresを超えた時点で、プログラマブルコントローラ1においてシーケンス処理プログラムの実行から切り換えて実行要求に対応するサービス処理の実行を行わせる。 That is, when the sequence processing program is executed in the programmable controller 1 when the service process execution request is received, the processing circuit 102b has a predetermined elapsed time from when the service process execution request is received. When the threshold value exceeds thres, the programmable controller 1 switches from execution of the sequence processing program to execute service processing corresponding to the execution request.
 このような構成によれば、たとえば、サービス処理の実行要求がシーケンス処理プログラムの実行開始直後に受け付けられた場合でも、サービス処理の実行要求がthresの時間よりも待たされることがなくなり、サービス処理の実行要求(通信要求)に対する応答時間が改善される。 According to such a configuration, for example, even when a service process execution request is received immediately after the start of execution of the sequence processing program, the service process execution request is not waited longer than the thres time. Response time for execution requests (communication requests) is improved.
 また、サービス処理の実行要求がない場合にはシーケンス処理が連続実行されるため、シーケンス処理の実行性能が向上する。 Also, when there is no execution request for service processing, the sequence processing is executed continuously, so that the execution performance of the sequence processing is improved.
 なお、これらの構成以外の構成については適宜省略することができるが、本明細書に示される他の構成のうちの少なくとも1つを適宜追加した場合でも、上記の効果を生じさせることができる。 In addition, although configurations other than these configurations can be omitted as appropriate, the above-described effects can be produced even when at least one of the other configurations shown in this specification is added as appropriate.
 また、上記の実施形態によれば、切り換え制御部12は、シーケンス処理プログラムの実行から切り換えてサービス処理の実行が行われた時間があらかじめ定められた第2しきい値を超えた時点で、プログラマブルコントローラ1においてシーケンス処理プログラムの実行を行わせる。 Further, according to the above embodiment, the switching control unit 12 is programmable when the time when the service process is executed after switching from the execution of the sequence processing program exceeds a predetermined second threshold value. The controller 1 executes the sequence processing program.
 ここで、第2しきい値は、処理切り換えを行うまでに実行されたシーケンス処理プログラムの実行時間と、ratioとを掛け合わせることで算出される。 Here, the second threshold value is calculated by multiplying the execution time of the sequence processing program executed until the process is switched and the ratio.
 このような構成によれば、サービス処理の実行時間に上限値が設けられることにより、シーケンス処理プログラムの実行時間と、サービス処理の実行時間との比率を調整することができる。具体的には、ratioの値を変更することで、シーケンス処理プログラムの実行時間と、サービス処理の実行時間との比率を調整することができる。 According to such a configuration, the upper limit value is provided for the execution time of the service process, so that the ratio between the execution time of the sequence processing program and the execution time of the service process can be adjusted. Specifically, the ratio between the execution time of the sequence processing program and the execution time of the service process can be adjusted by changing the ratio value.
 また、サービス処理の内容によってサービス処理の実行時間が長くなることが抑制されるため、シーケンス処理プログラムを実行時間が、サービス処理の実行時間と比較して短くなることが抑制される。 Also, since the execution time of the service process is suppressed from being increased depending on the contents of the service process, the execution time of the sequence processing program is suppressed from being shortened compared to the execution time of the service process.
 また、上記の実施形態によれば、第2しきい値は、サービス処理の実行に切り換える前のシーケンス処理プログラムの実行が行われた時間に、あらかじめ定められた第3しきい値としてのratioが乗算された値である。 Further, according to the above-described embodiment, the second threshold value is set as a predetermined third threshold value at the time when the sequence processing program is executed before switching to the service processing. The multiplied value.
 このような構成によれば、サービス処理の実行時間に上限値が設けられることにより、シーケンス処理プログラムの実行時間と、サービス処理の実行時間との比率を調整することができる。具体的には、ratioの値を変更することで、シーケンス処理プログラムの実行時間と、サービス処理の実行時間との比率を調整することができる。 According to such a configuration, the upper limit value is provided for the execution time of the service process, so that the ratio between the execution time of the sequence processing program and the execution time of the service process can be adjusted. Specifically, the ratio between the execution time of the sequence processing program and the execution time of the service process can be adjusted by changing the ratio value.
 また、サービス処理の内容によってサービス処理の実行時間が長くなることが抑制されるため、シーケンス処理プログラムを実行時間が、サービス処理の実行時間と比較して短くなることが抑制される。 Also, since the execution time of the service process is suppressed from being increased depending on the contents of the service process, the execution time of the sequence processing program is suppressed from being shortened compared to the execution time of the service process.
 また、上記の実施形態によれば、プログラマブルコントローラが、サービス処理の実行をシーケンス処理プログラムの実行よりも優先させる度合いを示す優先度値を外部から変更可能に設定する優先度値設定部7を備える。 Moreover, according to said embodiment, the programmable controller is provided with the priority value setting part 7 which sets the priority value which shows the degree of giving priority to execution of a service process over execution of a sequence processing program so that change is possible from the outside. .
 優先度値は、優先度値設定部7において設定変更することができる。また、優先度値は、プログラマブルコントローラ1に外部接続したコンピュータ装置9から設定変更することができる。 The priority value can be changed in the priority value setting unit 7. The priority value can be set and changed from the computer device 9 externally connected to the programmable controller 1.
 そして、thresおよびratioのうちの少なくとも一方は、優先度値に基づいてあらかじめ定められる。 And at least one of thres and ratio is predetermined based on the priority value.
 このような構成によれば、使用環境に合わせて、使用者が、プログラマブルコントローラ1のシーケンス処理プログラムの実行とサービス処理の実行とのバランスを簡単に調整することができる。 According to such a configuration, the user can easily adjust the balance between the execution of the sequence processing program of the programmable controller 1 and the execution of the service processing according to the use environment.
 具体的には、優先度値を変更することでthresを調整し、シーケンス処理プログラムの実行からサービス処理の実行へ切り換えを行うまでの時間を調整することができる。また、優先度値を変更することでratioを調整し、サービス処理の実行からシーケンス処理プログラムの実行へ切り換えを行うまでの時間を調整することができる。 Specifically, it is possible to adjust thres by changing the priority value and adjust the time from the execution of the sequence processing program to the execution of the service processing. Further, the ratio is adjusted by changing the priority value, and the time from the execution of the service processing to the execution of the sequence processing program can be adjusted.
 シーケンス処理プログラムの実行性能と通信処理の応答性能とを規定する優先度は、プログラマブルコントローラが設備または機械システムに取り付けた後に調整可能であることが望ましい。そのためには、プログラマブルコントローラ本体に取り付けられた機能部を用いて、優先度値が設定可能である必要がある。 Priority that defines the execution performance of the sequence processing program and the response performance of the communication processing is desirably adjustable after the programmable controller is attached to the equipment or mechanical system. For that purpose, it is necessary to be able to set the priority value using a functional unit attached to the programmable controller main body.
 また、取り付けられる設備または機械システムによっては、プログラマブルコントローラが、人手では直接触れることのできない場所に取り付けられる場合がある。この場合には、プログラマブルコントローラに接続された外部装置から優先度値が設定可能である必要がある。 Also, depending on the installed equipment or mechanical system, the programmable controller may be installed in a place where it cannot be directly touched by human hands. In this case, it is necessary that the priority value can be set from an external device connected to the programmable controller.
 これに対し、上記の実施形態によれば、優先度値は、優先度値設定部7において設定変更することができる。また、上記の実施形態によれば、優先度値は、プログラマブルコントローラ1に外部接続したコンピュータ装置9から設定変更することができる。そのため、優先度値が、プログラマブルコントローラが設備または機械システムに取り付けた後においても容易に調整可能である。 On the other hand, according to the above embodiment, the priority value can be set and changed in the priority value setting unit 7. Further, according to the above embodiment, the priority value can be set and changed from the computer device 9 externally connected to the programmable controller 1. Therefore, the priority value can be easily adjusted even after the programmable controller is attached to the facility or mechanical system.
 また、上記の実施形態によれば、プログラマブルコントローラが、シーケンス処理部10と、サービス処理部11と、待ち時間超過検出部14と、サービス処理超過検出部15とを備える。 Further, according to the above embodiment, the programmable controller includes the sequence processing unit 10, the service processing unit 11, the waiting time excess detection unit 14, and the service processing excess detection unit 15.
 シーケンス処理部10は、シーケンス処理プログラムの実行と、シーケンス処理プログラムの実行が行われた時間の計測とを行う。サービス処理部11は、サービス処理の実行と、サービス処理の実行が行われた時間の計測とを行う。 The sequence processing unit 10 executes the sequence processing program and measures the time when the sequence processing program is executed. The service processing unit 11 performs the service process and measures the time when the service process is performed.
 待ち時間超過検出部14は、サービス処理の実行要求を受け付けた時からの経過時間がthresを超えたことを検出する。サービス処理超過検出部15は、サービス処理の実行が行われた時間が第2しきい値を超えたことを検出する。 The waiting time excess detection unit 14 detects that the elapsed time from the reception of the service processing execution request has exceeded thres. The service process excess detection unit 15 detects that the time when the service process is executed exceeds the second threshold value.
 受け付けおよび計測部13は、サービス処理の実行要求を受け付けた時からの経過時間を計測する。 The reception and measurement unit 13 measures the elapsed time from when the service processing execution request is received.
 切り換え制御部12は、受け付けおよび計測部13でサービス処理の実行要求を受け付けた時にシーケンス処理部10においてシーケンス処理プログラムの実行が行われている場合、待ち時間超過検出部14における検出情報およびサービス処理超過検出部15における検出情報に基づいて、シーケンス処理プログラムの実行から切り換えてサービス処理部11において実行要求に対応するサービス処理の実行を行わせる。 If the sequence processing program is executed in the sequence processing unit 10 when the reception and measurement unit 13 receives a service processing execution request, the switching control unit 12 detects the detection information and service processing in the waiting time excess detection unit 14. Based on the detection information in the excess detection unit 15, the service processing unit 11 executes service processing corresponding to the execution request by switching from execution of the sequence processing program.
 このような構成によれば、たとえば、サービス処理の実行要求がシーケンス処理プログラムの実行開始直後に受け付けられた場合でも、サービス処理の実行要求がthresの時間よりも待たされることがなくなり、サービス処理の実行要求(通信要求)に対する応答時間が改善される。 According to such a configuration, for example, even when a service process execution request is received immediately after the start of execution of the sequence processing program, the service process execution request is not waited longer than the thres time. Response time for execution requests (communication requests) is improved.
 また、サービス処理の実行要求がない場合にはシーケンス処理が連続実行されるため、シーケンス処理の実行性能が向上する。 Also, when there is no execution request for service processing, the sequence processing is executed continuously, so that the execution performance of the sequence processing is improved.
 また、上記の実施形態によれば、プログラマブルコントローラの制御方法において、サービス処理の実行要求を受け付け、サービス処理の実行要求を受け付けた時にプログラマブルコントローラ1においてシーケンス処理プログラムの実行が行われている場合、サービス処理の実行要求を受け付けた時からの経過時間があらかじめ定められたthresを超えた時点で、プログラマブルコントローラ1においてシーケンス処理プログラムの実行から切り換えて実行要求に対応するサービス処理の実行を行わせる。 Moreover, according to said embodiment, in the control method of a programmable controller, when the execution request of a service process is received and the execution of a sequence process program is performed in the programmable controller 1 when the execution request of a service process is received, When the elapsed time from the reception of the service process execution request exceeds a predetermined thres, the programmable controller 1 switches the execution of the sequence processing program to execute the service process corresponding to the execution request.
 このような構成によれば、たとえば、サービス処理の実行要求がシーケンス処理プログラムの実行開始直後に受け付けられた場合でも、サービス処理の実行要求がthresの時間よりも待たされることがなくなり、サービス処理の実行要求に対する応答時間が改善される。 According to such a configuration, for example, even when a service process execution request is received immediately after the start of execution of the sequence processing program, the service process execution request is not waited longer than the thres time. Response time for execution requests is improved.
 また、サービス処理の実行要求がない場合にはシーケンス処理が連続実行されるため、シーケンス処理の実行性能が向上する。 Also, when there is no execution request for service processing, the sequence processing is executed continuously, so that the execution performance of the sequence processing is improved.
 なお、これらの構成以外の構成については適宜省略することができるが、本明細書に示される他の構成のうちの少なくとも1つを適宜追加した場合でも、上記の効果を生じさせることができる。 In addition, although configurations other than these configurations can be omitted as appropriate, the above-described effects can be produced even when at least one of the other configurations shown in this specification is added as appropriate.
 また、上記の実施形態によれば、プログラマブルコントローラの制御方法において、サービス処理の実行要求を受け付けた時にプログラマブルコントローラ1においてサービス処理の実行が行われている場合、実行要求に対応するサービス処理の実行を行わせる。 Further, according to the above embodiment, in the control method of the programmable controller, when the service process is executed in the programmable controller 1 when the service process execution request is received, the service process corresponding to the execution request is executed. To do.
 このような構成によれば、サービス処理の実行要求を受け付けた時にプログラマブルコントローラ1においてサービス処理の実行が行われている場合には、即座に実行要求に対応するサービス処理の実行を行わせることができる。 According to such a configuration, when a service process is executed in the programmable controller 1 when a service process execution request is received, the service process corresponding to the execution request can be immediately executed. it can.
 また、上記の実施形態によれば、プログラマブルコントローラの制御方法において、サービス処理の実行要求を複数受け付け、サービス処理の実行要求を受け付けた時にプログラマブルコントローラ1においてシーケンス処理プログラムの実行が行われている場合、各サービス処理の実行要求を受け付けた時からの経過時間を合算した時間がthresを超えた時点で、プログラマブルコントローラ1においてシーケンス処理プログラムの実行から切り換えて実行要求に対応するサービス処理の実行を行わせる。 Moreover, according to said embodiment, in the control method of a programmable controller, when the execution request of a service process is received in multiple numbers and the execution process of a sequence process is performed in the programmable controller 1 when the execution request of a service process is received When the sum of the elapsed time from when the execution request for each service process is received exceeds thres, the programmable controller 1 switches from the execution of the sequence processing program and executes the service process corresponding to the execution request. Make it.
 このような構成によれば、サービス処理の実行要求が複数受け付けられた場合でも、各サービス処理の実行要求がthresの時間よりも待たされることがなくなり、サービス処理の実行要求に対する応答時間が改善される。 According to such a configuration, even when a plurality of service process execution requests are received, each service process execution request is not waited longer than the thres time, and the response time to the service process execution request is improved. The
 また、上記の実施形態によれば、プログラマブルコントローラの制御方法において、シーケンス処理プログラムの実行から切り換えてサービス処理の実行が行われた時間があらかじめ定められた第2しきい値を超えた時点で、プログラマブルコントローラ1においてシーケンス処理プログラムの実行を行わせる。 According to the above embodiment, in the control method of the programmable controller, when the time when the execution of the service process is performed by switching from the execution of the sequence processing program exceeds a predetermined second threshold value, A sequence processing program is executed in the programmable controller 1.
 ここで、第2しきい値は、処理切り換えを行うまでに実行されたシーケンス処理プログラムの実行時間と、ratioとを掛け合わせることで算出される。 Here, the second threshold value is calculated by multiplying the execution time of the sequence processing program executed until the process is switched and the ratio.
 このような構成によれば、サービス処理の実行時間に上限値が設けられることにより、シーケンス処理プログラムの実行時間と、サービス処理の実行時間との比率を調整することができる。具体的には、ratioの値を変更することで、シーケンス処理プログラムの実行時間と、サービス処理の実行時間との比率を調整することができる。 According to such a configuration, the upper limit value is provided for the execution time of the service process, so that the ratio between the execution time of the sequence processing program and the execution time of the service process can be adjusted. Specifically, the ratio between the execution time of the sequence processing program and the execution time of the service process can be adjusted by changing the ratio value.
 また、サービス処理の内容によってサービス処理の実行時間が長くなることが抑制されるため、シーケンス処理プログラムを実行時間が、サービス処理の実行時間と比較して短くなることが抑制される。 Also, since the execution time of the service process is suppressed from being increased depending on the contents of the service process, the execution time of the sequence processing program is suppressed from being shortened compared to the execution time of the service process.
 また、上記の実施形態によれば、プログラマブルコントローラの制御方法において、第2しきい値は、サービス処理の実行に切り換える前のシーケンス処理プログラムの実行が行われた時間に、あらかじめ定められたratioが乗算された値である。 According to the above embodiment, in the control method of the programmable controller, the second threshold is set to a predetermined ratio at the time when the sequence processing program is executed before switching to the execution of the service processing. The multiplied value.
 このような構成によれば、サービス処理の実行時間に上限値が設けられることにより、シーケンス処理プログラムの実行時間と、サービス処理の実行時間との比率を調整することができる。具体的には、ratioの値を変更することで、シーケンス処理プログラムの実行時間と、サービス処理の実行時間との比率を調整することができる。 According to such a configuration, the upper limit value is provided for the execution time of the service process, so that the ratio between the execution time of the sequence processing program and the execution time of the service process can be adjusted. Specifically, the ratio between the execution time of the sequence processing program and the execution time of the service process can be adjusted by changing the ratio value.
 また、サービス処理の内容によってサービス処理の実行時間が長くなることが抑制されるため、シーケンス処理プログラムを実行時間が、サービス処理の実行時間と比較して短くなることが抑制される。 Also, since the execution time of the service process is suppressed from being increased depending on the contents of the service process, the execution time of the sequence processing program is suppressed from being shortened compared to the execution time of the service process.
 また、上記の実施形態によれば、プログラマブルコントローラの制御方法において、サービス処理の実行をシーケンス処理プログラムの実行よりも優先させる度合いを示す優先度値に基づいて、thresおよびratioのうちの少なくとも一方があらかじめ定められる。 Further, according to the above-described embodiment, in the control method of the programmable controller, at least one of thres and ratio is based on a priority value indicating a degree of giving priority to execution of service processing over execution of sequence processing program. Predetermined.
 このような構成によれば、使用環境に合わせて、使用者が、プログラマブルコントローラ1のシーケンス処理プログラムの実行とサービス処理の実行とのバランスを簡単に調整することができる。 According to such a configuration, the user can easily adjust the balance between the execution of the sequence processing program of the programmable controller 1 and the execution of the service processing according to the use environment.
 具体的には、優先度値を変更することでthresを調整し、シーケンス処理プログラムの実行からサービス処理の実行へ切り換えを行うまでの時間を調整することができる。また、優先度値を変更することでratioを調整し、サービス処理の実行からシーケンス処理プログラムの実行へ切り換えを行うまでの時間を調整することができる。 Specifically, it is possible to adjust thres by changing the priority value and adjust the time from the execution of the sequence processing program to the execution of the service processing. Further, the ratio is adjusted by changing the priority value, and the time from the execution of the service processing to the execution of the sequence processing program can be adjusted.
 シーケンス処理プログラムの実行性能と通信処理の応答性能とのいずれを優先させるかは、プログラマブルコントローラが使用される設備の実現要件、プログラマブルコントローラが使用される機械システムの実現要件、または、これらを運用する間のシステム状況によって異なる。そのため、その優先度を簡易に変更することができることが望ましい。 Whether to give priority to the execution performance of the sequence processing program or the response performance of communication processing depends on the realization requirements of the equipment that uses the programmable controller, the realization requirements of the mechanical system that uses the programmable controller, or these It depends on the system situation between. Therefore, it is desirable that the priority can be easily changed.
 特許文献1に記載された技術では、通信処理の種別ごとの実行する時間を規定したテーブルを編集することで、通信処理の実行に割り当てる時間を変更することができる。しかし、通信処理の種別ごとに実行する時間を規定するには、各通信処理に関する高度な知識が必要となるため、一般のプログラマブルコントローラの使用者が通信種別ごとの実行する時間を規定することは困難である。 In the technique described in Patent Document 1, the time allocated to the execution of the communication process can be changed by editing a table that defines the execution time for each type of the communication process. However, in order to specify the time to execute for each type of communication processing, advanced knowledge about each communication process is required, so it is not possible to specify the time to execute for each communication type by a general programmable controller user Have difficulty.
 特に、通信処理の種別ごとの割り当て時間を使用者が個別に規定する作業では、使用者が意図した通りにプログラマブルコントローラの性能を調整することが困難であった。 In particular, it is difficult to adjust the performance of the programmable controller as intended by the user in the work in which the user individually specifies the allocated time for each type of communication processing.
 これに対し、上記の実施形態によれば、使用環境に合わせて、使用者が、プログラマブルコントローラ1のシーケンス処理プログラムの実行とサービス処理の実行とのバランスを簡単に調整することができる。 On the other hand, according to the above embodiment, the user can easily adjust the balance between the execution of the sequence processing program of the programmable controller 1 and the execution of the service processing according to the use environment.
 また、上記の実施形態によれば、プログラマブルコントローラの制御方法において、優先度値に基づいて、thresおよびratioを同時に定められる。 Further, according to the above-described embodiment, in the control method of the programmable controller, thres and ratio can be determined simultaneously based on the priority value.
 このような構成によれば、使用環境に合わせて、使用者が、プログラマブルコントローラ1のシーケンス処理プログラムの実行とサービス処理の実行とのバランスを簡単に調整することができる。 According to such a configuration, the user can easily adjust the balance between the execution of the sequence processing program of the programmable controller 1 and the execution of the service processing according to the use environment.
 具体的には、優先度値を変更することでthresとratioとを同時に調整し、シーケンス処理プログラムの実行時間とサービス処理の実行時間との比率を調整することができる。 Specifically, by changing the priority value, thres and ratio can be adjusted at the same time, and the ratio between the execution time of the sequence processing program and the execution time of the service processing can be adjusted.
 また、上記の実施形態によれば、プログラマブルコントローラの制御方法において、thresおよびratioが、優先度値に比例する。 Further, according to the above-described embodiment, in the control method of the programmable controller, thres and ratio are proportional to the priority value.
 このような構成によれば、使用環境に合わせて、使用者が、プログラマブルコントローラ1のシーケンス処理プログラムの実行とサービス処理の実行とのバランスを簡単に調整することができる。 According to such a configuration, the user can easily adjust the balance between the execution of the sequence processing program of the programmable controller 1 and the execution of the service processing according to the use environment.
 具体的には、優先度値を変更することでthresとratioとを同時に調整し、シーケンス処理プログラムの実行時間とサービス処理の実行時間との比率を使用者の意図した通りに調整することができる。 Specifically, by changing the priority value, thres and ratio can be adjusted simultaneously, and the ratio between the execution time of the sequence processing program and the execution time of the service processing can be adjusted as intended by the user. .
 また、上記の実施形態によれば、プログラマブルコントローラの制御方法が、thresは、優先度値が大きくなるにしたがって小さくなる。また、ratioは、優先度値が大きくなるにしたがって大きくなる。 Further, according to the above embodiment, in the control method of the programmable controller, thres becomes smaller as the priority value becomes larger. Further, the ratio increases as the priority value increases.
 このような構成によれば、使用環境に合わせて、使用者が、プログラマブルコントローラ1のシーケンス処理プログラムの実行とサービス処理の実行とのバランスを簡単に調整することができる。 According to such a configuration, the user can easily adjust the balance between the execution of the sequence processing program of the programmable controller 1 and the execution of the service processing according to the use environment.
 具体的には、優先度値を変更することでthresとratioとを同時に調整し、シーケンス処理プログラムの実行時間とサービス処理の実行時間との比率を使用者の意図した通りに調整することができる。 Specifically, by changing the priority value, thres and ratio can be adjusted simultaneously, and the ratio between the execution time of the sequence processing program and the execution time of the service processing can be adjusted as intended by the user. .
 <変形例>
 上記実施形態では、各構成要素の寸法、形状、相対的配置関係または実施の条件などについても記載している場合があるが、これらはすべての局面において例示であって、本明細書に記載されたものに限られることはない。よって、例示されていない無数の変形例が、本技術の範囲内において想定される。たとえば、少なくとも1つの構成要素を変形する場合、追加する場合または省略する場合、さらには、少なくとも1つの実施形態における少なくとも1つの構成要素を抽出し、他の実施形態の構成要素と組み合わせる場合が含まれる。
<Modification>
In the above-described embodiments, the dimensions, shapes, relative arrangement relations, implementation conditions, and the like of each component may be described, but these are examples in all aspects and are described in this specification. It is not limited to those. Therefore, innumerable modifications not illustrated are assumed within the scope of the present technology. For example, the case where at least one component is modified, added or omitted, and further, the case where at least one component in at least one embodiment is extracted and combined with the components of other embodiments are included. It is.
 また、矛盾が生じない限り、上記実施形態において「1つ」備えられるものとして記載された構成要素は、「1つ以上」備えられていてもよい。さらに、各構成要素は概念的な単位であって、1つの構成要素が複数の構造物から成る場合と、1つの構成要素がある構造物の一部に対応する場合と、さらには、複数の構成要素が1つの構造物に備えられる場合とを含む。また、各構成要素には、同一の機能を発揮する限り、他の構造または形状を有する構造物が含まれる。 In addition, as long as no contradiction arises, “one or more” components described as being provided with “one” in the above embodiment may be provided. Furthermore, each component is a conceptual unit, and one component consists of a plurality of structures, one component corresponds to a part of the structure, and a plurality of components. And the case where the component is provided in one structure. Each component includes a structure having another structure or shape as long as the same function is exhibited.
 また、本明細書における説明は、本技術に関するすべての目的のために参照され、いずれも、従来技術であると認めるものではない。 In addition, the description in the present specification is referred to for all purposes related to the present technology, and none of them is admitted to be prior art.
 また、上記実施形態で記載された各構成要素は、ソフトウェアまたはファームウェアとしても、それと対応するハードウェアとしても想定され、その双方の概念において、各構成要素は「部」または「処理回路」などと称される。 In addition, each component described in the above embodiment is assumed to be software or firmware, or hardware corresponding thereto, and in both concepts, each component is a “unit” or “processing circuit” or the like. Called.
 本技術は、各構成要素が複数の装置に分散して備えられる場合(すなわち、システムのような態様)であってもよい。たとえば、データ保持部3は、図1においてはプログラマブルコントローラ1内に搭載されるものとして示されているが、外部の機能部であってもよい。その場合、プログラマブルコントローラ1内の他の機能部と互いに作用しあうことによって、全体としてデータ保持部3の機能を果たすものとする。 The present technology may be a case where each component is distributed and provided in a plurality of devices (that is, an aspect like a system). For example, the data holding unit 3 is illustrated as being mounted in the programmable controller 1 in FIG. 1, but may be an external functional unit. In that case, the function of the data holding unit 3 is achieved as a whole by interacting with other functional units in the programmable controller 1.
 1 プログラマブルコントローラ、2 処理実行部、3 データ保持部、4 待ち時間上限値、5 比率値、6 優先度値、7 優先度設定部、8 周辺器インターフェイス、9 コンピュータ装置、10 シーケンス処理部、11 サービス処理部、12 切り換え制御部、13 受け付けおよび計測部、14 待ち時間超過検出部、15 サービス処理超過検出部、102a,102b 処理回路、103 記憶装置、104 入力および出力装置。 1 programmable controller, 2 processing execution unit, 3 data holding unit, 4 waiting time upper limit value, 5 ratio value, 6 priority value, 7 priority setting unit, 8 peripheral device interface, 9 computer device, 10 sequence processing unit, 11 Service processing unit, 12 switching control unit, 13 reception and measurement unit, 14 waiting time excess detection unit, 15 service processing excess detection unit, 102a, 102b processing circuit, 103 storage device, 104 input and output device.

Claims (14)

  1.  機器を制御するためのシーケンス処理プログラムの実行と、ネットワーク通信処理を含むサービス処理の実行とを排他的に行うプログラマブルコントローラ(1)であり、
     前記サービス処理の実行要求を受け付ける受け付け部(13)と、
     前記受け付け部(13)で前記サービス処理の実行要求を受け付けた時に前記プログラマブルコントローラ(1)において前記シーケンス処理プログラムの実行が行われている場合、前記サービス処理の実行要求を受け付けた時からの経過時間があらかじめ定められた第1しきい値を超えた時点で、前記プログラマブルコントローラ(1)において前記シーケンス処理プログラムの実行から切り換えて前記実行要求に対応する前記サービス処理の実行を行わせる制御部(12)とを備える、
     プログラマブルコントローラ。
    A programmable controller (1) that exclusively performs execution of a sequence processing program for controlling a device and execution of service processing including network communication processing,
    A receiving unit (13) for receiving a request to execute the service process;
    If the execution of the sequence processing program is being executed in the programmable controller (1) when the execution request of the service process is received by the receiving unit (13), the process since the reception of the execution request of the service process When the time exceeds a predetermined first threshold, the programmable controller (1) switches from execution of the sequence processing program to execute the service processing corresponding to the execution request ( 12)
    Programmable controller.
  2.  前記制御部(12)は、前記シーケンス処理プログラムの実行から切り換えて前記サービス処理の実行が行われた時間があらかじめ定められた第2しきい値を超えた時点で、前記プログラマブルコントローラ(1)において前記シーケンス処理プログラムの実行を行わせる、
     請求項1に記載のプログラマブルコントローラ。
    The control unit (12) switches the execution of the sequence processing program to the programmable controller (1) at a point in time when the execution of the service processing exceeds a predetermined second threshold value. Causing the sequence processing program to be executed,
    The programmable controller according to claim 1.
  3.  前記第2しきい値は、前記サービス処理の実行に切り換える前の前記シーケンス処理プログラムの実行が行われた時間に、あらかじめ定められた第3しきい値が乗算された値である、
     請求項2に記載のプログラマブルコントローラ。
    The second threshold value is a value obtained by multiplying a predetermined third threshold value by the time when the sequence processing program is executed before switching to the execution of the service process.
    The programmable controller according to claim 2.
  4.  前記プログラマブルコントローラ(1)において、サービス処理の実行をシーケンス処理プログラムの実行よりも優先させる度合いを示す優先度値を外部から変更可能に設定する優先度値設定部(7)をさらに備え、
     前記第1しきい値および前記第3しきい値のうちの少なくとも一方は、前記優先度値に基づいてあらかじめ定められる、
     請求項3に記載のプログラマブルコントローラ。
    The programmable controller (1) further includes a priority value setting unit (7) for setting a priority value indicating a degree of giving priority to the execution of the service process over the execution of the sequence processing program.
    At least one of the first threshold and the third threshold is predetermined based on the priority value;
    The programmable controller according to claim 3.
  5.  前記シーケンス処理プログラムの実行と、前記シーケンス処理プログラムの実行が行われた時間の計測とを行うシーケンス処理部(10)と、
     前記サービス処理の実行と、前記サービス処理の実行が行われた時間の計測とを行うサービス処理部(11)と、
     前記サービス処理の実行要求を受け付けた時からの経過時間が前記第1しきい値を超えたことを検出する待ち時間超過検出部(14)と、
     前記サービス処理の実行が行われた時間が前記第2しきい値を超えたことを検出するサービス処理超過検出部(15)とをさらに備え、
     前記受け付け部(13)は、前記サービス処理の実行要求を受け付けた時からの前記経過時間を計測し、
     前記制御部(12)は、前記受け付け部(13)で前記サービス処理の実行要求を受け付けた時に前記シーケンス処理部(10)において前記シーケンス処理プログラムの実行が行われている場合、待ち時間超過検出部(14)における検出情報およびサービス処理超過検出部(15)における検出情報に基づいて、前記シーケンス処理プログラムの実行から切り換えて前記サービス処理部(11)において前記実行要求に対応する前記サービス処理の実行を行わせる、
     請求項2から請求項4のうちのいずれか1項に記載のプログラマブルコントローラ。
    A sequence processing unit (10) for executing the sequence processing program and measuring the time when the sequence processing program is executed;
    A service processing unit (11) for performing the service processing and measuring the time when the service processing is performed;
    A waiting time excess detection unit (14) for detecting that an elapsed time from the reception of the service processing execution request exceeds the first threshold;
    A service processing excess detection unit (15) for detecting that the time when the execution of the service processing is performed exceeds the second threshold;
    The accepting unit (13) measures the elapsed time from when the execution request for the service process is accepted,
    The control unit (12) detects an excess of waiting time when the sequence processing program is being executed in the sequence processing unit (10) when the receiving unit (13) receives the service processing execution request. Based on the detection information in the unit (14) and the detection information in the service processing excess detection unit (15), the service processing unit (11) switches from execution of the sequence processing program and the service processing corresponding to the execution request in the service processing unit (11). To execute,
    The programmable controller according to any one of claims 2 to 4.
  6.  機器を制御するためのシーケンス処理プログラムの実行と、ネットワーク通信処理を含むサービス処理の実行とを排他的に行うプログラマブルコントローラ(1)において、
     前記サービス処理の実行要求を受け付け、
     前記サービス処理の実行要求を受け付けた時に前記プログラマブルコントローラ(1)において前記シーケンス処理プログラムの実行が行われている場合、前記サービス処理の前記実行要求を受け付けた時からの経過時間があらかじめ定められた第1しきい値を超えた時点で、前記プログラマブルコントローラ(1)において前記シーケンス処理プログラムの実行から切り換えて前記実行要求に対応する前記サービス処理の実行を行わせる、
     プログラマブルコントローラの制御方法。
    In a programmable controller (1) that exclusively performs execution of a sequence processing program for controlling a device and execution of service processing including network communication processing,
    Receiving an execution request for the service process;
    When the execution of the sequence processing program is performed in the programmable controller (1) when the execution request for the service process is received, an elapsed time from the reception of the execution request for the service process is predetermined. When the first threshold value is exceeded, in the programmable controller (1), the execution of the service process corresponding to the execution request is performed by switching from the execution of the sequence processing program.
    Programmable controller control method.
  7.  前記サービス処理の実行要求を受け付けた時に前記プログラマブルコントローラ(1)において前記サービス処理の実行が行われている場合、前記実行要求に対応する前記サービス処理の実行を行わせる、
     請求項6に記載のプログラマブルコントローラの制御方法。
    When the execution of the service process is performed in the programmable controller (1) when the execution request for the service process is received, the execution of the service process corresponding to the execution request is performed.
    The control method of the programmable controller of Claim 6.
  8.  前記サービス処理の実行要求を複数受け付け、
     前記サービス処理の実行要求を受け付けた時に前記プログラマブルコントローラ(1)において前記シーケンス処理プログラムの実行が行われている場合、各前記サービス処理の実行要求を受け付けた時からの経過時間を合算した時間が前記第1しきい値を超えた時点で、前記プログラマブルコントローラ(1)において前記シーケンス処理プログラムの実行から切り換えて前記実行要求に対応する前記サービス処理の実行を行わせる、
     請求項6または請求項7に記載のプログラマブルコントローラの制御方法。
    Receiving a plurality of execution requests for the service process;
    When the execution of the sequence processing program is performed in the programmable controller (1) when the execution request for the service process is received, a time obtained by adding up the elapsed time from the reception of the execution request for each service process When the first threshold value is exceeded, in the programmable controller (1), the execution of the service process corresponding to the execution request is performed by switching from the execution of the sequence processing program,
    The control method of the programmable controller of Claim 6 or Claim 7.
  9.  前記シーケンス処理プログラムの実行から切り換えて前記サービス処理の実行が行われた時間があらかじめ定められた第2しきい値を超えた時点で、前記プログラマブルコントローラ(1)において前記シーケンス処理プログラムの実行を行わせる、
     請求項6または請求項7に記載のプログラマブルコントローラの制御方法。
    The programmable controller (1) executes the sequence processing program when the time when the execution of the service processing is switched from the execution of the sequence processing program exceeds a predetermined second threshold value. ,
    The control method of the programmable controller of Claim 6 or Claim 7.
  10.  前記第2しきい値は、前記サービス処理の実行に切り換える前の前記シーケンス処理プログラムの実行が行われた時間に、あらかじめ定められた第3しきい値が乗算された値である、
     請求項9に記載のプログラマブルコントローラの制御方法。
    The second threshold value is a value obtained by multiplying a predetermined third threshold value by the time when the sequence processing program is executed before switching to the execution of the service process.
    The control method of the programmable controller of Claim 9.
  11.  前記プログラマブルコントローラ(1)において、前記サービス処理の実行を前記シーケンス処理プログラムの実行よりも優先させる度合いを示す優先度値に基づいて、前記第1しきい値および前記第3しきい値のうちの少なくとも一方があらかじめ定められる、
     請求項10に記載のプログラマブルコントローラの制御方法。
    In the programmable controller (1), based on a priority value indicating a degree of giving priority to execution of the service process over execution of the sequence process program, the first threshold value and the third threshold value At least one is predetermined,
    The control method of the programmable controller of Claim 10.
  12.  前記優先度値に基づいて、前記第1しきい値および前記第3しきい値を同時に定められる、
     請求項11に記載のプログラマブルコントローラの制御方法。
    Based on the priority value, the first threshold value and the third threshold value can be determined simultaneously.
    The control method of the programmable controller of Claim 11.
  13.  前記第1しきい値および前記第3しきい値が、前記優先度値に比例する、
     請求項11に記載のプログラマブルコントローラの制御方法。
    The first threshold and the third threshold are proportional to the priority value;
    The control method of the programmable controller of Claim 11.
  14.  前記第1しきい値は、前記優先度値が大きくなるにしたがって小さくなり、
     前記第3しきい値は、前記優先度値が大きくなるにしたがって大きくなる、
     請求項11に記載のプログラマブルコントローラの制御方法。
    The first threshold value decreases as the priority value increases,
    The third threshold value increases as the priority value increases.
    The control method of the programmable controller of Claim 11.
PCT/JP2015/067826 2015-06-22 2015-06-22 Programmable controller and control method for programmable controller WO2016207937A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2015550878A JP5866082B1 (en) 2015-06-22 2015-06-22 Programmable controller and control method of programmable controller
PCT/JP2015/067826 WO2016207937A1 (en) 2015-06-22 2015-06-22 Programmable controller and control method for programmable controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2015/067826 WO2016207937A1 (en) 2015-06-22 2015-06-22 Programmable controller and control method for programmable controller

Publications (1)

Publication Number Publication Date
WO2016207937A1 true WO2016207937A1 (en) 2016-12-29

Family

ID=55347015

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2015/067826 WO2016207937A1 (en) 2015-06-22 2015-06-22 Programmable controller and control method for programmable controller

Country Status (2)

Country Link
JP (1) JP5866082B1 (en)
WO (1) WO2016207937A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1165623A (en) * 1997-08-20 1999-03-09 Denso Corp Programmable controller
JP2001265412A (en) * 2000-03-15 2001-09-28 Omron Corp Programmable controller
JP2004362100A (en) * 2003-06-03 2004-12-24 Sony Corp Information processor, method for controlling process, and computer program
JP2005293312A (en) * 2004-03-31 2005-10-20 Omron Corp Controller and tool
JP2010277158A (en) * 2009-05-26 2010-12-09 Fujitsu Semiconductor Ltd Interrupt notification control device and semiconductor integrated circuit
JP2011134197A (en) * 2009-12-25 2011-07-07 Hitachi Industrial Equipment Systems Co Ltd Programmable controller and time division method for a plurality of processes in programmable controller
JP2012203519A (en) * 2011-03-24 2012-10-22 Toshiba Corp Control device and program

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1165623A (en) * 1997-08-20 1999-03-09 Denso Corp Programmable controller
JP2001265412A (en) * 2000-03-15 2001-09-28 Omron Corp Programmable controller
JP2004362100A (en) * 2003-06-03 2004-12-24 Sony Corp Information processor, method for controlling process, and computer program
JP2005293312A (en) * 2004-03-31 2005-10-20 Omron Corp Controller and tool
JP2010277158A (en) * 2009-05-26 2010-12-09 Fujitsu Semiconductor Ltd Interrupt notification control device and semiconductor integrated circuit
JP2011134197A (en) * 2009-12-25 2011-07-07 Hitachi Industrial Equipment Systems Co Ltd Programmable controller and time division method for a plurality of processes in programmable controller
JP2012203519A (en) * 2011-03-24 2012-10-22 Toshiba Corp Control device and program

Also Published As

Publication number Publication date
JP5866082B1 (en) 2016-02-17
JPWO2016207937A1 (en) 2017-07-06

Similar Documents

Publication Publication Date Title
US20150261473A1 (en) Memory system and method of controlling memory system
JP6886964B2 (en) Load balancing method and equipment
US10642250B2 (en) Servo control system equipped with learning control apparatus having function of optimizing learning memory allocation
CN106330754B (en) Access request control method and device
JP2007133481A (en) Distributed system
US20140344518A1 (en) Apparatus and method for performing data transfer between storages
KR20130109788A (en) Method for predicting temperature in device
KR20200131178A (en) Method for executing an application on a distributed system architecture
JP2009277022A (en) Information processing system, load control method, and load control program
JP5866082B1 (en) Programmable controller and control method of programmable controller
US10277503B2 (en) Cross-domain service request placement in a software defined environment (SDE)
JP2005327138A (en) Data base server, program, recording medium, and control method
US20150178011A1 (en) Path selection to read or write data
US9998347B2 (en) Monitoring device usage
JP6517706B2 (en) Numerical control system for efficient exchange of numerical control data
US9537740B2 (en) Monitoring device usage
JP2010282352A (en) Dma transfer control device
KR20200077391A (en) Electronic device for performing migration for virtual machine in cloud environment and operation method thereof
JP2017228223A (en) Signal processor
JP2018095142A (en) On-vehicle control device
JP6655034B2 (en) Control device, control method, and control program
JP6281354B2 (en) Information processing system, information processing apparatus, information processing method, and program
JP2021105772A (en) Prediction management system of resource usage amount, and prediction management method of resource usage amount
US10169182B2 (en) Monitoring levels of utilization of device
JP5056346B2 (en) Information processing apparatus, information processing system, virtual server movement processing control method, and program

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2015550878

Country of ref document: JP

Kind code of ref document: A

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15896260

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15896260

Country of ref document: EP

Kind code of ref document: A1