WO2016075721A1 - 命令実行制御システム及び命令実行制御方法 - Google Patents
命令実行制御システム及び命令実行制御方法 Download PDFInfo
- Publication number
- WO2016075721A1 WO2016075721A1 PCT/JP2014/005663 JP2014005663W WO2016075721A1 WO 2016075721 A1 WO2016075721 A1 WO 2016075721A1 JP 2014005663 W JP2014005663 W JP 2014005663W WO 2016075721 A1 WO2016075721 A1 WO 2016075721A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- instruction
- dummy
- output
- bus
- unit
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims description 48
- 238000001514 detection method Methods 0.000 claims description 220
- 238000004891 communication Methods 0.000 claims description 115
- 230000000737 periodic effect Effects 0.000 claims description 91
- 230000004044 response Effects 0.000 claims description 33
- 230000005856 abnormality Effects 0.000 claims description 21
- 230000005764 inhibitory process Effects 0.000 claims 1
- 230000006870 function Effects 0.000 description 363
- 239000000872 buffer Substances 0.000 description 278
- 230000005540 biological transmission Effects 0.000 description 121
- 238000012545 processing Methods 0.000 description 114
- 238000010586 diagram Methods 0.000 description 28
- 238000012986 modification Methods 0.000 description 21
- 230000004048 modification Effects 0.000 description 21
- 238000013461 design Methods 0.000 description 19
- 230000008569 process Effects 0.000 description 19
- 230000002159 abnormal effect Effects 0.000 description 11
- 238000006243 chemical reaction Methods 0.000 description 9
- 238000004088 simulation Methods 0.000 description 6
- 230000004888 barrier function Effects 0.000 description 5
- 238000011835 investigation Methods 0.000 description 4
- 238000012546 transfer Methods 0.000 description 4
- 238000011084 recovery Methods 0.000 description 3
- 238000011161 development Methods 0.000 description 2
- 230000007257 malfunction Effects 0.000 description 2
- 238000005070 sampling Methods 0.000 description 2
- 230000009131 signaling function Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000005352 clarification Methods 0.000 description 1
- 238000003780 insertion Methods 0.000 description 1
- 230000037431 insertion Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000006386 memory function Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001629 suppression Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
- G06F9/3836—Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/30076—Arrangements for executing specific machine instructions to perform miscellaneous control operations, e.g. NOP
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/30003—Arrangements for executing specific machine instructions
- G06F9/30076—Arrangements for executing specific machine instructions to perform miscellaneous control operations, e.g. NOP
- G06F9/30087—Synchronisation or serialisation instructions
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/38—Concurrent instruction execution, e.g. pipeline or look ahead
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
Definitions
- the present invention relates to an instruction execution control system and an instruction execution control method, and more particularly to a technique for executing instructions in parallel.
- Patent Document 1 discloses a technique for securing the execution order of instructions in a system having an instruction overtaking function in memory access.
- the instruction execution control device sets the pre-barrier flag of the instruction registered in the storage unit to one.
- the instruction execution control device registers the instruction in the storage unit, and ensures the order guarantee control of the registered instruction and the instruction whose pre-barrier flag is 1. It is determined whether or not it is a combination of instruction types to be executed.
- the instruction execution control device sets an overtaking prohibition flag of an instruction whose front-barrier flag is 1 to 1 when the instruction is a combination of instruction types to be subjected to order guarantee control.
- the instruction execution control unit executes an instruction, it clears the pre-barrier flag and the overtaking prohibition flag of the instruction. Then, the instruction execution control device suspends the execution of the later registered instruction until the overtaking prohibition flag is cleared. This guarantees the execution order of the instructions.
- Patent Document 1 does not disclose a technique for guaranteeing the execution order of instructions in a system in which a plurality of instruction execution units independently execute instructions in parallel.
- the instruction execution control system when the inputted instruction is a dummy instruction inserted between the instructions to be kept in the execution order, stores the inputted instruction in a plurality of instruction storage units.
- the instruction is distributed to all of the plurality of instruction storage units until the output of all the instruction storage units becomes a dummy instruction, and the output of the instruction from the instruction storage unit, which is a dummy instruction, is inhibited from outputting the instruction to the instruction execution unit It is.
- the execution order of instructions can be guaranteed.
- FIG. 1 is a block diagram of a module control system according to a first embodiment.
- FIG. 2 is a block diagram of an interface board and an external computer according to Embodiment 1;
- FIG. 2 is a diagram showing a software configuration and a hardware configuration of an external computer 3 according to the first embodiment.
- FIG. 5 is a diagram showing an execution order of instructions according to Embodiment 1.
- 5 is a flowchart showing an operation of the module control system according to Embodiment 1;
- 5 is a flowchart showing an operation of the external computer according to the first embodiment.
- 5 is a flowchart showing the operation of the interface board (transmission control function and dummy instruction detection function) according to the first embodiment.
- FIG. 5 is a flowchart showing the operation of the interface board (timing adjustment function) according to the first embodiment.
- FIG. 6 is a block diagram clearly showing the reception function of the interface board according to Embodiment 1; It is a figure which shows the example which can not keep the execution order of an instruction
- FIG. 7 is a block diagram of a modification 1 of the module control system according to the first embodiment.
- FIG. 10 is a block diagram of a modification 2 of the module control system according to the first embodiment.
- 5 is a configuration diagram of an interface board and an external computer according to Embodiment 2.
- FIG. FIG. 16 is a block diagram of a modification of the module control system according to the second embodiment.
- FIG. 14 is a configuration diagram of an interface board and an external computer according to Embodiment 3;
- FIG. 18 is a diagram showing an execution order of instructions according to Embodiment 3.
- 15 is a flowchart showing an operation of the interface board (timing adjustment function) according to the third embodiment.
- FIG. 16 is a block diagram of an interface board and an external computer according to a fourth embodiment.
- FIG. 18 is a diagram showing an execution order of instructions according to a fourth embodiment.
- FIG. 18 is a configuration diagram of a modification of the module control system according to the fourth embodiment.
- FIG. 18 is a block diagram of an interface board and an external computer according to a fifth embodiment.
- FIG. 18 is a diagram showing an execution order of instructions according to a fifth embodiment.
- FIG. 21 is a flowchart showing the operation of the interface board (timing adjustment function) according to the fifth embodiment.
- FIG. 18 is a configuration diagram of an interface board and an external computer according to a sixth embodiment.
- FIG. 18 is a configuration diagram of an interface board and an external computer according to a seventh embodiment.
- FIG. 18 is a configuration diagram of an interface board and an external computer according to Embodiment 8;
- FIG. 18 is a diagram showing the execution order of instructions according to Embodiment 8.
- FIG. 31 is a flowchart showing the operation of the interface board (transmission control function and dummy instruction detection function) according to the eighth embodiment.
- FIG. 20 is a configuration diagram of a module control system according to Embodiment 9;
- FIG. 20 is a configuration diagram of a module control system according to Embodiment 9;
- FIG. 20 is a configuration diagram of a module control system according to Embodiment 9;
- FIG. 18 is a diagram showing an execution order of instructions according to a ninth embodiment.
- FIG. 21 is a configuration diagram of a module control system according to a tenth embodiment.
- FIG. 21 is a configuration diagram of a module control system according to a tenth embodiment.
- FIG. 21 is a configuration diagram of a module control system according to a tenth embodiment.
- FIG. 18 is a diagram showing the execution order of instructions according to the tenth embodiment.
- the module control system 1 has an interface board 2, an external computer 3, and a plurality of modules 4.
- the interface board 2 is connected to the external computer 3 via the communication path 90. Further, the interface board 2 is connected to the plurality of modules 4 via the buses 91 to 93. At least one module 4 is connected to each of the buses 91 to 93. Strictly speaking, the buses 91 to 93 are formed by connecting the interface board 2 and the plurality of modules 4 to each other and connecting their internal signal lines. In the first embodiment, an example in which the number of buses 91 to 93 connecting the interface board 2 and the module 4 is three is described, but the number of buses is not limited to this.
- the interface board 2 receives an instruction from the external computer 3 via the communication path 90.
- the interface board 2 distributes the received instruction to each of the buses 91 to 93.
- the interface board 2 transmits the received instruction to the bus to which the module 4 which is the execution target of the instruction is connected.
- the external computer 3 generates an instruction to be executed by the module 4.
- the external computer 3 transmits the generated instruction to the interface board 2 via the communication path 90.
- the external computer 3 is typically, for example, a PC (Personal Computer).
- Each of the plurality of modules 4 executes an instruction received from the interface board 2.
- the plurality of modules 4 can be connected to one another to configure one operating gadget.
- the gadget may be, for example, an electronic device such as a home appliance, or a transport device such as an automobile.
- Each of the plurality of modules 4 executes an instruction to realize the operation of the gadget.
- Each of the plurality of modules 4 has a microcomputer 40, a sensor 41, and a motor 42, as shown in FIG. 1, for example.
- the module 4 may have any one of the sensor 41 and the motor 42.
- the microcomputer 40 executes an instruction received from the interface board 2. For example, when the received command is a sensor value acquisition command, the microcomputer 40 executes a process of acquiring a sensor value from the sensor 41 and transmitting it to the interface board 2.
- the interface board 2 transmits the sensor value received from the module 4 to the external computer 3.
- the microcomputer 40 executes a process of driving the motor 42 when the received command is a motor drive command.
- the motor drive command is generated, for example, based on the sensor value obtained by the external computer 3 from the module 4. That is, strictly speaking, the execution of the instruction in the first embodiment means that the module 4 executes the process according to the instruction. In other words, the instruction in the present embodiment can be said to be information for instructing the module 4 to perform processing.
- the movement is realized by driving the motor 42 based on the sensor value generated by the sensor 41 as described above.
- the configuration of the module 4 is not limited to this.
- the module 4 may have information acquiring means other than the sensor 41, and may have operation realizing means other than the motor 42.
- connection method may be adopted for connection between the module 4 and another module 4 or the interface board 2.
- the connection method may be, for example, a method of connecting indirectly via a cable or a connecting part, or a method of connecting directly without using a cable or the like.
- two or more of those connection methods may be mixed.
- the external computer 3 can control more modules 4 by configuring the external computer 3 to control the plurality of modules 4 via the interface board 2 as described above. That is, by connecting the external computer 3 and the plurality of modules 4 via the interface board 2 to which the modules 4 can be connected by the plurality of buses 91 to 93, it is possible to connect more than directly connecting by a single bus. Connection of module 4 is enabled.
- the module 4 group connected to the bus 91, the module 4 group connected to the bus 92, and the module 4 group connected to the bus 93 are independently and parallelly operated.
- the instruction is executed. Therefore, if the independence is not taken into consideration, the instruction to be executed later is executed first when the instruction to be kept in the execution order is sent to different modules 4 of the connected bus. There is a problem that there is a problem.
- These modules 4 function as an instruction execution unit.
- the plurality of modules 4 are executed by the functions described below. We guarantee the order of the instruction.
- the external computer 3 has a dummy instruction generation function 30.
- the dummy instruction generation function 30 generates a dummy instruction, and inserts a plurality of instructions sequentially transmitted to the interface board 2 between the instructions whose execution order is to be maintained. That is, when there is a first instruction and a second instruction to be executed after the first instruction among a plurality of instructions, a dummy instruction is placed between the first instruction and the second instruction. Is inserted.
- the external computer 3 transmits the first instruction, the dummy instruction, and the second instruction to the interface board 2 in this order.
- the first instruction corresponds to a sensor value acquisition instruction
- the second instruction corresponds to a motor drive instruction generated based on the sensor value acquired by the sensor value acquisition instruction.
- the types of instructions that should follow the execution order are not limited to the sensor value acquisition instruction and the motor drive instruction illustrated in the present embodiment. The order of the other types of instructions may be guaranteed as will be described later.
- the interface board 2 has a transmission control function 20, a dummy instruction detection function 21, a plurality of bus instruction buffers 22a to 22c, and a timing adjustment function 23.
- bus instruction buffer 22 the bus instruction buffers 22a to 22c will be simply referred to as “bus instruction buffer 22" unless limited to one of them.
- the transmission control function 20 distributes or distributes the instruction received from the external computer 3 to the bus instruction buffers 22a to 22c. In other words, the transmission control function 20 stores the instruction received from the external computer 3 in the bus instruction buffers 22a to 22c. More specifically, when the received instruction is a dummy instruction, the transmission control function 20 outputs the dummy instruction to all the bus instruction buffers 22a to 22c. On the other hand, when the received instruction is not a dummy instruction, the transmission control function 20 outputs the instruction to any one of the bus instruction buffers 22a to 22c. More specifically, the transmission control function 20 outputs the instruction to the bus instruction buffer 22 corresponding to the bus to which the module 4 for executing the instruction is connected.
- the transmission control function 20 recognizes whether or not the received command is a dummy command based on the detection result of the dummy command detection function 21.
- the dummy instruction detection function 21 determines whether the instruction received from the external computer 3 is a dummy instruction. That is, the dummy instruction detection function 21 determines whether the instruction input to the transmission control function 20 is a dummy instruction. Then, when it is determined that the instruction received from the external computer 3 is a dummy instruction, the dummy instruction detection function 21 notifies the transmission control function 20 of detection of the dummy instruction.
- the transmission control function 20 and the dummy instruction detection function 21 are realized by, for example, a circuit described below.
- the dummy instruction detection function 21 outputs a broadcast instruction signal to a broadcast terminal of the transmission control function 20 when the instruction input to the transmission control function 20 is a dummy instruction.
- the broadcast instruction signal corresponds to a signal indicating the detection result of the above-mentioned dummy instruction.
- the dummy instruction detection function 21 does not output the broadcast instruction signal to the broadcast terminal of the transmission control function 20.
- the transmission control function 20 distributes the input instruction to all the bus instruction buffers 22a to 22c.
- the transmission control function 20 distributes the input instruction to any one of the bus instruction buffers 22a to 22c.
- the dummy instruction after all the first instruction is for all the bus instruction buffers 22a to 22c.
- the second instruction is stored in any one of the bus instruction buffers 22a to 22c after the dummy instruction.
- the transmission control function 20 and the dummy instruction detection function 21 function as an instruction control unit.
- Each of bus instruction buffers 22a to 22c can store a plurality of instructions.
- Each of bus instruction buffers 22a to 22c stores an instruction input from transmission control function 20.
- Each of bus instruction buffers 22a to 22c stores instructions in a first in first out (FIFO) manner. Therefore, the instructions stored in each of the bus instruction buffers 22a to 22c are sequentially taken out in the stored order, and transmitted to the buses 91 to 93, respectively.
- FIFO first in first out
- the bus instruction buffer 22 a is connected to the bus 91
- the bus instruction buffer 22 b is connected to the bus 92
- the bus instruction buffer 22 c is connected to the bus 93. Therefore, the instruction stored in the bus instruction buffer 22 a is output to the module 4 via the bus 91.
- the instruction stored in the bus instruction buffer 22 b is output to the module 4 via the bus 92.
- the instruction stored in the bus instruction buffer 22 c is output to the module 4 via the bus 93.
- the timing adjustment function 23 controls the output of the instruction from each of the bus instruction buffers 22a to 22c to the module 4 using the dummy instruction, to guarantee the order of the instruction.
- the timing adjustment function 23 functions as an output control unit.
- the timing adjustment function 23 monitors the instruction output from each of the bus instruction buffers 22a to 22c, and stops operation of the bus instruction buffer 22 when detecting the bus instruction buffer 22 that outputs a dummy instruction. . In other words, the timing adjustment function 23 stops the output of the instruction from the bus instruction buffer 22 to the module 4. Even after that, the timing adjustment function 23 stops the operation of the bus instruction buffer 22 each time it detects a new bus instruction buffer 22 that outputs a dummy instruction. Then, when the instruction outputted by all the bus instruction buffers 22a to 22c becomes a dummy instruction, the timing adjustment function 23 resumes the operation of the bus instruction buffer 22 which has been stopped. That is, the timing adjustment function 23 resumes the output of the instruction to the module 4 from the bus instruction buffer 22 which has been stopped.
- the output of the instruction after the dummy instruction to the module 4 is stopped until the dummy instructions are aligned with the outputs from all the bus instruction buffers 22a to 22c. Therefore, when there is a first instruction and a second instruction to be executed after the first instruction, at least the first instruction is output, and a dummy instruction after the first instruction is output. The second instruction after the dummy instruction is not output until the second instruction. That is, the order of the first instruction and the second instruction is guaranteed.
- the bus instruction buffers 22a to 22c and the timing adjustment function 23 are realized by, for example, a circuit described below.
- the timing adjustment function 23 outputs the stop signal to the stop signal input terminal of the bus instruction buffer 22 for outputting the dummy instruction until all the bus instruction buffers 22a to 22c output the dummy instruction.
- the bus instruction buffer 22 stops its operation. More specifically, the bus instruction buffer 22 stops the output operation of the instruction to the module 4 in response to the stop signal from the timing adjustment function 23.
- the transfer sequence of data (instructions) on the bus from the bus instruction buffer 22 to the module 4 is interrupted. This transfer sequence conforms to the communication standard on the buses 91 to 93.
- the bus instruction buffer 22 stops the transfer sequence of instructions to the module 4 by stopping the operation of the bus instruction buffer 22.
- the method of interrupting has been described, the present invention is not limited to this method, and other methods may be used.
- the timing adjustment function 23 temporarily acquires an instruction output from the bus instruction buffer 22, and if the acquired instruction is a dummy instruction, transmission of the instruction is suppressed, and if not, the instruction is issued to the module 4. You may make it transmit.
- the timing adjustment function 23 When the timing adjustment function 23 detects the output of the dummy instruction from all the bus instruction buffers 22a to 22c, it stops the output of the stop signal. When the stop signal is not input from the timing adjustment function 23, the bus instruction buffer 22 that has stopped the operation resumes its operation. More specifically, in response to the release of the stop signal from the timing adjustment function 23, the bus instruction buffer 22 resumes the output operation of the instruction to the module 4. Here, as described later, the dummy instruction is discarded at this time. Therefore, for the instruction following the dummy instruction, the transfer sequence of the instruction from the bus instruction buffer 22 to the module 4 is started. That is, transmission of instructions from all of the bus instruction buffers 22a to 22c to the module 4 is resumed.
- FIG. 2 shows the configurations of the transmission control function 20 and the timing adjustment function 23 provided in the interface board 2 in more detail.
- the transmission control function 20 includes an instruction distribution unit 201, an instruction distribution unit 202, and an inverter 209.
- the timing adjustment function 23 includes dummy instruction detection units 231a to 231c and an AND circuit 232.
- the dummy instruction detection units 231a to 231c will be simply referred to as “dummy instruction detection unit 231" when not limited to any one.
- the instruction input to the transmission control function 20 is input to both the instruction distribution unit 201 and the instruction distribution unit 202.
- the instruction distribution unit 201 distributes the input instruction to any one of the bus instruction buffers 22a to 22c according to the destination.
- the instruction distribution unit 202 distributes the input instruction to all of the bus instruction buffers 22a to 22c.
- the instruction distribution unit 201 and the instruction distribution unit 202 operate complementarily depending on whether a broadcast instruction signal is input from the dummy instruction detection function 21 to the transmission control function 20.
- the instruction distribution unit 201 operates and the instruction distribution unit 202 stops its operation.
- the instruction distribution unit 201 stops its operation, and the instruction distribution unit 202 operates.
- the instruction distribution unit 201 and the instruction distribution unit 202 operate, for example, as described below.
- the dummy instruction detection function 21 outputs, to the instruction distribution unit 201 and the instruction distribution unit 202, a signal which can be switched between high level and low level.
- the dummy instruction detection function 21 outputs a high level signal.
- the dummy instruction detection function 21 outputs a low level signal.
- This signal is input to the instruction distribution unit 202 as it is, and a signal inverted via the inverter 209 is input to the instruction distribution unit 201.
- the instruction distribution unit 201 and the instruction distribution unit 202 operate when a high level signal is input, and stop the operation when a low level signal is input. That is, the high level signal corresponds to the broadcast instruction signal.
- Each of the dummy instruction detection units 231a to 231c monitors an instruction output from each of the bus instruction buffers 22a to 22c, and detects an output of the dummy instruction.
- the dummy instruction detection unit 231a monitors the bus instruction buffer 22a.
- the dummy instruction detection unit 231b monitors the bus instruction buffer 22b.
- the dummy instruction detection unit 231c monitors the bus instruction buffer 22c.
- the dummy instruction detection unit 231a When the dummy instruction is output from the bus instruction buffer 22a, the dummy instruction detection unit 231a outputs a stop signal to the bus instruction buffer 22a and the AND circuit 232.
- the dummy instruction detection unit 231b When the dummy instruction is output from the bus instruction buffer 22b, the dummy instruction detection unit 231b outputs a stop signal to the bus instruction buffer 22b and the AND circuit 232.
- the dummy instruction detection unit 231 c outputs a stop signal to the bus instruction buffer 22 c and the AND circuit 232 when the dummy instruction is output from the bus instruction buffer 22 c.
- the AND circuit 232 outputs a signal generated by an AND operation of the signals input from each of the dummy instruction detection units 231a to 231c to each of the dummy instruction detection units 231a to 231c.
- the AND circuit 232 outputs a clear signal to each of the dummy instruction detection units 231a to 231c when the stop signal is input from all of the dummy instruction detection units 231a to 231c.
- the AND circuit 232 does not output the clear signal to each of the dummy instruction detection units 231a to 231c when the stop signal is not input from at least one of the dummy instruction detection units 231a to 231c.
- the dummy instruction detection units 231a to 231c and the AND circuit 232 operate as described below, for example.
- Each of the dummy instruction detection units 231a to 231c outputs a signal to be switched between the high level and the low level to each of the bus instruction buffers 22a to 22c and the AND circuit 232.
- Each of the dummy instruction detection units 231a to 231c outputs a high level signal when the dummy instruction is output from each of the bus instruction buffers 22a to 22c.
- each of the dummy instruction detection units 231a to 231c outputs a low level signal.
- Each of the bus instruction buffers 22a to 22c operates when a high level signal is input, and stops the operation when a low level signal is input. That is, the high level signal corresponds to the stop signal.
- the AND circuit 232 outputs a high level signal to each of the dummy instruction detection units 231a to 231c when a high level signal is input from all of the dummy instruction detection units 231a to 231c.
- the AND circuit 232 outputs a low level signal to each of the dummy instruction detection units 231a to 231c when the low level signal is input from at least one of the dummy instruction detection units 231a to 231c.
- each of the dummy instruction detection units 231a to 231c switches the signal output to the bus instruction buffers 22a to 22c and the AND circuit 232 from the high level to the low level. .
- each of the dummy instruction detection units 231a to 231c does not switch the level of the signal output to the bus instruction buffers 22a to 22c and the AND circuit 232. . That is, the high level signal output from the AND circuit 232 corresponds to the clear signal.
- FIG. 2 shows the configuration of the external computer 3 in more detail.
- the external computer 3 has an instruction generation unit 31 and an execution order determination unit 32 in addition to the dummy instruction generation function 30.
- the instruction generation unit 31 generates a plurality of instructions to be executed by the plurality of modules 4.
- the execution order determination unit 32 determines whether or not there is an instruction to maintain the execution order among the plurality of instructions generated by the instruction generation unit 31.
- the dummy instruction generation function 30 generates a dummy instruction and inserts it between the instructions which should maintain the execution order detected by the execution order determination unit 32.
- the external computer 3 includes a central processing unit (CPU) 300, a memory 301, a hard disk 302, and a communication controller 303.
- CPU central processing unit
- memory 301 a hard disk 302
- communication controller 303 a communication controller
- the CPU 300 centrally controls the external computer 3.
- the CPU 300 loads the interpreter 310 stored in the hard disk 302 into the memory 301 and executes it to interpret the source program 311 stored in the hard disk 302 and generate an executable program.
- the CPU 300 generates an instruction and transmits it to the interface board 2 by executing the generated executable program.
- the interpreter 310 and the executable program generated by interpreting the source program 311 execute various processes as the dummy instruction generation function 30, the instruction generation unit 31, and the execution order determination unit 32 to the CPU 300. Contains code to make it happen.
- the memory 301 temporarily stores information used by the CPU 300. This information also includes the interpreter 310 and the source program 311 etc. loaded from the hard disk 302 as described above.
- the memory 301 is a volatile storage device such as, for example, a dynamic random access memory (DRAM) and a static random access memory (SRAM).
- DRAM dynamic random access memory
- SRAM static random access memory
- the hard disk 302 stores various information such as the interpreter 310 and the source program 311.
- a non-volatile storage device such as the hard disk 302
- another storage device such as a flash memory may be used instead of the hard disk 302.
- the memory 301 and the hard disk 302 function as a storage unit in which information used by the external computer 3 is stored. Note that the number and combination of storage devices functioning as the storage unit are not limited to the above-described example.
- the communication controller 303 converts the information output from the CPU 300 into a format that can be transmitted to the interface board 2 and transmits it.
- the format after conversion conforms to the communication standard between the external computer 3 and the interface board 2.
- the communication controller 303 also receives information from the interface board 2, converts the information into a format that can be processed in the external computer 3, and outputs the converted information to the CPU 300.
- the interpreter 310 has a function of generating dummy instructions.
- the source program (source code, atomic program) 311 describes a code that controls the plurality of modules 4.
- the CPU 300 is executed in a plurality of modules 4 by executing an executable program (load module, machine language program, object code) generated by interpreting (also referred to as sequential compilation) the source program 311 sequentially by the interpreter 310.
- An instruction is generated and sequentially transmitted to the plurality of modules 4 via the interface board 2.
- the CPU 300 when generating and transmitting an instruction which should follow the execution order, the CPU 300 generates and transmits a dummy instruction between those instructions.
- the interpreter 310 adds a code that generates and transmits dummy instructions between those codes and causes the CPU 300 to execute the code.
- the external computer 3 can insert dummy instructions between the instructions that should follow the execution order and send those instructions to the interface board 2.
- the method of controlling the plurality of modules 4 is not limited to the example in which the executable program generated by sequentially interpreting the source program 311 by the interpreter 310 is executed as described above.
- a compiler may be stored in the hard disk 302 instead of the interpreter 310, and the CPU 300 may execute an executable program generated by the compiler interpreting the source program 311 collectively (also referred to as batch compilation).
- the compiler causes the CPU 300 to execute a process of generating an executable program by adding a code for generating and transmitting a dummy instruction between codes for generating and transmitting an instruction to be kept in execution order.
- the CPU 300 it is possible to cause the CPU 300 to execute a process of generating a dummy instruction while checking the order of instructions by providing an executable program itself with an instruction determination function and a dummy instruction generation function that should keep the execution order.
- dummy instructions are inserted between the instructions that should follow the execution order, and these instructions are transmitted to the interface board 2.
- FIG. 4 illustrates an example in which the instruction generation unit 31 of the external computer 3 generates instructions in order of instructions A to F.
- the instruction C, the instruction D, and the instruction F are instructions for which the execution order should be maintained. That is, it is assumed that the instruction D needs to be executed after the execution of the instruction C, and the instruction F needs to be executed after the execution of the instruction D.
- the dummy instruction generation function 30 inserts the dummy instruction A between the instruction C and the instruction D, and inserts the dummy instruction B between the instruction D and the instruction F. Therefore, as shown by “data of communication path 90” in FIG. 4, the external computer 3 sequentially executes instruction A, instruction B, instruction C, dummy instruction A, instruction D, instruction E, dummy instruction B, and instruction F. The instructions are sequentially transmitted to the interface board 2 via the communication path 90 one by one.
- the communication speed of the communication path 90 is preferably higher than the communication speed of the buses 91 to 93.
- a plurality of instructions (instructions A to F and dummy instructions A and B) can be transmitted on the communication path 90 within the time of transmitting one instruction on the buses 91 to 93.
- FIG. 4 shows an example in which at least eight instructions can be transmitted on the communication path 90 within the time of transmitting one instruction on the buses 91 to 93, the relationship of the number of instructions is not limited to this. .
- Such a relationship between the communication path 90 and the plurality of buses 91 to 93 enables continuous transmission of instructions to the module 4 without exhaustion of the instructions on the buses 91 to 93. It becomes.
- instruction A, instruction B, and instruction C are instructions executed by module 4 connected to bus 91
- instruction D is an instruction executed by module 4 connected to bus 92
- E and instruction F are instructions to be executed by the module 4 connected to the bus 93.
- each of the bus instruction buffers 22a to 22c transmits an instruction to each of the buses 91 to 93. That is, the bus instruction buffer 22a stores instructions in the order of the instruction A, the instruction B, the instruction C, the dummy instruction A, and the dummy instruction B, and transmits the instructions in that order.
- the bus instruction buffer 22b stores instructions in the order of the dummy instruction A, the instruction D, and the dummy instruction B, and transmits the instructions in that order.
- the bus instruction buffer 22c stores instructions in the order of the dummy instruction A, the instruction E, the dummy instruction B, and the instruction F, and transmits the instructions in that order.
- the states of the buses 91 to 93 according to the passage of time in this case will be described.
- the instruction A stored in the bus instruction buffer 22 a is transmitted to the bus 91.
- the module 4 connected to the bus 91 receives and executes the instruction A transmitted from the bus instruction buffer 22a.
- the instruction transmitted from the bus instruction buffer 22a is not the dummy instruction A, but the instruction transmitted from the bus instruction buffers 22b and 22c is the dummy instruction A. Therefore, the timing adjustment function 23 stops the operation of the bus instruction buffers 22 b and 22 c for transmitting the dummy instruction A.
- reception by the module 4 of the dummy instruction A transmitted from the bus instruction buffers 22b and 22c is not completed.
- the instruction B stored in the bus instruction buffer 22 a is transmitted to the bus 91.
- the module 4 connected to the bus 91 receives and executes the instruction B transmitted from the bus instruction buffer 22a.
- the instruction transmitted from the bus instruction buffer 22a is not the dummy instruction A, but the instruction transmitted from the bus instruction buffers 22b and 22c is the dummy instruction A. Therefore, the timing adjustment function 23 continues to stop the operation of the bus instruction buffers 22b and 22c for transmitting the dummy instruction A.
- the instruction C stored in the bus instruction buffer 22 a is transmitted to the bus 91.
- the module 4 connected to the bus 91 receives and executes the instruction C transmitted from the bus instruction buffer 22a.
- the instruction transmitted from the bus instruction buffer 22a is not the dummy instruction A, but the instruction transmitted from the bus instruction buffers 22b and 22c is the dummy instruction A. Therefore, the timing adjustment function 23 continues to stop the operation of the bus instruction buffers 22b and 22c for transmitting the dummy instruction A.
- the instruction transmitted from the bus instruction buffers 22b and 22c is not the dummy instruction B, but the instruction transmitted from the bus instruction buffer 22a is the dummy instruction B. Therefore, the timing adjustment function 23 stops the operation of the bus instruction buffer 22a that transmits the dummy instruction B.
- the dummy instruction B stored in the bus instruction buffer 22 b is also transmitted to the bus 92.
- the dummy instruction B stored in the bus instruction buffer 22 c is also transmitted to the bus 93. Therefore, the instruction transmitted from all of the bus instruction buffers 22a to 22c is the dummy instruction B. Therefore, the timing adjustment function 23 resumes the operation of the bus instruction buffer 22a.
- the order execution of instruction execution is guaranteed even among the group of modules 4 that execute instructions independently and in parallel. be able to.
- the CPU 300 of the external computer 3 creates the source program 311 according to the input from the user (S1).
- code for controlling the plurality of modules 4 is described.
- a code that generates a sensor value acquisition command and a motor drive command and transmits the command to the module 4 is described.
- the input from the above-mentioned user is implemented by operating the input device (not shown) which the external computer 3 has.
- the input device is, for example, a keyboard and a mouse.
- the CPU 300 of the external computer 3 executes the interpreter 310 to sequentially interpret the source program 311 to generate and execute an executable program (S2).
- various instructions are generated by the external computer 3 and sequentially transmitted to the plurality of modules 4 through the interface board 2.
- the operation of the gadget configured by the plurality of modules 4 is realized (S3).
- the operation of the external computer 3 according to the first embodiment will be described with reference to FIG.
- the external computer 3 interprets the source program 311 sequentially and executes an executable program by executing the interpreter 310, the external computer 3 repeatedly executes the processing of the following steps S11 to S14.
- the execution order determination unit 32 determines the order between the instruction generated by the code of the i-th line to be interpreted and the instruction generated by the code before the i-1 line (including the i-1 line). It is determined whether or not there is a restriction (S11) (i is an arbitrary positive integer).
- the execution order determination unit 32 analyzes, for example, the source code 311, and the instruction generated in the code before the i-1th line is a sensor value acquisition instruction, and the instruction generated in the i-th line is the sensor In the case of a motor drive instruction based on the sensor value acquired by the value acquisition instruction, it is determined that the order of the both is restricted.
- any method among the following methods (1) to (4) may be adopted.
- This execution method determination unit 32 sequentially investigates from the i-1 line to the line where the dummy instruction was generated immediately before.
- the execution order determination unit 32 examines lines from the (i-1) -th line to lines that trace back the predetermined line number.
- the dummy instruction generation function 30 Generate (S12).
- a dummy instruction is inserted between the code corresponding to the i-th line and the code corresponding to the line determined to be restricted in order before the i-1st line. The code to be sent is inserted.
- the dummy instruction generation function 30 determines that the order of the instruction on the i-th row and the instruction on or before the i-th row is not restricted by the execution order determination unit 32 (S11: No) No instruction is generated.
- the instruction generating unit 31 When the process of transmitting an instruction to the module 4 is described in the i-th line of the source program 311, the instruction generating unit 31 generates an instruction from the description in the i-th line of the source program 311 (S13).
- the instruction generation unit 31 adds, to the generated instruction, target bus information indicating a bus to which the instruction is to be transmitted (S14).
- the bus to which the instruction is to be transmitted is determined based on the corresponding data indicating the module 4 and the bus to which the module 4 is connected.
- the corresponding data is stored in advance in the hard disk 302, for example.
- the code for generating the instruction indicates the module 4 to which the instruction is to be sent. Therefore, based on the corresponding data, the instruction generation unit 31 generates, from the module 4 to which the instruction is transmitted, target bus information indicating a bus to which the instruction is to be transmitted, and adds the object bus information to the instruction.
- the transmission control function 20 instruction distribution unit 201 of the interface board 2 receives an instruction from the external computer 3, the transmission instruction function 22 for the bus corresponding to the bus indicated by the target bus information added to the instruction Assign the instruction.
- the transmission control function 20 instruction distribution unit 201) can correctly distribute the instruction to the bus instruction buffer 22 corresponding to the transmission destination.
- the dummy instruction generation function 30 when it is determined that there is a restriction on the order between the instruction on the i-th row and the instructions on or before the i-1th row, the dummy instruction generation function 30 generates a dummy instruction in step S12. After transmission, the instruction generation unit 31 generates and transmits an instruction in step S13. On the other hand, when it is determined that there is no restriction on the order between the instruction on the i-th row and the instructions on or before the i-1th row, no dummy instruction is transmitted, and only the instruction generation unit 31 performs the instruction in step S13. Generate and send
- the sensor value acquisition instruction and the sensor value acquisition instruction and the motor drive instruction having a restricted order are transmitted to different buses, the sensor value acquisition instruction and the motor drive instruction A dummy instruction can be inserted between and sent. Therefore, the control using the dummy instruction in the interface board 2 can prevent the motor drive instruction from overtaking and executing the sensor value acquisition instruction as described with reference to FIG. 4. Therefore, for example, a malfunction such as driving the motor based on the sensor value one cycle before can be avoided.
- the dummy instruction detection function 21 determines whether the instruction received from the external computer 3 is a dummy instruction (S21). When it is determined that the instruction received from the external computer 3 is not a dummy instruction (S21: No), the transmission control function 20 causes the instruction allocation unit 201 to transmit the instruction to the bus indicated by the target bus information included in the instruction. It distributes (S22). On the other hand, when it is determined that the command received from the external computer 3 is a dummy command (S21: Yes), the transmission control function 20 causes the command distribution unit 202 to distribute the command to all the buses 91 to 93 ( S23).
- the dummy instruction detection units 231a to 231c of the timing adjustment function 23 determine whether the instruction output from the corresponding bus instruction buffer 22a to 22c is a dummy instruction (S31). When the dummy instruction detection units 231a to 231c determine that the instruction output from the bus instruction buffers 22a to 22c is not a dummy instruction (S31: No), the output of the instruction from the bus instruction buffers 22a to 22c to the bus Is allowed (S32).
- the dummy instruction detection units 231a to 231c determine that the instruction output from the bus instruction buffers 22a to 22c corresponding to the dummy instruction detection unit 231 is a dummy instruction (S31: Yes)
- the output of the instruction from the instruction buffers 22a to 22c to the bus is stopped (S33).
- the timing adjustment function 23 determines whether dummy instructions are output from all the bus instruction buffers 22a to 22c (S34). That is, the dummy instruction detection unit 231 determines whether the clear signal is input.
- the timing adjustment function 23 determines that the dummy instruction is output from all the bus instruction buffers 22a to 22c (S34: Yes), the dummy instruction of the bus instruction buffers 22a to 22c is discarded (S35). ).
- the discarding of the dummy instruction is performed by discarding the instruction output by each of the bus instruction buffers 22a to 22c at the timing at which the output of the stop instruction from each of the dummy instruction detecting units 231a to 231c is canceled. Do.
- the instructions output from the bus instruction buffers 22a to 22c are not dummy instructions (S31: No), and the instructions are output from the bus instruction buffers 22a to 22c (S32).
- the timing adjustment function 23 determines that dummy instructions are not output from all the bus instruction buffers 22a to 22c (S34: No)
- discarding of dummy instructions for those bus instruction buffers 22a to 22c is Not implemented
- the interface board 2 has a transmission control function 20, a dummy instruction detection function 21, a bus instruction buffer 22a to 22c, and a transmission function 200 having a timing adjustment function 23. , Reception function 220.
- the reception function 220 has a reception control function 221 and instruction buffers for reception bus 222a to 222c.
- Each of reception bus instruction buffers 222a to 222c can store a plurality of instructions.
- Each of reception bus instruction buffers 222a to 222c stores an instruction received from module 4 via each of buses 91 to 93.
- Each of the receive bus instruction buffers 222a to 222c stores instructions in a first-in first-out (FIFO) manner. Therefore, each of the reception bus instruction buffers 222a to 222c sequentially outputs instructions to the reception control function 221 in the order of storage.
- FIFO first-in first-out
- the reception control function 221 sequentially transmits the instructions input from the reception bus instruction buffers 222a to 222c to the external computer 3 one by one in the order of arrival via the communication path 90. That is, when the communication path 90 and the buses 91 to 93 are occupied by an instruction transmitted from the module 4 to the external computer 3 similarly to the instruction for occupying the communication path 90 and the buses 91 to 93 shown in FIG. There is also a possibility.
- the command sent from the module 4 to the external computer 3 is not limited to the command itself that the module 4 instructs the external computer 3 to perform processing, and the information to which the module 4 responds in response to the command from the external computer 3 Also included.
- This information is, for example, a sensor value that the module 4 transmits to the external computer 3 in response to a sensor value acquisition command.
- the module control system 1 sequentially receives the bus instruction buffers 22a to 22c for outputting the instructions on a first-in first-out basis to the buses 91 to 93 (module 4 group), respectively. And a timing control function 23 for controlling the output of instructions from the bus instruction buffers 22a to 22c.
- the transmission control function 20 applies the input instruction to all of the bus instruction buffers 22a to 22c. Distribute. Then, the timing adjustment function 23 operates the bus (module 4 group) from the bus instruction buffer 22 for which the instruction to be output is a dummy instruction until the instruction to be output for all the bus instruction buffers 22a to 22c becomes a dummy instruction. Suppress the output of instructions to
- the instruction A to the instruction F shown in FIG. 4 are transmitted without implementing control by the dummy instruction according to the first embodiment, the instruction A to the instruction F are transmitted as shown in FIG. That is, the interface board 2 immediately distributes each of the instructions A to F received from the external computer 3 via the communication path 90 to each of the buses 91 to 93 for transmission.
- the instruction A is transmitted to the bus 91
- the instruction D is transmitted to the bus 92
- the instruction E is transmitted to the bus 93.
- the instruction B is transmitted to the bus 91
- the instruction F is transmitted to the bus 93.
- the instruction C is transmitted to the bus 91.
- the instruction D to be executed after the instruction C is sent to the module 4 prior to the instruction C and executed.
- the order of the instructions can be ensured as shown in FIG.
- the module control system 1 is not limited to a mode in which the external computer 3 and the interface board 2 are directly connected as shown in FIGS. 1 and 2, and as shown in FIG. 11, the external computer 3 and the interface board 2 are processed You may make it connect via 5.
- the external computer 3 is connected to the processing device 5 via the communication path 90.
- the processing device 5 is connected to the interface board 2 via the communication path 95.
- the processing device 5 is, for example, a microcomputer board.
- the processing device 5 has an instruction memory 50.
- the instruction memory 50 temporarily stores the instruction received from the external computer 3.
- the instruction memory 50 is a volatile storage device such as a DRAM and an SRAM. Then, the processing device 5 may temporarily store the instruction received from the external computer 3 in the instruction memory 50 and then sequentially transmit the instruction to the interface board 2.
- the instruction memory 50 also stores instructions in a first-in first-out (FIFO) manner.
- the method of using the processing device 5 is not limited to only relaying the instruction transmitted from the external computer 3 as described above, and as shown in FIG. 12, the external computer 3 collectively interprets the source program 311 by the compiler.
- the instructions may be transmitted to the interface board 2 by executing the executable program generated in the above in the processing device 5.
- the external computer 3 has a program generation unit 320.
- the CPU 300 of the external computer 3 functions as the program generation unit 320 by taking charge of the function of the above-mentioned compiler.
- the program generation unit 320 further includes an execution order determination unit 32. When the execution order determination unit 32 detects an instruction that should maintain the execution order, the program generation unit 320 generates and transmits a dummy instruction between the codes that generate and transmit the instruction that should maintain the execution order. Add code to create an executable program.
- the external computer 3 transmits the generated executable program to the processing device 5.
- the processing device 5 includes a program execution unit 321.
- the CPU (not shown) of the processing device 5 functions as the program execution unit 321 by executing the executable program received from the external computer 3.
- the program execution unit 321 further includes a dummy instruction generation function 30 and an instruction generation unit 31.
- the execution of the executable program by the CPU of the processing device 5 generates instructions sequentially and transmits them to the interface board 2. Also, at this time, a dummy instruction is generated and inserted between the instructions whose execution order is to be maintained. That is, the CPU of the processing device 5 functions as the instruction generation function 30 and the instruction generation unit 31 by executing the executable program.
- the processing device 5 may be stored in the storage device of the processing device 5 and executed at an arbitrary timing without immediately executing the executable program upon reception. According to this, it is possible to control by connecting only the processing device 5 and the interface board 2 to the plurality of modules 4 without connecting the external computer 3. Therefore, the restriction of the operation range of the gadget configured by the plurality of modules 4 can be eliminated. For example, in the state where the external computer 3 and the interface board 2 are connected by a cable, the length of the cable limits the operation range of the gadget.
- the processing device 5 for example, microcomputer board
- the interface board 2 are smaller than the external computer 3 (for example, PC) Therefore, the processing apparatus 5 and the interface board 2 can be operated with no restriction on the operation range while being mounted on the gadget.
- the interface board 2 according to the second embodiment further includes an overflow detection unit 24 as compared to the interface board 2 according to the first embodiment.
- the overflow detection unit 24 detects an overflow of each of the bus instruction buffers 22a to 22c. When the overflow is detected in at least one of the bus instruction buffers 22a to 22c, the overflow detection unit 24 transmits, to the external computer 3, a notification signal for notifying the detection of the overflow.
- the dummy instruction generation function 30 and the instruction generation unit 31 of the external computer 3 stop the generation / transmission of the instruction in response to the notification signal from the interface board 2.
- the external computer 3 may restart the transmission of the command after restoring the interface board 2 by resetting the interface board 2 or the like.
- the overflow detection unit 24 detects that the bus instruction buffer 22 has overflowed, and notifies the external computer 3 as an input source of the instruction. According to this, the external computer 3 can suppress the continuation of the operation in the state where the bus instruction buffers 22a to 22c of the interface board 2 overflow in response to the notification. Therefore, it is possible to prevent the operation from being continued when an abnormality occurs.
- the interface board 2 includes the overflow detection unit 24 that detects overflow of the bus instruction buffers 22a to 22c, but the present invention is not limited to this.
- the interface board 2 may have a buffer full detection unit for detecting buffer fullness of the bus instruction buffers 22a to 22c (when the bus instruction buffer 22 is full).
- the buffer full detection unit when the buffer full detection unit detects that at least one of the bus instruction buffers 22a to 22c becomes buffer full, a notification signal notifying the detection of buffer full is sent to the external computer 3 Send.
- the dummy instruction generation function 30 and the instruction generation unit 31 of the external computer 3 stop the generation / transmission of the instruction in response to the notification signal from the interface board 2.
- the buffer full detection unit may cancel the transmission of the communication signal to the external computer 3 when the buffer full of the bus instruction buffers 22a to 22c is eliminated. In this case, the dummy instruction generation function 30 and the instruction generation unit 31 of the external computer 3 may resume the generation / transmission of the instruction in response to the cancellation of the transmission of the notification signal from the interface board 2.
- the overflow of the bus instruction buffers 22a to 22c of the interface board 2 can be prevented. Therefore, control can be prevented from being continued when an abnormality occurs.
- module control system 1 connects the external computer 3 and the interface board 2 via the processing device 5 as in the example shown in FIG. 11. You may do so.
- the overflow detection unit 24 transmits a notification signal to the processing device 5.
- the processing device 5 stops transmission of the instruction stored in the instruction memory 50.
- a buffer full detection unit may be provided instead of the overflow detection unit 24, a buffer full detection unit may be provided.
- the external computer 3 executes an executable program generated by the compiler interpreting the source program 311 at one time by the processing device 5 to execute an instruction to the interface board 2. You may make it transmit. In this case, the CPU of the processing device 5 stops the transmission of the instruction in response to the notification signal by including the process of stopping the transmission of the instruction in response to the notification signal from the interface board 2 in the executable program. You may In addition, abnormal processing is included in the executable program, and when the CPU of the processing device 5 receives a notification signal when this executable program is executed, the interface board 2 is reset as abnormal processing, etc. After the board 2 is restored, the transmission of the instruction may be resumed.
- the configurations of the interface board and the external computer according to the third embodiment will be described with reference to FIG.
- the interface board 2 according to the third embodiment is different from the interface board 2 according to the first embodiment in that a timer 25 is further provided.
- the timer 25 is a circuit that outputs, to the AND circuit 232, a notification signal that periodically notifies that a predetermined period of time has elapsed. Therefore, the AND circuit 232 according to the third embodiment receives the stop signal from all of the dummy instruction detection units 231a to 231c, and receives the notification signal from the timer 25. A clear signal is output to all of 231a to 231c. On the other hand, when at least one of the stop signal from each of the dummy instruction detection units 231a to 231c and the stop signal from the timer 25 is not input, the clear signal is output to the dummy instruction detection units 231a to 231c. do not do.
- the timer 25 outputs, to the AND circuit 232, a pulse signal that becomes high level for a predetermined period of time each time a predetermined period of time elapses. Therefore, this pulse signal (high level signal) corresponds to a notification signal.
- the AND circuit 232 outputs a high level signal to all of the dummy instruction detection units 231a to 231c when a high level signal is input from all of the dummy instruction detection units 231a to 231c and the timer 25.
- AND circuit 232 outputs a low level signal to all of dummy instruction detection units 231a to 231c. Output.
- the operation of the bus instruction buffers 22a to 22c and the dummy instruction detection units 231a to 231c depending on whether the input signal is high level or low level is as described in the first embodiment.
- FIG. 16 illustrates an example in which the instruction generation unit 31 of the external computer 3 generates instructions in the order of instructions A to F, as in the example shown in FIG. 4 in the first embodiment.
- the cycle in which the timer 25 outputs the notification signal is every five unit time, and is assumed to be "time 5" and "time 10".
- the states of the buses 91 to 93 in “time 1” to “time 3” are the same as those in FIG.
- the timer 25 sends a timer notification of a fixed cycle to the timing adjustment function 23. Therefore, since the instruction transmitted from all the bus instruction buffers 22a to 22c is the dummy instruction A and the timer notification is performed from the timer 25, the timing adjustment function 23 resumes the operation of the bus instruction buffers 22a to 22c. Let At this time, the bus instruction buffers 22a to 22c discard the dummy instruction A.
- the dummy instruction B stored in the bus instruction buffer 22 a is transmitted to the bus 91.
- the bus instruction buffer 22 b transmits the instruction D to the bus 92.
- the bus instruction buffer 22 c also transmits the instruction E to the bus 93.
- the dummy instruction B stored in the bus instruction buffer 22 b is transmitted to the bus 92.
- the dummy instruction B stored in the bus instruction buffer 22 c is transmitted to the bus 93.
- timer notification from the timer 25 to the timing adjustment function 23 is not performed.
- the timing adjustment function 23 stops the operation of the bus instruction buffers 22a to 22c transmitting the dummy instruction B.
- the timer 25 notifies the timing adjustment function 23 of the elapse of a fixed period of time. Therefore, since the instruction transmitted from all of the bus instruction buffers 22a to 22c is the dummy instruction B and the timer notification is performed from the timer 25, the timing adjustment function 23 resumes the operation of the bus instruction buffers 22a to 22c. Let At this time, the bus instruction buffers 22a to 22c discard the dummy instruction B. Thus, the bus instruction buffer 22c transmits the instruction F to the bus 93. The module 4 connected to the bus 93 receives and executes the instruction F transmitted from the bus instruction buffer 22c.
- the module control system 1 by setting the cycle of the timer 25 as a control cycle, it is possible to control the module 4 for each control cycle. Further, according to the module control system 1 according to the third embodiment, it is possible to divide an instruction to be executed for each control cycle. For example, instructions from dummy instruction A to dummy instruction B can be executed in a period from time 5 to time 9, and instructions after dummy instruction B can be executed in a period from time 10 to time.
- the instructions D and E are sensor value acquisition instructions and the instruction F is a motor drive instruction
- the sensor value acquisition instruction is executed in the period from time 5 to time 9, and the motor in time 10 to the period
- An instruction can be divided and executed every control cycle, such as executing a driving instruction.
- step S36 is added.
- the timing adjustment function 23 determines whether dummy instructions are output from all the bus instruction buffers 22a to 22c and the output of the timer 25 is 1 (high level) (S34, 36). .
- the timing adjustment function 23 determines that the dummy instruction is output from all the bus instruction buffers 22a to 22c and the output of the timer 25 is 1 (high level) (S34: Yes, S36: Yes) And the dummy instructions of the bus instruction buffers 22a to 22c are discarded (S35).
- S32 the output of instructions from the bus instruction buffers 22a to 22c to the buses 91 to 93 is resumed
- the timing adjustment function 23 keeps the instruction output in all the bus instruction buffers 22a to 22c as a dummy instruction and the timer 25 outputs a notification signal.
- the output of the instruction from the bus instruction buffer 22 in which the instruction to be output is a dummy instruction is suppressed. According to this, it is possible to execute the instruction following the dummy instruction at each cycle of the timer 25.
- control of the module 4 can be performed in a predetermined control cycle.
- instructions between dummy instructions are divided and executed every cycle of the timer 25. That is, instructions can be divided and executed for each control cycle.
- the external computer 3 and the interface board 2 may be connected via the processing device 5 as in the example shown in FIG. Further, also in the third embodiment, as in the example shown in FIG. 12, the instructions are executed by the processing device 5 executing an executable program generated by the external computer 3 collectively interpreting the source program 311 by the compiler. May be sent to the interface board 2.
- the configurations of the interface board 2 and the external computer 3 according to the fourth embodiment will be described with reference to FIG.
- the external computer 3 according to the fourth embodiment further includes a dummy instruction detection unit 33 in comparison with the external computer 3 according to the third embodiment.
- the dummy instruction detection unit 33 detects a dummy instruction N ahead of the dummy instruction detected by the timing adjustment function 23 (N is a predetermined positive integer). That is, the dummy instruction detection unit 33 detects the Nth dummy instruction (not including the first dummy instruction) from the transmission of the first dummy instruction transmitted to the interface board 2. In other words, the dummy instruction detection unit 33 detects the dummy instruction transmitted to the N + 1th from the transmission start of the instruction.
- the dummy instruction detection unit 33 stops the operation of the dummy instruction generation function 30, the instruction generation unit 31, and the execution order determination unit 32 when detecting a dummy instruction N ahead. In other words, the dummy instruction generation function 30 and the instruction generation unit 31 stop the generation / transmission of the instruction.
- the AND circuit 232 according to the fourth embodiment further includes the dummy instruction detection unit 33 of the external computer 3 in comparison with the AND circuit 232 according to the third embodiment. Also sends a clear signal.
- the dummy instruction detection unit 33 In response to the reception of the clear signal from the AND circuit 232, the dummy instruction detection unit 33 resumes the operations of the dummy instruction generation function 30, the instruction generation unit 31, and the execution order determination unit 32. In other words, the dummy instruction generation function 30 and the instruction generation unit 31 resume the generation / transmission of the instruction.
- the external computer 3 when waiting for the output of the x-th dummy instruction in the timing adjustment function 23, the external computer 3 suppresses the transmission of the instructions after the x + N-th dummy instruction. Therefore, only the instruction transmitted between the xth dummy instruction and the x + Nth dummy instruction is stored in the bus instruction buffers 22a to 22c. Therefore, the number of instructions stored in bus instruction buffers 22a-22c can be suppressed, and overflow of bus instruction buffers 22a-22c can be prevented.
- the dummy instruction detection unit 33 resumes the operations of the dummy instruction generation function 30, the instruction generation unit 31, and the execution order determination unit 32, and is then transmitted to the interface board 2 next.
- a dummy instruction one dummy instruction
- the operations of the dummy instruction generation function 30, the instruction generation unit 31, and the execution order determination unit 32 may be stopped.
- the instruction transmissions and transmission restarts of the instruction are repeated for each dummy instruction one by one. It is possible to maintain the stored state of the instruction transmitted between the dummy instruction of and the x + Nth dummy instruction.
- the states of buses 91 to 93 are the same as the example shown in FIG. 16 in the third embodiment, but the state of communication path 90 is different.
- the external computer 3 stops the generation and transmission of the instruction. Therefore, on the communication path 90, transmission of the dummy instruction B is not completed. As described above, this state is continued until "time 5" when the dummy instruction A is transmitted to all the buses 91 to 93 and the timer 25 outputs a pulse signal.
- the transmission of the instruction to the buses 92 and 93 is stopped until the dummy instruction A is transmitted to the bus 91.
- the instruction buffer for buses 22b and 22c corresponding to the buses 92 and 93 is stopped. Only stores the instruction generated between the dummy instruction A and the dummy instruction B. Therefore, the overflow of the bus instruction buffers 22b and 22c can be prevented.
- the dummy instruction detection unit 33 interrupts the input of an instruction to the interface board 2 in response to the input of the predetermined number of dummy instructions to the interface board 2.
- the timing adjustment function 23 outputs a clear signal to the external computer 3 when the instruction output in all the bus instruction buffers 22a to 22c is a dummy instruction and the notification signal is output from the timer 25. Then, in response to the output of the notification signal from the timing adjustment function 23, the dummy instruction detection unit 33 resumes the input of the interrupted instruction.
- the number of instructions stored in the bus instruction buffers 22a to 22c is limited to only the instructions between the first dummy instruction and the predetermined number of dummy instructions. Therefore, the number of instructions stored in bus instruction buffers 22a-22c can be suppressed, and overflow of bus instruction buffers 22a-22c can be prevented.
- the module control system 1 connects the external computer 3 and the interface board 2 via the processing device 5 as in the example shown in FIG. Good.
- the processing device 5 may have a dummy instruction detection unit 33 instead of the external computer 3.
- the processing device 5 stops transmission of the instruction stored in the instruction memory 50. Further, in response to the reception of the clear signal by the dummy instruction detection unit 33, the processing device 5 resumes transmission of the instruction stored in the instruction memory 50.
- the processing unit 5 executes an executable program generated by the external computer 3 collectively interpreting the source program 311 by the compiler, thereby interfacing the instruction. It may be transmitted to the board 2.
- the CPU of the processing device 5 transmits the dummy instruction N times ahead by including the processing for stopping the transmission of the instruction when the executable program detects the transmission of the dummy ahead N times. Stop sending instructions accordingly.
- the CPU of the processing device 5 resumes the transmission of the instruction in response to the clear signal.
- the embodiment can be implemented in a form in which the interface board 2 does not have the timer 25 (a form in which the dummy instruction detection unit 33 is further included in the first embodiment).
- the interface board 2 according to the fifth embodiment is different from the interface board 2 according to the fourth embodiment in that the order command detection unit 211 is replaced with the dummy command detection function 21; The difference is that the periodic instruction detection unit 212 and the OR circuit 213 are included.
- the order instruction detection unit 211 outputs a broadcast instruction signal to the OR circuit 213 when the instruction input to the transmission control function 20 is an order instruction.
- the periodic instruction detection unit 212 outputs a broadcast instruction signal to the OR circuit 213.
- the OR circuit 213 outputs the signal generated by the logical sum operation of the signals input from each of the order command detection unit 211 and the periodic command detection unit 212 to the broadcast terminal of the transmission control function 20. In other words, the OR circuit 213 outputs the broadcast instruction signal to the transmission control function 20 when the broadcast instruction signal is input from at least one of the order instruction detection unit 211 and the periodic instruction detection unit 212. On the other hand, the OR circuit 213 does not output the broadcast instruction signal when the broadcast instruction signal is not input from any of the order instruction detection unit 211 and the periodic instruction detection unit 212.
- the order instruction detection unit 211 and the periodic instruction detection unit 212 are realized, for example, as circuits to be described next.
- Each of the order command detection unit 211 and the cycle command detection unit 212 outputs, to the transmission control function 20, a signal that can be switched to either the high level or the low level.
- the order command detection unit 211 When the order command is input to the transmission control function 20, the order command detection unit 211 outputs a high level signal.
- the order instruction detection unit 211 outputs a low level signal.
- the periodic instruction detection unit 212 outputs a high level signal.
- the periodic instruction detection unit 212 outputs a low level signal. That is, the high level signal corresponds to the broadcast instruction signal.
- the OR circuit 213 outputs a high level signal to the transmission control function 20 when a high level signal is input from at least one of the order instruction detection unit 211 and the periodic instruction detection unit 212.
- the OR circuit 213 outputs a low level signal to the transmission control function 20 when a low level signal is input from both the order command detection unit 211 and the periodic command detection unit 212.
- an order instruction and a periodic instruction exist as dummy instructions.
- the order instruction (1) functions as a dummy instruction in the case of simply keeping the order of the instruction.
- the periodic instruction (2) functions as a dummy instruction in the case where it is desired to divide the instruction every control period.
- the interface board 2 according to the fifth embodiment is different from the interface board 2 according to the fourth embodiment in determining dummy instructions instead of the dummy instruction detecting portions 231a to 231c.
- the difference is that parts 233a to 233c are included.
- And 237 are different.
- Each of the dummy instruction determination units 233 a to 233 c includes an order instruction detection unit 2331, a periodic instruction detection unit 2332, and an OR circuit 2333.
- Each of the dummy instruction determination units 233a to 233c monitors an instruction output from each of the bus instruction buffers 22a to 22c, and detects an output of a dummy instruction (order instruction and periodic instruction).
- the dummy instruction determination unit 233a monitors the bus instruction buffer 22a
- the dummy instruction determination unit 233b monitors the bus instruction buffer 22b
- the dummy instruction determination unit 233c monitors the bus instruction buffer 22c.
- the dummy instruction determination unit 233a outputs a stop signal to the bus instruction buffer 22a when the sequential instruction or the periodic instruction is output from the bus instruction buffer 22a.
- the dummy instruction determination unit 233b outputs a stop signal to the bus instruction buffer 22b.
- the dummy instruction determination unit 233c outputs a stop signal to the bus instruction buffer 22c.
- each of the dummy instruction determination units 233a to 233c outputs a stop signal to the AND circuit 234 when the sequential instruction is output from each of the bus instruction buffers 22a to 22c.
- Each of dummy instruction determination units 233a to 233c outputs a stop signal to OR circuit 236 when the cycle instruction is output from each of bus instruction buffers 22a to 22c.
- order instruction detection unit 2331 when an order instruction is output from corresponding bus instruction buffer 22, order instruction detection unit 2331 outputs a stop signal to OR circuit 2333. Further, when the periodic instruction is output from the corresponding bus instruction buffer 22, the periodic instruction detection unit 2332 outputs a stop signal to the OR circuit 2333 and the OR circuit 236.
- OR circuit 2333 outputs a signal generated by OR operation of the signals input from each of order instruction detection unit 2331 and periodic instruction detection unit 2332 to corresponding bus instruction buffer 22 and AND circuit 234. .
- the OR circuit 2333 outputs the stop signal to the OR circuit 2333 and the OR circuit 236 when the stop signal is input from at least one of the order command detection unit 2331 and the cycle instruction detection unit 2332.
- the OR circuit 2333 does not output the stop signal when the stop signal is not input from both the order command detection unit 2331 and the periodic command detection unit 2332.
- the order instruction detection unit 2331, the cycle instruction detection unit 2332, and the OR circuit 2333 are realized, for example, as a circuit described below.
- Each of the order command detection unit 2331 and the cycle command detection unit 2332 outputs, to the transmission control function 20, a signal that can be switched to either high level or low level.
- the sequential instruction detection unit 2331 When the sequential instruction is output from the corresponding bus instruction buffer 22, the sequential instruction detection unit 2331 outputs a high level signal. On the other hand, when the sequential instruction is not output from the corresponding bus instruction buffer 22, the sequential instruction detection unit 2331 outputs a low level signal.
- the periodic instruction detection unit 2332 outputs a high level signal.
- the periodic instruction detection unit 212 outputs a low level signal. That is, the high level signal corresponds to the stop signal.
- OR circuit 2333 when a high level signal is input from at least one of sequential instruction detection unit 2331 and periodic instruction detection unit 2332, OR circuit 2333 outputs a high level to the corresponding bus instruction buffer and AND circuit 234. Output a signal.
- OR circuit 2333 when a low level signal is input from both of order command detection unit 2331 and periodic command detection unit 2332, OR circuit 2333 sends a low level signal to the corresponding bus command buffer and AND circuit 234. Output.
- the AND circuit 234 outputs, to the AND circuit 235 and the selection circuit 237, a signal generated by an AND operation of the signals input from each of the dummy instruction determination units 233a to 233c.
- the AND circuit 234 outputs a stop signal to the AND circuit 235 when the stop signal is input from all of the dummy instruction determination units 233a to 233c. This stop signal functions as a clear signal.
- the AND circuit 232 does not output the clear signal to the AND circuit 235 and the selection circuit 237 when the stop signal is not input from at least one of the dummy instruction determination units 233a to 233c.
- the AND circuit 235 outputs, to the selection circuit 237, a signal generated by an AND operation of the signals input from each of the AND circuit 234 and the timer 25.
- the AND circuit 235 outputs a clear signal to the selection circuit 237.
- the AND circuit 235 does not output the clear signal to the selection circuit 237.
- the OR circuit 236 outputs, to the signal selection terminal of the selection circuit 237, a signal generated by an AND operation of the signals input from each of the dummy instruction determination units 233a to 233c.
- the OR circuit 236 outputs a selection signal for selecting the clear signal of the AND circuit 235 to the selection circuit 237 when the stop signal is input from at least one of the dummy instruction determination units 233a to 233c.
- the OR circuit 236 outputs a selection signal for selecting the clear signal of the AND circuit 234 to the selection circuit 237 when the stop signal is not input from any of the dummy instruction determination units 233a to 233c.
- the selection circuit 237 selects the clear signal input from the AND circuit 234 and outputs it to the dummy instruction determination units 233a to 233c.
- the selection circuit 237 selects the clear signal inputted from the AND circuit 235 and sends it to the dummy instruction determination unit 233a to 233c. Output.
- the AND circuits 234 and 235, the OR circuit 236, and the selection circuit 237 operate as described below.
- the AND circuit 234 outputs a high level signal to the AND circuit 235 and the selection circuit 237 when a high level signal is input from all of the dummy instruction determination units 233a to 233c.
- the AND circuit 234 outputs a low level signal to the AND circuit 235 and the selection circuit 237 when a low level signal is input from at least one of the dummy instruction determination units 233a to 233c.
- the AND circuit 235 outputs a high level signal to the AND circuit 235 and the selection circuit 237 when a high level signal is input from all of the AND circuit 234 and the timer 25.
- the AND circuit 234 outputs a low level signal to the AND circuit 235 and the selection circuit 237.
- the OR circuit 236 outputs a high level signal to the selection circuit 237 when a high level signal is input from at least one of the dummy instruction determination units 233a to 233c.
- the OR circuit 236 outputs a low level signal to the selection circuit 237 when a low level signal is input from all of the dummy instruction determination units 233a to 233c.
- the selection circuit 237 When a high level signal is input from the OR circuit 236, the selection circuit 237 outputs the signal input from the AND circuit 235 to each of the dummy instruction determination units 233a to 233c. On the other hand, when the low level signal is input from the OR circuit 236, the selection circuit 237 outputs the signal input from the AND circuit 234 to each of the dummy instruction determination units 233a to 233c.
- the high level signal output from the OR circuit 236 corresponds to a selection signal for selecting the clear signal of the AND circuit 235.
- the low level signal output from the OR circuit 236 corresponds to a selection signal for selecting the clear signal of the AND circuit 234.
- the high level signals output from the AND circuits 234 and 235 and the selection circuit 237 correspond to the clear signal.
- the output of the instruction from the bus instruction buffer 22 can be stopped. Thereafter, when the outputs from all the bus instruction buffers 22a to 22c become the sequential instruction or the periodic instruction, the output of the instruction from the stopped bus instruction buffer 22 can be resumed.
- the dummy instruction is a periodic instruction
- the output of the instruction from the bus instruction buffer 22 can be resumed only when the timer 25 notifies of the elapse of the constant period.
- the dummy instruction is an order instruction
- the output of the instruction from the bus instruction buffer 22 can be resumed without being limited to whether or not the elapse of a fixed cycle is notified from the timer 25.
- the execution order of instructions can be guaranteed by simply inserting the order instruction between the instructions whose order of instruction is to be maintained by the external computer 3. Then, in addition to guaranteeing the execution order of the instructions, the external computer 3 divides the predetermined control cycle of these instructions by inserting a periodical instruction between the instructions to be executed by dividing by predetermined control cycles. Is also possible.
- the external computer 3 according to the fifth embodiment is different from the external computer 3 according to the fourth embodiment in that the periodic instruction detection unit 34 is substituted for the dummy instruction detection unit 33. It differs in that it has
- the cycle instruction detection unit 34 detects a cycle instruction N times ahead of the cycle instruction detected by the timing adjustment function 23 (N is a predetermined positive integer). That is, although the periodic instruction detection unit 34 operates in the same manner as the dummy instruction detection unit 33 according to the fourth embodiment, a dummy instruction detects only the periodic instruction out of the order instruction and the periodic instruction. It is different from part 33.
- the AND circuit 235 also outputs a signal to the cycle instruction detection unit 34 of the external computer 3. Therefore, the dummy instruction detection unit 33 according to the fourth embodiment resumes the operations of the dummy instruction generation function 30, the instruction generation unit 31, and the execution order determination unit 32 in response to the clear signal from the AND circuit 232.
- the periodic instruction detection unit 34 resumes the operation of the dummy instruction generation function 30, the instruction generation unit 31, and the execution order determination unit 32 in response to the clear signal from the AND circuit 235.
- the number of instructions stored in the bus instruction buffers 22a to 22c can be suppressed, and overflow of the bus instruction buffers 22a to 22c can be prevented.
- the execution order of instructions according to the fifth embodiment will be described with reference to FIG.
- FIG. 22 an example in which the instruction generation unit 31 of the external computer 3 generates instructions in order of instructions A to G will be described.
- the instruction E and the instruction F are instructions which should follow the execution order.
- the instruction C, the instruction D, and the instruction G are instructions that are desired to be divided and executed at predetermined intervals.
- the number of N is 1 as in the example shown in FIG. 19 in the fourth embodiment.
- the cycle in which the timer 25 outputs the notification signal is every five unit time, and is “time 5” and “time 10”.
- the dummy instruction generation function 30 inserts a periodic instruction between instruction C and instruction D, inserts an ordered instruction between instruction E and instruction F, and inserts a periodic instruction between instruction D and instruction G.
- the external computer 3 executes the instruction A, the instruction B, the instruction C, the periodic instruction A, the instruction D, the instruction E, the order instruction, the instruction F, the periodic instruction B
- the instruction is sequentially transmitted to the interface board 2 via the communication path 90 one by one in order of.
- the states in “time 1” to “time 4” are the same as the example shown in FIG. 19 except that the dummy instruction becomes a periodic instruction, and therefore the description will be omitted.
- the timer 25 sends a timer notification of a fixed cycle to the timing adjustment function 23. Therefore, since the instruction transmitted from all of the bus instruction buffers 22a to 22c becomes a periodic instruction and the timer notification is performed from the timer 25, the timing adjustment function 23 resumes the operation of the bus instruction buffers 22a to 22c. .
- the order instruction stored in the bus instruction buffer 22 a is transmitted to the bus 91.
- the instruction D stored in the bus instruction buffer 22 b is transmitted to the bus 92.
- the bus instruction buffer 22 c also transmits the instruction E to the bus 93.
- the periodic instruction stored in the bus instruction buffer 22 c is transmitted to the bus 93. Although the instruction transmitted from all of the bus instruction buffers 22a to 22c is a periodic instruction, timer notification from the timer 25 to the timing adjustment function 23 is not performed.
- the dummy instruction determination units 233a to 233c of the timing adjustment function 23 stop the operation of the bus instruction buffers 22a to 22c transmitting the periodic instruction.
- the timer 25 notifies the timing adjustment function 23 of the timer. Therefore, since the instruction transmitted from all of the bus instruction buffers 22a to 22c becomes a periodic instruction and the timer notification is performed from the timer 25, the timing adjustment function 23 resumes the operation of the bus instruction buffers 22a to 22c. . Thus, the bus instruction buffer 22b transmits the instruction G to the bus 92.
- the module control system 1 according to the fifth embodiment described above, as exemplified here, (1) if you simply want to keep the order of the instructions, and (2) if you want to divide the instructions for each control cycle It is possible to mix and implement.
- the instruction D is a sensor value acquisition instruction and the instruction G is a motor drive instruction
- the instruction to be executed in each control cycle can be divided into a sensor value acquisition instruction and a motor drive instruction.
- the instruction E and the instruction F it is also possible to execute in consideration of only the order.
- the operation of the timing adjustment function 23 of the interface board 2 according to the fifth embodiment is a step after step S33 instead of steps S34 to S35.
- the difference is that S36 to S40 are executed.
- the timing adjustment function 23 determines whether or not the order instruction is output from all the bus instruction buffers 22a to 22c (S37). If the timing adjustment function 23 determines that the sequential instruction is output from all the bus instruction buffers 22a to 22c (S37: Yes), it discards the sequential instruction of the bus instruction buffers 22a to 22c (S41). As a result, the output of instructions from the bus instruction buffers 22a to 22c to the buses 91 to 93 is resumed (S32). On the other hand, when the timing adjustment function 23 determines that the sequential instruction is not output from all the bus instruction buffers 22a to 22c (S37: No), it does not discard the sequential instruction of the bus instruction buffers 22a to 22c.
- the timing adjustment function 23 determines whether a cycle instruction is output from all the bus instruction buffers 22a to 22c and whether the output of the timer 25 is 1 (high level) (S38, 39). .
- the timing adjustment function 23 determines that the cycle instruction is output from all the bus instruction buffers 22a to 22c and the output of the timer 25 is 1 (high level) (S38: Yes, S39: Yes).
- the periodic instructions of the bus instruction buffers 22a to 22c are discarded (S40).
- the output of instructions from the bus instruction buffers 22a to 22c to the buses 91 to 93 is resumed (S32).
- the periodic instruction of the bus instruction buffers 22a to 22c is not discarded.
- the timing adjustment function 23 when the dummy instruction is an order instruction, the timing adjustment function 23 not only outputs the notification signal from the timer 25 but all the bus instruction buffers 22a to 22c.
- the instruction output from the bus instruction buffer 22a which is an ordered instruction, is inhibited from outputting the instruction until the instruction to be output is an ordered instruction.
- the timing adjustment function 23 outputs the instruction until all the instructions output from the bus instruction buffers 22a to 22c become the periodic instruction and the notification signal is output from the timer. Prevents the output of the instruction from the bus instruction buffer 22a, which is a periodic instruction.
- the dummy instruction is an ordered instruction, as described in the first and second embodiments, (1) it is possible to simply carry out control in the case of wanting to keep the order of instructions, dummy instruction
- the cycle instruction is a cycle instruction, as described in the third and fourth embodiments, (2) control can be performed when it is desired to divide an instruction for each control cycle. Therefore, it is possible to mix (1) control for simply keeping the order of instructions and (2) control for separately dividing instructions for each control cycle.
- the module control system 1 may connect the external computer 3 and the interface board 2 via the processing device 5.
- the processing device 5 may have the periodic instruction detection unit 34 instead of the external computer 3.
- the processing device 5 stops the transmission of the instruction stored in the instruction memory 50 when the periodic instruction detection unit 34 detects a dummy instruction N ahead. Further, in response to the reception of the clear signal by the periodic instruction detection unit 34, the processing device 5 resumes transmission of the instruction stored in the instruction memory 50.
- the processing unit 5 executes an executable program generated by the external computer 3 collectively interpreting the source program 311 by the compiler, thereby interfacing the instruction. It may be transmitted to the board 2.
- the CPU of the processing device 5 transmits the N-th cycle instruction by including the process of stopping the transmission of the N-th cycle instruction in the executable program. In response, the transmission of the instruction is to be stopped. Also, by including the process of resuming the transmission of the instruction in response to the clear signal from the interface board 2 in the executable program, the CPU of the processing device 5 resumes the transmission of the instruction in response to the clear signal. Do.
- Embodiment 6 A sixth embodiment will now be described. Hereinafter, the same contents as those of the first to fifth embodiments will be omitted as appropriate.
- a sequential instruction and a periodic instruction are prepared as dummy instructions. Since the order instruction and the periodic instruction are normally distributed to all the bus instruction buffers 22a to 22c in the order transmitted from the external computer 3 via the transmission control function 20, the bus instruction buffers 22a to 22c Sequential commands and periodic commands do not coexist as dummy commands output at the same time. However, if a processing error occurs due to power supply noise or the like, there is a possibility that the sequential instruction and the periodic instruction are mixed as dummy instructions output from the bus instruction buffers 22a to 22c at the same time. In this case, in the fifth embodiment, there is a problem that the output stop of the instruction from the bus instruction buffers 22a to 22c is not canceled, and the state is a freeze state. Therefore, in the sixth embodiment, a method of avoiding the freeze state will be described.
- the interface board 2 according to the sixth embodiment is different from the interface board 2 according to the fifth embodiment in that it further includes an OR circuit 238 and an AND circuit 239.
- the order instruction detection unit 2331 of each of the dummy instruction determination units 233a to 233c further outputs a signal to the OR circuit 238. Further, the OR circuit 236 further outputs a signal to the AND circuit 239.
- dummy instruction determination unit 233 determines whether the instruction output from the corresponding bus instruction buffer 22 is an order instruction or a periodic instruction. Dummy instruction determination unit 233 outputs a stop signal to OR circuit 238 when the instruction is an order instruction, and outputs a stop signal to OR circuit 236 when the instruction is a periodic instruction. .
- the OR circuit 238 outputs, to the AND circuit 239, a signal generated by the logical sum operation of the signals input from the order instruction detection unit 2331 of each of the dummy instruction determination units 233a to 233c.
- the OR circuit 238 outputs a notification signal to the AND circuit 239 when the notification signal is input from at least one of the dummy instruction determination units 233a to 233c.
- the OR circuit 238 does not output the notification signal to the AND circuit 239 when the notification signal is not input from any of the dummy instruction determination units 233a to 233c.
- the AND circuit 239 transmits, to the external computer 3, a signal generated by an AND operation of the signals input from each of the OR circuit 236 and the OR circuit 238.
- the AND circuit 239 outputs a notification signal to the external computer 3 when a notification signal is input from all of the OR circuit 236 and the OR circuit 238.
- the AND circuit 239 does not output the notification signal to the external computer 3 when the notification signal is not input from at least one of the OR circuit 236 and the OR circuit 238. That is, the AND circuit 239 transmits a notification signal to the external computer 3 when there is a mismatch in the determination result as to whether the dummy instruction in each of the dummy instruction determination units 233a to 233c is the sequential instruction or the periodic instruction.
- the OR circuit 238 and the AND circuit 239 operate as described below.
- the OR circuit 238 outputs a high level signal to the AND circuit 239 when a high level signal is input from at least one of the dummy instruction determination units 233a to 233c.
- the OR circuit 238 outputs a low level signal to the AND circuit 239 when a low level signal is input from all of the dummy instruction determination units 233a to 233c.
- the AND circuit 235 outputs a high level signal to the external computer 3 when a high level signal is input from all of the OR circuit 236 and the OR circuit 238.
- the AND circuit 235 outputs a low level signal to the external computer 3 when a low level signal is input from at least one of the OR circuit 236 and the OR circuit 238. Therefore, the high level signal functions as a notification signal.
- the notification signal from the AND circuit 239 functions as a signal for notifying the external computer 3 of an abnormality.
- an abnormality is notified to the external computer 3 of the instruction.
- the external computer 3 can reset the interface board 2 in response to the notification signal from the AND circuit 239 of the interface board 2. Therefore, the freeze state of the interface board 2 can be eliminated in a configuration in which all of the dummy instruction determination units 233a to 233c align one of the sequential instruction and the periodic instruction.
- the external computer 3 and the interface board 2 may be connected via the processing device 5, and instead of the external computer 3, the processing device 5 has a period
- the instruction detecting unit 34 may be provided, or the processor 5 may execute an executable program generated by the external computer 3 collectively interpreting the source program 311 by the compiler.
- the seventh embodiment will be described next. Hereinafter, the same contents as in the first embodiment will be appropriately omitted.
- the configurations of the interface board 2 and the external computer 3 according to the module control system 1 according to the seventh embodiment will be described with reference to FIG.
- the interface board 2 according to the seventh embodiment further includes an error signal detection unit 26 and an instruction issuance information collection unit 27 in comparison with the interface board 2 according to the first embodiment.
- the error signal detection unit 26 monitors the buses 91 to 93. When the error occurrence is detected on the buses 91 to 93, the error signal detection unit 26 outputs a notification signal for notifying the occurrence of an error to the command issuance information collection unit 27. For example, when an error packet is defined in the communication standards of the buses 91 to 93, the error signal detection unit 26 determines that an error has occurred when the error packet is detected. If no error packet is defined in the communication standard of the buses 91 to 93, for example, when the module 4 detects an abnormality in communication, the user-defined error packet is transmitted to detect the error packet. It may be determined that an error has occurred when the
- the instruction issuance information collection unit 27 collects information on the instructions stored in each of the bus instruction buffers 22a to 22c. The collection of this information may be performed on all of the bus instruction buffers 22a to 22c, and is performed only on the bus instruction buffer 22 corresponding to the bus for which an error is detected by the error signal detection unit 26. You may do so. Then, the command issuance information collection unit 27 transmits, to the external computer 3, notification information for notifying the occurrence of an error.
- the notification information includes the collected information. This information is, for example, information indicating the type and number of instructions stored in each of the bus instruction buffers 22a to 22c.
- the error signal detection unit 26 detects an abnormality in the buses 91 to 93 between the bus instruction buffers 22a to 22c and the module 4 group. Then, when the error signal detection unit 26 detects an abnormality, the instruction issuance information collection unit 27 collects information related to the instructions stored in the bus instruction buffers 22a to 22c.
- the external computer 3 can grasp in what kind of command transmission status an error has occurred. Therefore, for example, the external computer 3 can reset the bus instruction buffers 22a to 22c of the interface board 2 and execute recovery processing such as re-sending an instruction from an instruction in which an error occurs.
- the module control system 1 may connect the external computer 3 and the interface board 2 via the processing device 5 as in FIG.
- the instruction issuance information collection unit 27 also transmits the notification information to the processing device 5 (not shown).
- the processing device 5 stops transmission of the instruction stored in the instruction memory 50.
- the external computer 3 may reset the bus instruction buffers 22a to 22c of the interface board 2 and the instruction memory 50 of the processing device 5, and execute recovery processing such as retransmitting an instruction from an instruction in which an error occurs.
- the external computer 3 executes an executable program generated by the compiler interpreting the source program 311 at one time by the processing device 5 to transmit an instruction to the interface board 2.
- the CPU of the processing device 5 stops the transmission of the instruction in response to the notification signal by including the process of stopping the transmission of the instruction in response to the notification signal from the interface board 2 in the executable program.
- the abnormal process is included in the executable program, and when the CPU of the processing device 5 receives the notification signal at the time of execution of the executable program, the bus instruction buffer 22 a to 22 c of the interface board 2 is processed as abnormal process. May be reset, and recovery such as re-sending an instruction from an instruction in which an error occurs may be performed.
- Embodiment 8 Subsequently, an eighth embodiment will be described. Hereinafter, the same contents as in the first embodiment will be appropriately omitted.
- the interface board 2 according to the eighth embodiment is different from the interface board 2 according to the first embodiment in that the interface board 2 further has a trigger instruction detection function 28 and an OR circuit 214.
- the transmission control function 20 according to the eighth embodiment is different from the transmission control function 20 according to the first embodiment in that a dummy instruction generation unit 203 is further included.
- trigger instruction detection function 28 outputs a broadcast instruction signal to dummy instruction generation unit 203 and OR circuit 214, and the input instruction is a trigger instruction. If not, the broadcast instruction signal is not output.
- the OR circuit 214 outputs, to the instruction distribution unit 201 and the instruction distribution unit 202, the signals generated by the logical sum operation of the signals input from the dummy instruction detection function 21 and the trigger instruction detection function 28, respectively. That is, in the eighth embodiment, compared with the first embodiment, the signal output from dummy instruction detection function 21 is input to OR circuit 214 instead of instruction distribution unit 201 and instruction distribution unit 202. .
- the OR circuit 214 outputs a broadcast signal to the instruction distribution unit 201 and the instruction distribution unit 202 when the broadcast signal is input from at least one of the dummy instruction detection function 21 and the trigger instruction detection function 28.
- OR circuit 214 outputs a broadcast instruction signal to instruction distribution unit 201 and instruction distribution unit 202 when the broadcast instruction signal is not input from either dummy instruction detection function 21 or trigger instruction detection function 28. do not do.
- the dummy instruction generation unit 203 When the broadcast instruction signal is input from the trigger instruction detection function 28, the dummy instruction generation unit 203 generates a dummy instruction and outputs the dummy instruction to the instruction distribution unit 201 and the instruction distribution unit 202. That is, the broadcast instruction signal from trigger instruction detection function 28 to dummy instruction generation unit 203 functions as a dummy instruction generation instruction signal.
- the instruction distribution unit 202 distributes the dummy instruction input from the dummy instruction generation unit 203 to the bus instruction buffers 22a to 22c, and then transmits the trigger instruction input from the external computer 3 to the buffers 22a to 22c. Distribute to 22c.
- the trigger instruction detection function 28 outputs a high level signal to the OR circuit 214 when the instruction input to the transmission control function 20 is a trigger instruction.
- the trigger command detection function 28 outputs a low level signal to the OR circuit 214.
- the OR circuit 214 When the signal input from at least one of the dummy instruction detection function 21 and the trigger instruction detection function 28 is a high level signal, the OR circuit 214 outputs a high level to the instruction distribution unit 201 and the instruction distribution unit 202. Output a signal.
- the OR circuit 214 When the signal input from both of the dummy instruction detection function 21 and the trigger instruction detection function 28 is a low level signal, the OR circuit 214 outputs a low level to the instruction distribution unit 201 and the instruction distribution unit 202. Output a signal. As described in the first embodiment, this signal is input to the instruction distribution unit 202 as it is, and the signal inverted by the inverter 209 is input to the instruction distribution unit 201.
- the dummy instruction generation unit 203 generates a dummy instruction when a high level signal is input from the trigger instruction detection function 28. That is, the high level signal corresponds to the broadcast instruction signal.
- the dummy instruction is stored in all of bus instruction buffers 22a to 22c, and the trigger instruction is stored next to the dummy instruction. can do.
- the outputs from the bus instruction buffers 22a to 22c are queued with dummy instructions to guarantee the order of the instructions. Therefore, the instruction following the dummy instruction is simultaneously transmitted to each of the buses 91 to 93, and the execution timing of the instruction can be adjusted. Therefore, in the eighth embodiment, the instruction generation unit 31 of the external computer 3 transmits an instruction whose execution timing is to be matched in the module 4 as a trigger instruction, so that the execution timing of the instruction can be matched.
- FIG. 27 illustrates an example in which the instruction generation unit 31 of the external computer 3 generates instructions in the order of instructions A to C, a trigger instruction, and instructions D to F.
- the instruction D and the instruction F are instructions that should follow the execution order.
- the dummy instruction generation function 30 of the external computer 3 inserts a dummy instruction between the instruction D and the instruction F. Therefore, as shown by “data of communication path 90” in FIG. 4, the external computer 3 executes the instruction in the order of instruction A, instruction B, instruction C, trigger instruction, instruction D, instruction E, dummy instruction, instruction F. It transmits one by one to the interface board 2 via the communication path 90 one by one.
- the dummy instruction generation unit 203 inserts a dummy instruction before the instruction C and the trigger instruction. Accordingly, the states of the buses 91 to 93 in “time 1” to “time 4” are the same as those in the example shown in FIG.
- the trigger command detection function 28 determines whether the command received from the external computer 3 is a trigger command (S24). When it is determined that the instruction received from the external computer 3 is a trigger instruction (S24: Yes), the dummy instruction generation unit 203 generates a dummy instruction and inserts it in front of the trigger instruction (S25). The transmission control function 20 causes the instruction distribution unit 202 to distribute the dummy instruction and the trigger instruction to all the buses (S26).
- Step S23 is executed. If the instruction received from the external computer 3 is not a trigger instruction but a dummy instruction (S24: No, S21: Yes), Step S23 is executed. If the instruction received from the external computer 3 is neither a trigger instruction nor a dummy instruction (S24: No, S21: No), the process of step S22 is executed.
- the transmission control function 20 when the input instruction is a trigger instruction, the transmission control function 20 inserts a dummy instruction before the trigger instruction and uses the trigger instruction for the bus. It is distributed to all of the instruction buffers 22a to 22c.
- the trigger instruction is simultaneously executed by simultaneously transmitting the trigger instruction to all the buses 91 to 93 using the mechanism that the output of the dummy instruction is aligned in all of the bus instruction buffers 22a to 22c. can do.
- the external computer 3 and the interface board 2 may be connected via the processing device 5 as in the example shown in FIG. Further, also in the third embodiment, as in the example shown in FIG. 12, the instructions are executed by the processing device 5 executing an executable program generated by the external computer 3 collectively interpreting the source program 311 by the compiler. May be sent to the interface board 2.
- the transmission control function 20 generates and inserts a dummy instruction for aligning the execution timing of the trigger instruction
- the present invention is not limited to this.
- the dummy instruction generation function 30 may generate a dummy instruction and insert it before the trigger instruction. According to this, in the transmission control function 20, the dummy instruction generation unit 203 becomes unnecessary.
- the module control system 1 has an interface board 2, an external computer 3, a plurality of modules 4, a processing device 5, and a server 6.
- the server 6 has a community providing unit 61, an online shop providing unit 62, and a storage unit 63.
- the server 6 is connected to the external computer 3 via the Internet.
- the community providing unit 61 provides the external computer 3 with an internet community service.
- the online shop providing unit 62 provides an online shop service to the external computer 3.
- the storage unit 63 stores module data 601, design data 602, and the like. That is, the storage unit 63 includes a storage device capable of storing the data 601 and 602. The storage device is, for example, a memory and a hard disk.
- Module data 601 is data of module 4.
- the module data 601 indicates, for example, the shape, weight, and physical characteristics of the module 4.
- Module data 601 is prepared for only the type of module 4.
- Design data 602 is data indicating a virtual model of the gadget constructed by the plurality of modules 4.
- the user of the external computer 3 can share, for example, the design data 602 created by the server 6 with other users by using the community provided by the community providing unit 61. it can. Also, the user of the external computer 3 can purchase the design data 602, the software for creating the design data, the module 4 and the like from the online shop provided by the online shop providing unit 62.
- the external computer 3 has a design function 330 and a USB (Universal Serial Bus) communication function 337.
- the design function 330 has a storage function 331, a graphical user interface (GUI) -based module assembly function 332, a display function 333, a physical simulation function 334, a programming environment 335, and a control design tool 336.
- the external computer 3 has a design function 330 in which the functions 331 to 336 are linked to provide an environment where the user can design the gadget and a program for operating the gadget comfortably.
- the storage function 331 stores module data 601, design data 602, and the like acquired from the server 3.
- the storage function 331 includes a storage device capable of storing these data 601 and 602.
- the storage device is, for example, a memory and a hard disk.
- the module assembly function 332 provides a function for the user to virtually assemble the module 4 based on GUI and create a virtual model of a gadget.
- Design data 602 indicating a virtual model created in this manner is stored in the storage function 331. The user can create a virtual model by operating the input device of the external computer 3.
- the display function 333 displays virtual models of the module 4 and the gadget in three-dimensional computer graphics. More specifically, the display function 333 is realized by the CPU of the external computer 3 displaying those images on the display device of the external computer 3.
- the physical simulation function 334 provides a function to perform operation simulation of the gadget by the virtual model indicated by the design data 602.
- the physical simulation function 334 can perform operation simulation in consideration of the shape of the module 4 and the like by using the module data 601 of the module 4 configuring the gadget.
- the programming environment 335 provides the user with an environment for creating the source program 311 described above.
- the programming environment 335 is, for example, an integrated development environment.
- the user uses the programming environment 335 to create the source program 311 by operating the input device of the external computer 3.
- the control design tool 336 is an automatic generation tool of the source program 311 that controls the plurality of modules 4.
- the control design tool 336 may be a tool that automatically generates the source program 311 based on the design data 602.
- the USB communication function 337 is a function to realize communication according to the USB communication standard with the interface board 2. That is, in the ninth embodiment, an example in which the communication path 90 connecting the external computer 3 and the interface board 2 is a USB bus will be described.
- the processing device 5 has a processing function 51, a USB communication function 52, an SPI communication function 53, a voltage conversion unit 54, an analog input / output unit 55, and a digital input / output unit 56. .
- the processing function 51 controls the processing device 5 in an integrated manner.
- the processing function 51 has a CPU, a memory and the like (not shown), and the CPU executes a program stored in the memory to realize the function as the processing device 5.
- the processing function 51 receives an instruction from the external computer 3 via the USB communication function 52.
- the processing function 51 transmits the received instruction to the interface board 2 via a serial peripheral interface (SPI) communication function 53.
- SPI serial peripheral interface
- the memory included in the processing function 51 functions as the instruction memory 50.
- the processing function 51 can also function as the program execution unit 301 by causing the CPU to execute an executable program stored in the memory.
- the USB communication function 52 is a function for realizing communication according to the USB communication standard with the external computer 3.
- the SPI communication function 53 is a function that implements communication with the interface board 2 according to the SPI communication standard. That is, in the ninth embodiment, an example in which the communication path 95 connecting the processing device 5 and the interface board 2 is an SPI bus will be described.
- the voltage conversion unit 54 converts the voltage supplied from the battery 80 into a voltage that can be supplied to the interface board 2.
- the Vdd output unit 541 supplies the voltage converted by the voltage conversion unit 54 to the interface board 2 as a power supply voltage.
- the Gnd output unit 542 supplies a ground voltage to the interface board 2.
- the analog input / output unit 55 receives an input of an arbitrary analog signal from a device connected to the connector of the analog input / output unit 55.
- the analog input / output unit 55 outputs the input analog signal to the processing function 51 and the interface board 2.
- the digital input / output unit 56 receives an input of an arbitrary digital signal from a device connected to the connector of the digital input / output unit 56.
- the digital input / output unit 56 outputs the input digital signal to the processing function 51 and the interface board 2.
- the interface board 2 has a transmitting function 200, a receiving function 220, an SPI communication function 290, a plurality of I2C communication functions 291a to 291d, and connectors 292a to 292h.
- the transmission function 200 and the reception function 220 are as described in the first to eighth embodiments.
- the SPI communication function 290 is a function that implements communication with the processing device 5 according to the SPI communication standard.
- Each of the I2C communication functions 291a to 291d is a function to realize communication with the module 4 according to the I2C communication standard via the connectors 292a to 292h.
- FIG. 30 an example in which the module 4 is connected to each of the four connectors 292a to 292d will be described.
- the connectors 292a to 292h are typically 4-pin connectors.
- each of the buses 91 to 94 includes two signal lines, one power supply voltage line, and one ground voltage line.
- the power supply voltage output from the Vdd output unit 541 is supplied to the power supply voltage line.
- the ground voltage output from the Gnd output unit 542 is supplied to the ground voltage line.
- the transmission function 200 can distribute or distribute the instruction received from the processing device 5 via the transmission control function 20 to the buses 91 to 94 and transmit it.
- the transmission function 200, the reception function 220, the SPI communication function 290, and the I2C communication functions 291a to 291d are realized by the microcomputer 2000, for example.
- the module 4 has a microcomputer 40 and a connector 48. As described above, by connecting the connectors 292a to 292d of the interface board 2 and the connectors 48 of the plurality of modules 4, the buses 91 to 94 are formed.
- the microcomputer 40 operates with the power supply voltage and the ground voltage supplied from the interface board 2 through the connector 48. Further, the microcomputer 40 receives and executes an instruction according to a signal supplied from the interface board 2 through the connector 48.
- the module 4 can take various aspects. For example, as shown in FIG. 31, one of the sensor 41, AC (Alternating Current) motor 43, DC (Direct Current) motor 44, analog input / output module 45, digital input / output module 46, and communication standard compliant module 47. It may have more than one.
- the sensor 41 is as described in the first embodiment.
- the AC motor 43 is driven by an alternating current supplied from an AC power supply 81.
- the DC motor 44 is driven by direct current supplied from the battery 80.
- the plurality of modules 4 is not limited to the example in which the module 4 having the AC motor 43 and the module 4 having the DC motor 44 are mixed. Only one of the module 4 having the AC motor 43 and the module 4 having the DC motor 44 may be used.
- the AC current from the AC power supply 81 is converted into DC current by the AC / DC converter 82 and supplied to the device in the module 4 (analog input / output module 45 in the example of FIG. 31). You may do so.
- the analog input / output module 45 inputs / outputs an external device by an analog signal.
- the digital input / output module 46 inputs and outputs digital signals to and from an external device.
- the module 4 may operate by connecting to an external device and transmitting / receiving any signal to / from the external device.
- the communication standard compliant module 47 transmits and receives information to and from an external device through communication according to an arbitrary communication standard. Note that this communication may be wired or wireless. Thus, the module 4 may operate by transmitting and receiving information to and from an external device.
- control period for example, 10 msec
- a cycle command, sensor value acquisition commands A to F, and motor drive commands A to G are transmitted from the processing device 5 to the interface board 2 by SPI communication. It shall be.
- the timing adjustment function 23 waits until the instruction for each of the buses 91 to 94 becomes a periodic instruction. Therefore, sensor value acquisition instructions A to F and motor drive instructions A to G following the periodic instruction are simultaneously transmitted from the timing when the periodic instruction is aligned on each of the buses 91 to 94 and executed by the module 4.
- each of the sensor values A to F acquired by the sensor value acquisition instructions A to F is transmitted from the module 4 to the processing device 5 by SPI communication as needed. Furthermore, this sensor value is transmitted from the processing device 5 to the external computer 3.
- the external computer 3 calculates command values in motor drive instructions A to I in the next second control cycle based on the sensor values A to F transmitted from the module 4.
- a periodic command, sensor value acquisition commands A to E, and motor drive commands A to I are transmitted from the processing device 5 to the interface board 2 by SPI communication. It shall be.
- the timing adjustment function 23 waits until the instruction for each of the buses 91 to 94 becomes a periodic instruction. Therefore, sensor value acquisition instructions A to E and motor drive instructions A to I following the periodic instruction are simultaneously transmitted from the timing when the periodic instruction is aligned on each of the buses 91 to 94, and executed by the module 4.
- the instruction can be divided for each control period. Then, the gadget (module 4) can be controlled by repeatedly executing those instructions. This is suitable, for example, for motor control based on sensor values as shown in FIG. In motor control, acquisition of a sensor value and drive of a motor by the sensor value are repeated. On the other hand, according to control using a cycle command, acquisition of a sensor value and drive of a motor can be repeated for every control cycle, and suitable motor control can be realized. In addition, as described here, by simultaneously executing the motor drive instruction and the sensor value acquisition instruction for acquiring the sensor value to be used for generation of the motor drive instruction in the next control period in the control period, Motor drive can be performed continuously in each control cycle.
- the contents described in the first to eighth embodiments can be implemented without any problem even in an integrated system in which a development environment is incorporated as in the module control system 1 according to the ninth embodiment. It is possible.
- a tenth embodiment will be described.
- a more specific second configuration example of the module control system 1 will be described.
- the configuration of a module control system 1 according to the tenth embodiment will be described with reference to FIGS. 33 to 35.
- the server 6 is not shown in FIG. 33, the server 6 may of course be included in the module control system 1 according to the tenth embodiment.
- the external computer 3 according to the tenth embodiment differs from the external computer 3 according to the ninth embodiment in that the external computer 3 further has a connection module list display function 340.
- the connection module list display function 340 displays a list of the plurality of modules 4 connected to the interface board 2 by the display function 333.
- the processing apparatus 5 according to the tenth embodiment further includes an I2C communication function 57, an interrupt function 58, and a Vdd output function 543 as compared with the processing apparatus 5 according to the ninth embodiment. The point of having it is different.
- the I2C communication function 57 is a function that implements communication with the interface board 2 according to the I2C communication standard. That is, the tenth embodiment has a communication path for transmitting an instruction separately from the communication path 95 based on the SPI communication standard.
- the interrupt function 58 is a function of receiving an interrupt signal from the interface board 2.
- the Vdd output unit 543 supplies the voltage converted by the voltage conversion unit 54 to the interface board 2 as a power supply voltage.
- the voltage conversion unit 54 according to the tenth embodiment converts the voltage supplied from the battery 80 to generate a first voltage and a second voltage different from the first voltage.
- the Vdd output unit 541 supplies a first voltage to the interface board 2, and the Vdd output unit 542 supplies a second voltage to the interface board 2.
- connection module list acquisition function 510 acquires a list of a plurality of modules 4 connected to the interface board 2, and transmits list information indicating a list of the plurality of modules 4 to the external computer 3.
- the connection module list display function 340 of the external computer 3 can display a list of the plurality of modules 4 based on the list information received from the processing device 5. According to this, the user can easily confirm the plurality of modules 4 configuring the gadget.
- the connection module list acquisition function 510 transmits a module information reply command to each of the plurality of modules 4 to acquire a list of the plurality of modules 4.
- Each of the plurality of modules 4 responds to the processing device 5 with information specifying itself in response to a module information reply command from the processing device 5.
- This information is, for example, a module ID uniquely assigned to each module 4.
- a list of module IDs of the plurality of modules 4 is acquired as the list of the plurality of modules 4.
- the acquisition of the list of modules 4 is realized, for example, by including the process of transmitting a module information reply command to the above-mentioned executable program, and the processing function 51 executing the executable program.
- the interface board 2 according to the tenth embodiment further includes a plurality of interrupt detection units 250a to 250d, an OR circuit 251, and the interface board 2 according to the ninth embodiment.
- a stop instruction function 260 a plurality of error detectors 261a to 261d, a plurality of overcurrent detectors 262a to 262d, an overcurrent detector 263, selection circuits 293 and 294, a distribution circuit 295, a plurality of voltages And conversion units 296a to 296d.
- the interface board 2 according to the tenth embodiment has an RS 485 communication function 297 instead of the I2C communication function 291 d.
- Each of the plurality of interrupt detection units 250a to 250d detects an interrupt packet transmitted to each of the buses 91 to 94.
- each of the plurality of interrupt detection units 250a to 250d outputs an interrupt signal to the OR circuit 251.
- the OR circuit 251 transmits, to the interrupt function 58 of the processing device 5, a signal generated by the logical sum operation from each of the plurality of interrupt detection units 250a to 250d. That is, the OR circuit 251 transmits an interrupt signal to the interrupt function 58 of the processing device 5 when an interrupt signal is input from at least one of the plurality of interrupt detection units 250a to 250d.
- module 4 sends an interrupt packet when it detects an event that requires urgent action. According to this, when the processing function 51 receives an interrupt signal based on the interrupt packet through the interrupt function 58, it can promptly cope with the event.
- the stop instruction function 260 transmits a stop instruction to the processing device 5 when an error is detected by the error detection units 261a to 261d and an overcurrent is detected by the overcurrent detection units 262a to 262d and 263. Do.
- the processing device 5 carries out an abnormal process.
- the abnormal process is, for example, resetting the interface board 2 or stopping the gadget (plural modules 4). According to this, it is possible to prevent the malfunction of the gadget.
- Each of the plurality of error detection units 261a to 261d detects an error packet transmitted to each of the buses 91 to 94 as the above-mentioned error.
- Each of the plurality of overcurrent detection units 262a to 262d detects an overcurrent of the signal supplied from each of the voltage conversion units 296a to 296d to each of the buses 91 to 94 as the above-mentioned error.
- the overcurrent detection unit 263 detects an overcurrent of the current supplied together with the power supply voltage from the Vdd output units 541 and 543 to the buses 91 to 94 through the selection circuit 293 as the above-mentioned error.
- the selection unit 293 selects one of the voltage supplied from the Vdd output unit 541 and the voltage supplied from the Vdd output unit 543, and supplies the selected one to the buses 91 to 94 as a power supply voltage.
- which voltage is selected is switched by a signal input to the selection unit 293 by the processing function 51 of the processing device 5.
- the processing function 51 selects an appropriate voltage in accordance with the operating voltage of the module 4 to be used.
- the selection unit 294 selects one of the instruction transmitted from the I2C communication function 57 of the processing device 5 and the instruction transmitted from the I2C communication function 291 a of the interface board 2 and transmits the selected one to the bus 91.
- which instruction is selected is switched by a signal input to the selection unit 294 by the processing function 51 of the processing device 5. According to this, when it is desired to debug the operation of the module 4, an arbitrary instruction can be directly transmitted to the module 4 via the I2C communication function 57 without passing through the transmission function 200.
- the distribution unit 295 distributes the command transmitted from the transmission function 200 to any one of the I2C communication function 291 c and the RS485 communication function 297. According to this, it becomes possible to mix modules 4 of different communication standards in a plurality of modules 4. For example, when it is desired to use not only the module 4 compatible with I2C communication but also the module 4 compatible with RS485 communication, the module 4 is connected not to the end of the connector 292c but to the end of the connector 292d. According to this, it is possible to control a gadget composed of the module 4 corresponding to I2C communication connected to the connectors 292a and 292b and the module 4 corresponding to RS485 communication connected to the connector 292d.
- the module 4 may be connected to the end of the connector 292 c instead of the end of the connector 292 d.
- which of the I2C communication function 291c and the RS485 communication function 297 the distribution unit 295 distributes the command is switched by the signal input to the distribution unit 295 by the processing function 51 of the processing device 5.
- Each of voltage conversion units 296a to 296d converts the voltage input from selection unit 293 into a voltage that can be used for the signals on buses 91 to 94.
- the RS 485 communication function 292 is a function that implements communication with the module 4 according to the RS 485 communication standard.
- the RS 485 communication function 297 implements communication with the bus 94 connected to the connector 292 d.
- the module 4 includes a microcomputer 40, a motor 42, a connector 48, and an error detection unit 49.
- the connector 48 and the motor 42 are as described in the first to ninth embodiments.
- the microcomputer 40 has a processing function 400 and a storage device 410.
- the processing function 400 includes an operation control unit 401 and error handling control units 402 and 403.
- the operation control unit 401 executes control of the motor 42 in a normal state in which an abnormality of the motor 42 is not detected.
- the error handling control units 402 and 403 execute control of the motor 42 in the abnormal state in which the abnormality of the motor 42 is detected.
- the storage device 410 stores in advance selection information indicating which of the error handling control unit 402 and the error handling control unit 403 is to execute control in an abnormal state.
- the processing function 400 determines which of the error handling control unit 402 and the error handling control unit 403 is to perform control in accordance with the selection information stored in the storage device 410, and performs the determined control. Do. According to this, for example, it is possible to change which of the error handling control unit 402 and the error handling control unit 403 is to execute control in an abnormal state according to the gadget in which the module 4 is used.
- the error detection unit 49 detects an abnormality of the motor 42 described above.
- the error detection unit 49 notifies the processing function 400 when an abnormality of the motor 42 is detected.
- control period for example, 10 msec
- the timing adjustment function 23 waits until the instruction for each of the buses 91 to 94 becomes a periodic instruction. Therefore, the sensor value acquisition instructions A to F and the motor drive instructions A to G following the periodic instruction are simultaneously transmitted at the timing when the periodic instruction is aligned on the buses 91 to 94.
- the processing device 5 executes control according to this abnormality. For example, as shown in FIG. 36, a motor drive command for stopping the motor 42 may be transmitted to the module.
- the processing device 5 may resume the transmission of the sensor value acquisition command and the motor drive command as usual from the second control period.
- the instruction can be divided for each control period. Then, the gadget (module 4) can be controlled by repeatedly executing those instructions. In the tenth embodiment, even if an abnormality occurs at this time, the abnormality can be detected by the stop instruction function 260 and notified to the processing device 5. Therefore, as described above, in response to the notification from the stop instruction function 260 of the interface board 2, the processing device 5 can restore the abnormal state and resume the control.
- the contents described in the first to eighth embodiments can be implemented without hindrance even in a system in which various abnormality detection functions are incorporated as in the module control system 1 according to the tenth embodiment. It is.
- the dummy instructions when dummy instructions are provided in all the bus instruction buffers 22, the dummy instructions are discarded.
- the present invention is not limited to this. Even when dummy instructions are provided in all the bus instruction buffers 22, the dummy instructions may be transmitted to the module 4 without discarding them.
- the dummy instruction may be an instruction that does not affect the control of the module 4.
- this instruction may be an instruction that does not execute any process even if the module 4 receives the instruction.
- unnecessary instruction transmission can be eliminated by discarding the dummy instruction as described above.
- the present invention is not limited thereto. At least a part of the functions may be realized by executing a program that causes at least a part of the functions to be executed by the CPU of the microcomputer 2000 of the interface board 2. That is, also in the first to eighth embodiments, as described in the ninth embodiment, the transmission function 200 and the reception function 220 may be realized by the microcomputer 2000.
- connection scheme in the communication path between the interface board 2 and the module 4 may be a peer-to-peer connection.
- the communication path may be wired or wireless.
- Condition 1 (number of communication paths between interface board 2 and module 4 ⁇ speed of the communication path) ⁇ speed condition of communication path between external computer 3 and interface board 2 2: between interface board 2 and module 4
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Advance Control (AREA)
- Programmable Controllers (AREA)
- Executing Machine-Instructions (AREA)
Abstract
Description
まず、図1を参照して、実施の形態1に係るモジュール制御システム1の構成について説明する。図1に示すように、モジュール制御システム1は、インターフェイスボード2と、外部計算機3と、複数のモジュール4とを有する。
バス用命令バッファ22aに格納された命令Aは、バス91に送信される。バス91に接続されるモジュール4は、バス用命令バッファ22aから送信された命令Aを受信して実行する。ここで、バス用命令バッファ22aから送信される命令はダミー命令Aではないが、バス用命令バッファ22b、22cから送信される命令はダミー命令Aである。よって、タイミング調整機能23は、ダミー命令Aを送信するバス用命令バッファ22b、22cの動作を停止させる。これにより、バス用命令バッファ22b、22cから送信されるダミー命令Aのモジュール4による受信が完了することはない。
バス用命令バッファ22aに格納された命令Bは、バス91に送信される。バス91に接続されるモジュール4は、バス用命令バッファ22aから送信された命令Bを受信して実行する。ここで、バス用命令バッファ22aから送信される命令はダミー命令Aではないが、バス用命令バッファ22b、22cから送信される命令はダミー命令Aである。よって、タイミング調整機能23は、ダミー命令Aを送信するバス用命令バッファ22b、22cの動作を引き続き停止させる。
バス用命令バッファ22aに格納された命令Cは、バス91に送信される。バス91に接続されるモジュール4は、バス用命令バッファ22aから送信された命令Cを受信して実行する。ここで、バス用命令バッファ22aから送信される命令はダミー命令Aではないが、バス用命令バッファ22b、22cから送信される命令はダミー命令Aである。よって、タイミング調整機能23は、ダミー命令Aを送信するバス用命令バッファ22b、22cの動作を引き続き停止させる。
バス用命令バッファ22aに格納されたダミー命令Aも、バス91に送信される。よって、バス用命令バッファ22a~22cの全てから送信される命令がダミー命令Aとなる。そのため、タイミング調整機能23は、バス用命令バッファ22b、22cの動作を再開させる。なお、このときに、バス用命令バッファ22a~22cは、後述するように、ダミー命令Aを破棄する。
バス用命令バッファ22aに格納されたダミー命令Bは、バス91に送信される。一方、動作を再開したバス用命令バッファ22bに格納された命令Dは、バス92に送信される。バス92に接続されるモジュール4は、バス用命令バッファ22bから送信された命令Dを受信して実行する。動作を再開したバス用命令バッファ22cに格納された命令Eも、バス93に送信される。バス93に接続されるモジュール4は、バス用命令バッファ22cから送信された命令Eを受信して実行する。このように、命令Cが送信されるまで、命令Cの後に実行すべき命令Dの送信が保留される。よって、命令C、Dの実行順序を保証することができる。ここで、バス用命令バッファ22b、22cから送信される命令はダミー命令Bではないが、バス用命令バッファ22aから送信される命令はダミー命令Bである。よって、タイミング調整機能23は、ダミー命令Bを送信するバス用命令バッファ22aの動作を停止させる。
バス用命令バッファ22bに格納されたダミー命令Bも、バス92に送信される。バス用命令バッファ22cに格納されたダミー命令Bも、バス93に送信される。よって、バス用命令バッファ22a~22cの全てから送信される命令がダミー命令Bとなる。そのため、タイミング調整機能23は、バス用命令バッファ22aの動作を再開させる。
バス用命令バッファ22cに格納された命令Fは、バス93に送信される。バス93に接続されるモジュール4は、バス用命令バッファ22cから送信された命令Fを受信して実行する。このように、命令Dが送信されるまで、命令Dの後に実行すべき命令Fの送信が保留される。よって、命令D、Fの実行順序を保証することができる。
この方法の場合、実行順序判断部32は、i-1行目から直前にダミー命令を生成した行までを順番に遡って調査する。
この方法の場合、実行順序判断部32は、i-1行目から予め定めた行数を遡った行までを調査する。
この方法の場合、実行順序判断部32は、i-1行目から順番に遡っていき、順序の制約がある命令を生成するコードが検出された行で調査を終了する。
この方法の場合、実行順序判断部32は、i-1行目からソースプログラム311の最初の行までを順番に遡って調査する。
モジュール制御システム1は、図1、2に示すように、外部計算機3とインターフェイスボード2とを直接接続する形態に限られず、図11に示すように、外部計算機3とインターフェイスボード2とを処理装置5を介して接続するようにしてもよい。外部計算機3は、通信経路90を介して処理装置5と接続される。処理装置5は、通信経路95を介してインターフェイスボード2と接続される。
また、処理装置5の利用方法は、このように外部計算機3から送信された命令を中継するのみに限られず、図12に示すように、外部計算機3がコンパイラによってソースプログラム311を一括解釈することで生成した実行可能プログラムを処理装置5で実行することで、命令をインターフェイスボード2に対して送信するようにしてもよい。
続いて、実施の形態2について説明する。以下、実施の形態1と同様の内容については適宜省略して説明する。図13を参照して、実施の形態2に係るモジュール制御システム1に係るインターフェイスボード2及び外部計算機3の構成について説明する。本実施の形態2に係るインターフェイスボード2は、実施の形態1に係るインターフェイスボード2と比較して、さらにオーバーフロー検出部24を有する。
上記説明では、インターフェイスボード2がバス用命令バッファ22a~22cのオーバーフローを検出するオーバーフロー検出部24を有する例について説明したが、これに限られない。インターフェイスボード2は、オーバーフロー検出部24に代えて、バス用命令バッファ22a~22cのバッファフル(バス用命令バッファ22が一杯になったこと)を検出するバッファフル検出部を有してもよい。
また、本実施の形態2においても、図14に示すように、モジュール制御システム1は、図11で示した例と同様に外部計算機3とインターフェイスボード2と、を処理装置5を介して接続するようにしてもよい。
続いて、実施の形態3について説明する。以下、これまでの実施の形態1、2と同様の内容については適宜省略して説明する。
(1)単純に命令の順序を守りたい場合
例えば、上述したように、第1の命令でセンサ値を取得し、第2の命令で取得したセンサ値に基づいてモータを駆動したい場合である。
(2)制御周期毎に命令を分けたい場合
例えば、モータ制御では、制御理論に基づいてセンサ値のサンプリングタイミングと、モータへの指令タイミングは、一定周期毎のタイミングが定められる。モータの制御量は、サンプリング及び指令の周期の関数で表され、周期が期待値と異なれば設計通りに動作しない。
バス用命令バッファ22a~22cの全てから送信される命令がダミー命令となる。しかしながら、タイマー25からタイミング調整機能23に対しては、一定周期Aの時間の経過は通知されていない。よって、タイミング調整機能23は、ダミー命令Aを送信するバス用命令バッファ22a~22cの動作を停止させる。
タイマー25は、タイミング調整機能23に対して一定周期のタイマー通知を行う。よって、バス用命令バッファ22a~22cの全てから送信される命令がダミー命令Aとなり、かつタイマー25からタイマー通知が行われたため、タイミング調整機能23は、バス用命令バッファ22a~22cの動作を再開させる。このとき、バス用命令バッファ22a~22cは、ダミー命令Aを破棄する。
バス用命令バッファ22bに格納されたダミー命令Bは、バス92に送信される。バス用命令バッファ22cに格納されたダミー命令Bは、バス93に送信される。バス用命令バッファ22a~22cの全てから送信される命令がダミー命令Bとなるが、タイマー25からタイミング調整機能23に対しては、タイマー通知は行われていない。タイミング調整機能23は、ダミー命令Bを送信するバス用命令バッファ22a~22cの動作を停止させる。
タイマー25は、タイミング調整機能23に対して一定周期の時間の経過を通知する。よって、バス用命令バッファ22a~22cの全てから送信される命令がダミー命令Bとなり、かつタイマー25からタイマー通知が行われたため、タイミング調整機能23は、バス用命令バッファ22a~22cの動作を再開させる。このとき、バス用命令バッファ22a~22cは、ダミー命令Bを破棄する。これにより、バス用命令バッファ22cは、バス93に命令Fを送信する。バス93に接続されるモジュール4は、バス用命令バッファ22cから送信された命令Fを受信して実行する。
本実施の形態3においても、図11示す例と同様に、外部計算機3とインターフェイスボード2とを処理装置5を介して接続するようにしてもよい。また、本実施の形態3においても、図12に示す例と同様に、外部計算機3がコンパイラによってソースプログラム311を一括解釈することで生成した実行可能プログラムを処理装置5で実行することで、命令をインターフェイスボード2に対して送信するようにしてもよい。
続いて、実施の形態4について説明する。以下、これまでの実施の形態1~3と同様の内容については適宜省略して説明する。本実施の形態4では、実施の形態2で課題となったオーバーフローの問題と、実施の形態3で課題となった制御周期の問題を同時に解決する構成について説明する。
本実施の形態4においても、図20に示すように、モジュール制御システム1は、図11に示す例と同様に外部計算機3とインターフェイスボード2とを処理装置5を介して接続するようにしてもよい。
続いて、実施の形態5について説明する。以下、これまでの実施の形態1~4と同様の内容については適宜省略して説明する。
タイマー25は、タイミング調整機能23に対して一定周期のタイマー通知を行う。よって、バス用命令バッファ22a~22cの全てから送信される命令が周期命令となり、かつタイマー25からタイマー通知が行われたため、タイミング調整機能23は、バス用命令バッファ22a~22cの動作を再開させる。
バス用命令バッファ22bに格納された順序命令は、バス92に送信される。バス用命令バッファ22cに格納された順序命令は、バス93に送信される。よって、バス用命令バッファ22a~22cの全てから送信される命令が順序命令となる。そのため、タイミング調整機能23は、タイマー25からタイマー通知は行われていないが、バス用命令バッファ22b、22cの動作を再開させる。
バス用命令バッファ22aに格納された周期命令は、バス91に送信される。一方、動作を再開したバス用命令バッファ22bに格納された周期命令は、バス92に送信される。バス用命令バッファ22cも、バス93に命令Fを送信する。
バス用命令バッファ22cに格納された周期命令は、バス93に送信される。バス用命令バッファ22a~22cの全てから送信される命令が周期命令となるが、タイマー25からタイミング調整機能23に対しては、タイマー通知は行われていない。タイミング調整機能23のダミー命令判断部233a~233cは、周期命令を送信するバス用命令バッファ22a~22cの動作を停止させる。
タイマー25は、タイミング調整機能23に対してタイマー通知を行う。よって、バス用命令バッファ22a~22cの全てから送信される命令が周期命令となり、かつタイマー25からタイマー通知が行われたため、タイミング調整機能23は、バス用命令バッファ22a~22cの動作を再開させる。これにより、バス用命令バッファ22bは、バス92に命令Gを送信する。
本実施の形態5においても、図11に示す例と同様に、モジュール制御システム1は、外部計算機3とインターフェイスボード2と、を処理装置5を介して接続するようにしてもよい。
続いて、実施の形態6について説明する。以下、これまでの実施の形態1~5と同様の内容については適宜省略して説明する。
本実施の形態6においても、実施の形態5と同様に、外部計算機3とインターフェイスボード2とを処理装置5を介して接続するようにしてもよく、外部計算機3に代えて処理装置5が周期命令検出部34を有するようにしてもよく、外部計算機3がコンパイラによってソースプログラム311を一括解釈することで生成した実行可能プログラムを処理装置5で実行するようにしてもよい。
続いて、実施の形態7について説明する。以下、実施の形態1と同様の内容については適宜省略して説明する。図25を参照して、実施の形態7に係るモジュール制御システム1に係るインターフェイスボード2及び外部計算機3の構成について説明する。本実施の形態7に係るインターフェイスボード2は、実施の形態1に係るインターフェイスボード2と比較して、さらにエラー信号検出部26と、命令発行情報収集部27とを有する。
また、本実施の形態7においても、図11と同様に、モジュール制御システム1は、外部計算機3とインターフェイスボード2とを処理装置5を介して接続するようにしてもよい。
続いて、実施の形態8について説明する。以下、実施の形態1と同様の内容については適宜省略して説明する。
「時間4」でバス用命令バッファ22b、22cの動作が再開されるため、全てのバス用命令バッファ22a~22cのそれぞれは、ダミー命令の次に格納されたトリガ命令を、バス91~93のそれぞれに送信する。そのため、バス91~93のそれぞれに接続されるモジュール4でトリガ命令が同時に実行される。
本実施の形態8においても、図11示す例と同様に、外部計算機3とインターフェイスボード2とを処理装置5を介して接続するようにしてもよい。また、本実施の形態3においても、図12に示す例と同様に、外部計算機3がコンパイラによってソースプログラム311を一括解釈することで生成した実行可能プログラムを処理装置5で実行することで、命令をインターフェイスボード2に対して送信するようにしてもよい。
以上の説明では、トリガ命令の実行タイミングを揃えるためのダミー命令を送信制御機能20において生成して挿入するようにしていたが、これに限られない。外部計算機3において、ダミー命令生成機能30がダミー命令を生成して、トリガ命令の前に挿入するようにしてもよい。これによれば、送信制御機能20においてダミー命令生成部203は不要となる。
続いて、実施の形態9として、モジュール制御システム1のより具体的な第1の構成例について説明する。
続いて、実施の形態10について説明する。実施の形態10として、モジュール制御システム1のより具体的な第2の構成例について説明する。図33~図35を参照して、実施の形態10に係るモジュール制御システム1の構成について説明する。図33では、サーバー6を図示していないが、当然に、実施の形態10に係るモジュール制御システム1においても、サーバー6を有するようにしてもよい。
条件1:(インターフェイスボード2とモジュール4の間の通信経路数 × その通信経路の速度) < 外部計算機3とインターフェイスボード2との間の通信経路の速度
条件2:インターフェイスボード2とモジュール4の間の通信経路の間で、送信される命令数に偏りがある
2 インターフェイスボード
3 外部計算機
4 モジュール
5 処理装置
6 サーバー
20 送信制御機能
21 ダミー命令検出機能
22a、22b、22c バス用命令バッファ
23 タイミング調整機能
24 オーバーフロー検出部
25 タイマー
26 エラー信号検出部
27 命令発行情報収集部
28 トリガ命令検出機能
30 ダミー命令生成機能
31 命令生成部
32 実行順序判断部
33 ダミー命令検出部
34 周期命令検出部
40 マイコン
41 センサ
42 モータ
43 ACモータ
44 DCモータ
45 アナログ入出力モジュール
46 デジタル入出力モジュール
47 通信規格対応モジュール
48 コネクタ
49 エラー検知部
50 命令メモリ
51 処理機能
52 USB通信機能
53 SPI通信機能
54 電圧変換部
55 アナログ入出力部
56 デジタル入出力部
57 I2C通信機能
58 割り込み機能
61 コミュニティー提供部
62 オンラインショップ提供部
63 記憶部
80 バッテリ
81 AC電源
82 AC/DC変換器
90 通信経路
91、92、93 バス
200 送信機能
201 命令振分部
202 命令分配部
203 ダミー命令生成部
209 インバータ
211 順序命令検出部
212 周期命令検出部
213、214、236、238、2333 OR回路
220 受信機能
221 受信制御機能
222a、222b、222c 受信バス用命令バッファ
231a、231b、231c ダミー命令検出部
233a、233b、231c ダミー命令判断機能
232、234、235、239 AND回路
237 選択回路
250a、250b、250c、250d 割込み検出部
261a、261b、261c、261d エラー検出部
262a、262b、262c、262d、263 過電流検出部
251 OR回路
290 SPI通信機能
291a、291b、291c、291d I2C通信機能
292a、292b、292c、292d、292e、292f、292g、292h コネクタ
293、294 選択部
295 振分部
297 RS485通信機能
300 CPU
301 メモリ
302 ハードディスク
303 通信コントローラ
310 インタプリタ
311 ソースプログラム
320 プログラム生成部
321 プログラム実行部
330 設計機能
331 記憶機能
332 モジュール組立て機能
333 表示機能
334 物理シミュレーション機能
335 プログラミング環境
336 制御設計ツール
337 USB通信機能
340 接続モジュール一覧表示機能
400 処理機能
401 動作制御部
402、403 エラー対応制御部
410 記憶装置
510 接続モジュール一覧取得機能
541、543 Vdd出力部
542 Gnd出力部
601 モジュールデータ
602 設計データ
2000 マイコン
2331 順序命令検出部
2332 周期命令検出部
Claims (12)
- 命令を実行する複数の命令実行部のそれぞれに前記命令を先入れ先出しで出力する複数の命令記憶部と、
順次入力される命令を前記複数の命令記憶部のいずれかに振り分ける命令制御部と、
前記複数の命令記憶部からの前記命令の出力を制御する出力制御部と、を備え、
前記命令制御部は、入力された命令が、実行順序を守るべき命令の間に挿入されるダミー命令である場合には、前記入力された命令を前記複数の命令記憶部の全てに分配し、
前記出力制御部は、前記複数の命令記憶部の全てにおいて出力する命令が前記ダミー命令となるまで、出力する命令が前記ダミー命令となっている命令記憶部から前記命令実行部への命令の出力を抑止する、
命令実行制御システム。 - 前記命令実行制御システムは、さらに、前記命令記憶部がオーバーフロー又は一杯になったこと検出し、前記命令の入力元に通知する検出部を備えた
請求項1に記載の命令実行制御システム。 - 前記命令実行制御システムは、さらに、一定周期毎に通知信号を出力するタイマーを備え、
前記出力制御部は、前記複数の命令記憶部の全てにおいて出力する命令が前記ダミー命令となっているときに前記タイマーから前記通知信号が出力されるまで、前記出力する命令がダミー命令となっている命令記憶部からの命令の出力を抑止する、
請求項1に記載の命令実行制御システム。 - 前記命令実行制御システムは、さらに、
前記複数の命令記憶部と、前記命令制御部と、前記出力制御部と、前記タイマーとを有するインターフェイス装置と、
前記インターフェイス装置に対して前記命令を入力する外部装置と、を備え、
前記外部装置は、所定数のダミー命令の前記インターフェイス装置に対する入力に応じて、前記インターフェイス装置に対する前記命令の入力を中断するダミー命令検出部を有し、
前記出力制御部は、前記複数の命令記憶部の全てにおいて出力する命令が前記ダミー命令となり、かつ前記タイマーから前記通知信号が出力された場合に、前記ダミー命令検出部に対して通知信号を出力し、
前記ダミー命令検出部は、前記出力制御部からの通知信号の出力に応じて、前記中断していた命令の入力を再開する、
請求項3に記載の命令実行制御システム。 - 前記命令実行制御システムは、前記ダミー命令として、順序命令及び周期命令が入力され、
前記出力制御部は、
前記ダミー命令が前記順序命令である場合、前記タイマーからの通知信号の出力に関わらず、前記複数の命令記憶部の全てにおいて出力する命令が前記順序命令となるまで、出力する命令が前記順序命令となっている命令記憶部からの命令の出力を抑止し、
前記ダミー命令が前記周期命令である場合は、前記複数の命令記憶部の全てにおいて出力する命令が前記周期命令となっているときに前記タイマーから前記通知信号が出力されるまで、出力する命令が前記周期命令となっている命令記憶部からの命令の出力を抑止する、
請求項3に記載の命令実行制御システム。 - 前記命令実行制御システムは、さらに、
前記複数の命令記憶部と、前記命令制御部と、前記出力制御部と、前記タイマーとを有するインターフェイス装置と、
前記インターフェイス装置に対して前記命令を入力する外部装置と、を備え、
前記外部装置は、所定数の周期命令の前記インターフェイス装置に対する入力に応じて、前記インターフェイス装置に対する前記命令の入力を中断する周期命令検出部を有し、
前記出力制御部は、前記複数の命令記憶部の全てにおいて出力する命令が前記周期命令となり、かつ前記タイマーから前記通知信号が出力された場合に、前記周期命令検出部に対して通知信号を出力し、
前記周期命令検出部は、前記出力制御部からの通知信号の出力に応じて、前記中断していた命令の入力を再開する、
請求項5に記載の命令実行制御システム。 - 前記出力制御部は、
前記複数の命令記憶部のそれぞれから出力される命令が、前記順序命令及び前記周期命令のいずれの命令であるかを判断する複数のダミー命令判断部と、
前記複数のダミー命令判断部による判断結果が不一致である場合に前記命令の入力元に異常を通知する通知部と、を有する、
請求項5に記載の命令実行制御システム。 - 前記命令実行制御システムは、さらに、
前記命令記憶部と前記命令実行部との間において前記命令が伝送される通信経路の異常を検出する異常検出部と、
前記異常検出部によって異常が検出された場合に、前記命令記憶部に格納された命令に関する情報を収集する情報収集部と、を備えた
請求項1に記載の命令実行制御システム。 - 前記命令制御部は、さらに、前記入力された命令がトリガ命令である場合には、前記トリガ命令の前に前記ダミー命令を挿入して前記複数の命令記憶部の全てに分配するとともに、前記入力されたトリガ命令を前記複数の命令記憶部の全てに分配する、
請求項1に記載の命令実行制御システム。 - 前記命令記憶部は、前記出力制御部による前記命令の出力の抑止が解除された場合に、前記ダミー命令を破棄する、
請求項1に記載の命令実行制御システム。 - 前記命令実行制御システムは、さらに、
前記複数の命令記憶部と、前記命令制御部と、前記出力制御部とを有するインターフェイス装置と、
前記インターフェイス装置に対して前記命令を入力する外部装置と、を備え、
前記インターフェイス装置は、
前記命令を生成する命令生成部と、
前記命令生成部によって生成された命令において、実行順序を守るべき命令が存在するか否かを判断する実行順序判断部と、
前記実行順序判断部によって実行順序を守るべきと判断された命令の間に前記ダミー命令を生成して挿入するダミー命令生成部と、を有する、
請求項1に記載の命令実行制御システム。 - 順次入力される命令を複数の命令記憶部のいずれかに振り分ける命令制御ステップと、
前記複数の命令記憶部のそれぞれに格納された命令を、前記命令を実行する複数の命令実行部のそれぞれに先入れ先出しで出力する命令出力ステップと、を備え、
前記命令制御ステップでは、入力された命令が、実行順序を守るべき命令の間に挿入されるダミー命令である場合には、前記入力された命令を前記複数の命令記憶部の全てに分配し、
前記命令出力ステップでは、前記複数の命令記憶部の全てにおいて出力する命令が前記ダミー命令となるまで、出力する命令が前記ダミー命令となっている命令記憶部から前記命令実行部への命令の出力を抑止する、
命令実行制御方法。
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201480082409.0A CN107111523B (zh) | 2014-11-11 | 2014-11-11 | 命令执行控制系统和命令执行控制方法 |
PCT/JP2014/005663 WO2016075721A1 (ja) | 2014-11-11 | 2014-11-11 | 命令実行制御システム及び命令実行制御方法 |
JP2016558442A JP6314246B2 (ja) | 2014-11-11 | 2014-11-11 | 命令実行制御システム及び命令実行制御方法 |
US15/513,544 US20170300329A1 (en) | 2014-11-11 | 2014-11-11 | Instruction execution control system and instruction execution control method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2014/005663 WO2016075721A1 (ja) | 2014-11-11 | 2014-11-11 | 命令実行制御システム及び命令実行制御方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2016075721A1 true WO2016075721A1 (ja) | 2016-05-19 |
Family
ID=55953835
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/JP2014/005663 WO2016075721A1 (ja) | 2014-11-11 | 2014-11-11 | 命令実行制御システム及び命令実行制御方法 |
Country Status (4)
Country | Link |
---|---|
US (1) | US20170300329A1 (ja) |
JP (1) | JP6314246B2 (ja) |
CN (1) | CN107111523B (ja) |
WO (1) | WO2016075721A1 (ja) |
Families Citing this family (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10303230B1 (en) * | 2016-10-31 | 2019-05-28 | Cadence Design Systems, Inc. | Method and system to mitigate large power load steps due to intermittent execution in a computation system |
US10719320B2 (en) * | 2017-07-31 | 2020-07-21 | Intel Corporation | Power noise injection to control rate of change of current |
JP6927032B2 (ja) * | 2017-12-29 | 2021-08-25 | トヨタ自動車株式会社 | 電力変換回路の保護制御装置 |
JP6939718B2 (ja) * | 2018-06-26 | 2021-09-22 | 日本電信電話株式会社 | ネットワーク機器及びネットワーク機器の設定方法 |
JP7059899B2 (ja) * | 2018-11-09 | 2022-04-26 | トヨタ自動車株式会社 | ネットワークシステム |
CN111124496B (zh) * | 2019-12-25 | 2022-06-21 | 合肥中感微电子有限公司 | 一种多周期指令处理方法、处理器和电子设备 |
US11366774B2 (en) * | 2020-09-24 | 2022-06-21 | Adesto Technologies Corporation | Memory latency reduction in XIP mode |
US11609868B1 (en) * | 2020-12-31 | 2023-03-21 | Waymo Llc | Control calibration timing to avoid memory write blackout period |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06162206A (ja) * | 1992-11-26 | 1994-06-10 | Fujitsu Ltd | 並列処理装置における処理順序指定方式 |
Family Cites Families (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5819079A (en) * | 1995-09-11 | 1998-10-06 | Intel Corporation | Instruction fetch on demand for uncacheable memory which avoids memory mapped I/O side effects in a processor with speculative instruction fetch |
US5961639A (en) * | 1996-12-16 | 1999-10-05 | International Business Machines Corporation | Processor and method for dynamically inserting auxiliary instructions within an instruction stream during execution |
US6088772A (en) * | 1997-06-13 | 2000-07-11 | Intel Corporation | Method and apparatus for improving system performance when reordering commands |
US6047334A (en) * | 1997-06-17 | 2000-04-04 | Intel Corporation | System for delaying dequeue of commands received prior to fence command until commands received before fence command are ordered for execution in a fixed sequence |
US5941983A (en) * | 1997-06-24 | 1999-08-24 | Hewlett-Packard Company | Out-of-order execution using encoded dependencies between instructions in queues to determine stall values that control issurance of instructions from the queues |
US6209073B1 (en) * | 1998-04-27 | 2001-03-27 | International Business Machines Corp. | System and method for interlocking barrier operations in load and store queues |
US6643718B1 (en) * | 2000-07-21 | 2003-11-04 | Silicon Integrated Systems Corporation | Method and apparatus for controlling order dependency of items in a multiple FIFO queue structure |
US7363474B2 (en) * | 2001-12-31 | 2008-04-22 | Intel Corporation | Method and apparatus for suspending execution of a thread until a specified memory access occurs |
US7437521B1 (en) * | 2003-08-18 | 2008-10-14 | Cray Inc. | Multistream processing memory-and barrier-synchronization method and apparatus |
US7475397B1 (en) * | 2004-07-28 | 2009-01-06 | Sun Microsystems, Inc. | Methods and apparatus for providing a remote serialization guarantee |
US20060026388A1 (en) * | 2004-07-30 | 2006-02-02 | Karp Alan H | Computer executing instructions having embedded synchronization points |
US8996761B2 (en) * | 2007-08-10 | 2015-03-31 | Kernelon Silicon Inc. | Virtual queue processing circuit and task processor |
JP2009134391A (ja) * | 2007-11-29 | 2009-06-18 | Renesas Technology Corp | ストリーム処理装置、ストリーム処理方法及びデータ処理システム |
US8176299B2 (en) * | 2008-09-24 | 2012-05-08 | Apple Inc. | Generating stop indicators based on conditional data dependency in vector processors |
US8082426B2 (en) * | 2008-11-06 | 2011-12-20 | Via Technologies, Inc. | Support of a plurality of graphic processing units |
JP2011234517A (ja) * | 2010-04-28 | 2011-11-17 | Renesas Electronics Corp | 動力駆動制御装置および動力装置 |
CN102480387A (zh) * | 2010-11-30 | 2012-05-30 | 英业达股份有限公司 | 机架式服务器装置 |
JP5714455B2 (ja) * | 2011-08-31 | 2015-05-07 | ルネサスエレクトロニクス株式会社 | 半導体集積回路 |
EP3005128B1 (en) * | 2013-05-30 | 2018-07-04 | Hewlett-Packard Enterprise Development LP | Separate memory controllers to access data in memory |
US9495318B2 (en) * | 2013-11-25 | 2016-11-15 | Apple Inc. | Synchronizing transactions for a single master over multiple busses |
US10067768B2 (en) * | 2014-07-18 | 2018-09-04 | Nvidia Corporation | Execution of divergent threads using a convergence barrier |
US9575802B2 (en) * | 2014-10-28 | 2017-02-21 | International Business Machines Corporation | Controlling execution of threads in a multi-threaded processor |
-
2014
- 2014-11-11 WO PCT/JP2014/005663 patent/WO2016075721A1/ja active Application Filing
- 2014-11-11 US US15/513,544 patent/US20170300329A1/en not_active Abandoned
- 2014-11-11 CN CN201480082409.0A patent/CN107111523B/zh not_active Expired - Fee Related
- 2014-11-11 JP JP2016558442A patent/JP6314246B2/ja not_active Expired - Fee Related
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH06162206A (ja) * | 1992-11-26 | 1994-06-10 | Fujitsu Ltd | 並列処理装置における処理順序指定方式 |
Also Published As
Publication number | Publication date |
---|---|
CN107111523B (zh) | 2020-10-20 |
JPWO2016075721A1 (ja) | 2017-04-27 |
JP6314246B2 (ja) | 2018-04-18 |
US20170300329A1 (en) | 2017-10-19 |
CN107111523A (zh) | 2017-08-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2016075721A1 (ja) | 命令実行制御システム及び命令実行制御方法 | |
EP2413484B1 (en) | Safety control system | |
US10241551B2 (en) | Control and synchronization mechanism for a complex distributed power management system | |
EP2515189B1 (en) | Plc cpu unit, system program for plc, and storage medium having system program for plc stored therein | |
EP3076293A2 (en) | Control apparatus | |
JP6527399B2 (ja) | ネットワークを用いた通信システム | |
WO2015163084A1 (ja) | データ処理システム及びデータ処理方法 | |
EP3651417A1 (en) | Control system and control method | |
WO2018163665A1 (ja) | 制御装置および制御方法 | |
JP5244082B2 (ja) | リアルタイム分散制御システム、リアルタイム分散制御方法、およびロボット | |
Klobedanz et al. | Distributed coordination of task migration for fault-tolerant FlexRay networks | |
US7506082B2 (en) | Data transferring system using USB and method thereof | |
WO2014013866A1 (ja) | 端末通信装置および分散制御システム | |
EP4027591A1 (en) | Master device, arithmetic processing device, programmable logic controller, network, and method | |
JP2012146150A (ja) | 割り込み信号生成装置および割り込み信号生成方法 | |
JP2007214981A (ja) | データ転送回路、それを利用したマルチプロセッサシステム、及びデータ転送方法 | |
WO2011108232A1 (ja) | プログラムトレース装置 | |
JP2019092351A (ja) | 電力系統安定化システムおよび処理装置 | |
US11734206B2 (en) | Information processing device | |
CN111527724B (zh) | 处理装置、半导体集成电路以及状态监视方法 | |
KR101476585B1 (ko) | 다중화 기기간 데이터 선별을 위한 시리얼 버스 프로토콜 구현 방법 및 장치 | |
JP2011065529A (ja) | 半導体集積装置およびその制御方法 | |
KR20160144688A (ko) | 큐를 이용한 smp 가상 머신 이벤트 라우터 및 방법 | |
WO2012117445A1 (ja) | 情報処理システム | |
US10089156B2 (en) | Electronic device for synchronizing tasks of an electronic appliance |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 14905915 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2016558442 Country of ref document: JP Kind code of ref document: A |
|
WWE | Wipo information: entry into national phase |
Ref document number: 15513544 Country of ref document: US |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 14905915 Country of ref document: EP Kind code of ref document: A1 |