WO2014091592A1 - Signal synchronization system, node synchronization system, signal synchronization method, and node synchroniz ation method - Google Patents

Signal synchronization system, node synchronization system, signal synchronization method, and node synchroniz ation method Download PDF

Info

Publication number
WO2014091592A1
WO2014091592A1 PCT/JP2012/082334 JP2012082334W WO2014091592A1 WO 2014091592 A1 WO2014091592 A1 WO 2014091592A1 JP 2012082334 W JP2012082334 W JP 2012082334W WO 2014091592 A1 WO2014091592 A1 WO 2014091592A1
Authority
WO
WIPO (PCT)
Prior art keywords
reference signal
synchronization
count value
value
unit
Prior art date
Application number
PCT/JP2012/082334
Other languages
French (fr)
Japanese (ja)
Inventor
崇 光井
Original Assignee
富士電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 富士電機株式会社 filed Critical 富士電機株式会社
Priority to JP2014551797A priority Critical patent/JP5825446B2/en
Priority to CN201280077569.7A priority patent/CN104838615B/en
Priority to PCT/JP2012/082334 priority patent/WO2014091592A1/en
Priority to KR1020157015123A priority patent/KR101636496B1/en
Publication of WO2014091592A1 publication Critical patent/WO2014091592A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/04Generating or distributing clock signals or signals derived directly therefrom
    • G06F1/06Clock generators producing several clock signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0682Clock or time synchronisation in a network by delay compensation, e.g. by compensation of propagation delay or variations thereof, by ranging

Definitions

  • the present invention relates to a signal synchronization system, a node synchronization system, a signal synchronization method, and a node synchronization method for synchronizing predetermined signals.
  • each device is provided with a virtual shared memory (common memory) and transmits its own node data to all nodes (stations) on the network at the update timing.
  • each received node updates its data and accesses an application, thereby realizing a data exchange method that guarantees real-time performance.
  • broadcast communication broadcast communication
  • Patent Document 1 the time division multiple access method using the internal timer of each node and the internal timer correction of the slave node using the synchronization frame from the master node are used together.
  • the transmission path is configured as a network connected by a bus or a serial cable.
  • the slave processor generates a delay time due to overhead or the like after receiving the interrupt signal from the main processor until executing the reset processing of its own counter corresponding to the signal. Therefore, conventionally, even if reset processing is performed, a counter synchronization error between the main processor and the slave processor remains.
  • a method of receiving a synchronization frame and clearing a timer can be considered.
  • the counter is cleared by firmware after receiving the synchronization frame, an error occurs in the counter due to a delay time such as overhead.
  • the interrupt signal transmitted from the main processor to the slave processor is counted by hardware, and based on the difference from the counter in the slave processor, It can be considered that the main processor and the slave processor are synchronized by adjusting the counting target (reference value) of the counter.
  • the counter of the main processor and the counter of the slave processor have different electrical characteristics, so it is difficult to estimate how much the counter shifts between the main processor and the slave processor. Therefore, if the synchronization correction process for adjusting the reference value of the counter of the slave processor is performed for each interrupt signal, the master processor and the slave processor are kept synchronized. However, if the synchronization correction process is frequently performed, the processing load increases, which may affect other processes that should be executed.
  • a signal synchronization system a node synchronization system, a signal synchronization method, and a node synchronization method that synchronize a predetermined signal with high accuracy while suppressing a processing load.
  • the purpose is to provide.
  • the signal synchronization of the present invention includes a main module that operates according to a first reference signal and a slave module that operates according to a second reference signal, and synchronizes the second reference signal with the first reference signal.
  • the system includes a first reference signal generation unit that generates a first reference signal when the main module performs a count and the count value reaches a preset reference value, and the slave module performs a count and performs a reference value
  • the second reference signal generating unit that generates the second reference signal when the count value reaches the time, the interval counting unit that counts the interval for performing the synchronization correction processing, and the correction processing interval value for performing the synchronization correction processing in the interval counting unit.
  • the first reference signal is received and restarted, and an overhead counter for counting, and after the count value reaches the correction processing interval value in the interval counter, the first reference signal is received.
  • a counter value acquisition unit that acquires the count value of the second reference signal generation unit and the count value of the overhead counter unit, and a value that cancels the difference between the count value of the second reference signal generation unit and the count value of the overhead counter unit
  • a synchronization correction unit that temporarily sets the reference value as a reference value in the second reference signal generation unit.
  • FIG. 6 is a time chart (part 3) for explaining an example of synchronization correction processing in the first embodiment; It is a figure which shows the schematic example of a sequence of a signal synchronization method. It is a figure which shows an example of schematic structure of the node synchronous system in 2nd Embodiment.
  • the main module side In response to the interrupt signal (counter reset signal) from, the overhead value on the slave module side is obtained.
  • the synchronization correction process is performed based on the obtained overhead value and the counter on the slave module side.
  • the interval for performing the synchronization correction process is counted and synchronized periodically (intermittently) for each predetermined correction process interval value. Execute correction processing.
  • the synchronization correction process is performed in consideration of the delay time (transmission delay time) on the communication path.
  • FIG. 1 is a diagram illustrating an example of a schematic configuration of a signal synchronization system according to the first embodiment.
  • the signal synchronization system 10 shown in FIG. 1 shows an example of a multiprocessor for performing counter synchronization among a plurality of processor modules (modules 11a to 11c in the example of FIG. 1) as an example. .
  • a signal synchronization system 10 shown in FIG. 1 includes a plurality of processor modules 11a to 11c (hereinafter referred to as “processor module 11” as necessary), a transmission bus 12, and an I / O (input / output) module 13 (FIG. 1). And 13a to 13d), an external device 14 (indicated by 14a to 14d in FIG. 1), and a programming device 15.
  • processor module 11 for convenience of explanation, the main configuration of each processor module will be described with the processor module 11 a as a main processor module and the processor modules 11 b and 11 c as slave processor modules.
  • the number of slave processor modules is not limited to two as shown in FIG.
  • the present invention is not limited to the above-described configuration, and has the same configuration so that one processor module can be the main processor module 11a and the slave processor modules 11b and 11c. .
  • Each processor module 11 is connected by a transmission bus 12. In the first embodiment, it is assumed that there is no delay time caused by the transmission bus 12.
  • the main processor module 11 a includes a first reference signal generation unit 21, a first calculation unit 22, and a storage unit 23.
  • the first reference signal generation unit 21 is built in a CPU to be described later, but is not limited to this.
  • the first reference signal generation unit 21 and the CPU are separate. It may be configured.
  • the above-described “built-in” means that only the function units (the first reference signal generation unit 21 and the first calculation unit 22) in the CPU can access the first reference signal generation unit 21, for example. Means.
  • the slave processor modules 11b and 11c include a second reference signal generator 31, a second calculator 32, an interval counter 33, an overhead counter 34, a count value acquisition unit 35, and a synchronization determination unit 36. , A synchronization correction unit 37 and a storage unit 38.
  • the second reference signal generation unit 31 is built in the CPU.
  • the present invention is not limited to this.
  • the second reference signal generation unit 31 and the CPU are configured separately. It may be.
  • the first reference signal generator 21 performs counting and generates a first reference signal when the count value reaches a preset reference value.
  • the first reference signal generation unit 21 functions as a hardware counter (hereinafter also referred to as “timer” as necessary).
  • the above-described count value is cyclically counted based on the reference value. In FIG. 1, such a hardware counter is indicated by a broken line.
  • the first calculation unit 22 executes (calculates) a predetermined application program stored in the storage unit 23 according to the first reference signal generated by the first reference signal generation unit 21.
  • the first reference signal is also given (transmitted) to the slave processor modules 11b and 11c through the transmission bus 12 as an interrupt signal (counter reset signal).
  • the storage unit 23 stores a predetermined application program (sequence program) to be calculated by the first calculation unit 22.
  • the predetermined application program calculated by the first calculation unit 22 is a process for giving an instruction to, for example, the I / O module 13a connected to the main processor module 11a and controlling the external device 14a by the I / O module 13a. . Therefore, the storage unit 23 stores a program for executing predetermined processing mainly on the I / O module 13a and the external device 14a connected to the own processor module 11a.
  • the main processor module 11a generates a first reference signal at predetermined intervals, and the first calculation unit 22 executes (calculates) an application program (sequence program) in accordance with the first reference signal.
  • the device is controlled, and the application program (sequence program) is cyclically executed.
  • slave processor modules 11b and 11c will be described. Since the slave processor modules 11b and 11c have the same configuration, in the following description, the slave processor module 11b will be described, and the slave processor module 11c will be described. Omitted.
  • the second reference signal generation unit 31 performs counting, sets the same reference value as the reference value set in the first reference signal generation unit 21 described above, and reaches the reference value to reach the second reference value. Generate a signal.
  • the second reference signal generation unit 31 functions as a hardware counter. The above-described count value is cyclically counted based on the reference value.
  • the counters of the first reference signal generation unit 21 and the second reference signal generation unit 31 are free running counters and are self-running.
  • the second calculation unit 32 executes (calculates) a predetermined application program or the like stored in the storage unit 38 in accordance with the second reference signal generated by the second reference signal generation unit 31.
  • the second reference signal generation unit 31 is a counter that can be accessed only from the second arithmetic unit 32 in the CPU, for example, and is a counter (CPU built-in counter) built in the CPU. That is, the second reference signal generation unit 31 is a counter that cannot be reset in hardware from the outside of the main processor module 11a and the like.
  • the second calculation unit 32 receives the first reference signal (synchronization reference signal) from the main processor module 11a as an interrupt signal, and activates a synchronization correction process described later.
  • the interval counting unit 33 performs counting and generates a correction processing start signal indicating that a correction processing interval value corresponding to a correction processing interval for performing synchronization processing is set in advance and reaches the correction processing interval value. To do.
  • the correction processing interval value is set through the following calculation. For example, it is assumed that the synchronization error between the main processor module 11a and the slave processor module 11b, which is allowed to satisfy the processing accuracy required for the signal synchronization system, is 10 ⁇ s. In this case, in this embodiment, the shortest time until the synchronization error reaches 1 to 5 ⁇ s is calculated. Here, the reason why it is 1 ⁇ s or more is that if it is shorter than that, the frequency of synchronization correction processing increases and the processing load increases. The reason why it is 5 ⁇ s or less is that the margin for 10 ⁇ s is taken into consideration.
  • the frequency of the oscillator used in the main processor module 11a and the sub processor module 11b is 50 MHz and the oscillation accuracy is 50 ppm.
  • the shortest time when the synchronization error is 5 ⁇ s is 100 ms. Therefore, the correction processing interval value may be a value obtained by converting 20 ms to 100 ms into a count value.
  • the overhead counting unit 34 counts and synchronizes after reception of the first reference signal described above after reception of the correction processing start signal, that is, after the count value of the interval counting unit 33 reaches the correction processing interval value.
  • the overhead value until the correction process is executed is measured.
  • the overhead counter 34 functions as a hardware counter (timer) that receives and restarts the first reference signal.
  • the overhead counting unit 34 Since the overhead counting unit 34 is a counter configured by hardware, it reacts immediately to the first reference signal. However, the synchronization correction processing takes time until preparation for reading the count value is completed, for example.
  • the time required to prepare for reading the count value is an overhead.
  • the overhead means a delay time from the occurrence of a certain event until the processing (software) for the event is actually executed. In this example, the overhead is synchronized from the starting point when the overhead counting unit 34 is restarted. The time until correction processing is actually performed is not limited to this.
  • the count value acquisition unit 35 After receiving the correction processing start signal, that is, after the count value of the interval counter 33 reaches the correction processing interval value, the count value acquisition unit 35 actually executes the synchronization correction processing in response to reception of the first reference signal.
  • the count value of the second reference signal generation unit 31 and the count value of the overhead count unit 34 at the time (starting point) to be obtained are acquired.
  • the synchronization determination unit 36 determines that the first reference signal and the second reference signal are It is determined that they are synchronized. Further, the synchronization determination unit 36, when the count value of the second reference signal generation unit 31 and the count value of the overhead counter 34 acquired by the count value acquisition unit 35 are different from each other, It is determined that the reference signal is asynchronous.
  • the synchronization determination unit 36 converts the count value of the second reference signal generation unit 31 acquired by the count value acquisition unit 35 and the count value of the overhead count unit 34 into time, and synchronizes when both times are equal. It can also be determined that it is asynchronous, and when both times are different, it can also be determined that they are asynchronous. That is, in the first embodiment, the unit time per clock of each counter may not be equal between the processor modules 11. Therefore, in such a case, each count value is converted into time, and synchronous / asynchronous determination is performed at the converted time.
  • the synchronization correction unit 37 sets the reference value in the second reference signal generation unit 31 when the synchronization determination unit 36 determines that the first reference signal and the second reference signal are synchronized. In addition, when the synchronization determination unit 36 determines that the first reference signal and the second reference signal are asynchronous, the synchronization correction unit 37 determines the count value of the second reference signal generation unit 31 and the count value of the overhead count unit 34. The value which cancels the difference of is obtained. Specifically, the synchronization correction unit 37 subtracts the count value of the overhead counter 34 from the count value of the second reference signal generation unit 31 acquired by the count value acquisition unit 35 to obtain the synchronization correction value.
  • the synchronization correction unit 37 subtracts the obtained synchronization correction value from the reference value, and sets the subtracted value as a new reference value in the second reference signal generation unit 31.
  • the new reference value is a timer that is temporarily used when the synchronization determination unit 36 determines asynchronous with respect to the timer reference value (default reference value) used when the synchronization determination unit 36 determines synchronization. This is the reference value.
  • the synchronization determination unit 36 determines that the first reference signal and the second reference signal are asynchronous, sets the subtracted value as a new reference value in the second reference signal generation unit 31, and uses the subtracted value.
  • the synchronization correction unit 37 quickly sets the reference value in the second reference signal generation unit 31.
  • the reference value can be temporarily changed by the synchronization correction value.
  • the correction for the synchronization correction value is executed at a time, but the present invention is not limited to this, and it may be executed in multiple steps. Even in that case, the synchronization correction unit 37 sets the reference value in the second reference signal generation unit 31 after the synchronization correction processing is completed.
  • the synchronization correction unit 37 sets the above-described default reference value in the second reference signal generation unit 31 each time the synchronization determination unit 36 determines the synchronization between the first reference signal and the second reference signal. However, if synchronization is maintained, once the default reference value is set, nothing needs to be done.
  • the synchronization correction unit 37 since the synchronization correction process is executed at every correction process interval, there is a high possibility that the count value of the second reference signal generation unit 31 and the count value of the overhead count unit 34 are different, and the synchronization determination unit Often, 36 determines that the first reference signal and the second reference signal are asynchronous. Therefore, the synchronization correction unit 37 does not execute the determination by the synchronization determination unit 36, that is, regardless of whether the first reference signal and the second reference signal are synchronous or asynchronous, the synchronization correction unit 37 performs the second reference signal generation unit. A value that cancels the difference between the count value of 31 and the count value of the overhead counter 34 may be obtained, and the value may be set as a new reference value in the second reference signal generator 31.
  • the determination process becomes unnecessary, and the processing load for the determination can be reduced.
  • the storage unit 38 stores a predetermined application program (sequence program) that is calculated by the second calculation unit 32.
  • the predetermined application program calculated by the second calculation unit 32 gives instructions to the I / O modules 13b and 13c connected to the slave processor module 11b, for example, and the external devices 14b and 14c are transmitted by the I / O modules 13b and 13c. It is a process to control. Therefore, the storage unit 38 stores a program for executing predetermined processing mainly on the I / O modules 13b and 13c and the external devices 14b and 14c connected to the own processor module 11b.
  • the I / O module 13 performs input / output processing with the external device 14 and the like. For example, the I / O module 13 outputs (transmits) data or the like obtained from the connected external device 14 or the like to the processor module 11, or outputs a result processed by the processor module 11 to the external device 14 or the like. Or remember. That is, the processor module 11 controls the external device 14 by calculating the input data obtained from the I / O module 13 by the application program and giving the calculation result to the I / O module 13 as output data.
  • the external device 14 is, for example, various sensors, motors, recording devices, or the like.
  • the external device 14 detects and drives data, inputs / outputs data, and the like based on a control signal from the I / O module 13.
  • the reference value may be set in advance in each of the processor module 11a, the processor module 11b, and the processor module 11c, or may be set from a programming device 15 (setting device) externally connected thereto.
  • the programming device 15 can be realized by adding a function for setting a reference value by communicating with the processor module 11 to a PC (Personal Computer) used by a user or the like. It may be a device. Thereby, a reference value (processing cycle) can be arbitrarily adjusted for each user.
  • PC Personal Computer
  • the multiprocessor has been described as an example of the signal synchronization system 10.
  • the signal synchronization system 10 includes a first reference signal generation unit 21, a second reference signal generation unit 31, and an overhead counting unit. 34, the count value acquisition unit 35, the synchronization determination unit 36, and the synchronization correction unit 37 may be included.
  • the application example of the signal synchronization system 10 is not limited to a multiprocessor.
  • the main device side is a transmitting station that transmits a digital signal of date / time information by an atomic clock
  • the slave device side is a radio wave clock.
  • Application as a timer synchronization system is also possible.
  • FIG. 2 is a diagram illustrating an example of a hardware configuration of the processor module 11.
  • the processor module 11 illustrated in FIG. 2 includes an input unit 41, an output unit 42, a CPU 43, an FPGA 44, a memory 45, and an external interface 46, which are connected by a common bus B.
  • the input unit 41 inputs various operation signals such as execution of a program from a user or the like.
  • the input unit 41 may have a keyboard operated by a user or the like, a pointing device such as a mouse or a touch panel, and may have a voice input device when inputting by voice or the like. .
  • the output unit 42 includes a display that displays various windows and data necessary for operating the processor module 11 that performs processing in the present embodiment, and displays the execution progress and results of the control program executed by the CPU 43. .
  • the CPU 43 Based on a control program such as an OS (Operating System) and an execution program stored in the memory 45, the CPU 43 performs processing of the entire processor module 11 such as various operations and data input / output with each hardware component. Each process in this embodiment is realized by controlling. In addition, the CPU 43 cooperates with the memory 45 to substantially function as the first calculation unit 22, the second calculation unit 32, the count value acquisition unit 35, the synchronization determination unit 36, and the synchronization correction unit 37 described above. A first reference signal generation unit 21 and a second reference signal generation unit 31 are incorporated. Various information necessary during program execution may be acquired from the memory 45 and the execution result or the like may be stored in the memory 45.
  • a control program such as an OS (Operating System) and an execution program stored in the memory 45.
  • An FPGA (Field-Programmable Gate Array) 44 is an integrated circuit that can rewrite a logic circuit.
  • the FPGA 44 is composed of various logic circuits that assist the CPU 43, and particularly functions as the interval counting unit 33 and the overhead counting unit 34 in the present embodiment.
  • the interval counting unit 33 may be processed by software.
  • the memory 45 stores an execution program read by the CPU 43 and the like.
  • the memory 45 includes a ROM (Read Only Memory), a RAM (Random Access Memory), and the like. Further, the memory 45 may have storage means such as a hard disk as an auxiliary storage device.
  • the memory 45 stores an execution program in the present embodiment, a control program provided in a computer, and the like, and performs input / output as necessary.
  • the memory 45 corresponds to the storage units 23 and 38 described above.
  • the external interface 46 transmits / receives data and control signals to / from other processor modules 11 via the transmission bus 12 and the like.
  • the external interface 46 also transmits / receives data and control signals to / from the connected I / O module 13.
  • the hardware configuration described above it is possible to execute the synchronization correction processing in this embodiment.
  • the synchronization correction processing in the present embodiment can be easily realized by a general-purpose personal computer or the like.
  • Example of synchronization correction processing in the first embodiment 3 to 5 are time chart diagrams (No. 1 to No. 3) for explaining an example of the synchronization correction processing in the first embodiment.
  • FIGS. 3 to 5 an example of synchronization of count values between the main processor module 11a and the slave processor module 11b is shown.
  • the reference value (processing cycle) in the first embodiment is 1000 ⁇ s, but is not limited to this.
  • the setting can be appropriately changed by the programming device 15 described above.
  • the first reference signal generator 21 of the main processor module 11a performs counting.
  • a first reference signal is output.
  • the 1st calculating part 22 performs a predetermined
  • a triangular area indicated by hatching indicates the transition of the count value, and the count value increases as time passes, and is reset when the count target (for example, a reference value) is reached.
  • the second reference signal generation unit 31 of the slave processor module 11b performs counting. When the count value reaches the reference value at time (2) in FIG. 3, a second reference signal is output. And the 2nd calculating part 32 performs a predetermined
  • the interval counter 33 performs counting, and when the count value reaches the correction processing interval value ((3) in FIG. 3), a correction processing start signal is generated. In response to the correction processing start signal, preparation for the synchronous correction processing is started.
  • the first reference signal generated by the main processor module 11a is transmitted to the slave processor module 11b as an interrupt signal.
  • the slave processor module 11b receives the first reference signal as an interrupt, and starts a synchronization correction process by software ((4) in FIG. 3).
  • the overhead counter 34 of the slave processor module 11b clears the counter value by the hardware and restarts ((5) in FIG. 3).
  • the count value acquisition unit 35 acquires the count value from the second reference signal generation unit 31 ((7) in FIG. 3) at the time (6) in FIG. The count value is acquired from the overhead counter 34 ((8) in FIG. 3).
  • the synchronization determination unit 36 converts the count value given by the count value acquisition unit 35 into time.
  • 300 ⁇ s is obtained from the count value of the second reference signal generation unit 31 and 300 ⁇ s is obtained from the count value of the overhead counting unit 34.
  • the overhead from when the first reference signal is interrupted until the count value is acquired in the synchronization correction process can be measured, and the count value of the second reference signal generation unit 31 at that time can be acquired.
  • the count values should be equal.
  • the synchronization determination unit 36 compares the count value (300 ⁇ s) of the second reference signal generation unit 31 obtained from the count value acquisition unit 35 with the count value (300 ⁇ s) of the overhead count unit 34. In this case, the synchronization determination unit 36 determines that the first reference signal and the second reference signal are synchronized because both are the same value.
  • the synchronization correction unit 37 sets the reference value 1000 ⁇ s in the second reference signal generation unit 31 as usual. (At this time, the second reference signal generator 31 has not restarted). Then, the second reference signal generation unit 31 restarts because the count value reaches the reference value 1000 ⁇ s at the time (9) in FIG.
  • the second reference signal generation unit 31 is built in the CPU 43 described above. However, in the present embodiment, the second reference signal generation unit 31 is not limited to this and may be separate from the CPU 43.
  • the synchronization correction processing shown in FIG. 3 includes the program processing of the count value acquisition unit 35, the synchronization determination unit 36, and the synchronization correction unit 37.
  • FIG. 4 shows a case where the counter of the slave processor module 11b is delayed by 3 ⁇ s from the counter of the main processor module 11a.
  • the interval counter 33 of the slave processor module 11b performs counting, and when the count value reaches the correction processing interval value ((1) in FIG. 4), a correction processing start signal is generated. In response to the correction processing start signal, preparation for the synchronous correction processing is started.
  • the first reference signal generation unit 21 of the main processor module 11a outputs the first reference signal every 1000 ⁇ s because the count value reaches the reference value.
  • the slave processor module 11b receives the first reference signal as an interrupt, and starts the synchronous correction processing by software ((2) in FIG. 4).
  • the overhead counter 34 of the slave processor module 11b clears and restarts the counter value counted by the hardware ((3) in FIG. 4).
  • the count value acquisition unit 35 acquires the count value from the second reference signal generation unit 31 ((5) in FIG. 4) at the time (4) in FIG. The count value is acquired from the overhead counter 34 ((6) in FIG. 4).
  • the synchronization determination unit 36 converts the count value given by the count value acquisition unit 35 into time.
  • 297 ⁇ s is obtained from the count value of the second reference signal generation unit 31 and 300 ⁇ s is obtained from the count value of the overhead counting unit 34.
  • the synchronization determination unit 36 compares the two count values and determines that the first reference signal and the second reference signal are asynchronous because the two count values are different.
  • the synchronization correction unit 37 Since the synchronization determination unit 36 determines asynchronism, the synchronization correction unit 37 generates the second reference signal so that the difference between the count value of the second reference signal generation unit 31 and the count value of the overhead count unit 34 is canceled out. A temporary reference value is set in the part 31. Specifically, the synchronization correction unit 37 uses the expression “reference value (processing period) ⁇ (count value of the overhead counter 34 ⁇ count value of the second reference signal generator 31)” to calculate the second reference signal generator. A restart value (reset value) of the count value of 31 is obtained, and the obtained count value is set in the second reference signal generation unit 31 as a temporary reference value.
  • 1st Embodiment can restart the 2nd reference signal production
  • the reference value is set to 1000 ⁇ s after the third cycle.
  • FIG. 5 shows a case where the counter of the slave processor module 11b is advanced by 3 ⁇ s from the counter of the main processor module 11a.
  • the interval counter 33 of the slave processor module 11b performs counting, and when the count value reaches the correction processing interval value ((1) in FIG. 5), a correction processing start signal is generated. In response to the correction processing start signal, preparation for the synchronous correction processing is started.
  • the first reference signal generation unit 21 of the main processor module 11a outputs the first reference signal every 1000 ⁇ s because the count value reaches the reference value.
  • the slave processor module 11b receives the first reference signal as an interrupt, and starts the synchronous correction processing by software ((2) in FIG. 5).
  • the overhead counting unit 34 of the slave processor module 11b clears the count value of the counter by the hardware and restarts ((3) in FIG. 5).
  • the count value acquisition unit 35 acquires the count value from the second reference signal generation unit 31 ((5) in FIG. 5) at the time (4) in FIG. The count value is acquired from the overhead counter 34 ((6) in FIG. 5).
  • the synchronization determination unit 36 converts the count value given by the count value acquisition unit 35 into time.
  • 303 ⁇ s is obtained from the count value of the second reference signal generation unit 31 and 300 ⁇ s is obtained from the count value of the overhead counting unit 34.
  • the synchronization determination unit 36 compares the two count values and determines that the first reference signal and the second reference signal are asynchronous because the two count values are different values.
  • the synchronization correction unit 37 Since the synchronization determination unit 36 determines asynchronism, the synchronization correction unit 37 generates the second reference signal so that the difference between the count value of the second reference signal generation unit 31 and the count value of the overhead count unit 34 is canceled out.
  • a temporary reference value is set in the part 31.
  • the synchronization correction unit 37 calculates in the same manner as in the description of FIG. 4, obtains a temporary reference value, and sets it in the second reference signal generation unit 31.
  • the second reference signal generation unit 31 restarts because the count value reaches the temporary reference value 1003 ⁇ s at the point (7) in FIG.
  • the count value of the overhead counter 34 minus the count value of the second reference signal generator 31 is the synchronization correction value.
  • 1st Embodiment can restart the 2nd reference signal production
  • FIG. 6 is a diagram illustrating a schematic sequence example of the signal synchronization method.
  • synchronization using the main processor module 11a and the sub processor module 11b will be described.
  • the present embodiment is not limited to this, and one main processor module is not limited to this. Multiple slave processor modules can be synchronized.
  • the first reference signal generation unit 21 of the main processor module 11a generates a first reference signal (S01), and the second reference signal generation unit 31 of the slave processor module 11b Two reference signals are generated (S02). This process is cyclically operated in terms of hardware.
  • the main processor module 11a also transmits the first reference signal obtained in the process of S01 to the slave processor module 11b. Therefore, the slave processor module 11b is always in a state where it can receive the first reference signal.
  • the interval counting unit 33 of the slave processor module 11b counts the correction processing interval, and when the count value reaches the correction processing interval value, generates a correction processing start signal and starts preparation for the synchronous correction processing (S03). .
  • the slave processor module 11b When the slave processor module 11b receives the first reference signal transmitted by the main processor module 11a after the count value of the interval counter 33 reaches the correction processing interval value (S04), the synchronization correction processing by software is started. Together with (S05), the overhead counting unit 34 is restarted (S06). Then, the count value acquisition unit 35 acquires both count values of the second reference signal generation unit 31 and the overhead count unit 34 (S07), and the synchronization determination unit 36 performs synchronization determination based on the both count values. (S08) If it is determined to be asynchronous, the synchronization correction unit 37 performs synchronization correction (S09).
  • FIG. 7 is a diagram illustrating an example of a schematic configuration of the node synchronization system according to the second embodiment.
  • the node synchronization system 50 shown in FIG. 7 is an example that performs counter synchronization among a plurality of nodes such as the nodes 51a to 51c.
  • the node synchronization system 50 includes a plurality of nodes 51a to 51c (hereinafter referred to as “node 51” as necessary), a communication path (communication network) 52, and an I / O (input / output) module 53 (in FIG. 7, 53a to 53d), an external device 54 (indicated by 54a to 54d in FIG. 7), and a programming device 55. That is, in the node synchronization system 50, a master node 51a and slave nodes 51b and 51c are connected via a communication path 52 as a communication network.
  • the node 51a is a master node and the nodes 51b and 51c are slave nodes, and the configuration unique to each node will be described.
  • the present invention is not limited to this. It has both configurations so that it can be.
  • it is assumed that a transmission delay time by the communication path 52 is generated.
  • the master node 51a corresponds to the main processor module 11a in the first embodiment
  • the slave nodes 51b and 51c correspond to the slave processor modules 11b and 11c in the first embodiment.
  • the programming device 55 is substantially equal to the programming device 15 in the first embodiment
  • the I / O modules 53a to 53d are substantially the same as the I / O modules 13a to 13d in the first embodiment.
  • the external devices 54a to 54d are substantially the same as the external devices 14a to 14d in the first embodiment. Therefore, in the following description, the description of the same configuration as in the first embodiment is omitted.
  • the master node 51a includes a first reference signal generator 61 (corresponding to the first reference signal generator 21 of the first embodiment) and a first calculator 62 (corresponding to the first calculator 22 of the first embodiment).
  • a storage unit 63 (corresponding to the storage unit 23 of the first embodiment), an interval counting unit 64 (corresponding to the interval counting unit 33 of the first embodiment), a transmission delay time notification unit 65, and a synchronization frame And a notification unit 66.
  • the main difference between the master node 51a and the main processor module 11a in the first embodiment is that the interval counter 33 provided in the slave processor module 11b in the first embodiment is added as the interval counter 64.
  • a transmission delay time notification unit 65 and a synchronization frame notification unit 66 are newly added. Therefore, in the following description, the main part of the second embodiment will be described, and the same movement as in the first embodiment will be omitted.
  • the interval counting unit 64 performs counting, and when a correction processing interval value corresponding to a correction processing interval for performing synchronization processing is preset, and the count value reaches the correction processing interval value, this is indicated. A correction processing start signal is generated. Since the correction processing interval value is substantially the same as that in the first embodiment, the description thereof is omitted here.
  • the correction processing interval is measured on the master node 51a side, but the correction processing interval may be measured on the slave node 51b side. In that case, when the count value reaches the correction processing interval value in the slave node 51b, a correction processing start signal is transmitted to the master node 51a, and the synchronous correction processing is started.
  • the transmission delay time notification unit 65 of the master node 51a After receiving the correction processing start signal, the transmission delay time notification unit 65 of the master node 51a transmits a transmission delay time request frame to the slave nodes 51b and 51c in order to calculate the transmission delay time.
  • This transmission delay time request frame has substantially the same format as a later-described synchronization frame and has a different data in a predetermined portion (for example, a command portion) in the synchronization frame.
  • the transmission delay time request frame is transmitted in synchronization with the first reference signal generated by the first reference signal generation unit 61.
  • the transmission delay time notification unit 65 receives a reception completion frame from the slave node that responds to the transmission delay time request frame. Then, the transmission delay time notification unit 65 calculates the round trip transmission delay time between the master node 51a and the slave nodes 51b and 51c from the difference between the time when the response frame is received and the time when the transmission delay time request frame is transmitted. To do. Then, the transmission delay time notification unit 65 transmits a transmission delay time notification frame including the calculated round trip transmission delay time to the slave nodes 51b and 51c in synchronization with the next first reference signal, whereby the slave nodes 51b and 51c. Is notified of the delay time caused by the communication path 52.
  • the master node 51a After notifying the round-trip transmission delay time, the master node 51a, based on the first reference signal (in synchronization with the first reference signal), sends the prepared synchronization frame to the slave nodes 51b, 51c. This process is executed by the synchronization frame notification unit 66.
  • the synchronization frame is a synchronization reference signal for matching the count value of the second reference signal generation unit 71 of the slave nodes 51b and 51c with the count value of the first reference signal generation unit 61 of the master node 51a. is there.
  • the slave nodes 51b and 51c include a second reference signal generator 71 (corresponding to the second reference signal generator 31 of the first embodiment) and a second calculator 72 (the second calculator 32 of the first embodiment). ), An overhead counting unit 74 (corresponding to the overhead counting unit 34 of the first embodiment), a count value acquiring unit 75 (corresponding to the count value acquiring unit 35 of the first embodiment), and a synchronization determining unit 76 (corresponding to the synchronization determination unit 36 of the first embodiment), a synchronization correction unit 77 (corresponding to the synchronization correction unit 37 of the first embodiment), and a storage unit 78 (storage unit 38 of the first embodiment).
  • a second reference signal generator 71 corresponding to the second reference signal generator 31 of the first embodiment
  • a second calculator 72 the second calculator 32 of the first embodiment.
  • An overhead counting unit 74 corresponding to the overhead counting unit 34 of the first embodiment
  • a count value acquiring unit 75 corresponding to the count value acquiring unit 35 of the first embodiment
  • a synchronization determining unit 76
  • the CPU 43 has a second reference signal generation unit 71 built therein. Since the slave nodes 51b and 51c have the same configuration, the following description will be made using the slave node 51b, and the description of the slave node 51c will be omitted.
  • the main differences from the processor module 11b of the first embodiment are that the synchronization determination unit 76 is different from the synchronization determination unit 36 of the first embodiment, and that a reception completion notification unit 79 and a frame reception unit 80 are added. It is. However, since the other components are substantially the same as those in the first embodiment, the description thereof is omitted here. Hereinafter, the synchronization correction processing of the slave node 51b including the transmission delay time of the communication path 52 will be described.
  • the reception completion notification unit 79 receives the above-described transmission delay time request frame from the master node 51a, and transmits a reception completion frame to the master node 51a according to the transmission delay time request frame.
  • the frame receiving unit 80 receives the above-described transmission delay time notification frame transmitted by the master node 51a, and saves the round-trip transmission delay time (value) included in the frame in the above-described memory 45 or the like. In this way, the slave node 51b obtains the round trip transmission delay time between the master node 51a and the slave node 51b from the master node 51a.
  • the slave node 51b that has obtained the round-trip transmission delay time from the master node 51a receives the synchronization frame and causes the second computing unit 72 to generate an interrupt.
  • the second calculation unit 72 starts a synchronization correction process described later.
  • the synchronization correction processing may be started with the round trip transmission delay time set to zero (0).
  • hardware logic such as FPGA 44 as the means for receiving the synchronization frame. .
  • the overhead counting unit 74 measures an overhead value until the synchronization correction process is executed, starting from the reception of the synchronization frame described above. Specifically, the overhead counting unit 74 functions as a hardware counter (timer) that receives and restarts the synchronization frame.
  • the count value acquisition unit 75 acquires the count value of the second reference signal generation unit 71 and the count value of the overhead count unit 74 at the time when the synchronization correction process is actually executed in response to reception of the synchronization frame. .
  • the synchronization determination unit 76 calculates the one-way transmission delay time of the communication path 52 by dividing the above-described round-trip transmission delay time by 2, and further converts the one-way transmission delay time and the count value of the overhead counter 74 described above into a time. The total delay time is calculated by adding the calculated value. Then, the synchronization determination unit 76 compares the obtained total delay time with a value obtained by time-converting the count value of the second reference signal generation unit 71 acquired by the count value acquisition unit 75. As a result of the comparison, when both are equal, the synchronization determination unit 76 determines that the first reference signal and the second reference signal are synchronized. When both are different, the first reference signal and the second reference signal are determined. Are determined to be asynchronous.
  • the synchronization means that the count value of the first reference signal generation unit 61 is equal to the count value of the second reference signal generation unit 71.
  • the synchronization determination unit 76 can, of course, determine synchronization / asynchronization by converting the count values of the respective counters into time as in the synchronization determination unit 36 of the first embodiment.
  • the synchronization correction unit 77 sets the reference value to the second reference signal. Set in the generation unit 71. If it is determined that the first reference signal and the second reference signal are asynchronous, a value that cancels the difference between the count value of the second reference signal generation unit 71 and the total delay time value is obtained. Specifically, the synchronization correction unit 77 obtains a synchronization correction value by subtracting the total delay time value from the count value of the second reference signal generation unit 71 acquired by the count value acquisition unit 75.
  • the synchronization correction unit 77 subtracts the obtained synchronization correction value from the reference value, and sets the subtracted value as a new reference value in the second reference signal generation unit 71.
  • the new reference value is a timer of the second reference signal generation unit 71 with respect to a reference value (default reference value) set in the second reference signal generation unit 71 when the synchronization determination unit 76 determines synchronization. Temporarily set to correct the value (temporary reference value).
  • the default reference value does not need to be rewritten thereafter if the default reference value is set in the second reference signal generation unit 71 and synchronization is maintained.
  • this embodiment can perform the synchronization correction process considering the influence of the transmission delay time when the synchronization reference signal (synchronization frame) is notified via the communication path 52. That is, in the second embodiment, the count value including the transmission delay time between the nodes and the overhead of the slave nodes 51b and 51c can be corrected, and synchronization between the nodes can be realized with high accuracy.
  • FIGS. 8 to 10 are time charts for explaining an example of synchronization correction processing in the second embodiment, and are examples of synchronization of count values between the master node 51a and the slave node 51b.
  • the reference value (processing cycle) in the second embodiment is set to 1000 ⁇ s as in the first embodiment, and this reference value can be appropriately changed by the programming device 55.
  • the first reference signal generator 61 of the master node 51a performs counting. When the count value reaches the reference value at time (1) in FIG. 8, a first reference signal is output. And the 1st calculating part 62 performs a predetermined
  • the second reference signal generation unit 71 of the slave node 51b performs counting. When the count value reaches the reference value at time (2) in FIG. 8, a second reference signal is output. And the 2nd calculating part 72 performs a predetermined
  • the interval counting unit 64 performs counting, and when the count value reaches the correction processing interval value ((3) in FIG. 8), a correction processing start signal is generated.
  • the synchronization correction process in the master node 51a is started in response to the correction process start signal.
  • the transmission delay time notification unit 65 of the master node 51a transmits a transmission delay time request frame in order to calculate the transmission delay time ((4) in FIG. 8).
  • the reception completion notifying unit 79 of the slave node 51b transmits the reception completion frame to the master node 51a according to the transmission delay time request frame ((5 in FIG. 8). )).
  • the transmission delay time notification unit 65 of the master node 51a calculates the round trip transmission delay time between the master node 51a and the slave node 51b according to the reception completion frame, and includes the calculated round trip transmission delay time (400 ⁇ s).
  • a transmission delay time notification frame is transmitted ((6) in FIG. 8).
  • the frame receiving unit 80 of the slave node 51b saves the round-trip transmission delay time (value) included in the frame in the memory 45 or the like ((7) in FIG. 8).
  • the synchronization frame notification unit 66 of the master node 51a transmits the synchronization frame as an interrupt signal to the slave node 51b ((8) in FIG. 8). Then, the slave node 51b receives the synchronization frame through the one-way transmission delay time (200 ⁇ s) of the communication path 52 at the time of (9) in FIG. 8, and activates the synchronization correction process by software in the slave node 51b. Yes. With the reception of the synchronization frame, the hardware counter of the overhead counter 74 is cleared and restarted ((10) in FIG. 8).
  • the count value acquisition unit 75 acquires the count value from the second reference signal generation unit 71 ((12) in FIG. 8) at the time (11) in FIG. The count value is acquired from the overhead counter 74 ((13) in FIG. 8).
  • the count value acquisition unit 75 refers to the count value of the second reference signal generation unit 71, converts it to time, and acquires 400 ⁇ s.
  • the synchronization determination unit 76 calculates a one-way transmission delay time 200 ⁇ s from the round-trip transmission delay time (400 ⁇ s), and adds the calculated transmission delay time and the time-converted count value of the overhead counter 74 to 200 ⁇ s.
  • the delay time is 400 ⁇ s.
  • the synchronization determination unit 76 compares the total delay time 400 ⁇ s with the 400 ⁇ s obtained by converting the count value of the second reference signal generation unit 71 acquired by the count value acquisition unit 75, and since both are equal, the first reference signal And the second reference signal are determined to be synchronized.
  • the synchronization correction unit 77 sets the reference value 1000 ⁇ s in the second reference signal generation unit 71 as usual. (The second reference signal generator 71 has not been restarted at the time of setting). The second reference signal generation unit 71 restarts because the count value reaches the reference value 1000 ⁇ s at the time point (14) in FIG.
  • FIG. 9 shows a case where the counter of the slave node 51b is delayed by 3 ⁇ s from the counter of the master node 51a.
  • the frame receiving unit 80 of the slave node 51b performs the round trip included in the transmission delay time notification frame. Since the processing until the transmission delay time (value) is saved in the memory 45 or the like is substantially the same as the processing in FIG. 8, the description thereof is omitted here.
  • the synchronization frame notification unit 66 of the master node 51a transmits the synchronization frame as an interrupt signal to the slave node 51b. Then, the slave node 51b receives the synchronization frame through the one-way transmission delay time (200 ⁇ s) of the communication path 52 at the time of FIG. 9 (2), and starts the synchronization correction process by software in the slave node 51b. . In addition, with the reception of the synchronization frame, the counter of the overhead counter 74 is cleared and restarted ((3) in FIG. 9).
  • the count value acquisition unit 75 acquires the count value from the second reference signal generation unit 71 ((5) in FIG. 9) at the time (4) in FIG. Then, the count value is acquired from the overhead counter 74 ((6) in FIG. 9).
  • the count value acquisition unit 75 refers to the count value of the second reference signal generation unit 71, converts it to time, and acquires 397 ⁇ s.
  • the synchronization determination unit 76 calculates a one-way transmission delay time 200 ⁇ s from the round-trip transmission delay time (400 ⁇ s), and adds the calculated transmission delay time and the time-converted count value of the overhead counter 74 to 200 ⁇ s. The delay time is 400 ⁇ s.
  • the synchronization determination unit 76 compares the total delay time 400 ⁇ s and the count value of the second reference signal generation unit 71 acquired by the count value acquisition unit 75 with time of 397 ⁇ s. It is determined that the signal and the second reference signal are asynchronous.
  • the synchronization correction unit 77 sets a temporary reference value in the second reference signal generation unit 71. Specifically, the synchronization correction unit 77 restarts the second reference signal generation unit 71 using the formula “reference value (processing period) ⁇ (total delay time ⁇ count value of the second reference signal generation unit 71)”. A value (reset value) is obtained, and the obtained count value is set in the second reference signal generator 71 as a temporary reference value.
  • the second reference signal generation unit 71 restarts because the count value reaches the temporary reference value 997 ⁇ s at the point (7) in FIG. Incidentally, the total delay time—the value of the count value of the second reference signal generator 71 is the synchronization correction value.
  • FIG. 10 shows a case where the counter of the slave node 51b is advanced by 3 ⁇ s from the counter of the master node 51a.
  • the frame receiving unit 80 of the slave node 51b performs the round trip included in the transmission delay time notification frame. Since the processing until the transmission delay time (value) is saved in the memory 45 or the like is substantially the same as the processing of FIGS. 8 and 9, the description thereof is omitted here.
  • the synchronization frame notification unit 66 of the master node 51a transmits the synchronization frame as an interrupt signal to the slave node 51b. Then, the slave node 51b receives the synchronization frame through the one-way transmission delay time (200 ⁇ s) of the communication path 52 at the time of FIG. 10 (2), and starts the synchronization correction process by software in the slave node 51b. . In addition, with the reception of the synchronization frame, the counter of the overhead counter 74 is cleared and restarted ((3) in FIG. 10).
  • the count value acquisition unit 75 acquires the count value from the second reference signal generation unit 71 ((5) in FIG. 10) at the time (4) in FIG. Then, the count value is acquired from the overhead counter 74 ((6) in FIG. 10).
  • the count value acquisition unit 75 refers to the count value of the second reference signal generation unit 71, converts it into time, and acquires 403 ⁇ s.
  • the synchronization determination unit 76 obtains a one-way transmission delay time of 200 ⁇ s from the round-trip transmission delay time (400 ⁇ s), and adds the obtained one-way transmission delay time to the time-converted count value of the overhead counting unit 74 of 200 ⁇ s.
  • the total delay time is 400 ⁇ s.
  • the synchronization determination unit 76 compares the total delay time 400 ⁇ s with the 403 ⁇ s obtained by converting the count value of the second reference signal generation unit 71 acquired by the count value acquisition unit 75 into time, and the first reference because the two are different. It is determined that the signal and the second reference signal are asynchronous.
  • the synchronization correction unit 77 sets a temporary reference value in the second reference signal generation unit 71.
  • the synchronization correction unit 77 subsequently changes the original reference value 1000 ⁇ s to the first cycle. 2 is set in the reference signal generation unit 71 (the second reference signal generation unit 71 has not been restarted at the time of setting). Then, the second reference signal generation unit 71 restarts when the count value reaches the reference value 1000 ⁇ s. That is, in the second embodiment, the slave counter can be restarted at substantially the same timing as the restart of the master counter in the next fourth cycle with respect to the third cycle. The value and the value of the counter on the slave side can be adjusted to substantially the same value.
  • the synchronization correction processing includes program processing of the count value acquisition unit 75, the synchronization determination unit 76, and the synchronization correction unit 77 as in the first embodiment.
  • the second reference signal generation unit 71 of the slave node 51b has been described on the assumption that it is built in the CPU 43, it is not limited to this. That is, the second reference signal generation unit 71 can be realized even if it is separate from the CPU 43. However, since the second reference signal generation unit 71 is built in the CPU 43, the second reference signal generation unit 71 cannot be hardware reset with a predetermined signal generated outside the CPU 43. In other words, the second reference signal generation unit 71 is a counter whose operation is controlled through a program. For this reason, in this embodiment, the reset process (restart process) of the second reference signal generation unit 71 needs to be executed by a program, and the overhead thereof leads to a synchronization error. Therefore, in this embodiment, a configuration for measuring overhead is required (the same applies to the first embodiment).
  • the synchronization correction process is an interrupt process that is activated by receiving a synchronization frame.
  • the slave node 51b obtains and holds the round trip transmission delay time from the master node 51a, and uses the held round trip transmission delay time in the synchronization correction processing.
  • the master node 51a includes the round trip transmission delay time in the synchronization frame and transmits it to the slave node 51b, and the slave node 51b that has received this uses the round trip transmission time included in the synchronization frame. .
  • the slave node 51b can utilize the round trip transmission delay time according to the situation in a timely manner. .
  • the transmission delay time notifying unit 65 may calculate the one-way transmission delay time by halving the calculated round-trip transmission delay time, and notify the slave node 51b of the calculated one-way transmission delay time.
  • the synchronization determination unit 76 of the slave node 51b may obtain the total delay time by using the given one-way transmission delay time as it is.
  • the first reference signal and the second reference signal can be synchronized including the transmission delay time of the signal through the communication path 52.
  • FIG. 11 is a diagram for explaining an example of a transmission delay time notification procedure according to the second embodiment.
  • the above-described master node 51 a and slave nodes 51 b and 51 c are provided, and each node 51 is connected in a state where signals can be transmitted and received via the communication path 52. To do. Further, in the following description, an example in which the master node 51a acquires the signal transmission delay time through the communication path 52 between the nodes 51 is shown.
  • the squares shown in FIG. 11 indicate frames, the squares on the line for each node 51 indicate transmission frames, and the squares below the lines indicate reception frames.
  • the frame shown in FIG. 11 includes a transmission delay time request frame 81 (“REQ *” in FIG. 11 (* indicates an identifier (eg, b, c) of each slave node, for example)), and reception is completed.
  • a frame 82 (“REC *” in FIG. 11), a transmission delay time notification frame 83 (“SET *” in FIG. 11), and a response frame 84 (“ANS *” in FIG. 11) to the transmission delay time notification frame 83
  • the master node 51a broadcasts a transmission delay time request frame 81b (REQb) for the slave node 51b on the communication path 52 in accordance with the master node synchronization standard.
  • the transmission delay time request frame 81b includes information (target node information) indicating a transmission delay time request for the slave node 51b.
  • the transmission delay time request frame 81b transmitted by broadcast is received by the slave nodes 51b and 51c via the communication path 52 after a predetermined transmission delay time.
  • the slave node 51b receives the transmission delay time request frame 81b with the delay time D1 from the master node synchronization reference
  • the slave node 51c receives the transmission delay time request with the delay time D2 from the master node synchronization reference.
  • the frame 81b is received.
  • each of the slave nodes 51b and 51c confirms the above-mentioned target node information included in the transmission delay time request frame 81b.
  • the transmission delay time request frame 81b is a request for the slave node 51b
  • the slave node 51b broadcasts the reception completion frame 82b (RECb) to the master node 51a.
  • the reception completion frame 82b includes information (target node information) indicating that it is a reception completion frame for the master node 51a.
  • the transmitted reception completion frame 82b is received by the master node 51a and the slave node 51c via the communication path 52.
  • the master node 51a and the slave node 51c confirm the above-described target node information included in the reception completion frame 82b.
  • the reception completion frame 82b is a frame for the master node 51a. Therefore, the master node 51a sets the transmission delay time for the slave node 51b based on the time information from the transmission of the transmission delay time request frame 81b transmitted according to the master node synchronization reference until the reception completion frame 82b is received.
  • the set transmission delay time may be a round trip transmission delay time in which a predetermined signal reciprocates between the master node 51a and the slave node 51b via the communication path 52, or may be a one-way transmission delay time.
  • the master node 51a creates a transmission delay time notification frame 83b (SETb) for notifying the slave node 51b of the set transmission delay time, and broadcasts the created transmission delay time notification frame 83b according to the master node synchronization standard. Send.
  • the transmission delay time notification frame 83b includes the target node information described above.
  • the transmission delay time notification frame 83b transmitted by broadcast is received by each of the slave nodes 51b and 51c after a predetermined transmission delay time via the communication path 52 in the same manner as the transmission delay time request frame 81b described above.
  • the slave node 51b determines that it is information for the own node from the target node information of the received transmission delay time notification frame 83b, and includes the transmission delay time included in the frame, the overhead time described above, and the like.
  • the synchronization correction process in the second embodiment is performed.
  • the slave node 51b creates a response frame 84b (ANSb) for the transmission delay time notification frame 83b, and broadcasts the created response frame 84b.
  • the response frame 84b includes information indicating that the frame is for the master node 51a (target node information), information indicating that the synchronization correction processing has been completed, and the like.
  • the transmitted response frame 84b is received by the master node 51a and the slave node 51c via the communication path 52, similarly to the reception completion frame 82b described above.
  • the master node 51a and the slave node 51c confirm the above-described target node information included in the response frame 84b.
  • the response frame 84b is a frame for the master node 51a. Therefore, the master node 51a can grasp that the synchronization correction processing is completed by the response frame 84b from the slave node 51b.
  • the slave node 51c receives a transmission delay time request frame 81b (REQb), a reception completion frame 82b (RECb), a transmission delay time notification frame 83b (SETb), and a response frame 84b (ANSb). However, since none of them is a frame for the own node, the received frame is discarded.
  • the contents up to the above are the transmission delay time notification procedure to the slave node 51b. Therefore, the master node 51a similarly notifies the slave node 51c of the transmission delay time.
  • the master node 51a broadcasts a transmission delay time request frame 81c (REQc) to the slave node 51c on the communication path 52 according to the master node synchronization standard.
  • the transmission delay time request frame 81c transmitted by broadcast is received by each of the slave nodes 51b and 51c via the communication path 52 with a predetermined transmission delay time (D1, D2) as described above.
  • the transmission delay time request frame 81c is a request for the slave node 51c
  • only the slave node 51c broadcasts a reception completion frame 82c (RECc) to the master node 51a.
  • the transmitted reception completion frame 82c is received by the master node 51a and the slave node 51c via the communication path 52.
  • the reception completion frame 82c is a frame for the master node 51a. Therefore, the master node 51a sets the transmission delay time for the slave node 51c based on the time information from the transmission of the transmission delay time request frame 81c transmitted according to the master node synchronization reference until the reception completion frame 82c is received.
  • the set transmission delay time may be a round trip transmission delay time in which a predetermined signal reciprocates between the master node 51a and the slave node 51c via the communication path 52, or may be a one-way transmission delay time.
  • the master node 51a creates a transmission delay time notification frame 83c (SETc) for notifying the slave node 51c of the set transmission delay time, and broadcasts the created transmission delay time notification frame 83c according to the master node synchronization standard. Send.
  • the transmission delay time notification frame 83c transmitted by broadcast is received by each of the slave nodes 51b and 51c via the communication path 52 with a predetermined transmission delay time (D1, D2) in the same manner as the transmission delay time request frame 81c described above.
  • D1, D2 predetermined transmission delay time
  • the slave node 51c determines from the target node information of the received transmission delay time notification frame 83c that the information is for the own node, and the transmission delay time included in the frame and the overhead time described above.
  • the synchronization correction process in the second embodiment including the above is performed.
  • the slave node 51c creates a response frame 84c (ANSc) for the transmission delay time notification frame 83c, and broadcasts the created response frame 84c.
  • the response frame 84c includes information indicating that the frame is for the master node 51a (target node information), information indicating that the synchronization correction processing has been completed, and the like.
  • the transmitted response frame 84c is received by the master node 51a and the slave node 51c via the communication path 52 in the same manner as the reception completion frame 82c described above.
  • the master node 51a and the slave node 51b confirm the above-described target node information included in the response frame 84c.
  • the response frame 84c is a frame for the master node 51a. Therefore, the master node 51a can recognize that the synchronization correction processing has been completed based on the response frame 84c from the slave node 51c.
  • the slave node 51b receives a transmission delay time request frame 81c (REQc), a reception completion frame 82c (RECc), a transmission delay time notification frame 83c (SETc), and a response frame 84c (ANSc). However, since none of them is a frame for the own node, the received frame is discarded.
  • REQc transmission delay time request frame 81c
  • RECc reception completion frame 82c
  • SETc transmission delay time notification frame
  • ANSc response frame 84c
  • the transmission delay time can be notified by sequentially performing the above-described processing on each of the slave nodes 51b and 51c of the communication path 52.
  • the transmission delay time notification procedure is not limited to the procedure described above.
  • a send counter may be provided inside and the response frame 84 may be controlled to be transmitted at different timings using the send counter.
  • the counter of each node is synchronized with the common memory network using the time division multiplex transmission method, and the entire apparatus is Synchronous control that matches the timing of control is possible.
  • the counter to be synchronized can be configured using a counter inside the microcomputer or using a counter such as an FPGA. Therefore, in the second embodiment, for example, a counter that is synchronized with the master node 51a at the reception timing of a frame to be transmitted and received and a counter that measures the processing time in the microcomputer are configured by hardware such as FPGA, for example. Processing errors can be corrected by calculating the count value with a microcomputer.
  • the node synchronization between the master and the slave has been described as an example of the node synchronization system 50.
  • the present invention is not limited to this.
  • sampling synchronization in a protection relay or the like It can also be applied to technology.
  • FIG. 12 is a diagram illustrating an example of a schematic configuration of a network transmission system including the node synchronization system 50 using the master node 51a and the slave nodes 51b and 51c in the second embodiment.
  • the network transmission system 90 shown in FIG. 12 includes a plurality of nodes 51 (nodes 51a to 51c in the example of FIG. 12) and a HUB 91 as one or a plurality of relay devices (in the example of FIG. 12, HUB 91a). 91e). Note that the number and type of nodes and relay devices, and the connection method are not limited thereto.
  • the master node of FIG. 7, that is, the node 51a is the node A (master station)
  • the slave nodes of FIG. 7, that is, the node 51b and the node 51c are the node B and node C (slave station).
  • the communication path of the network transmission system 90 is, for example, a star type having a relay device between the master node 51a and the slave node 51b.
  • the relay device uses HUB as an example.
  • the present embodiment is not limited to this, and for example, a router, a repeater, an optical converter, or the like can be used.
  • the master node 51a and the slave nodes 51b and 51c are, for example, programmable controllers (also referred to as a control device or PLC (Programmable Logic Controller)), and the communication path of the network transmission system 90 exchanges data between these programmable controllers.
  • Data exchange bus Examples of devices connected to the data exchange bus include a PC, a server, an I / O module, a drive device (for example, an inverter, a servo, and the like) in addition to the above-described programmable controller.
  • the node 51a and the node 51c are connected to the same HUB 91a, and the node 51b is connected to the node 51a and the node 51c via a 5-stage HUB (relay device). Yes.
  • a general Ethernet HUB employs an interface method called store & forward.
  • all the sent frames are stored in the reception buffer in the HUB, and are transmitted after performing the HUB internal processing (for example, abnormality determination, destination determination, etc.).
  • FIG. 13 is a diagram illustrating a schematic sequence example of the node synchronization method.
  • synchronization using the master node 51a and the slave node 51b will be described.
  • the present invention is not limited to this. Slave nodes can be synchronized.
  • the first reference signal generation unit 61 of the master node 51a generates a first reference signal (S11), and the second reference signal generation unit 71 of the slave node 51b generates a second reference signal.
  • a signal is generated (S12). Further, this process is cyclically operated in terms of hardware.
  • the interval counting unit 64 of the master node 51a counts the correction processing interval, and when the count value reaches the correction processing interval value, generates a correction processing start signal and starts the synchronous correction processing (S13).
  • the transmission delay time request frame is transmitted (S14).
  • the transmission delay time request frame is a data obtained by changing a predetermined portion of data included in the synchronization frame, and can be referred to as a synchronization frame.
  • the reception completion notification unit 79 of the slave node 51b Upon receiving the transmission delay time request frame, the reception completion notification unit 79 of the slave node 51b generates a reception completion notification and notifies the master node 51a (S15).
  • the transmission delay time notification unit 65 of the master node 51a Upon receiving the reception completion notification, calculates, for example, a round trip transmission delay time (S16), and generates a transmission delay time notification frame including the calculated round trip transmission delay time (S17). The generated transmission delay time notification frame is transmitted to the slave node 51b via the communication path 52 (S18).
  • the frame receiving unit 80 of the slave node 51b When receiving the transmission delay time notification frame, the frame receiving unit 80 of the slave node 51b saves the round-trip transmission delay time (value) included in the frame in the memory 45 or the like (S19). Then, the synchronization frame notification unit 66 of the master node 51a transmits the synchronization frame as an interrupt signal to the slave node 51b in synchronization with the first reference signal (S20).
  • the slave node 51b receives the synchronization frame (S21), the synchronization correction process by software is activated (S22) and the overhead counting unit 74 is restarted (S23).
  • the count value acquisition unit 75 acquires both count values of the second reference signal generation unit 71 and the overhead count unit 74 (S24), and the synchronization determination unit 76 performs synchronization determination based on the both count values.
  • S25 If it is determined to be asynchronous, an overall delay time is calculated (S26). The total delay time is, for example, a value obtained by adding a transmission delay time and an overhead value, but is not limited thereto.
  • the synchronization correction unit 77 of the slave node 51b performs synchronization correction using the calculated total delay time (S27). In the process illustrated in FIG. 13, the slave node 51b may transmit a response frame indicating that the synchronization correction has been completed to the master node 51a.
  • the master node 51a also performs node synchronization processing in the above-described procedure for slave nodes other than the slave node 51b connected to the communication path 52.
  • a program for causing a computer to function as each unit included in the above-described node 51 is generated, and the generated program is installed in the computer or the like, so that Node synchronization processing can be realized.
  • the present embodiment it is possible to synchronize a predetermined signal with high accuracy while suppressing the processing load. Thereby, for example, stabilization of the data exchange cycle of each node 51 can be realized. Further, according to the present embodiment, in a system having a star topology such as Ethernet, for example, the timer of each node 51 is synchronized with the shared memory network using the time division multiplex transmission method, thereby improving the transmission efficiency. The efficiency of data exchange, the stabilization of the data exchange cycle, etc. can be realized.
  • this embodiment can be applied to a synchronization method when performing a series of operations in a large-scale facility such as a steel plant using a plurality of operations. It can be widely applied as a synchronization method.
  • each step of the signal synchronization method and the node synchronization method of the present specification does not necessarily have to be processed in time series in the order described in the sequence diagram, and may include processing in parallel or by a subroutine. .
  • the present invention can be used for a signal synchronization system, a node synchronization system, a signal synchronization method, and a node synchronization method for synchronizing predetermined signals.

Abstract

A main module performs counting and generates a first reference signal from the count value rea ching a preset reference value. A sub-module performs counting, generates a second reference signal from the count value reaching a reference value, counts an interval at which a synchronization correction process is performed, and, after the count value reaches a correction processing interval value for the synchronization correction process to be performed, receives the first reference signal, whereupon the sub-module restarts and continues to count. Then, after a count value indicating an interval at which the synchronization correction process is performed reaches the correction processing interval value, the sub- module acquires a count value for generating the second reference signal and a count value restarted after receiving the first reference signal, and temporarily sets a value for offsetting the difference between the count value for generating the second reference signal and the count value restarted after receiving the first reference signal, the offsetting value being set as a reference value to the count value for generating the second reference signal.

Description

信号同期システム、ノード同期システム、信号同期方法、及び、ノード同期方法Signal synchronization system, node synchronization system, signal synchronization method, and node synchronization method
 本発明は、所定の信号を同期させるための信号同期システム、ノード同期システム、信号同期方法、及び、ノード同期方法に関する。 The present invention relates to a signal synchronization system, a node synchronization system, a signal synchronization method, and a node synchronization method for synchronizing predetermined signals.
 従来、プロセッサ等を用いて所定のプログラムを実行させるような場合に、大規模処理への対応や処理の迅速化、負荷分散等の目的から、複数のプロセッサを用いて処理を実行するマルチプロセッサシステムが知られている。このようなマルチプロセッサシステムでは、複数のプロセッサ間でカウンタ(タイマ)の同期を行うために、主プロセッサから従プロセッサのカウンタに対して割り込み信号等を発生させ、従プロセッサはその割り込み信号に合わせてカウンタの同期を図っている。 Conventionally, when a predetermined program is executed using a processor or the like, a multiprocessor system that executes processing using a plurality of processors for the purpose of dealing with large-scale processing, speeding up processing, load distribution, etc. It has been known. In such a multiprocessor system, in order to synchronize counters (timers) among a plurality of processors, an interrupt signal is generated from the main processor to the counter of the slave processor, and the slave processor matches the interrupt signal. The counter is synchronized.
 また、従来のプラント制御用伝送システム等の産業用ネットワークにおいては、システムを構成する各機器が、リアルタイム性を保証したうえで相互に大容量のデータ交換を行う必要がある。したがって、例えば各機器に搭載されるアプリケーションによるアクセス要求の発生に応じてイベント的に相互アクセスを行うような場合には、ネットワーク負荷がアプリケーションに依存してしまい、リアルタイム性を保証することができない場合がある。 Also, in an industrial network such as a conventional transmission system for plant control, it is necessary for each device constituting the system to exchange large amounts of data with each other while guaranteeing real-time performance. Therefore, for example, when mutual access is performed in an event according to the occurrence of an access request by an application installed in each device, the network load depends on the application, and real-time performance cannot be guaranteed. There is.
 そこで、従来、各機器に仮想的な共有メモリ(コモンメモリ)を設け、更新タイミングでネットワーク上の全ノード(局)へ自ノードデータの送信を行う技術が存在する。このような技術を用いた場合には、受信した各ノードが、そのデータを更新し、アプリケーションにアクセスさせることにより、リアルタイム性を保証したデータ交換方式を実現している。また、従来、上述したデータ交換時にネットワーク上での効率的な同報通信(ブロードキャスト通信)を実現するための手法が提案されている(例えば、特許文献1参照)。 Therefore, conventionally, there is a technology in which each device is provided with a virtual shared memory (common memory) and transmits its own node data to all nodes (stations) on the network at the update timing. When such a technique is used, each received node updates its data and accesses an application, thereby realizing a data exchange method that guarantees real-time performance. Conventionally, there has been proposed a method for realizing efficient broadcast communication (broadcast communication) on a network at the time of data exchange described above (see, for example, Patent Document 1).
 特許文献1では、各ノードの内蔵タイマによる時分割多重アクセス方式とマスタノードからの同期化フレームによるスレーブノードの内蔵タイマ補正を併用している。また、特許文献1に示す手法では、伝送路をバス又はシリアルケーブルで接続されたネットワークとして構成している。 In Patent Document 1, the time division multiple access method using the internal timer of each node and the internal timer correction of the slave node using the synchronization frame from the master node are used together. In the method shown in Patent Document 1, the transmission path is configured as a network connected by a bus or a serial cable.
特開2005-159754号公報JP 2005-159754 A
 ところで、上述したような主プロセッサと従プロセッサ間等でのカウンタ同期補正処理では、主プロセッサから従プロセッサのカウンタに対して直接(ハードウェア的に)リセットさせるのが好ましい。しかしながら、このカウンタは、内部で行う複数のプログラム処理の実行基準となるカウンタであるため、外部により勝手に書き換えられると他の処理に問題が生じ得る。また、カウンタが従プロセッサのCPU(Central Processing Unit)等に内蔵されているような場合には、主プロセッサから直接従プロセッサのカウンタをリセットすることができない。したがって、従来、一旦主プロセッサから従プロセッサに割り込み信号を送信し、従プロセッサがその信号を受信して、所定のソフトウェアを用いて間接的(ソフトウェア的)にカウンタのリセット処理を実行している。 By the way, in the counter synchronization correction processing between the main processor and the slave processor as described above, it is preferable to reset the counter of the slave processor directly (in hardware) from the main processor. However, since this counter is a counter that serves as an execution reference for a plurality of program processes performed internally, problems may occur in other processes if the counter is rewritten without permission. Further, when the counter is built in a CPU (Central Processing Unit) of the slave processor, the counter of the slave processor cannot be reset directly from the master processor. Therefore, conventionally, an interrupt signal is once transmitted from the main processor to the slave processor, and the slave processor receives the signal and executes a counter reset process indirectly (software) using predetermined software.
 そのような場合に、従プロセッサは、主プロセッサから割り込み信号を受信してから、その信号に対応する自カウンタのリセット処理を実行するまでの間にオーバーヘッド等による遅延時間が発生する。そのため、従来、リセット処理を行ったとしても、主プロセッサと従プロセッサとのカウンタ同期誤差が残ってしまう。 In such a case, the slave processor generates a delay time due to overhead or the like after receiving the interrupt signal from the main processor until executing the reset processing of its own counter corresponding to the signal. Therefore, conventionally, even if reset processing is performed, a counter synchronization error between the main processor and the slave processor remains.
 また、ネットワーク間のマスタースレーブ関係にあるノード間のカウンタの同期については、例えば、同期化フレームを受信しタイマをクリアする等の手法が考えられる。しかしながら、上述と同様に、同期化フレーム受信後にファームウェアが介在してカウンタのクリアを行うと、そのオーバーヘッド等の遅延時間によってカウンタに誤差が生じていた。 Also, for synchronization of counters between nodes in a master-slave relationship between networks, for example, a method of receiving a synchronization frame and clearing a timer can be considered. However, as described above, if the counter is cleared by firmware after receiving the synchronization frame, an error occurs in the counter due to a delay time such as overhead.
 したがって、従来手法である同期化フレームを用いたノード間の同期手法についても、マスタノードと各スレーブノードとの同期時間の測定の補正をマイコンのファームウェアで行っている場合には、マイコンの処理時間による誤差が発生する。 Therefore, even if the synchronization method between nodes using the synchronization frame, which is the conventional method, if the microcomputer firmware corrects the measurement of the synchronization time between the master node and each slave node, the microcomputer processing time An error will occur.
 そこで、カウンタの書き換えによる他の処理への影響を抑えるべく、主プロセッサから従プロセッサに送信される割り込み信号をハードウェア的に計数し、従プロセッサ内のカウンタとの差分に基づいて、従プロセッサのカウンタの計数目標(基準値)を調整することで、主プロセッサと従プロセッサの同期を図ることが考えられる。 Therefore, in order to suppress the influence on the other processing due to the rewriting of the counter, the interrupt signal transmitted from the main processor to the slave processor is counted by hardware, and based on the difference from the counter in the slave processor, It can be considered that the main processor and the slave processor are synchronized by adjusting the counting target (reference value) of the counter.
 主プロセッサのカウンタと従プロセッサのカウンタは、それぞれ電気的特性が異なるので、主プロセッサと従プロセッサとの間で、カウンタのずれがどの程度であるか推定することは難しい。そこで、上記従プロセッサのカウンタの基準値を調整する同期補正処理を割り込み信号毎に行えば、主プロセッサと従プロセッサとの同期が保たれることとなる。しかし、同期補正処理を頻繁に行うと、その処理負荷が増大し、本来実行すべき他の処理に影響を及ぼすおそれがある。 The counter of the main processor and the counter of the slave processor have different electrical characteristics, so it is difficult to estimate how much the counter shifts between the main processor and the slave processor. Therefore, if the synchronization correction process for adjusting the reference value of the counter of the slave processor is performed for each interrupt signal, the master processor and the slave processor are kept synchronized. However, if the synchronization correction process is frequently performed, the processing load increases, which may affect other processes that should be executed.
 本発明は、上記の点に鑑みて考案されたものであり、処理負荷を抑制しつつ、所定の信号を高精度に同期させる信号同期システム、ノード同期システム、信号同期方法、及び、ノード同期方法を提供することを目的とする。 The present invention has been devised in view of the above points. A signal synchronization system, a node synchronization system, a signal synchronization method, and a node synchronization method that synchronize a predetermined signal with high accuracy while suppressing a processing load. The purpose is to provide.
 上記の課題を解決するために、第1基準信号に従って動作する主モジュールと、第2基準信号に従って動作する従モジュールとを含み、第1基準信号に第2基準信号を同期させる本発明の信号同期システムは、主モジュールは、計数を行い、予め設定された基準値に計数値が達することで第1基準信号を生成する第1基準信号生成部を備え、従モジュールは、計数を行い、基準値に計数値が達することで第2基準信号を生成する第2基準信号生成部と、同期補正処理を行う間隔を計数する間隔計数部と、間隔計数部において同期補正処理を行う補正処理間隔値に計数値が達した後、第1基準信号を受信してリスタートし、計数を行うオーバーヘッド計数部と、間隔計数部において補正処理間隔値に計数値が達した後、第1基準信号の受信に応じて第2基準信号生成部の計数値及びオーバーヘッド計数部の計数値を取得する計数値取得部と、第2基準信号生成部の計数値とオーバーヘッド計数部の計数値との差分を相殺する値を、第2基準信号生成部に一時的に基準値として設定する同期補正部と、を備えることを特徴とする。 In order to solve the above problem, the signal synchronization of the present invention includes a main module that operates according to a first reference signal and a slave module that operates according to a second reference signal, and synchronizes the second reference signal with the first reference signal. The system includes a first reference signal generation unit that generates a first reference signal when the main module performs a count and the count value reaches a preset reference value, and the slave module performs a count and performs a reference value The second reference signal generating unit that generates the second reference signal when the count value reaches the time, the interval counting unit that counts the interval for performing the synchronization correction processing, and the correction processing interval value for performing the synchronization correction processing in the interval counting unit. After the count value has been reached, the first reference signal is received and restarted, and an overhead counter for counting, and after the count value reaches the correction processing interval value in the interval counter, the first reference signal is received. A counter value acquisition unit that acquires the count value of the second reference signal generation unit and the count value of the overhead counter unit, and a value that cancels the difference between the count value of the second reference signal generation unit and the count value of the overhead counter unit And a synchronization correction unit that temporarily sets the reference value as a reference value in the second reference signal generation unit.
 なお、本発明の構成要素、表現又は構成要素の任意の組み合わせを、方法、装置、システム、コンピュータプログラム、記録媒体、データ構造等に適用したものも本発明の態様として有効である。 In addition, what applied the arbitrary combination of the component of this invention, the expression, or the component to a method, an apparatus, a system, a computer program, a recording medium, a data structure, etc. is effective as an aspect of this invention.
 本発明によれば、処理負荷を抑制しつつ、所定の信号を高精度に同期させることができる。 According to the present invention, it is possible to synchronize a predetermined signal with high accuracy while suppressing a processing load.
第1実施形態における信号同期システムの概略構成の一例を示す図である。It is a figure which shows an example of schematic structure of the signal synchronization system in 1st Embodiment. プロセッサモジュールのハードウェア構成の一例を示す図である。It is a figure which shows an example of the hardware constitutions of a processor module. 第1実施形態における同期補正処理例を説明するためのタイムチャート図(その1)である。It is a time chart figure (the 1) for explaining the example of synchronous amendment processing in a 1st embodiment. 第1実施形態における同期補正処理例を説明するためのタイムチャート図(その2)である。It is a time chart figure (2) for explaining the example of synchronous correction processing in a 1st embodiment. 第1実施形態における同期補正処理例を説明するためのタイムチャート図(その3)である。FIG. 6 is a time chart (part 3) for explaining an example of synchronization correction processing in the first embodiment; 信号同期方法の概略的なシーケンス例を示す図である。It is a figure which shows the schematic example of a sequence of a signal synchronization method. 第2実施形態におけるノード同期システムの概略構成の一例を示す図である。It is a figure which shows an example of schematic structure of the node synchronous system in 2nd Embodiment. 第2実施形態における同期補正処理例を説明するためのタイムチャート図(その1)である。It is a time chart figure (the 1) for explaining an example of synchronous amendment processing in a 2nd embodiment. 第2実施形態における同期補正処理例を説明するためのタイムチャート図(その2)である。It is a time chart figure (the 2) for explaining an example of synchronous amendment processing in a 2nd embodiment. 第2実施形態における同期補正処理例を説明するためのタイムチャート図(その3)である。It is a time chart figure (the 3) for explaining the example of synchronous amendment processing in a 2nd embodiment. 第2実施形態における伝送遅延時間の通知手順の一例を説明するための図である。It is a figure for demonstrating an example of the notification procedure of the transmission delay time in 2nd Embodiment. 第2実施形態におけるマスタノード及びスレーブノードを用いたノード同期システムを含むネットワーク伝送システムの概略構成の一例を示す図である。It is a figure which shows an example of schematic structure of the network transmission system containing the node synchronous system using the master node and slave node in 2nd Embodiment. ノード同期方法の概略的なシーケンス例を示す図である。It is a figure which shows the schematic sequence example of a node synchronization method.
 以下に添付図面を参照しながら、本発明の好適な実施形態について詳細に説明する。かかる実施形態に示す寸法、材料、その他具体的な数値などは、発明の理解を容易とするための例示にすぎず、特に断る場合を除き、本発明を限定するものではない。なお、本明細書及び図面において、実質的に同一の機能、構成を有する要素については、同一の符号を付することにより重複説明を省略し、また本発明に直接関係のない要素は図示を省略する。 Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. The dimensions, materials, and other specific numerical values shown in the embodiment are merely examples for facilitating understanding of the invention, and do not limit the present invention unless otherwise specified. In the present specification and drawings, elements having substantially the same function and configuration are denoted by the same reference numerals, and redundant description is omitted, and elements not directly related to the present invention are not illustrated. To do.
(本実施形態について)
 本実施形態は、例えば、複数のプロセッサモジュールや、少なくとも1のプロセッサモジュールをそれぞれ含む複数のノード、装置、基板といった、主従関係にあるモジュール間でカウンタ(タイマ)同期を行う場合に、主モジュール側からの割り込み信号(カウンタリセット信号)に対し、従モジュール側のオーバーヘッド値を求める。また、本実施形態は、求めたオーバーヘッド値と従モジュール側のカウンタとに基づいて同期補正処理を行う。
(About this embodiment)
In the present embodiment, for example, when counter (timer) synchronization is performed between modules having a master-slave relationship such as a plurality of processor modules or a plurality of nodes, devices, and boards each including at least one processor module, the main module side In response to the interrupt signal (counter reset signal) from, the overhead value on the slave module side is obtained. In the present embodiment, the synchronization correction process is performed based on the obtained overhead value and the counter on the slave module side.
 ただし、当該同期補正処理を頻繁に実行すると処理負荷が増大するので、本実施形態においては、同期補正処理を行う間隔を計数し、所定の補正処理間隔値毎に定期的(間欠的)に同期補正処理を実行する。 However, if the synchronization correction process is frequently executed, the processing load increases. Therefore, in this embodiment, the interval for performing the synchronization correction process is counted and synchronized periodically (intermittently) for each predetermined correction process interval value. Execute correction processing.
 また、本実施形態は、主従関係にある装置をマスタノード及びスレーブノードとした場合に、通信路上の遅延時間(伝送遅延時間)も考慮して同期補正処理を行う。 Also, in this embodiment, when the master-slave device is a master node and a slave node, the synchronization correction process is performed in consideration of the delay time (transmission delay time) on the communication path.
 以下に、本実施形態における信号同期システム、及び、ノード同期システムを好適に実施した形態について、図面を用いて説明する。 Hereinafter, embodiments in which the signal synchronization system and the node synchronization system in the present embodiment are preferably implemented will be described with reference to the drawings.
(第1実施形態:信号同期システム)
 図1は、第1実施形態における信号同期システムの概略構成の一例を示す図である。図1に示す信号同期システム10は、一例として、モジュールとしての複数のプロセッサモジュール(図1の例では、プロセッサモジュール11a~11c)間で、カウンタ同期を行うためのマルチプロセッサの一例を示している。
(First embodiment: signal synchronization system)
FIG. 1 is a diagram illustrating an example of a schematic configuration of a signal synchronization system according to the first embodiment. The signal synchronization system 10 shown in FIG. 1 shows an example of a multiprocessor for performing counter synchronization among a plurality of processor modules (modules 11a to 11c in the example of FIG. 1) as an example. .
 図1に示す信号同期システム10は、複数のプロセッサモジュール11a~11c(以下、必要に応じて「プロセッサモジュール11」という)と、伝送バス12と、I/O(入出力)モジュール13(図1中、13a~13dで示す)と、外部機器14(図1中、14a~14dで示す)と、プログラミング装置15とを有する。ここで、図1の例では、説明の便宜上、プロセッサモジュール11aを主プロセッサモジュールとし、プロセッサモジュール11b,11cを従プロセッサモジュールとして、それぞれのプロセッサモジュールとしての主な構成について説明する。ただし、従プロセッサモジュールの数等については図1のように2つに限定されるものではない。 A signal synchronization system 10 shown in FIG. 1 includes a plurality of processor modules 11a to 11c (hereinafter referred to as “processor module 11” as necessary), a transmission bus 12, and an I / O (input / output) module 13 (FIG. 1). And 13a to 13d), an external device 14 (indicated by 14a to 14d in FIG. 1), and a programming device 15. Here, in the example of FIG. 1, for convenience of explanation, the main configuration of each processor module will be described with the processor module 11 a as a main processor module and the processor modules 11 b and 11 c as slave processor modules. However, the number of slave processor modules is not limited to two as shown in FIG.
 なお、本実施形態においては、上記の構成に限定されるものではなく、1つのプロセッサモジュールが主プロセッサモジュール11aにも従プロセッサモジュール11b,11cにもなり得るように同一の構成を有している。また、各プロセッサモジュール11は、伝送バス12により接続されている。なお、第1実施形態では、伝送バス12による遅延時間は生じていないものとする。 In the present embodiment, the present invention is not limited to the above-described configuration, and has the same configuration so that one processor module can be the main processor module 11a and the slave processor modules 11b and 11c. . Each processor module 11 is connected by a transmission bus 12. In the first embodiment, it is assumed that there is no delay time caused by the transmission bus 12.
 ここで、主プロセッサモジュール11aは、第1基準信号生成部21と、第1演算部22と、記憶部23とを有する。なお、図1の例では、第1基準信号生成部21は後述するCPUに内蔵されているが、これに限定されるものではなく、例えば第1基準信号生成部21とCPUとが別体で構成されていてもよい。また、上述した「内蔵されている」とは、例えば第1基準信号生成部21に対して、CPU内の各機能部(第1基準信号生成部21や第1演算部22)のみがアクセスできることを意味する。 Here, the main processor module 11 a includes a first reference signal generation unit 21, a first calculation unit 22, and a storage unit 23. In the example of FIG. 1, the first reference signal generation unit 21 is built in a CPU to be described later, but is not limited to this. For example, the first reference signal generation unit 21 and the CPU are separate. It may be configured. Further, the above-described “built-in” means that only the function units (the first reference signal generation unit 21 and the first calculation unit 22) in the CPU can access the first reference signal generation unit 21, for example. Means.
 また、従プロセッサモジュール11b,11cは、第2基準信号生成部31と、第2演算部32と、間隔計数部33と、オーバーヘッド計数部34と、計数値取得部35と、同期判定部36と、同期補正部37と、記憶部38とを有する。なお、図1の例では、第2基準信号生成部31がCPUに内蔵されているが、これに限定されるものではなく、例えば第2基準信号生成部31とCPUとが別体で構成されていてもよい。 The slave processor modules 11b and 11c include a second reference signal generator 31, a second calculator 32, an interval counter 33, an overhead counter 34, a count value acquisition unit 35, and a synchronization determination unit 36. , A synchronization correction unit 37 and a storage unit 38. In the example of FIG. 1, the second reference signal generation unit 31 is built in the CPU. However, the present invention is not limited to this. For example, the second reference signal generation unit 31 and the CPU are configured separately. It may be.
 第1基準信号生成部21は、計数を行い、予め設定された基準値に計数値が達することで第1基準信号を生成する。なお、第1基準信号生成部21は、ハードウェア的なカウンタ(以下、必要に応じて「タイマ」ともいう)として機能する。上述した計数値は、基準値に基づいてサイクリックにカウントされている。図1では、このようなハードウェア的なカウンタを破線で示している。 The first reference signal generator 21 performs counting and generates a first reference signal when the count value reaches a preset reference value. The first reference signal generation unit 21 functions as a hardware counter (hereinafter also referred to as “timer” as necessary). The above-described count value is cyclically counted based on the reference value. In FIG. 1, such a hardware counter is indicated by a broken line.
 第1演算部22は、第1基準信号生成部21によって生成された第1基準信号に応じて、記憶部23に記憶されている所定のアプリケーションプログラム等を実行(演算)する。また、第1基準信号は、割り込み信号(カウンタリセット信号)として、伝送バス12を介して従プロセッサモジュール11b,11cにも与えられる(送信される)。 The first calculation unit 22 executes (calculates) a predetermined application program stored in the storage unit 23 according to the first reference signal generated by the first reference signal generation unit 21. The first reference signal is also given (transmitted) to the slave processor modules 11b and 11c through the transmission bus 12 as an interrupt signal (counter reset signal).
 記憶部23は、第1演算部22で演算させる所定のアプリケーションプログラム(シーケンスプログラム)を記憶する。なお、第1演算部22が演算する所定のアプリケーションプログラムは、例えば主プロセッサモジュール11aに接続されたI/Oモジュール13aに指示を与え、I/Oモジュール13aによって外部機器14aを制御する処理である。そのため、記憶部23には、主に自プロセッサモジュール11aに接続されているI/Oモジュール13aや外部機器14aに対して所定の処理を実行するためのプログラムが記憶される。 The storage unit 23 stores a predetermined application program (sequence program) to be calculated by the first calculation unit 22. The predetermined application program calculated by the first calculation unit 22 is a process for giving an instruction to, for example, the I / O module 13a connected to the main processor module 11a and controlling the external device 14a by the I / O module 13a. . Therefore, the storage unit 23 stores a program for executing predetermined processing mainly on the I / O module 13a and the external device 14a connected to the own processor module 11a.
 つまり、主プロセッサモジュール11aは、第1基準信号を所定周期毎に生成し、第1演算部22は、第1基準信号に応じてアプリケーションプログラム(シーケンスプログラム)を実行(演算)することで所定の機器を制御し、当該アプリケーションプログラム(シーケンスプログラム)はサイクリックに実行される。 That is, the main processor module 11a generates a first reference signal at predetermined intervals, and the first calculation unit 22 executes (calculates) an application program (sequence program) in accordance with the first reference signal. The device is controlled, and the application program (sequence program) is cyclically executed.
 次に、従プロセッサモジュール11b,11cについて説明するが、従プロセッサモジュール11b,11cは同一の構成であるため、以下の説明では、従プロセッサモジュール11bを用いて説明し、従プロセッサモジュール11cの説明は省略する。 Next, the slave processor modules 11b and 11c will be described. Since the slave processor modules 11b and 11c have the same configuration, in the following description, the slave processor module 11b will be described, and the slave processor module 11c will be described. Omitted.
 第2基準信号生成部31は、計数を行い、上述した第1基準信号生成部21に設定されている基準値と同一の基準値が設定され、基準値に計数値が達することで第2基準信号を生成する。なお、第2基準信号生成部31は、ハードウェア的なカウンタとして機能する。上述した計数値は、基準値に基づいてサイクリックにカウントされている。付言すると、第1基準信号生成部21と第2基準信号生成部31のそれぞれのカウンタは、フリーランニングカウンタであり、自走している。 The second reference signal generation unit 31 performs counting, sets the same reference value as the reference value set in the first reference signal generation unit 21 described above, and reaches the reference value to reach the second reference value. Generate a signal. The second reference signal generation unit 31 functions as a hardware counter. The above-described count value is cyclically counted based on the reference value. In addition, the counters of the first reference signal generation unit 21 and the second reference signal generation unit 31 are free running counters and are self-running.
 第2演算部32は、第2基準信号生成部31によって生成された第2基準信号に応じて、記憶部38に記憶されている所定のアプリケーションプログラム等を実行(演算)する。 The second calculation unit 32 executes (calculates) a predetermined application program or the like stored in the storage unit 38 in accordance with the second reference signal generated by the second reference signal generation unit 31.
 なお、第2基準信号生成部31は、例えばCPU内の第2演算部32からしかアクセスすることができないカウンタであり、CPUに内蔵されたカウンタ(CPU内蔵カウンタ)である。すなわち、第2基準信号生成部31は、主プロセッサモジュール11a等の外部からハード的にリセットすることができないカウンタである。 The second reference signal generation unit 31 is a counter that can be accessed only from the second arithmetic unit 32 in the CPU, for example, and is a counter (CPU built-in counter) built in the CPU. That is, the second reference signal generation unit 31 is a counter that cannot be reset in hardware from the outside of the main processor module 11a and the like.
 また、第2演算部32は、主プロセッサモジュール11aからの第1基準信号(同期基準信号)を割り込み信号として受信し、後述の同期補正処理を起動する。 Further, the second calculation unit 32 receives the first reference signal (synchronization reference signal) from the main processor module 11a as an interrupt signal, and activates a synchronization correction process described later.
 間隔計数部33は、計数を行い、同期処理を行う補正処理間隔に相当する補正処理間隔値が予め設定され、補正処理間隔値に計数値が達すると、その旨を示す補正処理開始信号を生成する。 The interval counting unit 33 performs counting and generates a correction processing start signal indicating that a correction processing interval value corresponding to a correction processing interval for performing synchronization processing is set in advance and reaches the correction processing interval value. To do.
 なお、補正処理間隔値は、以下のような計算を通じて設定されている。例えば、当該信号同期システムに要求される加工精度を満たすために許容される、主プロセッサモジュール11aと従プロセッサモジュール11bとの同期誤差が10μsであるとする。この場合、本実施形態では、同期誤差が1~5μsとなるまでの最短時間を計算する。ここで、1μs以上としたのは、それより短いと、同期補正処理の頻度が高くなって処理負荷が増加するからであり、5μs以下としたのは、10μsに対するマージンを考慮したものである。 The correction processing interval value is set through the following calculation. For example, it is assumed that the synchronization error between the main processor module 11a and the slave processor module 11b, which is allowed to satisfy the processing accuracy required for the signal synchronization system, is 10 μs. In this case, in this embodiment, the shortest time until the synchronization error reaches 1 to 5 μs is calculated. Here, the reason why it is 1 μs or more is that if it is shorter than that, the frequency of synchronization correction processing increases and the processing load increases. The reason why it is 5 μs or less is that the margin for 10 μs is taken into consideration.
 このとき、主プロセッサモジュール11aと従プロセッサモジュール11bとで用いられる発振器の周波数が50MHz、発振精度が50ppmであったとする。この条件下において、同期誤差が1μsとなる最短時間は、1クロックの時間×同期許容誤差ずれる発振回数であり、20ns×((1μs/20ns)×(1/50ppm))=20msとなる。同様に、同期誤差が5μsとなる最短時間は、100msとなる。したがって、補正処理間隔値は、20ms~100msを計数値に換算した値とするとよい。補正処理間隔値をこのような範囲に設定し、同期補正処理を間欠的に実行することで、処理負荷を抑制しつつ、より高い加工精度や生産品質の向上を実現できる。 At this time, it is assumed that the frequency of the oscillator used in the main processor module 11a and the sub processor module 11b is 50 MHz and the oscillation accuracy is 50 ppm. Under this condition, the shortest time when the synchronization error is 1 μs is the time of 1 clock × the number of oscillations deviating from the synchronization tolerance, and is 20 ns × ((1 μs / 20 ns) × (1/50 ppm)) = 20 ms. Similarly, the shortest time when the synchronization error is 5 μs is 100 ms. Therefore, the correction processing interval value may be a value obtained by converting 20 ms to 100 ms into a count value. By setting the correction processing interval value in such a range and executing the synchronous correction processing intermittently, it is possible to realize higher machining accuracy and improved production quality while suppressing the processing load.
 オーバーヘッド計数部34は、計数を行い、補正処理開始信号の受信後、すなわち、間隔計数部33の計数値が補正処理間隔値に達した後、上述した第1基準信号の受信を起点として、同期補正処理が実行されるまでのオーバーヘッド値を計測する。具体的には、オーバーヘッド計数部34は、第1基準信号を受信してリスタートするハードウェア的なカウンタ(タイマ)として機能する。 The overhead counting unit 34 counts and synchronizes after reception of the first reference signal described above after reception of the correction processing start signal, that is, after the count value of the interval counting unit 33 reaches the correction processing interval value. The overhead value until the correction process is executed is measured. Specifically, the overhead counter 34 functions as a hardware counter (timer) that receives and restarts the first reference signal.
 オーバーヘッド計数部34はハードウェアで構成されたカウンタなので、第1基準信号に対して直ぐに反応するが、同期補正処理は、例えば、計数値を読み込むための準備が整うまでに時間を要する。この計数値を読み込むための準備が整うまでに要する時間がオーバーヘッドとなる。なお、オーバーヘッドとは、あるイベントが発生してからそのイベントに対する処理(ソフトウェア)が実際に実行されるまでの遅延時間を意味するが、本例ではオーバーヘッド計数部34がリスタートされた起点から同期補正処理が実際に行われるまでの時間であり、これに限定されるものではない。 Since the overhead counting unit 34 is a counter configured by hardware, it reacts immediately to the first reference signal. However, the synchronization correction processing takes time until preparation for reading the count value is completed, for example. The time required to prepare for reading the count value is an overhead. The overhead means a delay time from the occurrence of a certain event until the processing (software) for the event is actually executed. In this example, the overhead is synchronized from the starting point when the overhead counting unit 34 is restarted. The time until correction processing is actually performed is not limited to this.
 計数値取得部35は、補正処理開始信号の受信後、すなわち、間隔計数部33の計数値が補正処理間隔値に達した後、第1基準信号の受信に応じ、同期補正処理が実際に実行される時点(開始時点)での、第2基準信号生成部31の計数値及びオーバーヘッド計数部34の計数値を取得する。 After receiving the correction processing start signal, that is, after the count value of the interval counter 33 reaches the correction processing interval value, the count value acquisition unit 35 actually executes the synchronization correction processing in response to reception of the first reference signal. The count value of the second reference signal generation unit 31 and the count value of the overhead count unit 34 at the time (starting point) to be obtained are acquired.
 同期判定部36は、計数値取得部35によって取得された、第2基準信号生成部31の計数値とオーバーヘッド計数部34の計数値とが等しいとき、第1基準信号と第2基準信号とが同期していると判定する。また、同期判定部36は、計数値取得部35によって取得された、第2基準信号生成部31の計数値とオーバーヘッド計数部34の計数値とが異なるとき、上述した第1基準信号と第2基準信号とが非同期であると判定する。 When the count value of the second reference signal generation unit 31 and the count value of the overhead count unit 34 acquired by the count value acquisition unit 35 are equal to each other, the synchronization determination unit 36 determines that the first reference signal and the second reference signal are It is determined that they are synchronized. Further, the synchronization determination unit 36, when the count value of the second reference signal generation unit 31 and the count value of the overhead counter 34 acquired by the count value acquisition unit 35 are different from each other, It is determined that the reference signal is asynchronous.
 また、同期判定部36は、計数値取得部35によって取得された第2基準信号生成部31の計数値とオーバーヘッド計数部34の計数値とを時間換算し、双方の時間が等しいときに同期していると判定し、また双方の時間が異なるときには非同期であると判定することもできる。つまり、第1実施形態では、各プロセッサモジュール11間において、各カウンタの1クロックあたりの単位時間が等しくない場合もありえる。したがって、そのような場合には、各計数値を時間に換算し、換算された時間で同期/非同期の判定を行う。 The synchronization determination unit 36 converts the count value of the second reference signal generation unit 31 acquired by the count value acquisition unit 35 and the count value of the overhead count unit 34 into time, and synchronizes when both times are equal. It can also be determined that it is asynchronous, and when both times are different, it can also be determined that they are asynchronous. That is, in the first embodiment, the unit time per clock of each counter may not be equal between the processor modules 11. Therefore, in such a case, each count value is converted into time, and synchronous / asynchronous determination is performed at the converted time.
 同期補正部37は、同期判定部36が第1基準信号と第2基準信号とが同期していると判定すると、基準値を第2基準信号生成部31に設定する。また、同期補正部37は、同期判定部36が第1基準信号と第2基準信号とが非同期であると判定すると、第2基準信号生成部31の計数値とオーバーヘッド計数部34の計数値との差分を相殺する値を求める。具体的に、同期補正部37は、計数値取得部35によって取得された、第2基準信号生成部31の計数値から、オーバーヘッド計数部34の計数値を差し引いて同期補正値を求める。次に、同期補正部37は、求めた同期補正値を基準値から差し引き、差し引いた値を第2基準信号生成部31に新たな基準値として設定する。この新たな基準値とは、同期判定部36が同期を判定したときに使われるタイマ基準値(デフォルトの基準値)に対し、同期判定部36が非同期を判定したときに一時的に使われるタイマ基準値である。 The synchronization correction unit 37 sets the reference value in the second reference signal generation unit 31 when the synchronization determination unit 36 determines that the first reference signal and the second reference signal are synchronized. In addition, when the synchronization determination unit 36 determines that the first reference signal and the second reference signal are asynchronous, the synchronization correction unit 37 determines the count value of the second reference signal generation unit 31 and the count value of the overhead count unit 34. The value which cancels the difference of is obtained. Specifically, the synchronization correction unit 37 subtracts the count value of the overhead counter 34 from the count value of the second reference signal generation unit 31 acquired by the count value acquisition unit 35 to obtain the synchronization correction value. Next, the synchronization correction unit 37 subtracts the obtained synchronization correction value from the reference value, and sets the subtracted value as a new reference value in the second reference signal generation unit 31. The new reference value is a timer that is temporarily used when the synchronization determination unit 36 determines asynchronous with respect to the timer reference value (default reference value) used when the synchronization determination unit 36 determines synchronization. This is the reference value.
 また、同期判定部36が第1基準信号と第2基準信号とが非同期であると判定し、差し引いた値を第2基準信号生成部31に新たな基準値として設定し、その差し引いた値での計数が完了すると、同期補正部37は、速やかに、基準値を第2基準信号生成部31に設定する。こうして、一時的に基準値を同期補正値分だけ変更することができる。ここでは、同期補正値分の補正を一度に実行する例を挙げているが、かかる場合に限らず、複数回に分けて実行してもよい。その場合においても、同期補正部37は、同期補正処理が完了した後、基準値を第2基準信号生成部31に設定する。 Further, the synchronization determination unit 36 determines that the first reference signal and the second reference signal are asynchronous, sets the subtracted value as a new reference value in the second reference signal generation unit 31, and uses the subtracted value. When the counting is completed, the synchronization correction unit 37 quickly sets the reference value in the second reference signal generation unit 31. Thus, the reference value can be temporarily changed by the synchronization correction value. Here, an example is given in which the correction for the synchronization correction value is executed at a time, but the present invention is not limited to this, and it may be executed in multiple steps. Even in that case, the synchronization correction unit 37 sets the reference value in the second reference signal generation unit 31 after the synchronization correction processing is completed.
 なお、同期補正部37は、同期判定部36が第1基準信号と第2基準信号との同期を判定すれば、その都度上述したデフォルトの基準値を第2基準信号生成部31に設定してもよいが、同期が保たれている場合には、一度デフォルトの基準値を設定すれば、何もしなくてもよい。 The synchronization correction unit 37 sets the above-described default reference value in the second reference signal generation unit 31 each time the synchronization determination unit 36 determines the synchronization between the first reference signal and the second reference signal. However, if synchronization is maintained, once the default reference value is set, nothing needs to be done.
 また、本実施形態では、補正処理間隔毎に同期補正処理が実行されるので、第2基準信号生成部31の計数値とオーバーヘッド計数部34の計数値とが異なる可能性が高く、同期判定部36が、第1基準信号と第2基準信号とが非同期であると判定することが多い。そこで、同期判定部36による判定を実行することなく、すなわち、第1基準信号と第2基準信号とが同期であるか非同期であるかに拘わらず、同期補正部37が第2基準信号生成部31の計数値とオーバーヘッド計数部34の計数値との差分を相殺する値を求め、その値を第2基準信号生成部31に新たな基準値として設定してもよい。 In the present embodiment, since the synchronization correction process is executed at every correction process interval, there is a high possibility that the count value of the second reference signal generation unit 31 and the count value of the overhead count unit 34 are different, and the synchronization determination unit Often, 36 determines that the first reference signal and the second reference signal are asynchronous. Therefore, the synchronization correction unit 37 does not execute the determination by the synchronization determination unit 36, that is, regardless of whether the first reference signal and the second reference signal are synchronous or asynchronous, the synchronization correction unit 37 performs the second reference signal generation unit. A value that cancels the difference between the count value of 31 and the count value of the overhead counter 34 may be obtained, and the value may be set as a new reference value in the second reference signal generator 31.
 このように、同期判定部36の構成を省略することにより、判定処理が不要になり、判定に費やす処理分、処理負荷を軽減することが可能となる。 Thus, by omitting the configuration of the synchronization determination unit 36, the determination process becomes unnecessary, and the processing load for the determination can be reduced.
 記憶部38は、第2演算部32で演算させる所定のアプリケーションプログラム(シーケンスプログラム)を記憶する。なお、第2演算部32が演算する所定のアプリケーションプログラムは、例えば従プロセッサモジュール11bに接続されたI/Oモジュール13b,13cに指示を与え、I/Oモジュール13b,13cによって外部機器14b,14cを制御する処理である。そのため、記憶部38には、主に自プロセッサモジュール11bに接続されているI/Oモジュール13b,13cや外部機器14b,14cに対して所定の処理を実行するためのプログラムが記憶される。 The storage unit 38 stores a predetermined application program (sequence program) that is calculated by the second calculation unit 32. The predetermined application program calculated by the second calculation unit 32 gives instructions to the I / O modules 13b and 13c connected to the slave processor module 11b, for example, and the external devices 14b and 14c are transmitted by the I / O modules 13b and 13c. It is a process to control. Therefore, the storage unit 38 stores a program for executing predetermined processing mainly on the I / O modules 13b and 13c and the external devices 14b and 14c connected to the own processor module 11b.
 I/Oモジュール13は、外部機器14等と入出力処理を行う。例えば、I/Oモジュール13は、接続された外部機器14等から得られるデータ等をプロセッサモジュール11に出力(送信)したり、プロセッサモジュール11により演算処理された結果を外部機器14等に出力したり、記憶したりする。つまり、プロセッサモジュール11は、I/Oモジュール13から得られた入力データをアプリケーションプログラムで演算し、この演算結果をI/Oモジュール13に出力データとして与えることにより、外部機器14を制御する。 The I / O module 13 performs input / output processing with the external device 14 and the like. For example, the I / O module 13 outputs (transmits) data or the like obtained from the connected external device 14 or the like to the processor module 11, or outputs a result processed by the processor module 11 to the external device 14 or the like. Or remember. That is, the processor module 11 controls the external device 14 by calculating the input data obtained from the I / O module 13 by the application program and giving the calculation result to the I / O module 13 as output data.
 外部機器14は、例えば各種センサやモータ、記録装置等である。外部機器14は、I/Oモジュール13からの制御信号等に基づいて、データの検出や駆動、データの入出力等を行う。 The external device 14 is, for example, various sensors, motors, recording devices, or the like. The external device 14 detects and drives data, inputs / outputs data, and the like based on a control signal from the I / O module 13.
 ここで、基準値は、プロセッサモジュール11a,プロセッサモジュール11b,プロセッサモジュール11cのそれぞれに予め設定されていてもよく、それぞれに外部接続されるプログラミング装置15(設定装置)からも設定することができる。 Here, the reference value may be set in advance in each of the processor module 11a, the processor module 11b, and the processor module 11c, or may be set from a programming device 15 (setting device) externally connected thereto.
 プログラミング装置15は、ユーザ等が使用するPC(Personal Computer)等にプロセッサモジュール11と通信し、基準値を設定する機能を付加すれば実現できるが、これに限定されるものではなく、専用の設定装置であってもよい。これにより、ユーザ毎に基準値(処理周期)を任意に調整することができる。 The programming device 15 can be realized by adding a function for setting a reference value by communicating with the processor module 11 to a PC (Personal Computer) used by a user or the like. It may be a device. Thereby, a reference value (processing cycle) can be arbitrarily adjusted for each user.
 ここで、上述の例では、信号同期システム10の一例としてマルチプロセッサについて説明したが、信号同期システム10としては、第1基準信号生成部21と、第2基準信号生成部31と、オーバーヘッド計数部34と、計数値取得部35と、同期判定部36と、同期補正部37とを含んでいればよい。 Here, in the above-described example, the multiprocessor has been described as an example of the signal synchronization system 10. However, the signal synchronization system 10 includes a first reference signal generation unit 21, a second reference signal generation unit 31, and an overhead counting unit. 34, the count value acquisition unit 35, the synchronization determination unit 36, and the synchronization correction unit 37 may be included.
 なお、信号同期システム10の適用例については、マルチプロセッサに限定されるものではなく、例えば主装置側を原子時計による日付・時刻情報のデジタル信号を送信する送信局とし、従装置側を電波時計としたタイマ同期システムとしての応用も可能である。 The application example of the signal synchronization system 10 is not limited to a multiprocessor. For example, the main device side is a transmitting station that transmits a digital signal of date / time information by an atomic clock, and the slave device side is a radio wave clock. Application as a timer synchronization system is also possible.
(プロセッサモジュール11のハードウェア構成例)
 次に、プロセッサモジュール11のハードウェア構成例について、図を用いて説明する。図2は、プロセッサモジュール11のハードウェア構成の一例を示す図である。図2に示すプロセッサモジュール11は、入力部41と、出力部42と、CPU43と、FPGA44と、メモリ45と、外部インタフェース46とを有し、これらは共通バスBにより接続されている。
(Hardware configuration example of the processor module 11)
Next, a hardware configuration example of the processor module 11 will be described with reference to the drawings. FIG. 2 is a diagram illustrating an example of a hardware configuration of the processor module 11. The processor module 11 illustrated in FIG. 2 includes an input unit 41, an output unit 42, a CPU 43, an FPGA 44, a memory 45, and an external interface 46, which are connected by a common bus B.
 入力部41は、例えばユーザ等からのプログラムの実行等、各種操作信号を入力する。なお、入力部41は、例えばユーザ等が操作するキーボードや、マウス、タッチパネル等のポインティングデバイスを有していてもよく、音声等により入力する場合には、音声入力デバイスを有していてもよい。 The input unit 41 inputs various operation signals such as execution of a program from a user or the like. Note that the input unit 41 may have a keyboard operated by a user or the like, a pointing device such as a mouse or a touch panel, and may have a voice input device when inputting by voice or the like. .
 出力部42は、本実施形態における処理を行うプロセッサモジュール11を操作するのに必要な各種ウィンドウやデータ等を表示するディスプレイを有し、CPU43が実行する制御プログラムの実行経過や結果等を表示する。 The output unit 42 includes a display that displays various windows and data necessary for operating the processor module 11 that performs processing in the present embodiment, and displays the execution progress and results of the control program executed by the CPU 43. .
 CPU43は、OS(Operating System)等の制御プログラム、及びメモリ45に格納されている実行プログラムに基づいて、各種演算や各ハードウェア構成部とのデータの入出力等、プロセッサモジュール11全体の処理を制御することで本実施形態における各処理を実現する。また、CPU43は、メモリ45と協働して、上述した第1演算部22、第2演算部32、計数値取得部35、同期判定部36、同期補正部37として実質的に機能し、第1基準信号生成部21、第2基準信号生成部31を内蔵する。なお、プログラム実行中に必要な各種情報等は、メモリ45から取得し、実行結果等をメモリ45に格納してもよい。 Based on a control program such as an OS (Operating System) and an execution program stored in the memory 45, the CPU 43 performs processing of the entire processor module 11 such as various operations and data input / output with each hardware component. Each process in this embodiment is realized by controlling. In addition, the CPU 43 cooperates with the memory 45 to substantially function as the first calculation unit 22, the second calculation unit 32, the count value acquisition unit 35, the synchronization determination unit 36, and the synchronization correction unit 37 described above. A first reference signal generation unit 21 and a second reference signal generation unit 31 are incorporated. Various information necessary during program execution may be acquired from the memory 45 and the execution result or the like may be stored in the memory 45.
 FPGA(Field-Programmable Gate Array)44は、論理回路を書き換え可能な集積回路である。FPGA44は、CPU43を補助する様々な論理回路で構成され、本実施形態では、特に、間隔計数部33、オーバーヘッド計数部34として機能する。ただし、間隔計数部33はソフトウェアで処理されてもよい。 An FPGA (Field-Programmable Gate Array) 44 is an integrated circuit that can rewrite a logic circuit. The FPGA 44 is composed of various logic circuits that assist the CPU 43, and particularly functions as the interval counting unit 33 and the overhead counting unit 34 in the present embodiment. However, the interval counting unit 33 may be processed by software.
 メモリ45は、CPU43により読み出された実行プログラム等を格納する。なお、メモリ45は、ROM(Read Only Memory)やRAM(Random Access Memory)等からなる。また、メモリ45は、補助記憶装置として、ハードディスク等のストレージ手段を有していてもよい。また、メモリ45は、本実施形態における実行プログラムやコンピュータに設けられた制御プログラム等を記憶し、必要に応じて入出力を行う。なお、メモリ45は、上述した記憶部23,38等に対応する。 The memory 45 stores an execution program read by the CPU 43 and the like. The memory 45 includes a ROM (Read Only Memory), a RAM (Random Access Memory), and the like. Further, the memory 45 may have storage means such as a hard disk as an auxiliary storage device. The memory 45 stores an execution program in the present embodiment, a control program provided in a computer, and the like, and performs input / output as necessary. The memory 45 corresponds to the storage units 23 and 38 described above.
 外部インタフェース46は、伝送バス12等を介して他のプロセッサモジュール11間とのデータや制御信号の送受信を行う。また、外部インタフェース46は、接続されたI/Oモジュール13とのデータや制御信号の送受信等も行う。 The external interface 46 transmits / receives data and control signals to / from other processor modules 11 via the transmission bus 12 and the like. The external interface 46 also transmits / receives data and control signals to / from the connected I / O module 13.
 上述したハードウェア構成により、本実施形態における同期補正処理を実行することが可能となる。また、実行プログラムをインストールすることにより、汎用のパーソナルコンピュータ等で本実施形態における同期補正処理を容易に実現することが可能となる。 With the hardware configuration described above, it is possible to execute the synchronization correction processing in this embodiment. In addition, by installing the execution program, the synchronization correction processing in the present embodiment can be easily realized by a general-purpose personal computer or the like.
 次に、第1実施形態における同期補正処理例について以下に説明する。 Next, an example of synchronization correction processing in the first embodiment will be described below.
(第1実施形態における同期補正処理例)
 図3~図5は、第1実施形態における同期補正処理例を説明するためのタイムチャート図(その1~その3)である。図3~図5に示す例では、主プロセッサモジュール11aと、従プロセッサモジュール11bとの間における計数値の同期例を示している。なお、第1実施形態における基準値(処理周期)は、1000μsとするが、これに限定されるものではなく、例えば上述したプログラミング装置15により適宜設定を変更することができる。
(Example of synchronization correction processing in the first embodiment)
3 to 5 are time chart diagrams (No. 1 to No. 3) for explaining an example of the synchronization correction processing in the first embodiment. In the example shown in FIGS. 3 to 5, an example of synchronization of count values between the main processor module 11a and the slave processor module 11b is shown. The reference value (processing cycle) in the first embodiment is 1000 μs, but is not limited to this. For example, the setting can be appropriately changed by the programming device 15 described above.
 図3では、主プロセッサモジュール11aの第1基準信号生成部21が計数を行っている。その計数値が図3の(1)時点で基準値に達すると、第1基準信号を出力する。そして、第1演算部22は、当該第1基準信号に応じて所定の処理を実行する。図3中、ハッチングで示した三角形の領域は、計数値の推移を示し、時間の経過に従い計数値が増加し、計数目標(例えば基準値)に達するとリセットされる。 In FIG. 3, the first reference signal generator 21 of the main processor module 11a performs counting. When the count value reaches the reference value at time (1) in FIG. 3, a first reference signal is output. And the 1st calculating part 22 performs a predetermined | prescribed process according to the said 1st reference signal. In FIG. 3, a triangular area indicated by hatching indicates the transition of the count value, and the count value increases as time passes, and is reset when the count target (for example, a reference value) is reached.
 また、従プロセッサモジュール11bの第2基準信号生成部31が計数を行っている。その計数値が図3の(2)時点で基準値に達すると、第2基準信号を出力する。そして、第2演算部32は、当該第2基準信号に応じて所定の処理を実行する。このように、主プロセッサモジュール11a及び従プロセッサモジュール11bでは、それぞれ、独立した第1基準信号及び第2基準信号に応じて所定の処理が遂行される。 Further, the second reference signal generation unit 31 of the slave processor module 11b performs counting. When the count value reaches the reference value at time (2) in FIG. 3, a second reference signal is output. And the 2nd calculating part 32 performs a predetermined | prescribed process according to the said 2nd reference signal. In this manner, the main processor module 11a and the slave processor module 11b perform predetermined processing according to the independent first reference signal and second reference signal, respectively.
 また、従プロセッサモジュール11bでは、間隔計数部33が計数を行い、計数値が補正処理間隔値に達すると(図3の(3))、補正処理開始信号を生成する。かかる補正処理開始信号に応じて同期補正処理の準備が開始される。 In the slave processor module 11b, the interval counter 33 performs counting, and when the count value reaches the correction processing interval value ((3) in FIG. 3), a correction processing start signal is generated. In response to the correction processing start signal, preparation for the synchronous correction processing is started.
 主プロセッサモジュール11aで生成される第1基準信号は、割り込み信号として従プロセッサモジュール11bに送信されている。従プロセッサモジュール11bは、第1基準信号を割り込みとして受信し、ソフトウェアによる同期補正処理を起動させている(図3の(4))。これと共に従プロセッサモジュール11bのオーバーヘッド計数部34は、当該ハードウェアによるカウンタの計数値をクリアしてリスタートしている(図3の(5))。続いて、同期補正処理の準備が整うと、図3の(6)時点で、計数値取得部35は、第2基準信号生成部31から計数値を取得する(図3の(7))と共に、オーバーヘッド計数部34から計数値を取得する(図3の(8))。 The first reference signal generated by the main processor module 11a is transmitted to the slave processor module 11b as an interrupt signal. The slave processor module 11b receives the first reference signal as an interrupt, and starts a synchronization correction process by software ((4) in FIG. 3). At the same time, the overhead counter 34 of the slave processor module 11b clears the counter value by the hardware and restarts ((5) in FIG. 3). Subsequently, when the preparation for the synchronization correction process is completed, the count value acquisition unit 35 acquires the count value from the second reference signal generation unit 31 ((7) in FIG. 3) at the time (6) in FIG. The count value is acquired from the overhead counter 34 ((8) in FIG. 3).
 同期判定部36は、計数値取得部35によって与えられた計数値を時間に換算する。ここでは、例えば、第2基準信号生成部31の計数値から300μsを得、オーバーヘッド計数部34の計数値から300μsを得たとする。こうして、第1基準信号の割り込みの起点から、同期補正処理において計数値が取得されるまでのオーバーヘッドを計測すると共に、その時点の第2基準信号生成部31の計数値を取得することができる。第1基準信号と第2基準信号とが同期している場合、かかる計数値は等しくなるはずである。 The synchronization determination unit 36 converts the count value given by the count value acquisition unit 35 into time. Here, for example, it is assumed that 300 μs is obtained from the count value of the second reference signal generation unit 31 and 300 μs is obtained from the count value of the overhead counting unit 34. Thus, the overhead from when the first reference signal is interrupted until the count value is acquired in the synchronization correction process can be measured, and the count value of the second reference signal generation unit 31 at that time can be acquired. When the first reference signal and the second reference signal are synchronized, the count values should be equal.
 同期判定部36は、計数値取得部35から得た、第2基準信号生成部31の計数値(300μs)とオーバーヘッド計数部34の計数値(300μs)とを比較する。この場合、同期判定部36は、双方が同じ値なので第1基準信号と第2基準信号とが同期していると判定する。 The synchronization determination unit 36 compares the count value (300 μs) of the second reference signal generation unit 31 obtained from the count value acquisition unit 35 with the count value (300 μs) of the overhead count unit 34. In this case, the synchronization determination unit 36 determines that the first reference signal and the second reference signal are synchronized because both are the same value.
 同期判定部36によって第1基準信号と第2基準信号とが同期していると判定されたため、同期補正部37は、通常通り、基準値1000μsを第2基準信号生成部31に設定している(この時点で第2基準信号生成部31は、リスタートしていない)。そして、第2基準信号生成部31は、図3の(9)の時点で計数値が基準値1000μsに達したため、リスタートしている。 Since the synchronization determination unit 36 determines that the first reference signal and the second reference signal are synchronized, the synchronization correction unit 37 sets the reference value 1000 μs in the second reference signal generation unit 31 as usual. (At this time, the second reference signal generator 31 has not restarted). Then, the second reference signal generation unit 31 restarts because the count value reaches the reference value 1000 μs at the time (9) in FIG.
 なお、第2基準信号生成部31については、上述したCPU43に内蔵されているが、本実施形態においては、これに限定されるものではなく、CPU43と別体であってもよい。 The second reference signal generation unit 31 is built in the CPU 43 described above. However, in the present embodiment, the second reference signal generation unit 31 is not limited to this and may be separate from the CPU 43.
 また、付言しておくが、図3に示す同期補正処理の中には、計数値取得部35、同期判定部36、同期補正部37のプログラムの処理が含まれている。 Also, as will be added, the synchronization correction processing shown in FIG. 3 includes the program processing of the count value acquisition unit 35, the synchronization determination unit 36, and the synchronization correction unit 37.
 図4は、従プロセッサモジュール11bのカウンタが、主プロセッサモジュール11aのカウンタより3μs遅れている場合を示している。 FIG. 4 shows a case where the counter of the slave processor module 11b is delayed by 3 μs from the counter of the main processor module 11a.
 図4では、従プロセッサモジュール11bの間隔計数部33が計数を行い、計数値が補正処理間隔値に達すると(図4の(1))、補正処理開始信号を生成する。かかる補正処理開始信号に応じて同期補正処理の準備が開始される。 In FIG. 4, the interval counter 33 of the slave processor module 11b performs counting, and when the count value reaches the correction processing interval value ((1) in FIG. 4), a correction processing start signal is generated. In response to the correction processing start signal, preparation for the synchronous correction processing is started.
 主プロセッサモジュール11aの第1基準信号生成部21は、計数値が基準値に達したため、1000μs毎に第1基準信号を出力している。従プロセッサモジュール11bは、補正処理開始信号が生成された後、第1基準信号を割り込みとして受信し、ソフトウェアによる同期補正処理を起動させる(図4の(2))。これと共に従プロセッサモジュール11bのオーバーヘッド計数部34は、当該ハードウェアによるカウンタの計数値をクリアしてリスタートしている(図4の(3))。続いて、同期補正処理の準備が整うと、図4の(4)時点で、計数値取得部35は、第2基準信号生成部31から計数値を取得する(図4の(5))と共に、オーバーヘッド計数部34から計数値を取得する(図4の(6))。 The first reference signal generation unit 21 of the main processor module 11a outputs the first reference signal every 1000 μs because the count value reaches the reference value. After the correction processing start signal is generated, the slave processor module 11b receives the first reference signal as an interrupt, and starts the synchronous correction processing by software ((2) in FIG. 4). At the same time, the overhead counter 34 of the slave processor module 11b clears and restarts the counter value counted by the hardware ((3) in FIG. 4). Subsequently, when the preparation for the synchronization correction process is completed, the count value acquisition unit 35 acquires the count value from the second reference signal generation unit 31 ((5) in FIG. 4) at the time (4) in FIG. The count value is acquired from the overhead counter 34 ((6) in FIG. 4).
 同期判定部36は、計数値取得部35によって与えられた計数値を時間に換算する。ここでは、例えば、第2基準信号生成部31の計数値から297μsを得、オーバーヘッド計数部34の計数値から300μsを得たとする。同期判定部36は、両計数値を比較し、両計数値が異なる値なので第1基準信号と第2基準信号とが非同期であると判定する。 The synchronization determination unit 36 converts the count value given by the count value acquisition unit 35 into time. Here, for example, it is assumed that 297 μs is obtained from the count value of the second reference signal generation unit 31 and 300 μs is obtained from the count value of the overhead counting unit 34. The synchronization determination unit 36 compares the two count values and determines that the first reference signal and the second reference signal are asynchronous because the two count values are different.
 同期判定部36によって非同期が判定されたため、同期補正部37は、第2基準信号生成部31の計数値とオーバーヘッド計数部34の計数値との差分が相殺されるように、第2基準信号生成部31に臨時の基準値を設定する。具体的には、同期補正部37は、「基準値(処理周期)-(オーバーヘッド計数部34の計数値-第2基準信号生成部31の計数値)」という式にて第2基準信号生成部31の計数値のリスタート値(リセット値)を求め、求めた計数値を臨時の基準値として第2基準信号生成部31にセットする。この例の場合、臨時の基準値は1000μs-(300μs-297μs)=997μsとなる。そして、第2基準信号生成部31は、図4の(7)の時点で計数値が臨時の基準値997μsに達したため、リスタートしている。ちなみに、オーバーヘッド計数部34の計数値-第2基準信号生成部31の計数値の値が同期補正値である。 Since the synchronization determination unit 36 determines asynchronism, the synchronization correction unit 37 generates the second reference signal so that the difference between the count value of the second reference signal generation unit 31 and the count value of the overhead count unit 34 is canceled out. A temporary reference value is set in the part 31. Specifically, the synchronization correction unit 37 uses the expression “reference value (processing period) − (count value of the overhead counter 34 −count value of the second reference signal generator 31)” to calculate the second reference signal generator. A restart value (reset value) of the count value of 31 is obtained, and the obtained count value is set in the second reference signal generation unit 31 as a temporary reference value. In this example, the temporary reference value is 1000 μs− (300 μs−297 μs) = 997 μs. Then, the second reference signal generation unit 31 restarts because the count value reaches the temporary reference value 997 μs at the time (7) in FIG. Incidentally, the count value of the overhead counter 34 minus the count value of the second reference signal generator 31 is the synchronization correction value.
 このようにすることにより、第1実施形態は、第2サイクルに対し、次の第3サイクルの第1基準信号の出力タイミングと略同タイミングで第2基準信号生成部31をリスタートすることができる。したがって、第1実施形態は、第1基準信号と第2基準信号とを同期させることができる。なお、図4の場合、第3サイクル以降は、基準値が1000μsに設定される。 By doing in this way, 1st Embodiment can restart the 2nd reference signal production | generation part 31 at the substantially same timing as the output timing of the 1st reference signal of the following 3rd cycle with respect to a 2nd cycle. it can. Therefore, the first embodiment can synchronize the first reference signal and the second reference signal. In the case of FIG. 4, the reference value is set to 1000 μs after the third cycle.
 図5は、従プロセッサモジュール11bのカウンタが、主プロセッサモジュール11aのカウンタより3μs進んでいる場合を示している。 FIG. 5 shows a case where the counter of the slave processor module 11b is advanced by 3 μs from the counter of the main processor module 11a.
 図5では、従プロセッサモジュール11bの間隔計数部33が計数を行い、計数値が補正処理間隔値に達すると(図5の(1))、補正処理開始信号を生成する。かかる補正処理開始信号に応じて同期補正処理の準備が開始される。 In FIG. 5, the interval counter 33 of the slave processor module 11b performs counting, and when the count value reaches the correction processing interval value ((1) in FIG. 5), a correction processing start signal is generated. In response to the correction processing start signal, preparation for the synchronous correction processing is started.
 主プロセッサモジュール11aの第1基準信号生成部21は、計数値が基準値に達したため、1000μs毎に第1基準信号を出力している。従プロセッサモジュール11bは、補正処理開始信号が生成された後、第1基準信号を割り込みとして受信し、ソフトウェアによる同期補正処理を起動させている(図5の(2))。これと共に従プロセッサモジュール11bのオーバーヘッド計数部34は、当該ハードウェアによるカウンタの計数値をクリアしてリスタートしている(図5の(3))。続いて、同期補正処理の準備が整うと、図5の(4)時点で、計数値取得部35は、第2基準信号生成部31から計数値を取得する(図5の(5))と共に、オーバーヘッド計数部34から計数値を取得する(図5の(6))。 The first reference signal generation unit 21 of the main processor module 11a outputs the first reference signal every 1000 μs because the count value reaches the reference value. After the correction processing start signal is generated, the slave processor module 11b receives the first reference signal as an interrupt, and starts the synchronous correction processing by software ((2) in FIG. 5). At the same time, the overhead counting unit 34 of the slave processor module 11b clears the count value of the counter by the hardware and restarts ((3) in FIG. 5). Subsequently, when the preparation for the synchronization correction process is completed, the count value acquisition unit 35 acquires the count value from the second reference signal generation unit 31 ((5) in FIG. 5) at the time (4) in FIG. The count value is acquired from the overhead counter 34 ((6) in FIG. 5).
 同期判定部36は、計数値取得部35によって与えられた計数値を時間に換算する。ここでは、例えば、第2基準信号生成部31の計数値から303μsを得、オーバーヘッド計数部34の計数値から300μsを得たとする。同期判定部36は、両計数値を比較し、両計数値が異なる値であるため、第1基準信号と第2基準信号とが非同期であると判定する。 The synchronization determination unit 36 converts the count value given by the count value acquisition unit 35 into time. Here, for example, it is assumed that 303 μs is obtained from the count value of the second reference signal generation unit 31 and 300 μs is obtained from the count value of the overhead counting unit 34. The synchronization determination unit 36 compares the two count values and determines that the first reference signal and the second reference signal are asynchronous because the two count values are different values.
 同期判定部36によって非同期が判定されたため、同期補正部37は、第2基準信号生成部31の計数値とオーバーヘッド計数部34の計数値との差分が相殺されるように、第2基準信号生成部31に臨時の基準値を設定する。具体的には、同期補正部37は、図4の説明と同様に計算して、臨時の基準値を求め、第2基準信号生成部31にセットする。この例の場合、臨時の基準値は、1000μs-(300μs-303μs)=1003μsとなる。そして、第2基準信号生成部31は、図4の(7)の時点で計数値が臨時の基準値1003μsに達したため、リスタートしている。ちなみに、オーバーヘッド計数部34の計数値-第2基準信号生成部31の計数値の値が同期補正値である。 Since the synchronization determination unit 36 determines asynchronism, the synchronization correction unit 37 generates the second reference signal so that the difference between the count value of the second reference signal generation unit 31 and the count value of the overhead count unit 34 is canceled out. A temporary reference value is set in the part 31. Specifically, the synchronization correction unit 37 calculates in the same manner as in the description of FIG. 4, obtains a temporary reference value, and sets it in the second reference signal generation unit 31. In this example, the temporary reference value is 1000 μs− (300 μs−303 μs) = 1003 μs. Then, the second reference signal generation unit 31 restarts because the count value reaches the temporary reference value 1003 μs at the point (7) in FIG. Incidentally, the count value of the overhead counter 34 minus the count value of the second reference signal generator 31 is the synchronization correction value.
 このようにすることにより、第1実施形態は、第2サイクルに対し、次の第3サイクルの第1基準信号の出力タイミングと略同タイミングで第2基準信号生成部31をリスタートすることができる。したがって、本実施形態の信号同期システムは第1基準信号と第2基準信号とを同期させることができる。なお、図5の第3サイクル以降は、基準値が1000μsに設定される。以上のように、第1実施形態では、主プロセッサモジュール11aのカウンタ(タイマ)に対して従プロセッサモジュール11bのカウンタ(タイマ)が遅れた場合も進んだ場合も適切にカウンタ同期を実現することができる。 By doing in this way, 1st Embodiment can restart the 2nd reference signal production | generation part 31 at the substantially same timing as the output timing of the 1st reference signal of the following 3rd cycle with respect to a 2nd cycle. it can. Therefore, the signal synchronization system of the present embodiment can synchronize the first reference signal and the second reference signal. Note that the reference value is set to 1000 μs after the third cycle in FIG. As described above, in the first embodiment, counter synchronization can be appropriately realized both when the counter (timer) of the slave processor module 11b is delayed or advanced with respect to the counter (timer) of the main processor module 11a. it can.
(信号同期方法のシーケンス例)
 図6は、信号同期方法の概略的なシーケンス例を示す図である。図6の例では、説明の便宜上、主プロセッサモジュール11aと従プロセッサモジュール11bとを用いた同期について説明するが、本実施形態においてはこれに限定されるものではなく、1つの主プロセッサモジュールに対して複数の従プロセッサモジュールを同期させることができる。
(Sequence example of signal synchronization method)
FIG. 6 is a diagram illustrating a schematic sequence example of the signal synchronization method. In the example of FIG. 6, for the sake of convenience of explanation, synchronization using the main processor module 11a and the sub processor module 11b will be described. However, the present embodiment is not limited to this, and one main processor module is not limited to this. Multiple slave processor modules can be synchronized.
 図6のカウンタ同期処理において、まず、主プロセッサモジュール11aの第1基準信号生成部21は、第1基準信号を生成し(S01)、従プロセッサモジュール11bの第2基準信号生成部31は、第2基準信号を生成する(S02)。なお、この処理は、ハードウェア的にサイクリックに動作されている。また、主プロセッサモジュール11aは、S01の処理で得られた第1基準信号を従プロセッサモジュール11bにも送信している。したがって、従プロセッサモジュール11bは、常に第1基準信号を受信できる状態にある。 In the counter synchronization processing of FIG. 6, first, the first reference signal generation unit 21 of the main processor module 11a generates a first reference signal (S01), and the second reference signal generation unit 31 of the slave processor module 11b Two reference signals are generated (S02). This process is cyclically operated in terms of hardware. The main processor module 11a also transmits the first reference signal obtained in the process of S01 to the slave processor module 11b. Therefore, the slave processor module 11b is always in a state where it can receive the first reference signal.
 また、従プロセッサモジュール11bの間隔計数部33は、補正処理間隔を計数し、計数値が補正処理間隔値に達すると、補正処理開始信号を生成して同期補正処理の準備を開始する(S03)。 The interval counting unit 33 of the slave processor module 11b counts the correction processing interval, and when the count value reaches the correction processing interval value, generates a correction processing start signal and starts preparation for the synchronous correction processing (S03). .
 間隔計数部33の計数値が補正処理間隔値に達した後、主プロセッサモジュール11aで送信された第1基準信号を、従プロセッサモジュール11bが受信すると(S04)、ソフトウェアによる同期補正処理を起動させる(S05)と共に、オーバーヘッド計数部34をリスタートする(S06)。そして、計数値取得部35は、第2基準信号生成部31とオーバーヘッド計数部34との両計数値を取得し(S07)、同期判定部36は、かかる両計数値に基づいて同期判定を行い(S08)、非同期であると判定されれば、同期補正部37が同期補正を行う(S09)。 When the slave processor module 11b receives the first reference signal transmitted by the main processor module 11a after the count value of the interval counter 33 reaches the correction processing interval value (S04), the synchronization correction processing by software is started. Together with (S05), the overhead counting unit 34 is restarted (S06). Then, the count value acquisition unit 35 acquires both count values of the second reference signal generation unit 31 and the overhead count unit 34 (S07), and the synchronization determination unit 36 performs synchronization determination based on the both count values. (S08) If it is determined to be asynchronous, the synchronization correction unit 37 performs synchronization correction (S09).
 こうして、処理負荷を抑制しつつ、所定の信号を高精度に同期させることができる。 Thus, it is possible to synchronize a predetermined signal with high accuracy while suppressing the processing load.
(第2実施形態:ノード同期システム)
 第2実施形態は、上述した第1実施形態における伝送バス12による遅延時間を含めて同期補正処理を実行することが特徴である。図7は、第2実施形態におけるノード同期システムの概略構成の一例を示す図である。図7に示すノード同期システム50は、ノード51a~51c等の複数のノードの間で、カウンタ同期を行う一例である。
(Second embodiment: node synchronization system)
The second embodiment is characterized in that the synchronization correction processing is executed including the delay time by the transmission bus 12 in the first embodiment described above. FIG. 7 is a diagram illustrating an example of a schematic configuration of the node synchronization system according to the second embodiment. The node synchronization system 50 shown in FIG. 7 is an example that performs counter synchronization among a plurality of nodes such as the nodes 51a to 51c.
 ノード同期システム50は、複数のノード51a~51c(以下、必要に応じて「ノード51」という)と、通信路(通信ネットワーク)52と、I/O(入出力)モジュール53(図7中、53a~53dで示す)と、外部機器54(図7中、54a~54dで示す)と、プログラミング装置55とを有する。すなわち、ノード同期システム50は、マスタノード51aと、スレーブノード51b,51cとが通信ネットワークとしての通信路52を介して接続されている。 The node synchronization system 50 includes a plurality of nodes 51a to 51c (hereinafter referred to as “node 51” as necessary), a communication path (communication network) 52, and an I / O (input / output) module 53 (in FIG. 7, 53a to 53d), an external device 54 (indicated by 54a to 54d in FIG. 7), and a programming device 55. That is, in the node synchronization system 50, a master node 51a and slave nodes 51b and 51c are connected via a communication path 52 as a communication network.
 ここで、便宜上、ノード51aをマスタノードとし、ノード51b,51cをスレーブノードとして、それぞれのノード固有の構成について説明するが、これに限定されるものではなく、各ノードがマスタノードにもスレーブノードにもなりえるように両方の構成を兼ね備えている。なお、第2実施形態では、通信路52による伝送遅延時間が生じているものとする。 Here, for the sake of convenience, the node 51a is a master node and the nodes 51b and 51c are slave nodes, and the configuration unique to each node will be described. However, the present invention is not limited to this. It has both configurations so that it can be. In the second embodiment, it is assumed that a transmission delay time by the communication path 52 is generated.
 ここで、第2実施形態(図7)と第1実施形態(図1)との違いについて説明しておく。マスタノード51aは、第1実施形態での主プロセッサモジュール11aに相当し、スレーブノード51b,51cは、第1実施形態での従プロセッサモジュール11b,11cに相当する。また、プログラミング装置55は、第1実施形態でのプログラミング装置15と実質的に等しく、更に、I/Oモジュール53a~53dは、第1実施形態でのI/Oモジュール13a~13dと実質的に等しい。また、外部機器54a~54dは、第1実施形態での外部機器14a~14dと実質的に等しい。よって、以下の説明では第1実施形態と同じ構成のものについてはその説明を割愛する。 Here, the difference between the second embodiment (FIG. 7) and the first embodiment (FIG. 1) will be described. The master node 51a corresponds to the main processor module 11a in the first embodiment, and the slave nodes 51b and 51c correspond to the slave processor modules 11b and 11c in the first embodiment. The programming device 55 is substantially equal to the programming device 15 in the first embodiment, and the I / O modules 53a to 53d are substantially the same as the I / O modules 13a to 13d in the first embodiment. equal. The external devices 54a to 54d are substantially the same as the external devices 14a to 14d in the first embodiment. Therefore, in the following description, the description of the same configuration as in the first embodiment is omitted.
 マスタノード51aは、第1基準信号生成部61(第1の実施形態の第1基準信号生成部21に対応)と、第1演算部62(第1実施形態の第1演算部22に対応)と、記憶部63(第1実施形態の記憶部23に対応)と、間隔計数部64(第1の実施形態の間隔計数部33に対応)と、伝送遅延時間通知部65と、同期化フレーム通知部66とを有する。 The master node 51a includes a first reference signal generator 61 (corresponding to the first reference signal generator 21 of the first embodiment) and a first calculator 62 (corresponding to the first calculator 22 of the first embodiment). A storage unit 63 (corresponding to the storage unit 23 of the first embodiment), an interval counting unit 64 (corresponding to the interval counting unit 33 of the first embodiment), a transmission delay time notification unit 65, and a synchronization frame And a notification unit 66.
 マスタノード51aの第1実施形態での主プロセッサモジュール11aとの主な相違点は、第1実施形態では従プロセッサモジュール11bに設けられていた間隔計数部33が間隔計数部64として加わったこと、及び、新たに、伝送遅延時間通知部65と、同期化フレーム通知部66とが加わったことである。よって、以下の説明においては、第2実施形態の主要部分を説明することとし、第1実施形態と同様の動きについては割愛する。 The main difference between the master node 51a and the main processor module 11a in the first embodiment is that the interval counter 33 provided in the slave processor module 11b in the first embodiment is added as the interval counter 64. In addition, a transmission delay time notification unit 65 and a synchronization frame notification unit 66 are newly added. Therefore, in the following description, the main part of the second embodiment will be described, and the same movement as in the first embodiment will be omitted.
 以下、第2実施形態での一例を説明する。第2実施形態において、間隔計数部64は、計数を行い、同期処理を行う補正処理間隔に相当する補正処理間隔値が予め設定され、補正処理間隔値に計数値が達すると、その旨を示す補正処理開始信号を生成する。なお、補正処理間隔値は第1の実施形態と実質的に等しいので、ここではその説明を省略する。 Hereinafter, an example in the second embodiment will be described. In the second embodiment, the interval counting unit 64 performs counting, and when a correction processing interval value corresponding to a correction processing interval for performing synchronization processing is preset, and the count value reaches the correction processing interval value, this is indicated. A correction processing start signal is generated. Since the correction processing interval value is substantially the same as that in the first embodiment, the description thereof is omitted here.
 なお、ここでは、マスタノード51a側で補正処理間隔を計っているが、スレーブノード51b側で補正処理間隔を計ってもよい。その場合、スレーブノード51bにおいて補正処理間隔値に計数値が達すると、マスタノード51aに補正処理開始信号を送信し、同期補正処理を開始することとなる。 Here, the correction processing interval is measured on the master node 51a side, but the correction processing interval may be measured on the slave node 51b side. In that case, when the count value reaches the correction processing interval value in the slave node 51b, a correction processing start signal is transmitted to the master node 51a, and the synchronous correction processing is started.
 補正処理開始信号の受信後、マスタノード51aの伝送遅延時間通知部65は、伝送遅延時間を算出するために伝送遅延時間リクエストフレームをスレーブノード51b,51cに送信する。この伝送遅延時間リクエストフレームは、後述の同期化フレームとフォーマットが実質的に等しく、同期化フレーム内の所定部分(例えば、コマンド部)のデータが異なるフレームである。かかる伝送遅延時間リクエストフレームは、第1基準信号生成部61によって生成された第1基準信号に同期して送信される。 After receiving the correction processing start signal, the transmission delay time notification unit 65 of the master node 51a transmits a transmission delay time request frame to the slave nodes 51b and 51c in order to calculate the transmission delay time. This transmission delay time request frame has substantially the same format as a later-described synchronization frame and has a different data in a predetermined portion (for example, a command portion) in the synchronization frame. The transmission delay time request frame is transmitted in synchronization with the first reference signal generated by the first reference signal generation unit 61.
 続いて、伝送遅延時間通知部65は、伝送遅延時間リクエストフレームに応答したスレーブノードからの受信完了フレームを受信する。そして、伝送遅延時間通知部65は、応答フレーム受信時の時刻と伝送遅延時間リクエストフレームを送信したときの時刻との差分から、マスタノード51aとスレーブノード51b,51c間の往復伝送遅延時間を計算する。そして、伝送遅延時間通知部65は、計算した往復伝送遅延時間を含む伝送遅延時間通知フレームを次の第1基準信号に同期してスレーブノード51b,51cに送信することで、スレーブノード51b,51cに通信路52による遅延時間を通知する。 Subsequently, the transmission delay time notification unit 65 receives a reception completion frame from the slave node that responds to the transmission delay time request frame. Then, the transmission delay time notification unit 65 calculates the round trip transmission delay time between the master node 51a and the slave nodes 51b and 51c from the difference between the time when the response frame is received and the time when the transmission delay time request frame is transmitted. To do. Then, the transmission delay time notification unit 65 transmits a transmission delay time notification frame including the calculated round trip transmission delay time to the slave nodes 51b and 51c in synchronization with the next first reference signal, whereby the slave nodes 51b and 51c. Is notified of the delay time caused by the communication path 52.
 往復伝送遅延時間を通知した後、マスタノード51aは、第1基準信号に基づき(第1基準信号に同期して)、予め用意された同期化フレームを、通信路52を介してスレーブノード51b,51cに送信する。なお、この処理は、同期化フレーム通知部66が実行する。後に詳述するが、同期化フレームは、スレーブノード51b,51cの第2基準信号生成部71の計数値をマスタノード51aの第1基準信号生成部61の計数値に合わせるための同期基準信号である。 After notifying the round-trip transmission delay time, the master node 51a, based on the first reference signal (in synchronization with the first reference signal), sends the prepared synchronization frame to the slave nodes 51b, 51c. This process is executed by the synchronization frame notification unit 66. As will be described in detail later, the synchronization frame is a synchronization reference signal for matching the count value of the second reference signal generation unit 71 of the slave nodes 51b and 51c with the count value of the first reference signal generation unit 61 of the master node 51a. is there.
 次に、スレーブノード51b,51cについて説明する。スレーブノード51b,51cは、第2基準信号生成部71(第1の実施形態の第2基準信号生成部31に対応)と、第2演算部72(第1の実施形態の第2演算部32に対応)と、オーバーヘッド計数部74(第1の実施形態のオーバーヘッド計数部34に対応)と、計数値取得部75(第1の実施形態の計数値取得部35に対応)と、同期判定部76(第1の実施形態の同期判定部36に対応)と、同期補正部77(第1の実施形態の同期補正部37に対応)と、記憶部78(第1の実施形態の記憶部38に対応)と、受信完了通知部79と、フレーム受信部80とを有する。なお、CPU43には、第2基準信号生成部71が内蔵されている。スレーブノード51b,51cは、同一の構成であるため、以下の説明では、スレーブノード51bを用いて説明し、スレーブノード51cの説明は省略する。 Next, the slave nodes 51b and 51c will be described. The slave nodes 51b and 51c include a second reference signal generator 71 (corresponding to the second reference signal generator 31 of the first embodiment) and a second calculator 72 (the second calculator 32 of the first embodiment). ), An overhead counting unit 74 (corresponding to the overhead counting unit 34 of the first embodiment), a count value acquiring unit 75 (corresponding to the count value acquiring unit 35 of the first embodiment), and a synchronization determining unit 76 (corresponding to the synchronization determination unit 36 of the first embodiment), a synchronization correction unit 77 (corresponding to the synchronization correction unit 37 of the first embodiment), and a storage unit 78 (storage unit 38 of the first embodiment). ), A reception completion notifying unit 79, and a frame receiving unit 80. The CPU 43 has a second reference signal generation unit 71 built therein. Since the slave nodes 51b and 51c have the same configuration, the following description will be made using the slave node 51b, and the description of the slave node 51c will be omitted.
 第1実施形態のプロセッサモジュール11bとの主な相違点は、同期判定部76が第1実施形態の同期判定部36と相違すること、受信完了通知部79とフレーム受信部80とが加わったことである。ただし、他の構成要素については、第1の実施形態と実質的に等しいので、ここでは、その説明を割愛する。以下、通信路52の伝送遅延時間を含めたスレーブノード51bの同期補正処理について説明する。 The main differences from the processor module 11b of the first embodiment are that the synchronization determination unit 76 is different from the synchronization determination unit 36 of the first embodiment, and that a reception completion notification unit 79 and a frame reception unit 80 are added. It is. However, since the other components are substantially the same as those in the first embodiment, the description thereof is omitted here. Hereinafter, the synchronization correction processing of the slave node 51b including the transmission delay time of the communication path 52 will be described.
 受信完了通知部79は、上述した伝送遅延時間リクエストフレームをマスタノード51aから受信し、その伝送遅延時間リクエストフレームに応じて、受信完了フレームをマスタノード51aに送信する。 The reception completion notification unit 79 receives the above-described transmission delay time request frame from the master node 51a, and transmits a reception completion frame to the master node 51a according to the transmission delay time request frame.
 フレーム受信部80は、マスタノード51aによって送信された上述した伝送遅延時間通知フレームを受信し、そのフレームに含まれる往復伝送遅延時間(値)を上述したメモリ45等に退避する。このようにして、スレーブノード51bはマスタノード51aとスレーブノード51b間との往復伝送遅延時間をマスタノード51aから得る。 The frame receiving unit 80 receives the above-described transmission delay time notification frame transmitted by the master node 51a, and saves the round-trip transmission delay time (value) included in the frame in the above-described memory 45 or the like. In this way, the slave node 51b obtains the round trip transmission delay time between the master node 51a and the slave node 51b from the master node 51a.
 マスタノード51aから往復伝送遅延時間を得たスレーブノード51bは、同期化フレームを受信し、第2演算部72に割り込みを発生させる。割り込みを受けた第2演算部72は、後述の同期補正処理を起動する。なお、本実施形態においては、往復伝送遅延時間を得ずに同期化フレームを受信した場合でも、往復伝送遅延時間をゼロ(0)として同期補正処理を起動してよいことは勿論である。また、同期化フレームを受信してから第2演算部72に割り込みが上がるスピードを勘案すると、不図示であるが、同期化フレームの受信手段としては、FPGA44等のハードウェアロジックを使うことが好ましい。 The slave node 51b that has obtained the round-trip transmission delay time from the master node 51a receives the synchronization frame and causes the second computing unit 72 to generate an interrupt. Upon receiving the interrupt, the second calculation unit 72 starts a synchronization correction process described later. In this embodiment, even when a synchronization frame is received without obtaining a round trip transmission delay time, it goes without saying that the synchronization correction processing may be started with the round trip transmission delay time set to zero (0). Also, considering the speed at which the interrupt is raised to the second arithmetic unit 72 after receiving the synchronization frame, although not shown, it is preferable to use hardware logic such as FPGA 44 as the means for receiving the synchronization frame. .
 また、オーバーヘッド計数部74は、上述した同期化フレームの受信を起点として、同期補正処理が実行されるまでのオーバーヘッド値を計測する。具体的には、オーバーヘッド計数部74には、同期化フレームを受信してリスタートするハードウェア的なカウンタ(タイマ)として機能する。 Also, the overhead counting unit 74 measures an overhead value until the synchronization correction process is executed, starting from the reception of the synchronization frame described above. Specifically, the overhead counting unit 74 functions as a hardware counter (timer) that receives and restarts the synchronization frame.
 計数値取得部75は、同期化フレームの受信に応じ、実際に同期補正処理が実行される開始時点での、第2基準信号生成部71の計数値及びオーバーヘッド計数部74の計数値を取得する。 The count value acquisition unit 75 acquires the count value of the second reference signal generation unit 71 and the count value of the overhead count unit 74 at the time when the synchronization correction process is actually executed in response to reception of the synchronization frame. .
 同期判定部76は、上述した往復伝送遅延時間を2で除算して通信路52の片道の伝送遅延時間を求め、更にこの片道の伝送遅延時間と上述したオーバーヘッド計数部74の計数値を時間換算した値とを加えた総合遅延時間を求める。そして、同期判定部76は、求めた総合遅延時間と、計数値取得部75によって取得された第2基準信号生成部71の計数値を時間換算した値とを比較する。この比較の結果、双方が等しいとき、同期判定部76は、第1基準信号と第2基準信号とが同期していると判定し、双方が相違するとき、第1基準信号と第2基準信号とが非同期であると判定する。ここで同期とは、第1基準信号生成部61の計数値と第2基準信号生成部71の計数値が等しいことを意味する。 The synchronization determination unit 76 calculates the one-way transmission delay time of the communication path 52 by dividing the above-described round-trip transmission delay time by 2, and further converts the one-way transmission delay time and the count value of the overhead counter 74 described above into a time. The total delay time is calculated by adding the calculated value. Then, the synchronization determination unit 76 compares the obtained total delay time with a value obtained by time-converting the count value of the second reference signal generation unit 71 acquired by the count value acquisition unit 75. As a result of the comparison, when both are equal, the synchronization determination unit 76 determines that the first reference signal and the second reference signal are synchronized. When both are different, the first reference signal and the second reference signal are determined. Are determined to be asynchronous. Here, the synchronization means that the count value of the first reference signal generation unit 61 is equal to the count value of the second reference signal generation unit 71.
 なお、同期判定部76は、第1実施形態の同期判定部36と同様に、各カウンタの計数値を時間に換算して比較することで、同期/非同期を判定することも勿論可能である。 It should be noted that the synchronization determination unit 76 can, of course, determine synchronization / asynchronization by converting the count values of the respective counters into time as in the synchronization determination unit 36 of the first embodiment.
 第2実施形態では、補正処理間隔毎に、同期判定部76によって第1基準信号と第2基準信号とが同期であると判定されると、同期補正部77は、基準値を第2基準信号生成部71に設定する。また、第1基準信号と第2基準信号とが非同期であると判定されると、第2基準信号生成部71の計数値と、総合遅延時間値との差分を相殺する値を求める。具体的に、同期補正部77は、計数値取得部75によって取得された、第2基準信号生成部71の計数値から総合遅延時間値を差し引いて同期補正値を求める。続いて、同期補正部77は、求めた同期補正値を基準値から差し引き、差し引いた値を第2基準信号生成部71に新たな基準値として設定する。この新たな基準値とは、同期判定部76が同期を判定したときに第2基準信号生成部71に設定される基準値(デフォルトの基準値)に対し、第2基準信号生成部71のタイマ値を補正するために一時的に設定される(臨時の基準値)。 In the second embodiment, when the synchronization determination unit 76 determines that the first reference signal and the second reference signal are synchronized at every correction processing interval, the synchronization correction unit 77 sets the reference value to the second reference signal. Set in the generation unit 71. If it is determined that the first reference signal and the second reference signal are asynchronous, a value that cancels the difference between the count value of the second reference signal generation unit 71 and the total delay time value is obtained. Specifically, the synchronization correction unit 77 obtains a synchronization correction value by subtracting the total delay time value from the count value of the second reference signal generation unit 71 acquired by the count value acquisition unit 75. Subsequently, the synchronization correction unit 77 subtracts the obtained synchronization correction value from the reference value, and sets the subtracted value as a new reference value in the second reference signal generation unit 71. The new reference value is a timer of the second reference signal generation unit 71 with respect to a reference value (default reference value) set in the second reference signal generation unit 71 when the synchronization determination unit 76 determines synchronization. Temporarily set to correct the value (temporary reference value).
 なお、本実施形態は、デフォルトの基準値が第2基準信号生成部71に設定され、同期が保たれていれば、以後デフォルトの基準値を書き換えしなくてよいことは勿論である。 In the present embodiment, it is needless to say that the default reference value does not need to be rewritten thereafter if the default reference value is set in the second reference signal generation unit 71 and synchronization is maintained.
 このようにして本実施形態は、同期基準信号(同期化フレーム)が通信路52を介して通知される際の伝送遅延時間の影響をも考慮した同期補正処理を行うことができる。すなわち、第2実施形態では、ノード間の伝送遅延時間とスレーブノード51b,51cのオーバーヘッドとを含めた計数値の補正を行うことができ、高精度なノード間の同期を実現できる。 As described above, this embodiment can perform the synchronization correction process considering the influence of the transmission delay time when the synchronization reference signal (synchronization frame) is notified via the communication path 52. That is, in the second embodiment, the count value including the transmission delay time between the nodes and the overhead of the slave nodes 51b and 51c can be corrected, and synchronization between the nodes can be realized with high accuracy.
(第2実施形態における同期補正処理例)
 図8~図10は、第2実施形態における同期補正処理例を説明するためのタイムチャート図であり、マスタノード51aとスレーブノード51b間での計数値の同期例である。なお、第2実施形態における基準値(処理周期)は、第1実施形態と同様1000μsとし、この基準値はプログラミング装置55により適宜変更することができる。
(Example of synchronization correction processing in the second embodiment)
FIGS. 8 to 10 are time charts for explaining an example of synchronization correction processing in the second embodiment, and are examples of synchronization of count values between the master node 51a and the slave node 51b. The reference value (processing cycle) in the second embodiment is set to 1000 μs as in the first embodiment, and this reference value can be appropriately changed by the programming device 55.
 図8では、マスタノード51aの第1基準信号生成部61が計数を行っている。その計数値が図8の(1)時点で基準値に達すると、第1基準信号を出力する。そして、第1演算部62は、当該第1基準信号に応じて所定の処理を実行する。 In FIG. 8, the first reference signal generator 61 of the master node 51a performs counting. When the count value reaches the reference value at time (1) in FIG. 8, a first reference signal is output. And the 1st calculating part 62 performs a predetermined | prescribed process according to the said 1st reference signal.
 また、スレーブノード51bの第2基準信号生成部71が計数を行っている。その計数値が図8の(2)時点で基準値に達すると、第2基準信号を出力する。そして、第2演算部72は、当該第2基準信号に応じて所定の処理を実行する。このように、マスタノード51a及びスレーブノード51bでは、それぞれ、独立した第1基準信号及び第2基準信号に応じて所定の処理が遂行される。 Further, the second reference signal generation unit 71 of the slave node 51b performs counting. When the count value reaches the reference value at time (2) in FIG. 8, a second reference signal is output. And the 2nd calculating part 72 performs a predetermined | prescribed process according to the said 2nd reference signal. As described above, the master node 51a and the slave node 51b perform predetermined processing according to the independent first reference signal and second reference signal, respectively.
 また、マスタノード51aでは、間隔計数部64が計数を行い、計数値が補正処理間隔値に達すると(図8の(3))、補正処理開始信号を生成する。かかる補正処理開始信号に応じてマスタノード51aにおける同期補正処理が開始される。 In the master node 51a, the interval counting unit 64 performs counting, and when the count value reaches the correction processing interval value ((3) in FIG. 8), a correction processing start signal is generated. The synchronization correction process in the master node 51a is started in response to the correction process start signal.
 同期補正処理が開始すると、マスタノード51aの伝送遅延時間通知部65は、伝送遅延時間を算出するために伝送遅延時間リクエストフレームを送信する(図8の(4))。スレーブノード51bの受信完了通知部79は、伝送遅延時間リクエストフレームをマスタノード51aから受信すると、その伝送遅延時間リクエストフレームに応じて、受信完了フレームをマスタノード51aに送信する(図8の(5))。 When the synchronization correction processing starts, the transmission delay time notification unit 65 of the master node 51a transmits a transmission delay time request frame in order to calculate the transmission delay time ((4) in FIG. 8). When receiving the transmission delay time request frame from the master node 51a, the reception completion notifying unit 79 of the slave node 51b transmits the reception completion frame to the master node 51a according to the transmission delay time request frame ((5 in FIG. 8). )).
 続いて、マスタノード51aの伝送遅延時間通知部65は、受信完了フレームに応じて、マスタノード51aとスレーブノード51b間の往復伝送遅延時間を計算し、計算した往復伝送遅延時間(400μs)を含む伝送遅延時間通知フレームを送信する(図8の(6))。スレーブノード51bのフレーム受信部80は、伝送遅延時間通知フレームを受信すると、そのフレームに含まれる往復伝送遅延時間(値)をメモリ45等に退避する(図8の(7))。 Subsequently, the transmission delay time notification unit 65 of the master node 51a calculates the round trip transmission delay time between the master node 51a and the slave node 51b according to the reception completion frame, and includes the calculated round trip transmission delay time (400 μs). A transmission delay time notification frame is transmitted ((6) in FIG. 8). When receiving the transmission delay time notification frame, the frame receiving unit 80 of the slave node 51b saves the round-trip transmission delay time (value) included in the frame in the memory 45 or the like ((7) in FIG. 8).
 同期補正処理が開始後、マスタノード51aの同期化フレーム通知部66は、同期化フレームを割り込み信号としてスレーブノード51bに送信する(図8の(8))。そして、スレーブノード51bは、同期化フレームを通信路52の片道の伝送遅延時間(200μs)を経て図8の(9)の時点で受信し、スレーブノード51bにおけるソフトウェアによる同期補正処理を起動している。また、同期化フレームの受信に伴い、オーバーヘッド計数部74のハードウェアによるカウンタがクリアされリスタートしている(図8の(10))。 After the synchronization correction process is started, the synchronization frame notification unit 66 of the master node 51a transmits the synchronization frame as an interrupt signal to the slave node 51b ((8) in FIG. 8). Then, the slave node 51b receives the synchronization frame through the one-way transmission delay time (200 μs) of the communication path 52 at the time of (9) in FIG. 8, and activates the synchronization correction process by software in the slave node 51b. Yes. With the reception of the synchronization frame, the hardware counter of the overhead counter 74 is cleared and restarted ((10) in FIG. 8).
 続いて、同期補正処理の準備が整うと、図8の(11)時点で、計数値取得部75は、第2基準信号生成部71から計数値を取得する(図8の(12))と共に、オーバーヘッド計数部74から計数値を取得する(図8の(13))。 Subsequently, when the preparation for the synchronization correction process is completed, the count value acquisition unit 75 acquires the count value from the second reference signal generation unit 71 ((12) in FIG. 8) at the time (11) in FIG. The count value is acquired from the overhead counter 74 ((13) in FIG. 8).
 続いて、計数値取得部75は、第2基準信号生成部71の計数値を参照して時間に換算し400μsを取得している。これに引き続き、同期判定部76は、往復伝送遅延時間(400μs)から片道の伝送遅延時間200μsを求め、求めた伝送遅延時間とオーバーヘッド計数部74の計数値を時間換算した200μsとを加算し総合遅延時間400μsを求めている。そして、同期判定部76は、総合遅延時間400μsと計数値取得部75が取得した、第2基準信号生成部71の計数値を時間換算した400μsとを比較し、双方が等しいので第1基準信号と第2基準信号とが同期していると判定している。 Subsequently, the count value acquisition unit 75 refers to the count value of the second reference signal generation unit 71, converts it to time, and acquires 400 μs. Subsequently, the synchronization determination unit 76 calculates a one-way transmission delay time 200 μs from the round-trip transmission delay time (400 μs), and adds the calculated transmission delay time and the time-converted count value of the overhead counter 74 to 200 μs. The delay time is 400 μs. Then, the synchronization determination unit 76 compares the total delay time 400 μs with the 400 μs obtained by converting the count value of the second reference signal generation unit 71 acquired by the count value acquisition unit 75, and since both are equal, the first reference signal And the second reference signal are determined to be synchronized.
 同期判定部76によって第1基準信号と第2基準信号とが同期していると判定されたため、同期補正部77は、通常通り、基準値1000μsを第2基準信号生成部71に設定している(設定時点で第2基準信号生成部71はリスタートしていない)。そして、第2基準信号生成部71は、図8の(14)の時点で計数値が基準値1000μsに達したため、リスタートしている。 Since the synchronization determination unit 76 determines that the first reference signal and the second reference signal are synchronized, the synchronization correction unit 77 sets the reference value 1000 μs in the second reference signal generation unit 71 as usual. (The second reference signal generator 71 has not been restarted at the time of setting). The second reference signal generation unit 71 restarts because the count value reaches the reference value 1000 μs at the time point (14) in FIG.
 図9は、スレーブノード51bのカウンタが、マスタノード51aのカウンタより3μs遅れている場合を示している。 FIG. 9 shows a case where the counter of the slave node 51b is delayed by 3 μs from the counter of the master node 51a.
 図9において、マスタノード51aの間隔計数部64の計数値が補正処理間隔値に達し、同期補正処理が開始されてから、スレーブノード51bのフレーム受信部80が伝送遅延時間通知フレームに含まれる往復伝送遅延時間(値)をメモリ45等に退避するまでの処理は、図8の処理と実質的に等しいので、ここでは、その説明を省略する。 In FIG. 9, after the count value of the interval counting unit 64 of the master node 51a reaches the correction processing interval value and the synchronization correction processing is started, the frame receiving unit 80 of the slave node 51b performs the round trip included in the transmission delay time notification frame. Since the processing until the transmission delay time (value) is saved in the memory 45 or the like is substantially the same as the processing in FIG. 8, the description thereof is omitted here.
 同期補正処理が開始後、図9の(1)時点で、マスタノード51aの同期化フレーム通知部66は、同期化フレームを割り込み信号としてスレーブノード51bに送信する。そして、スレーブノード51bは、同期化フレームを通信路52の片道の伝送遅延時間(200μs)を経て図9(2)の時点で受信し、スレーブノード51bにおけるソフトウェアによる同期補正処理を起動している。また、同期化フレームの受信に伴い、オーバーヘッド計数部74のカウンタがクリアされリスタートしている(図9の(3))。 9 (1) in FIG. 9 after the synchronization correction process is started, the synchronization frame notification unit 66 of the master node 51a transmits the synchronization frame as an interrupt signal to the slave node 51b. Then, the slave node 51b receives the synchronization frame through the one-way transmission delay time (200 μs) of the communication path 52 at the time of FIG. 9 (2), and starts the synchronization correction process by software in the slave node 51b. . In addition, with the reception of the synchronization frame, the counter of the overhead counter 74 is cleared and restarted ((3) in FIG. 9).
 続いて、同期補正処理の準備が整うと、図9の(4)時点で、計数値取得部75は、第2基準信号生成部71から計数値を取得する(図9の(5))と共に、オーバーヘッド計数部74から計数値を取得する(図9の(6))。 Subsequently, when the preparation for the synchronization correction processing is completed, the count value acquisition unit 75 acquires the count value from the second reference signal generation unit 71 ((5) in FIG. 9) at the time (4) in FIG. Then, the count value is acquired from the overhead counter 74 ((6) in FIG. 9).
 続いて、計数値取得部75は、第2基準信号生成部71の計数値を参照して時間に換算し397μsを取得している。これに引き続き、同期判定部76は、往復伝送遅延時間(400μs)から片道の伝送遅延時間200μsを求め、求めた伝送遅延時間とオーバーヘッド計数部74の計数値を時間換算した200μsとを加算し総合遅延時間400μsを求めている。そして、同期判定部76は、総合遅延時間400μsと計数値取得部75が取得した、第2基準信号生成部71の計数値を時間換算した397μsとを比較し、双方が相違するので第1基準信号と第2基準信号とが非同期であると判定する。 Subsequently, the count value acquisition unit 75 refers to the count value of the second reference signal generation unit 71, converts it to time, and acquires 397 μs. Subsequently, the synchronization determination unit 76 calculates a one-way transmission delay time 200 μs from the round-trip transmission delay time (400 μs), and adds the calculated transmission delay time and the time-converted count value of the overhead counter 74 to 200 μs. The delay time is 400 μs. Then, the synchronization determination unit 76 compares the total delay time 400 μs and the count value of the second reference signal generation unit 71 acquired by the count value acquisition unit 75 with time of 397 μs. It is determined that the signal and the second reference signal are asynchronous.
 同期判定部76によって第1基準信号と第2基準信号とが非同期であると判定されたため、同期補正部77は、第2基準信号生成部71に臨時の基準値を設定している。具体的には、同期補正部77は、「基準値(処理周期)-(総合遅延時間-第2基準信号生成部71の計数値)」という式にて第2基準信号生成部71のリスタート値(リセット値)を求め、求めた計数値を臨時の基準値として第2基準信号生成部71にセットする。この例の場合、臨時の基準値は1000μs-(400μs-397μs)=997μsとなる。そして、第2基準信号生成部71は、図9の(7)の時点で計数値が臨時の基準値997μsに達したため、リスタートしている。ちなみに、総合遅延時間-第2基準信号生成部71の計数値の値が同期補正値である。 Since the synchronization determination unit 76 determines that the first reference signal and the second reference signal are asynchronous, the synchronization correction unit 77 sets a temporary reference value in the second reference signal generation unit 71. Specifically, the synchronization correction unit 77 restarts the second reference signal generation unit 71 using the formula “reference value (processing period) − (total delay time−count value of the second reference signal generation unit 71)”. A value (reset value) is obtained, and the obtained count value is set in the second reference signal generator 71 as a temporary reference value. In this example, the temporary reference value is 1000 μs− (400 μs−397 μs) = 997 μs. Then, the second reference signal generation unit 71 restarts because the count value reaches the temporary reference value 997 μs at the point (7) in FIG. Incidentally, the total delay time—the value of the count value of the second reference signal generator 71 is the synchronization correction value.
 図10は、スレーブノード51bのカウンタが、マスタノード51aのカウンタより3μs進んでいる場合を示している。 FIG. 10 shows a case where the counter of the slave node 51b is advanced by 3 μs from the counter of the master node 51a.
 図10において、マスタノード51aの間隔計数部64の計数値が補正処理間隔値に達し、同期補正処理が開始されてから、スレーブノード51bのフレーム受信部80が伝送遅延時間通知フレームに含まれる往復伝送遅延時間(値)をメモリ45等に退避するまでの処理は、図8及び図9の処理と実質的に等しいので、ここでは、その説明を省略する。 In FIG. 10, after the count value of the interval counting unit 64 of the master node 51a reaches the correction processing interval value and the synchronization correction processing is started, the frame receiving unit 80 of the slave node 51b performs the round trip included in the transmission delay time notification frame. Since the processing until the transmission delay time (value) is saved in the memory 45 or the like is substantially the same as the processing of FIGS. 8 and 9, the description thereof is omitted here.
 同期補正処理が開始後、図10の(1)時点で、マスタノード51aの同期化フレーム通知部66は、同期化フレームを割り込み信号としてスレーブノード51bに送信する。そして、スレーブノード51bは、同期化フレームを通信路52の片道の伝送遅延時間(200μs)を経て図10(2)の時点で受信し、スレーブノード51bにおけるソフトウェアによる同期補正処理を起動している。また、同期化フレームの受信に伴い、オーバーヘッド計数部74のカウンタがクリアされリスタートしている(図10の(3))。 10 (1) in FIG. 10 after the start of the synchronization correction process, the synchronization frame notification unit 66 of the master node 51a transmits the synchronization frame as an interrupt signal to the slave node 51b. Then, the slave node 51b receives the synchronization frame through the one-way transmission delay time (200 μs) of the communication path 52 at the time of FIG. 10 (2), and starts the synchronization correction process by software in the slave node 51b. . In addition, with the reception of the synchronization frame, the counter of the overhead counter 74 is cleared and restarted ((3) in FIG. 10).
 続いて、同期補正処理の準備が整うと、図10の(4)時点で、計数値取得部75は、第2基準信号生成部71から計数値を取得する(図10の(5))と共に、オーバーヘッド計数部74から計数値を取得する(図10の(6))。 Subsequently, when the preparation for the synchronization correction process is completed, the count value acquisition unit 75 acquires the count value from the second reference signal generation unit 71 ((5) in FIG. 10) at the time (4) in FIG. Then, the count value is acquired from the overhead counter 74 ((6) in FIG. 10).
 続いて、計数値取得部75は、第2基準信号生成部71の計数値を参照して時間に換算し403μsを取得している。これに引き続き、同期判定部76は、往復伝送遅延時間(400μs)から片道の伝送遅延時間200μsを求め、求めた片道の伝送遅延時間とオーバーヘッド計数部74の計数値を時間換算した200μsとを加算し総合遅延時間400μsを求めている。そして、同期判定部76は、総合遅延時間400μsと計数値取得部75が取得した、第2基準信号生成部71の計数値を時間換算した403μsとを比較し、双方が相違するので第1基準信号と第2基準信号とが非同期であると判定する。 Subsequently, the count value acquisition unit 75 refers to the count value of the second reference signal generation unit 71, converts it into time, and acquires 403 μs. Subsequently, the synchronization determination unit 76 obtains a one-way transmission delay time of 200 μs from the round-trip transmission delay time (400 μs), and adds the obtained one-way transmission delay time to the time-converted count value of the overhead counting unit 74 of 200 μs. The total delay time is 400 μs. Then, the synchronization determination unit 76 compares the total delay time 400 μs with the 403 μs obtained by converting the count value of the second reference signal generation unit 71 acquired by the count value acquisition unit 75 into time, and the first reference because the two are different. It is determined that the signal and the second reference signal are asynchronous.
 同期判定部76によって第1基準信号と第2基準信号とが非同期であると判定されたため、同期補正部77は、第2基準信号生成部71に臨時の基準値を設定している。この例の場合、臨時の基準値は1000μs-(400μs-403μs)=1003μsとなる。そして、第2基準信号生成部71は、図10の(7)の時点で計数値が臨時の基準値1003μsに達したため、リスタートしている。 Since the synchronization determination unit 76 determines that the first reference signal and the second reference signal are asynchronous, the synchronization correction unit 77 sets a temporary reference value in the second reference signal generation unit 71. In this example, the temporary reference value is 1000 μs− (400 μs−403 μs) = 1003 μs. Then, the second reference signal generator 71 restarts because the count value reaches the temporary reference value 1003 μs at the point (7) in FIG.
 なお、図9及び図10の例の場合、第3サイクルで、マスタ側のカウンタとスレーブ側のカウンタとが同期することになるため、以後、同期補正部77は、元の基準値1000μsを第2基準信号生成部71に設定している(設定時点で第2基準信号生成部71は、リスタートしていない)。そして、第2基準信号生成部71は、計数値が基準値1000μsに達したときにリスタートする。すなわち、第2実施形態は、第3サイクルに対し、次の第4サイクルのマスタ側のカウンタのリスタートと略同タイミングでスレーブ側のカウンタをリスタートすることができるため、マスタ側のカウンタの値とスレーブ側のカウンタの値とを略等しい値に合わせることができる。 In the case of the examples of FIGS. 9 and 10, since the master counter and the slave counter are synchronized in the third cycle, the synchronization correction unit 77 subsequently changes the original reference value 1000 μs to the first cycle. 2 is set in the reference signal generation unit 71 (the second reference signal generation unit 71 has not been restarted at the time of setting). Then, the second reference signal generation unit 71 restarts when the count value reaches the reference value 1000 μs. That is, in the second embodiment, the slave counter can be restarted at substantially the same timing as the restart of the master counter in the next fourth cycle with respect to the third cycle. The value and the value of the counter on the slave side can be adjusted to substantially the same value.
 なお、同期補正処理には、第1実施形態と同様に計数値取得部75、同期判定部76、同期補正部77のプログラムの処理が含まれている。 Note that the synchronization correction processing includes program processing of the count value acquisition unit 75, the synchronization determination unit 76, and the synchronization correction unit 77 as in the first embodiment.
 また、スレーブノード51bの第2基準信号生成部71は、CPU43に内蔵されていることを前提に説明したが、これに限定されるものではない。すなわち、第2基準信号生成部71は、CPU43と別体であっても実現可能である。ただ、第2基準信号生成部71がCPU43に内蔵されていることにより、CPU43の外部で生成された所定の信号で第2基準信号生成部71をハード的にリセットすることができない。言い換えれば、第2基準信号生成部71はプログラムが介在してその動作が制御されるカウンタである。このため、本実施形態は第2基準信号生成部71のリセット処理(リスタート処理)をプログラムで実行する必要があり、そのオーバーヘッドが同期誤差に繋がる。よって、本実施形態ではオーバーヘッドを計測するという構成が必要になる(第1実施形態でも同様)。 Further, although the second reference signal generation unit 71 of the slave node 51b has been described on the assumption that it is built in the CPU 43, it is not limited to this. That is, the second reference signal generation unit 71 can be realized even if it is separate from the CPU 43. However, since the second reference signal generation unit 71 is built in the CPU 43, the second reference signal generation unit 71 cannot be hardware reset with a predetermined signal generated outside the CPU 43. In other words, the second reference signal generation unit 71 is a counter whose operation is controlled through a program. For this reason, in this embodiment, the reset process (restart process) of the second reference signal generation unit 71 needs to be executed by a program, and the overhead thereof leads to a synchronization error. Therefore, in this embodiment, a configuration for measuring overhead is required (the same applies to the first embodiment).
 また、第2実施形態において、同期補正処理は同期化フレーム受信によって起動される割り込み処理である。 In the second embodiment, the synchronization correction process is an interrupt process that is activated by receiving a synchronization frame.
 また、上記説明においてスレーブノード51bは、例えば、往復伝送遅延時間をマスタノード51aから得て保持し、保持した往復伝送遅延時間を同期補正処理の際に活用する。これとは別に、マスタノード51aが往復伝送遅延時間を同期化フレームに含めてスレーブノード51bに送信し、これを受信したスレーブノード51bが同期化フレームに含まれる往復伝送時間を活用する方法もある。このようにすることで、マスタノード51aは状況に応じた往復伝送遅延時間をスレーブノード51bに適宜通知することができるため、スレーブノード51bでは状況に応じた往復伝送遅延時間をタイムリーに活用できる。 In the above description, for example, the slave node 51b obtains and holds the round trip transmission delay time from the master node 51a, and uses the held round trip transmission delay time in the synchronization correction processing. Apart from this, there is also a method in which the master node 51a includes the round trip transmission delay time in the synchronization frame and transmits it to the slave node 51b, and the slave node 51b that has received this uses the round trip transmission time included in the synchronization frame. . By doing in this way, since the master node 51a can notify the slave node 51b of the round trip transmission delay time according to the situation, the slave node 51b can utilize the round trip transmission delay time according to the situation in a timely manner. .
 また、伝送遅延時間通知部65について、往復伝送遅延時間をスレーブノード51bに通知するよう説明したが、これに限定されるものではない。例えば伝送遅延時間通知部65は、算出した往復伝送遅延時間を半分にして片道の伝送遅延時間を求め、求めた片道の伝送遅延時間をスレーブノード51bに通知するようにしてもよい。この場合、スレーブノード51bの同期判定部76は、与えられた片道の伝送遅延時間をそのまま使って総合遅延時間を求めるようにすればよい。 Further, although the transmission delay time notifying unit 65 has been described to notify the slave node 51b of the round trip transmission delay time, the present invention is not limited to this. For example, the transmission delay time notification unit 65 may calculate the one-way transmission delay time by halving the calculated round-trip transmission delay time, and notify the slave node 51b of the calculated one-way transmission delay time. In this case, the synchronization determination unit 76 of the slave node 51b may obtain the total delay time by using the given one-way transmission delay time as it is.
 以上の説明のように第2実施形態では、通信路52による信号の伝送遅延時間を含めて第1基準信号と第2基準信号とを同期させることができる。 As described above, in the second embodiment, the first reference signal and the second reference signal can be synchronized including the transmission delay time of the signal through the communication path 52.
(同期補正処理における伝送遅延時間の通知手順について)
 次に、上述した同期補正処理における伝送遅延時間の通知手順について説明する。図11は、第2実施形態における伝送遅延時間の通知手順の一例を説明するための図である。なお、図11の例では、上述したマスタノード51aと、スレーブノード51b,51cとを有し、各ノード51は、通信路52を介して信号の送受信が可能な状態で接続されているものとする。また、以下の説明では、マスタノード51aが各ノード51間の通信路52による信号の伝送遅延時間を取得する例を示す。
(Notification procedure of transmission delay time in synchronization correction processing)
Next, a transmission delay time notification procedure in the above-described synchronization correction process will be described. FIG. 11 is a diagram for explaining an example of a transmission delay time notification procedure according to the second embodiment. In the example of FIG. 11, the above-described master node 51 a and slave nodes 51 b and 51 c are provided, and each node 51 is connected in a state where signals can be transmitted and received via the communication path 52. To do. Further, in the following description, an example in which the master node 51a acquires the signal transmission delay time through the communication path 52 between the nodes 51 is shown.
 また、図11に示す四角はフレームを示し、各ノード51に対する線上の四角は送信フレームを示し、線下の四角は受信フレームを示している。また、図11に示すフレームは、伝送遅延時間リクエストフレーム81(図11における「REQ*」(*は、例えば各スレーブノードの識別子(例えばb、c)を示す(以下同様))と、受信完了フレーム82(図11における「REC*」)と、伝送遅延時間通知フレーム83(図11における「SET*」)と、伝送遅延時間通知フレーム83に対する応答フレーム84(図11における「ANS*」)とを有する。 Also, the squares shown in FIG. 11 indicate frames, the squares on the line for each node 51 indicate transmission frames, and the squares below the lines indicate reception frames. Further, the frame shown in FIG. 11 includes a transmission delay time request frame 81 (“REQ *” in FIG. 11 (* indicates an identifier (eg, b, c) of each slave node, for example)), and reception is completed. A frame 82 (“REC *” in FIG. 11), a transmission delay time notification frame 83 (“SET *” in FIG. 11), and a response frame 84 (“ANS *” in FIG. 11) to the transmission delay time notification frame 83 Have
 図11の例において、マスタノード51aは、スレーブノード51bに対する伝送遅延時間リクエストフレーム81b(REQb)をマスタノード同期基準にしたがって通信路52上にブロードキャスト送信する。このとき、伝送遅延時間リクエストフレーム81bには、スレーブノード51bに対する伝送遅延時間リクエストであることを示す情報(対象ノード情報)が含まれている。 In the example of FIG. 11, the master node 51a broadcasts a transmission delay time request frame 81b (REQb) for the slave node 51b on the communication path 52 in accordance with the master node synchronization standard. At this time, the transmission delay time request frame 81b includes information (target node information) indicating a transmission delay time request for the slave node 51b.
 ブロードキャスト送信された伝送遅延時間リクエストフレーム81bは、通信路52を介して所定の伝送遅延時間後に各スレーブノード51b,51cで受信される。なお、図11の例では、スレーブノード51bは、マスタノード同期基準から遅延時間D1で伝送遅延時間リクエストフレーム81bを受信し、スレーブノード51cは、マスタノード同期基準から遅延時間D2で伝送遅延時間リクエストフレーム81bを受信する。 The transmission delay time request frame 81b transmitted by broadcast is received by the slave nodes 51b and 51c via the communication path 52 after a predetermined transmission delay time. In the example of FIG. 11, the slave node 51b receives the transmission delay time request frame 81b with the delay time D1 from the master node synchronization reference, and the slave node 51c receives the transmission delay time request with the delay time D2 from the master node synchronization reference. The frame 81b is received.
 ここで、各スレーブノード51b,51cは、伝送遅延時間リクエストフレーム81bに含まれている上述した対象ノード情報を確認する。上述したように、伝送遅延時間リクエストフレーム81bは、スレーブノード51bに対するリクエストであるため、スレーブノード51bのみがマスタノード51aに対して受信完了フレーム82b(RECb)をブロードキャスト送信する。このとき、受信完了フレーム82bには、マスタノード51aに対する受信完了フレームであることを示す情報(対象ノード情報)が含まれている。 Here, each of the slave nodes 51b and 51c confirms the above-mentioned target node information included in the transmission delay time request frame 81b. As described above, since the transmission delay time request frame 81b is a request for the slave node 51b, only the slave node 51b broadcasts the reception completion frame 82b (RECb) to the master node 51a. At this time, the reception completion frame 82b includes information (target node information) indicating that it is a reception completion frame for the master node 51a.
 送信された受信完了フレーム82bは、通信路52を介してマスタノード51a及びスレーブノード51cで受信される。次に、マスタノード51a及びスレーブノード51cは、受信完了フレーム82bに含まれている上述した対象ノード情報を確認する。上述したように、受信完了フレーム82bは、マスタノード51aに対するフレームである。そのため、マスタノード51aは、マスタノード同期基準にしたがって送信した伝送遅延時間リクエストフレーム81bの送信から、その受信完了フレーム82bを受信するまでの時間情報に基づいて、スレーブノード51bに対する伝送遅延時間を設定する。なお、ここで、設定される伝送遅延時間は、通信路52を介してマスタノード51aとスレーブノード51b間を所定の信号が往復する往復伝送遅延時間でもよく、片道分の伝送遅延時間でもよい。 The transmitted reception completion frame 82b is received by the master node 51a and the slave node 51c via the communication path 52. Next, the master node 51a and the slave node 51c confirm the above-described target node information included in the reception completion frame 82b. As described above, the reception completion frame 82b is a frame for the master node 51a. Therefore, the master node 51a sets the transmission delay time for the slave node 51b based on the time information from the transmission of the transmission delay time request frame 81b transmitted according to the master node synchronization reference until the reception completion frame 82b is received. To do. Here, the set transmission delay time may be a round trip transmission delay time in which a predetermined signal reciprocates between the master node 51a and the slave node 51b via the communication path 52, or may be a one-way transmission delay time.
 また、マスタノード51aは、設定した伝送遅延時間をスレーブノード51bに通知するための伝送遅延時間通知フレーム83b(SETb)を作成し、作成した伝送遅延時間通知フレーム83bをマスタノード同期基準にしたがってブロードキャスト送信する。なお、伝送遅延時間通知フレーム83bには、上述した対象ノード情報が含まれている。 Also, the master node 51a creates a transmission delay time notification frame 83b (SETb) for notifying the slave node 51b of the set transmission delay time, and broadcasts the created transmission delay time notification frame 83b according to the master node synchronization standard. Send. The transmission delay time notification frame 83b includes the target node information described above.
 ブロードキャスト送信された伝送遅延時間通知フレーム83bは、上述した伝送遅延時間リクエストフレーム81bと同様に通信路52を介して所定の伝送遅延時間後に各スレーブノード51b,51cで受信される。 The transmission delay time notification frame 83b transmitted by broadcast is received by each of the slave nodes 51b and 51c after a predetermined transmission delay time via the communication path 52 in the same manner as the transmission delay time request frame 81b described above.
 このとき、スレーブノード51bは、受信した伝送遅延時間通知フレーム83bの対象ノード情報から自ノードに対する情報であると判断し、フレーム内に含まれる伝送遅延時間と、上述したオーバーヘッド時間等とを含めた第2実施形態における同期補正処理を行う。また、スレーブノード51bは、伝送遅延時間通知フレーム83bに対する応答フレーム84b(ANSb)を作成し、作成した応答フレーム84bをブロードキャスト送信する。このとき、応答フレーム84bには、マスタノード51aに対するフレームであることを示す情報(対象ノード情報)及び同期補正処理が完了したことを示す情報等が含まれている。 At this time, the slave node 51b determines that it is information for the own node from the target node information of the received transmission delay time notification frame 83b, and includes the transmission delay time included in the frame, the overhead time described above, and the like. The synchronization correction process in the second embodiment is performed. In addition, the slave node 51b creates a response frame 84b (ANSb) for the transmission delay time notification frame 83b, and broadcasts the created response frame 84b. At this time, the response frame 84b includes information indicating that the frame is for the master node 51a (target node information), information indicating that the synchronization correction processing has been completed, and the like.
 送信された応答フレーム84bは、上述した受信完了フレーム82bと同様に、通信路52を介してマスタノード51a及びスレーブノード51cで受信される。次に、マスタノード51a及びスレーブノード51cは、応答フレーム84bに含まれている上述した対象ノード情報を確認する。上述したように、応答フレーム84bは、マスタノード51aに対するフレームである。そのため、マスタノード51aは、スレーブノード51bからの応答フレーム84bにより、同期補正処理が完了したことを把握することができる。なお、スレーブノード51cは、伝送遅延時間リクエストフレーム81b(REQb)と、受信完了フレーム82b(RECb)と、伝送遅延時間通知フレーム83b(SETb)と、応答フレーム84b(ANSb)とを受信しているが、何れも自ノードに対するフレームではないため、受信したフレームは破棄される。 The transmitted response frame 84b is received by the master node 51a and the slave node 51c via the communication path 52, similarly to the reception completion frame 82b described above. Next, the master node 51a and the slave node 51c confirm the above-described target node information included in the response frame 84b. As described above, the response frame 84b is a frame for the master node 51a. Therefore, the master node 51a can grasp that the synchronization correction processing is completed by the response frame 84b from the slave node 51b. The slave node 51c receives a transmission delay time request frame 81b (REQb), a reception completion frame 82b (RECb), a transmission delay time notification frame 83b (SETb), and a response frame 84b (ANSb). However, since none of them is a frame for the own node, the received frame is discarded.
 上述した内容までが、スレーブノード51bへの伝送遅延時間通知手順である。したがって、マスタノード51aは、同様にスレーブノード51cに対して伝送遅延時間の通知を行う。 The contents up to the above are the transmission delay time notification procedure to the slave node 51b. Therefore, the master node 51a similarly notifies the slave node 51c of the transmission delay time.
 具体的には、図11の例において、マスタノード51aは、スレーブノード51cに対する伝送遅延時間リクエストフレーム81c(REQc)をマスタノード同期基準にしたがって通信路52上にブロードキャスト送信する。ブロードキャスト送信された伝送遅延時間リクエストフレーム81cは、上述したように通信路52を介して所定の伝送遅延時間(D1,D2)で各スレーブノード51b,51cにて受信される。 Specifically, in the example of FIG. 11, the master node 51a broadcasts a transmission delay time request frame 81c (REQc) to the slave node 51c on the communication path 52 according to the master node synchronization standard. The transmission delay time request frame 81c transmitted by broadcast is received by each of the slave nodes 51b and 51c via the communication path 52 with a predetermined transmission delay time (D1, D2) as described above.
 伝送遅延時間リクエストフレーム81cは、スレーブノード51cに対するリクエストであるため、スレーブノード51cのみがマスタノード51aに対して受信完了フレーム82c(RECc)をブロードキャスト送信する。送信された受信完了フレーム82cは、通信路52を介してマスタノード51a及びスレーブノード51cで受信される。受信完了フレーム82cは、マスタノード51aに対するフレームである。そのため、マスタノード51aは、マスタノード同期基準にしたがって送信した伝送遅延時間リクエストフレーム81cの送信から、その受信完了フレーム82cを受信するまでの時間情報に基づいて、スレーブノード51cに対する伝送遅延時間を設定する。なお、ここで、設定される伝送遅延時間は、通信路52を介してマスタノード51aとスレーブノード51c間を所定の信号が往復する往復伝送遅延時間でもよく、片道分の伝送遅延時間でもよい。 Since the transmission delay time request frame 81c is a request for the slave node 51c, only the slave node 51c broadcasts a reception completion frame 82c (RECc) to the master node 51a. The transmitted reception completion frame 82c is received by the master node 51a and the slave node 51c via the communication path 52. The reception completion frame 82c is a frame for the master node 51a. Therefore, the master node 51a sets the transmission delay time for the slave node 51c based on the time information from the transmission of the transmission delay time request frame 81c transmitted according to the master node synchronization reference until the reception completion frame 82c is received. To do. Here, the set transmission delay time may be a round trip transmission delay time in which a predetermined signal reciprocates between the master node 51a and the slave node 51c via the communication path 52, or may be a one-way transmission delay time.
 また、マスタノード51aは、設定した伝送遅延時間をスレーブノード51cに通知するための伝送遅延時間通知フレーム83c(SETc)を作成し、作成した伝送遅延時間通知フレーム83cをマスタノード同期基準にしたがってブロードキャスト送信する。ブロードキャスト送信された伝送遅延時間通知フレーム83cは、上述した伝送遅延時間リクエストフレーム81cと同様に通信路52を介して所定の伝送遅延時間(D1,D2)で各スレーブノード51b,51cにて受信される。 Further, the master node 51a creates a transmission delay time notification frame 83c (SETc) for notifying the slave node 51c of the set transmission delay time, and broadcasts the created transmission delay time notification frame 83c according to the master node synchronization standard. Send. The transmission delay time notification frame 83c transmitted by broadcast is received by each of the slave nodes 51b and 51c via the communication path 52 with a predetermined transmission delay time (D1, D2) in the same manner as the transmission delay time request frame 81c described above. The
 このとき、スレーブノード51cは、上述したように、受信した伝送遅延時間通知フレーム83cの対象ノード情報から自ノードに対する情報であると判断し、フレーム内に含まれる伝送遅延時間と、上述したオーバーヘッド時間等とを含めた第2実施形態における同期補正処理を行う。また、スレーブノード51cは、伝送遅延時間通知フレーム83cに対する応答フレーム84c(ANSc)を作成し、作成した応答フレーム84cをブロードキャスト送信する。このとき、応答フレーム84cには、マスタノード51aに対するフレームであることを示す情報(対象ノード情報)及び同期補正処理が完了したことを示す情報等が含まれている。 At this time, as described above, the slave node 51c determines from the target node information of the received transmission delay time notification frame 83c that the information is for the own node, and the transmission delay time included in the frame and the overhead time described above. The synchronization correction process in the second embodiment including the above is performed. The slave node 51c creates a response frame 84c (ANSc) for the transmission delay time notification frame 83c, and broadcasts the created response frame 84c. At this time, the response frame 84c includes information indicating that the frame is for the master node 51a (target node information), information indicating that the synchronization correction processing has been completed, and the like.
 送信された応答フレーム84cは、上述した受信完了フレーム82cと同様に、通信路52を介してマスタノード51a及びスレーブノード51cで受信される。次に、マスタノード51a及びスレーブノード51bは、応答フレーム84cに含まれている上述した対象ノード情報を確認する。上述したように、応答フレーム84cは、マスタノード51aに対するフレームである。そのため、マスタノード51aは、スレーブノード51cからの応答フレーム84cにより、同期補正処理が完了したことを把握することができる。なお、スレーブノード51bは、伝送遅延時間リクエストフレーム81c(REQc)と、受信完了フレーム82c(RECc)と、伝送遅延時間通知フレーム83c(SETc)と、応答フレーム84c(ANSc)とを受信しているが、何れも自ノードに対するフレームではないため、受信したフレームは破棄される。 The transmitted response frame 84c is received by the master node 51a and the slave node 51c via the communication path 52 in the same manner as the reception completion frame 82c described above. Next, the master node 51a and the slave node 51b confirm the above-described target node information included in the response frame 84c. As described above, the response frame 84c is a frame for the master node 51a. Therefore, the master node 51a can recognize that the synchronization correction processing has been completed based on the response frame 84c from the slave node 51c. The slave node 51b receives a transmission delay time request frame 81c (REQc), a reception completion frame 82c (RECc), a transmission delay time notification frame 83c (SETc), and a response frame 84c (ANSc). However, since none of them is a frame for the own node, the received frame is discarded.
 第2実施形態では、上述した処理を通信路52の各スレーブノード51b,51cに対して順次実施することで、伝送遅延時間を通知することができる。 In the second embodiment, the transmission delay time can be notified by sequentially performing the above-described processing on each of the slave nodes 51b and 51c of the communication path 52.
 なお、伝送遅延時間の通知手順については、上述した手順に限定されるものでない。例えば、伝送遅延時間リクエストフレーム81をブロードキャスト送信し、これを受信したスレーブノード51b,51cが応答フレーム84の送信によって、通信路52上やマスタノード51a上で輻輳しないように、例えば上述した各ノード内部にセンドカウンタを設け、そのセンドカウンタを使って異なるタイミングで応答フレーム84を送信するように制御してもよい。 Note that the transmission delay time notification procedure is not limited to the procedure described above. For example, in order to prevent the slave nodes 51b and 51c that have received the transmission delay time request frame 81 from being broadcasted and to be congested on the communication path 52 or the master node 51a by transmitting the response frame 84, for example A send counter may be provided inside and the response frame 84 may be controlled to be transmitted at different timings using the send counter.
 上述した第2実施形態では、例えばイーサネット(登録商標)のようなスター型トポロジを持つシステムにおいて、時分割多重伝送方式を用いたコモンメモリネットワークに対し、各ノードのカウンタを同期化し、装置全体で制御のタイミングを合わせる同期制御ができる。また、第2実施形態において、同期させるカウンタは、マイコン内部のカウンタを用いたり、FPGA等のハードウェアにてカウンタを用いて構成することができる。したがって、第2実施形態では、例えば送受信されるフレームの受信タイミングでマスタノード51aと同期しているカウンタと、マイコンでの処理時間を計測するカウンタとを、例えばFPGA等のハードウェアで構成し、その計数値をマイコンで演算することで、処理誤差を補正することができる。 In the second embodiment described above, for example, in a system having a star topology such as Ethernet (registered trademark), the counter of each node is synchronized with the common memory network using the time division multiplex transmission method, and the entire apparatus is Synchronous control that matches the timing of control is possible. In the second embodiment, the counter to be synchronized can be configured using a counter inside the microcomputer or using a counter such as an FPGA. Therefore, in the second embodiment, for example, a counter that is synchronized with the master node 51a at the reception timing of a frame to be transmitted and received and a counter that measures the processing time in the microcomputer are configured by hardware such as FPGA, for example. Processing errors can be corrected by calculating the count value with a microcomputer.
 ここで、上述の例では、ノード同期システム50の一例として、マスタ-スレーブ間のノード同期について説明したが、本実施形態においては、これに限定されるものではなく、例えば保護リレー等におけるサンプリング同期技術にも応用することができる。 Here, in the above-described example, the node synchronization between the master and the slave has been described as an example of the node synchronization system 50. However, in the present embodiment, the present invention is not limited to this. For example, sampling synchronization in a protection relay or the like It can also be applied to technology.
(ネットワーク伝送システム:概略構成例)
 ここで、上述した第2実施形態では、例えば各ノード間を、IEEE802.3u(100BASE-TX)やIEEE802.3ab(1000BASE-T)等のようなHUB(ハブ)等の中継装置を介して接続される場合がある。図12は、第2実施形態におけるマスタノード51a及びスレーブノード51b,51cを用いたノード同期システム50を含むネットワーク伝送システムの概略構成の一例を示す図である。図12に示すネットワーク伝送システム90は、一例として、上述した複数のノード51(図12の例では、ノード51a~51c)と、1又は複数の中継装置としてのHUB91(図12の例では、HUB91a~91e)とを有する。なお、ノードや中継装置の数や種類、接続方法についてはこれに限定されるものではない。
(Network transmission system: schematic configuration example)
Here, in the second embodiment described above, for example, each node is connected via a relay device such as a HUB (hub) such as IEEE802.3u (100BASE-TX) or IEEE802.3ab (1000BASE-T). May be. FIG. 12 is a diagram illustrating an example of a schematic configuration of a network transmission system including the node synchronization system 50 using the master node 51a and the slave nodes 51b and 51c in the second embodiment. As an example, the network transmission system 90 shown in FIG. 12 includes a plurality of nodes 51 (nodes 51a to 51c in the example of FIG. 12) and a HUB 91 as one or a plurality of relay devices (in the example of FIG. 12, HUB 91a). 91e). Note that the number and type of nodes and relay devices, and the connection method are not limited thereto.
 図12の例では、図7のマスタノード、すなわちノード51aをノードA(マスタ局)とし、図7のスレーブノード、すなわちノード51b,ノード51cをノードB,ノードC(スレーブ局)とする。また、図12に示すように、ネットワーク伝送システム90の通信路は、例えばマスタノード51aとスレーブノード51bとの間に中継装置を有するスター型である。なお、中継装置は、一例としてHUBを用いているが、本実施形態においてはこれに限定されるものではなく、例えばルータ、リピータ、光コンバータ等を用いることもできる。 In the example of FIG. 12, the master node of FIG. 7, that is, the node 51a is the node A (master station), and the slave nodes of FIG. 7, that is, the node 51b and the node 51c are the node B and node C (slave station). As shown in FIG. 12, the communication path of the network transmission system 90 is, for example, a star type having a relay device between the master node 51a and the slave node 51b. The relay device uses HUB as an example. However, the present embodiment is not limited to this, and for example, a router, a repeater, an optical converter, or the like can be used.
 また、マスタノード51a及びスレーブノード51b,51cは、例えばプログラマブルコントローラ(制御装置、もしくはPLC(Programmable Logic Controller)ともいう)であり、ネットワーク伝送システム90の通信路はこれらプログラマブルコントローラ同士のデータを交換するデータ交換バスである。このデータ交換バスに接続される機器としては、例えば上述のプログラマブルコントローラに加え、PC、サーバ、I/Oモジュール、ドライブ装置(例えば、インバータ、サーボ等)等がある。 The master node 51a and the slave nodes 51b and 51c are, for example, programmable controllers (also referred to as a control device or PLC (Programmable Logic Controller)), and the communication path of the network transmission system 90 exchanges data between these programmable controllers. Data exchange bus. Examples of devices connected to the data exchange bus include a PC, a server, an I / O module, a drive device (for example, an inverter, a servo, and the like) in addition to the above-described programmable controller.
 図12に示すネットワーク伝送システム90は、ノード51a及びノード51cが同一のHUB91aに接続されており、ノード51bは、5段のHUB(中継装置)を経由してノード51a及びノード51cと接続されている。 In the network transmission system 90 shown in FIG. 12, the node 51a and the node 51c are connected to the same HUB 91a, and the node 51b is connected to the node 51a and the node 51c via a 5-stage HUB (relay device). Yes.
 ここで、一般的なイーサネットのHUBでは、ストア&フォワードといわれるインタフェース方式が採用されている。この場合、送られてきたフレームは、全てをHUB内の受信バッファに蓄え、HUB内部処理(例えば、異常判定や宛先判定等)を行ってから送信される。 Here, a general Ethernet HUB employs an interface method called store & forward. In this case, all the sent frames are stored in the reception buffer in the HUB, and are transmitted after performing the HUB internal processing (for example, abnormality determination, destination determination, etc.).
(ノード同期方法のシーケンス例)
 図13は、ノード同期方法の概略的なシーケンス例を示す図である。図13の例では、説明の便宜上、マスタノード51aとスレーブノード51bとを用いた同期について説明するが、本実施形態においてはこれに限定されるものではなく、1つのマスタノードに対して複数のスレーブノードを同期させることができる。
(Sequence example of node synchronization method)
FIG. 13 is a diagram illustrating a schematic sequence example of the node synchronization method. In the example of FIG. 13, for the sake of convenience of explanation, synchronization using the master node 51a and the slave node 51b will be described. However, in the present embodiment, the present invention is not limited to this. Slave nodes can be synchronized.
 図13のノード同期処理において、まず、マスタノード51aの第1基準信号生成部61は、第1基準信号を生成し(S11)、スレーブノード51bの第2基準信号生成部71は、第2基準信号を生成する(S12)。また、この処理は、ハードウェア的にサイクリックに動作されている。 In the node synchronization process of FIG. 13, first, the first reference signal generation unit 61 of the master node 51a generates a first reference signal (S11), and the second reference signal generation unit 71 of the slave node 51b generates a second reference signal. A signal is generated (S12). Further, this process is cyclically operated in terms of hardware.
 また、マスタノード51aの間隔計数部64は、補正処理間隔を計数し、計数値が補正処理間隔値に達すると、補正処理開始信号を生成して同期補正処理を開始する(S13)。 Further, the interval counting unit 64 of the master node 51a counts the correction processing interval, and when the count value reaches the correction processing interval value, generates a correction processing start signal and starts the synchronous correction processing (S13).
 間隔計数部64の計数値が補正処理間隔値に達すると、マスタノード51aにおける同期補正処理が開始され(S13)、マスタノード51aの伝送遅延時間通知部65は、伝送遅延時間を算出するために伝送遅延時間リクエストフレームを送信する(S14)。なお、伝送遅延時間リクエストフレームは、同期化フレームに含まれる所定部分のデータを変えただけのものであり、同期化フレームと言い換えることができるが、ここでは便宜上、「伝送遅延時間リクエストフレーム」として説明している。 When the count value of the interval counting unit 64 reaches the correction processing interval value, synchronization correction processing in the master node 51a is started (S13), and the transmission delay time notifying unit 65 of the master node 51a calculates the transmission delay time. A transmission delay time request frame is transmitted (S14). Note that the transmission delay time request frame is a data obtained by changing a predetermined portion of data included in the synchronization frame, and can be referred to as a synchronization frame. Explains.
 スレーブノード51bの受信完了通知部79は、伝送遅延時間リクエストフレームを受信すると、受信完了通知を生成し、マスタノード51aに通知する(S15)。 Upon receiving the transmission delay time request frame, the reception completion notification unit 79 of the slave node 51b generates a reception completion notification and notifies the master node 51a (S15).
 マスタノード51aの伝送遅延時間通知部65は、受信完了通知を受信すると、例えば往復伝送遅延時間を算出し(S16)、算出した往復伝送遅延時間等を含む伝送遅延時間通知フレームを生成し(S17)、生成した伝送遅延時間通知フレームを、通信路52を介してスレーブノード51bに送信する(S18)。 Upon receiving the reception completion notification, the transmission delay time notification unit 65 of the master node 51a calculates, for example, a round trip transmission delay time (S16), and generates a transmission delay time notification frame including the calculated round trip transmission delay time (S17). The generated transmission delay time notification frame is transmitted to the slave node 51b via the communication path 52 (S18).
 スレーブノード51bのフレーム受信部80は、伝送遅延時間通知フレームを受信すると、そのフレームに含まれる往復伝送遅延時間(値)をメモリ45等に退避する(S19)。そして、マスタノード51aの同期化フレーム通知部66は、第1基準信号に同期させて、同期化フレームを割り込み信号としてスレーブノード51bに送信する(S20)。スレーブノード51bが同期化フレームを受信すると(S21)、ソフトウェアによる同期補正処理を起動させる(S22)と共に、オーバーヘッド計数部74をリスタートする(S23)。そして、計数値取得部75は、第2基準信号生成部71とオーバーヘッド計数部74との両計数値を取得し(S24)、同期判定部76は、かかる両計数値に基づいて同期判定を行い(S25)、非同期であると判定されれば、総合遅延時間を算出する(S26)。総合遅延時間とは、例えば伝送遅延時間とオーバーヘッド値とを加算した値であるが、これに限定されるものではない。また、スレーブノード51bの同期補正部77は、算出された総合遅延時間を用いて同期補正を行う(S27)。なお、図13に示す処理では、スレーブノード51bは、同期補正が完了したことを示す応答フレームをマスタノード51aに送信してもよい。また、マスタノード51aは、通信路52に接続されたスレーブノード51b以外のスレーブノードに対しても上述した手順でノード同期処理を行う。 When receiving the transmission delay time notification frame, the frame receiving unit 80 of the slave node 51b saves the round-trip transmission delay time (value) included in the frame in the memory 45 or the like (S19). Then, the synchronization frame notification unit 66 of the master node 51a transmits the synchronization frame as an interrupt signal to the slave node 51b in synchronization with the first reference signal (S20). When the slave node 51b receives the synchronization frame (S21), the synchronization correction process by software is activated (S22) and the overhead counting unit 74 is restarted (S23). Then, the count value acquisition unit 75 acquires both count values of the second reference signal generation unit 71 and the overhead count unit 74 (S24), and the synchronization determination unit 76 performs synchronization determination based on the both count values. (S25) If it is determined to be asynchronous, an overall delay time is calculated (S26). The total delay time is, for example, a value obtained by adding a transmission delay time and an overhead value, but is not limited thereto. Further, the synchronization correction unit 77 of the slave node 51b performs synchronization correction using the calculated total delay time (S27). In the process illustrated in FIG. 13, the slave node 51b may transmit a response frame indicating that the synchronization correction has been completed to the master node 51a. The master node 51a also performs node synchronization processing in the above-described procedure for slave nodes other than the slave node 51b connected to the communication path 52.
 ここで、本実施形態では、コンピュータを、上述したノード51が有する各手段として機能させるためのプログラム(ノード同期プログラム)を生成し、生成したプログラムを、コンピュータ等にインストールすることにより、上述した各ノード同期処理を実現することができる。 Here, in the present embodiment, a program (node synchronization program) for causing a computer to function as each unit included in the above-described node 51 is generated, and the generated program is installed in the computer or the like, so that Node synchronization processing can be realized.
 上述したように、本実施形態によれば、処理負荷を抑制しつつ、所定の信号を高精度に同期させることができる。これにより、例えば、各ノード51のデータ交換周期の安定化を実現することができる。また、本実施形態によれば、例えばイーサネットのようなスター型トポロジを持つシステムにおいて、時分割多重伝送方式を用いた共有メモリネットワークに対し、各ノード51のタイマを同期化し、伝送の効率化とデータ交換の効率化、データ交換周期の安定化等を実現することができる。 As described above, according to the present embodiment, it is possible to synchronize a predetermined signal with high accuracy while suppressing the processing load. Thereby, for example, stabilization of the data exchange cycle of each node 51 can be realized. Further, according to the present embodiment, in a system having a star topology such as Ethernet, for example, the timer of each node 51 is synchronized with the shared memory network using the time division multiplex transmission method, thereby improving the transmission efficiency. The efficiency of data exchange, the stabilization of the data exchange cycle, etc. can be realized.
 なお、本実施形態は、例えば鉄鋼プラント等のような大規模設備等における一連の動作を複数の操作を用いて行う場合の同期手法に適用することができ、更にギガビットイーサネット全般における各装置間の同期方式としても広く適用することができる。 In addition, this embodiment can be applied to a synchronization method when performing a series of operations in a large-scale facility such as a steel plant using a plurality of operations. It can be widely applied as a synchronization method.
 以上、添付図面を参照しながら本発明の好適な実施形態について説明したが、本発明はかかる実施形態に限定されないことは言うまでもない。当業者であれば、特許請求の範囲に記載された範疇において、各種の変更例または修正例に想到し得ることは明らかであり、それらについても当然に本発明の技術的範囲に属するものと了解される。 The preferred embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to such embodiments. It will be apparent to those skilled in the art that various changes and modifications can be made within the scope of the claims, and these are naturally within the technical scope of the present invention. Is done.
 なお、本明細書の信号同期方法、及び、ノード同期方法の各工程は、必ずしもシーケンス図として記載された順序に沿って時系列に処理する必要はなく、並列的あるいはサブルーチンによる処理を含んでもよい。 Note that each step of the signal synchronization method and the node synchronization method of the present specification does not necessarily have to be processed in time series in the order described in the sequence diagram, and may include processing in parallel or by a subroutine. .
 本発明は、所定の信号を同期させるための信号同期システム、ノード同期システム、信号同期方法、及び、ノード同期方法に利用することができる。 The present invention can be used for a signal synchronization system, a node synchronization system, a signal synchronization method, and a node synchronization method for synchronizing predetermined signals.
 10 信号同期システム
 11 プロセッサモジュール
 12 伝送バス
 13,53 I/O(入出力)モジュール
 14,54 外部機器
 15,55 プログラミング装置
 21,61 第1基準信号生成部
 22,62 第1演算部
 23,38,63,78 記憶部
 31,71 第2基準信号生成部
 32,72 第2演算部
 34,74 オーバーヘッド計数部
 35,75 計数値取得部
 36,76 同期判定部
 37,77 同期補正部
 41 入力部
 42 出力部
 43 CPU
 44 FPGA
 45 メモリ
 46 外部インタフェース
 50 ノード同期システム
 51 ノード
 52 通信路
 65 伝送遅延時間通知部
 66 同期化フレーム通知部
 79 受信完了通知部
 80 フレーム受信部
 81 伝送遅延時間リクエストフレーム
 82 受信完了フレーム
 83 伝送遅延時間通知フレーム
 84 応答フレーム
 90 ネットワーク伝送システム
 91 HUB(中継装置)
DESCRIPTION OF SYMBOLS 10 Signal synchronization system 11 Processor module 12 Transmission bus 13,53 I / O (input / output) module 14,54 External apparatus 15,55 Programming apparatus 21,61 1st reference signal generation part 22,62 1st calculating part 23,38 , 63, 78 Storage unit 31, 71 Second reference signal generation unit 32, 72 Second calculation unit 34, 74 Overhead counting unit 35, 75 Count value acquisition unit 36, 76 Synchronization determination unit 37, 77 Synchronization correction unit 41 Input unit 42 Output unit 43 CPU
44 FPGA
45 Memory 46 External interface 50 Node synchronization system 51 Node 52 Communication path 65 Transmission delay time notification unit 66 Synchronization frame notification unit 79 Reception completion notification unit 80 Frame reception unit 81 Transmission delay time request frame 82 Reception completion frame 83 Transmission delay time notification Frame 84 Response frame 90 Network transmission system 91 HUB (relay device)

Claims (18)

  1.  第1基準信号に従って動作する主モジュールと、第2基準信号に従って動作する従モジュールとを含み、該第1基準信号に該第2基準信号を同期させる信号同期システムであって、
     前記主モジュールは、
     計数を行い、予め設定された基準値に計数値が達することで前記第1基準信号を生成する第1基準信号生成部を備え、
     前記従モジュールは、
     計数を行い、前記基準値に計数値が達することで前記第2基準信号を生成する第2基準信号生成部と、
     同期補正処理を行う間隔を計数する間隔計数部と、
     前記間隔計数部において前記同期補正処理を行う補正処理間隔値に計数値が達した後、前記第1基準信号を受信してリスタートし、計数を行うオーバーヘッド計数部と、
     前記間隔計数部において前記補正処理間隔値に計数値が達した後、前記第1基準信号の受信に応じて前記第2基準信号生成部の計数値及び前記オーバーヘッド計数部の計数値を取得する計数値取得部と、
     前記第2基準信号生成部の計数値と前記オーバーヘッド計数部の計数値との差分を相殺する値を、前記第2基準信号生成部に一時的に基準値として設定する同期補正部と、
    を備えることを特徴とする信号同期システム。
    A signal synchronization system including a main module operating in accordance with a first reference signal and a slave module operating in accordance with a second reference signal, wherein the second reference signal is synchronized with the first reference signal,
    The main module is
    A first reference signal generation unit that performs counting and generates the first reference signal when the count value reaches a preset reference value;
    The slave module is
    A second reference signal generation unit that performs counting and generates the second reference signal when the count value reaches the reference value;
    An interval counting unit that counts the interval at which the synchronization correction processing is performed;
    After the count value reaches the correction processing interval value for performing the synchronization correction processing in the interval counting unit, an overhead counting unit that receives and restarts the first reference signal and performs counting,
    After the count value reaches the correction processing interval value in the interval count unit, the count value of the second reference signal generation unit and the count value of the overhead counter unit are acquired in response to reception of the first reference signal. A numerical value acquisition unit;
    A synchronization correction unit that temporarily sets a value that cancels the difference between the count value of the second reference signal generation unit and the count value of the overhead count unit as a reference value in the second reference signal generation unit;
    A signal synchronization system comprising:
  2.  前記従モジュールは、該従モジュールにおける演算を実行するプロセッサを含み、
     前記第2基準信号生成部は、前記プロセッサのみがアクセスできるカウンタであることを特徴とする請求項1に記載の信号同期システム。
    The slave module includes a processor that executes an operation in the slave module;
    The signal synchronization system according to claim 1, wherein the second reference signal generation unit is a counter that can be accessed only by the processor.
  3.  前記従モジュールに含まれるプロセッサは、前記計数値取得部、前記同期補正部として機能することを特徴とする請求項2に記載の信号同期システム。 3. The signal synchronization system according to claim 2, wherein a processor included in the slave module functions as the count value acquisition unit and the synchronization correction unit.
  4.  前記従モジュールは、
     前記計数値取得部によって取得された、前記第2基準信号生成部の計数値と前記オーバーヘッド計数部の計数値とが異なるとき前記第1基準信号と前記第2基準信号とが非同期であると判定する同期判定部をさらに備え、
     前記同期補正部は、前記同期判定部に非同期であると判定された場合にのみ、前記差分を相殺する値を、前記第2基準信号生成部に一時的に基準値として設定することを特徴とする請求項1から3のいずれか1項に記載の信号同期システム。
    The slave module is
    It is determined that the first reference signal and the second reference signal are asynchronous when the count value of the second reference signal generation unit acquired by the count value acquisition unit is different from the count value of the overhead counter A synchronization determination unit that
    The synchronization correction unit temporarily sets a value that cancels the difference as a reference value in the second reference signal generation unit only when it is determined to be asynchronous to the synchronization determination unit. The signal synchronization system according to any one of claims 1 to 3.
  5.  前記同期判定部は、前記計数値取得部によって取得された前記第2基準信号生成部の計数値と前記オーバーヘッド計数部の計数値とを時間換算し、双方の時間が異なるとき非同期であると判定することを特徴とする請求項4に記載の信号同期システム。 The synchronization determination unit time-converts the count value of the second reference signal generation unit and the count value of the overhead counter acquired by the count value acquisition unit, and determines that they are asynchronous when both times are different The signal synchronization system according to claim 4, wherein:
  6.  前記第1基準信号生成部は、前記第1基準信号を周期的に生成し、
     前記第2基準信号生成部は、前記第2基準信号を周期的に生成することを特徴とする請求項1から5のいずれか1項に記載の信号同期システム。
    The first reference signal generation unit periodically generates the first reference signal,
    The signal synchronization system according to claim 1, wherein the second reference signal generation unit periodically generates the second reference signal.
  7.  前記基準値は、外部接続される設定装置から設定できることを特徴とする請求項1から6のいずれか1項に記載の信号同期システム。 The signal synchronization system according to any one of claims 1 to 6, wherein the reference value can be set from an externally connected setting device.
  8.  第1基準信号に従って動作するマスタノードと、第2基準信号に従って動作するスレーブノードとを含み、該第1基準信号に該第2基準信号を同期させるノード同期システムであって、
     前記マスタノードは、
     計数を行い、予め設定された基準値に計数値が達することで前記第1基準信号を生成する第1基準信号生成部と、
     同期補正処理を行う間隔を計数する間隔計数部と、
     前記間隔計数部において前記同期補正処理を行う補正処理間隔値に計数値が達した後、前記マスタノードと前記スレーブノードとを接続する通信路における伝送遅延時間を算出して前記スレーブノードに通知する伝送遅延時間通知部と、
     前記通信路を介して前記第1基準信号に同期した同期化フレームを前記スレーブノードに送信する同期化フレーム通知部と、
    を備え、
     前記スレーブノードは、
     計数を行い、前記基準値に計数値が達することで前記第2基準信号を生成する第2基準信号生成部と、
     前記同期化フレームを受信してリスタートし、計数を行うオーバーヘッド計数部と、
     前記同期化フレームの受信に応じて前記第2基準信号生成部の計数値及び前記オーバーヘッド計数部の計数値を取得する計数値取得部と、
     前記第2基準信号生成部の計数値と、前記オーバーヘッド計数部の計数値と前記伝送遅延時間を示す値との和である総合遅延時間値との差分を相殺する値を、前記第2基準信号生成部に一時的に基準値として設定する同期補正部と、
    を備えることを特徴とするノード同期システム。
    A node synchronization system including a master node that operates according to a first reference signal and a slave node that operates according to a second reference signal, wherein the second reference signal is synchronized with the first reference signal,
    The master node is
    A first reference signal generation unit that performs counting and generates the first reference signal when the count value reaches a preset reference value;
    An interval counting unit that counts the interval at which the synchronization correction processing is performed;
    After the count value reaches the correction processing interval value for performing the synchronization correction processing in the interval counting unit, the transmission delay time in the communication path connecting the master node and the slave node is calculated and notified to the slave node. A transmission delay time notification unit;
    A synchronization frame notification unit that transmits a synchronization frame synchronized with the first reference signal to the slave node via the communication path;
    With
    The slave node is
    A second reference signal generation unit that performs counting and generates the second reference signal when the count value reaches the reference value;
    An overhead counting unit that receives and restarts the synchronization frame and performs counting;
    A count value acquisition unit that acquires a count value of the second reference signal generation unit and a count value of the overhead counter in response to reception of the synchronization frame;
    A value that cancels the difference between the count value of the second reference signal generation unit and the total delay time value that is the sum of the count value of the overhead counter and the value indicating the transmission delay time is set to the second reference signal. A synchronization correction unit temporarily set as a reference value in the generation unit;
    A node synchronization system comprising:
  9.  前記伝送遅延時間通知部は、伝送遅延時間リクエストフレームを前記スレーブノードに送信し、前記伝送遅延時間リクエストフレームに対する前記スレーブノードからの受信完了フレームを受信し、該受信時の時刻と前記伝送遅延時間リクエストフレームを送信したときの時刻との差分から、前記伝送遅延時間を算出することを特徴とする請求項8に記載のノード同期システム。 The transmission delay time notification unit transmits a transmission delay time request frame to the slave node, receives a reception completion frame from the slave node with respect to the transmission delay time request frame, and receives the reception time and the transmission delay time. The node synchronization system according to claim 8, wherein the transmission delay time is calculated from a difference from a time when a request frame is transmitted.
  10.  前記通信路は、前記マスタノードと前記スレーブノードとの間に中継装置を有するスター型であることを特徴とする請求項8または9に記載のノード同期システム。 The node synchronization system according to claim 8 or 9, wherein the communication path is a star type having a relay device between the master node and the slave node.
  11.  前記スレーブノードは、該スレーブノードにおける演算を実行するプロセッサを含み、
     前記第2基準信号生成部は、前記プロセッサのみがアクセスできるカウンタであることを特徴とする請求項8から10のいずれか1項に記載のノード同期システム。
    The slave node includes a processor that executes operations in the slave node;
    The node synchronization system according to any one of claims 8 to 10, wherein the second reference signal generation unit is a counter that can be accessed only by the processor.
  12.  前記スレーブノードに含まれるプロセッサは、前記計数値取得部、前記同期補正部として機能することを特徴とする請求項11に記載のノード同期システム。 The node synchronization system according to claim 11, wherein a processor included in the slave node functions as the count value acquisition unit and the synchronization correction unit.
  13.  前記スレーブノードは、
     前記計数値取得部によって取得された、前記第2基準信号生成部の計数値と前記総合遅延時間とが異なるとき前記第1基準信号と前記第2基準信号とが非同期であると判定する同期判定部をさらに備え、
     前記同期補正部は、前記同期判定部に非同期であると判定された場合にのみ、前記差分を相殺する値を、前記第2基準信号生成部に一時的に基準値として設定することを特徴とする請求項8から12のいずれか1項に記載のノード同期システム。
    The slave node is
    Synchronous determination for determining that the first reference signal and the second reference signal are asynchronous when the count value of the second reference signal generation unit acquired by the count value acquisition unit is different from the total delay time Further comprising
    The synchronization correction unit temporarily sets a value that cancels the difference as a reference value in the second reference signal generation unit only when it is determined to be asynchronous to the synchronization determination unit. The node synchronization system according to any one of claims 8 to 12.
  14.  前記同期判定部は、前記計数値取得部によって取得された前記第2基準信号生成部の計数値と前記オーバーヘッド計数部の計数値とを時間換算し、双方の時間が異なるとき非同期であると判定することを特徴とする請求項13に記載のノード同期システム。 The synchronization determination unit time-converts the count value of the second reference signal generation unit and the count value of the overhead counter acquired by the count value acquisition unit, and determines that they are asynchronous when both times are different The node synchronization system according to claim 13.
  15.  前記第1基準信号生成部は、前記第1基準信号を周期的に生成し、
     前記第2基準信号生成部は、前記第2基準信号を周期的に生成することを特徴とする請求項8から14のいずれか1項に記載のノード同期システム。
    The first reference signal generation unit periodically generates the first reference signal,
    The node synchronization system according to claim 8, wherein the second reference signal generation unit periodically generates the second reference signal.
  16.  前記基準値は、外部接続される設定装置から設定できることを特徴とする請求項8から15のいずれか1項に記載のノード同期システム。 16. The node synchronization system according to claim 8, wherein the reference value can be set from an externally connected setting device.
  17.  第1基準信号に従って動作する主モジュールと、第2基準信号に従って動作する従モジュールとによって、該第1基準信号に該第2基準信号を同期させる信号同期方法であって、
     前記主モジュールは、
     計数を行い、予め設定された基準値に計数値が達することで前記第1基準信号を生成し、
     前記従モジュールは、
     計数を行い、前記基準値に計数値が達することで前記第2基準信号を生成し、
     同期補正処理を行う間隔を計数し、
     前記同期補正処理を行う補正処理間隔値に計数値が達した後、前記第1基準信号を受信してリスタートし、計数を行い、
     前記同期補正処理を行う間隔を示す計数値が前記補正処理間隔値に達した後、前記第2基準信号を生成するための計数値及び前記第1基準信号を受信してリスタートした計数値を取得し、
     前記第2基準信号を生成するための計数値と前記第1基準信号を受信してリスタートした計数値との差分を相殺する値を、前記第2基準信号を生成するための計数に一時的に基準値として設定することを特徴とする信号同期方法。
    A signal synchronization method for synchronizing the second reference signal to the first reference signal by a main module operating according to the first reference signal and a slave module operating according to the second reference signal,
    The main module is
    Counting is performed, and the first reference signal is generated when the count value reaches a preset reference value.
    The slave module is
    Counting, and generating the second reference signal when the count value reaches the reference value;
    Count the interval to perform synchronization correction processing,
    After the count value reaches the correction processing interval value for performing the synchronous correction processing, the first reference signal is received and restarted, and counting is performed.
    After a count value indicating an interval for performing the synchronization correction processing reaches the correction processing interval value, a count value for generating the second reference signal and a count value restarted by receiving the first reference signal Acquired,
    A value that cancels the difference between the count value for generating the second reference signal and the count value that has been received and restarted is temporarily used for the count for generating the second reference signal. The signal synchronization method is characterized in that it is set as a reference value.
  18.  第1基準信号に従って動作するマスタノードと、第2基準信号に従って動作するスレーブノードとによって、該第1基準信号に該第2基準信号を同期させるノード同期方法であって、
     前記マスタノードは、
     計数を行い、予め設定された基準値に計数値が達することで前記第1基準信号を生成し、
     同期補正処理を行う間隔を計数し、
     前記同期補正処理を行う間隔の計数値が補正処理間隔値に達した後、前記マスタノードと前記スレーブノードとを接続する通信路における伝送遅延時間を算出して前記スレーブノードに通知し、
     前記通信路を介して前記第1基準信号に同期した同期化フレームをスレーブノードに送信し、
     前記スレーブノードは、
     計数を行い、前記基準値に計数値が達することで前記第2基準信号を生成し、
     前記同期化フレームを受信してリスタートし、計数を行い、
     前記同期化フレームの受信に応じて前記第2基準信号を生成するための計数値及び前記同期化フレームを受信してリスタートした計数値を取得し、
     前記第2基準信号を生成するための計数値と、前記同期化フレームを受信してリスタートした計数値と前記伝送遅延時間を示す値との和である総合遅延時間値との差分を相殺する値を、前記第2基準信号を生成するための計数に一時的に基準値として設定することを特徴とするノード同期方法。
    A node synchronization method for synchronizing the second reference signal to the first reference signal by a master node that operates according to the first reference signal and a slave node that operates according to the second reference signal,
    The master node is
    Counting is performed, and the first reference signal is generated when the count value reaches a preset reference value,
    Count the interval to perform synchronization correction processing,
    After the count value of the interval for performing the synchronization correction processing reaches the correction processing interval value, the transmission delay time in the communication path connecting the master node and the slave node is calculated and notified to the slave node,
    Transmitting a synchronization frame synchronized with the first reference signal to the slave node via the communication path;
    The slave node is
    Counting, and generating the second reference signal when the count value reaches the reference value;
    Receiving the synchronization frame, restarting, counting,
    Obtaining a count value for generating the second reference signal in response to reception of the synchronization frame and a count value restarted by receiving the synchronization frame;
    The difference between the count value for generating the second reference signal and the total delay time value that is the sum of the count value that is received and restarted after receiving the synchronization frame and the value indicating the transmission delay time is canceled out A node synchronization method, wherein a value is temporarily set as a reference value in a count for generating the second reference signal.
PCT/JP2012/082334 2012-12-13 2012-12-13 Signal synchronization system, node synchronization system, signal synchronization method, and node synchroniz ation method WO2014091592A1 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP2014551797A JP5825446B2 (en) 2012-12-13 2012-12-13 Signal synchronization system, node synchronization system, signal synchronization method, and node synchronization method
CN201280077569.7A CN104838615B (en) 2012-12-13 2012-12-13 Signal synchronizing system, node synchronization system, signal synchronizing method and node synchronization method
PCT/JP2012/082334 WO2014091592A1 (en) 2012-12-13 2012-12-13 Signal synchronization system, node synchronization system, signal synchronization method, and node synchroniz ation method
KR1020157015123A KR101636496B1 (en) 2012-12-13 2012-12-13 Signal synchronization system, node synchronization system, signal synchronization method, and node synchronization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2012/082334 WO2014091592A1 (en) 2012-12-13 2012-12-13 Signal synchronization system, node synchronization system, signal synchronization method, and node synchroniz ation method

Publications (1)

Publication Number Publication Date
WO2014091592A1 true WO2014091592A1 (en) 2014-06-19

Family

ID=50933913

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/082334 WO2014091592A1 (en) 2012-12-13 2012-12-13 Signal synchronization system, node synchronization system, signal synchronization method, and node synchroniz ation method

Country Status (4)

Country Link
JP (1) JP5825446B2 (en)
KR (1) KR101636496B1 (en)
CN (1) CN104838615B (en)
WO (1) WO2014091592A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018006959A (en) * 2016-06-30 2018-01-11 キヤノン株式会社 Communication system, communication apparatus, and communication method
WO2021190963A1 (en) 2020-03-26 2021-09-30 Safran Method for communication according to a tdma protocol, between a master device and at least one slave device

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6400553B2 (en) * 2015-09-28 2018-10-03 ファナック株式会社 Numerical control system with synchronous control function between units
CN109644240A (en) * 2017-07-11 2019-04-16 深圳市柔宇科技有限公司 Image pickup method and terminal
KR102200451B1 (en) * 2018-09-21 2021-01-08 주식회사 룩시드랩스 Method for synchronizing time and apparatus using the same
JP7243695B2 (en) * 2020-08-25 2023-03-22 横河電機株式会社 Information processing device, information processing system, and information processing method
CN114285512B (en) * 2021-11-17 2024-01-23 中国电子科技集团公司第五十四研究所 Communication timing method, communication system and communication equipment
KR20230079632A (en) * 2021-11-29 2023-06-07 성창 주식회사 System for synchronizing time between server and IoT device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005159754A (en) * 2003-11-26 2005-06-16 Fuji Electric Fa Components & Systems Co Ltd Transmission timing determining method, bus usage right arbitrating method, network system and program
JP2005253033A (en) * 2004-02-06 2005-09-15 Nippon Telegr & Teleph Corp <Ntt> Network synchronization device, clock transmission method, and clock transmission packet network

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6691071B2 (en) * 2002-05-13 2004-02-10 Motorola, Inc. Synchronizing clock enablement in an electronic device
US7844703B2 (en) * 2006-11-02 2010-11-30 International Business Machines Corporation System and method of measurement for a distributed computer system
CN101039145B (en) * 2007-03-30 2010-08-04 华为技术有限公司 Method and apparatus for realizing clock
CN100589371C (en) * 2007-07-16 2010-02-10 中兴通讯股份有限公司 System and method for eliminating long line transmission time delay of source synchronizing signal
JP5127482B2 (en) * 2008-01-30 2013-01-23 株式会社東芝 Timing synchronization method, synchronization apparatus, synchronization system, and synchronization program
KR101011314B1 (en) * 2008-03-31 2011-01-28 후지쯔 가부시끼가이샤 Apparatus with clock generation function, method for setting reference frequency, and method for adjusting reference frequency
CN101431796A (en) * 2008-12-10 2009-05-13 扬州万方电子技术有限责任公司 Method for clock master-slave synchronization of centered broad band radio communication system
US8120935B2 (en) * 2011-03-29 2012-02-21 American Superconductor Corporation Power converter with dual ring network control

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005159754A (en) * 2003-11-26 2005-06-16 Fuji Electric Fa Components & Systems Co Ltd Transmission timing determining method, bus usage right arbitrating method, network system and program
JP2005253033A (en) * 2004-02-06 2005-09-15 Nippon Telegr & Teleph Corp <Ntt> Network synchronization device, clock transmission method, and clock transmission packet network

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2018006959A (en) * 2016-06-30 2018-01-11 キヤノン株式会社 Communication system, communication apparatus, and communication method
WO2021190963A1 (en) 2020-03-26 2021-09-30 Safran Method for communication according to a tdma protocol, between a master device and at least one slave device
FR3108817A1 (en) * 2020-03-26 2021-10-01 Safran Method of communication according to a TDMA protocol between a master device and at least one slave device

Also Published As

Publication number Publication date
KR20150084917A (en) 2015-07-22
JP5825446B2 (en) 2015-12-02
CN104838615A (en) 2015-08-12
KR101636496B1 (en) 2016-07-05
JPWO2014091592A1 (en) 2017-01-05
CN104838615B (en) 2017-08-18

Similar Documents

Publication Publication Date Title
JP5825446B2 (en) Signal synchronization system, node synchronization system, signal synchronization method, and node synchronization method
JP6523497B1 (en) Master controller and synchronous communication system using the same
WO2016004644A1 (en) Method and apparatus for monitoring ethernet clock synchronization
WO2015128981A1 (en) Programmable controller system and controller therefor
CN107402534B (en) Adjusting method, EtherCAT main station and computer readable storage medium
JP2011193457A (en) System and method for performing time synchronization
JP2013083450A (en) Time control device, time control method, and program
US20220147022A1 (en) Control system
CN110572230A (en) correction method and device for realizing time synchronization
CN106230541B (en) A kind of Site synch system and method for Industrial Ethernet
JP2019101480A (en) Control device and control method
JP6029433B2 (en) Microcomputer
JP6010802B2 (en) Time synchronization system, time synchronization method, slave node, and computer program
JP2011023788A (en) Network synchronization method and synchronization circuit
WO2020021597A1 (en) Communication device, communication system, and synchronization control method
US8060769B2 (en) Duplexed field controller
JP5850143B2 (en) Signal synchronization system, multiprocessor, and node synchronization system
JP4961589B2 (en) Network system and slave synchronization method
JP2010061458A (en) Machine controller system and method for synchronizing machine controllers
JP5662119B2 (en) Node system and monitoring node
JP6085864B2 (en) Time synchronization system, time synchronization method, slave node, and computer program
CN107229543B (en) Semiconductor device with a plurality of semiconductor chips
JP5223809B2 (en) Synchronous communication system
JP2014157386A (en) Data processing system
CN117424668A (en) Time synchronization between master and slave devices in a network

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: 12889834

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2014551797

Country of ref document: JP

Kind code of ref document: A

ENP Entry into the national phase

Ref document number: 20157015123

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12889834

Country of ref document: EP

Kind code of ref document: A1