WO2020217286A1 - 時刻同期システム、マスタ装置、スレーブ装置およびプログラム - Google Patents

時刻同期システム、マスタ装置、スレーブ装置およびプログラム Download PDF

Info

Publication number
WO2020217286A1
WO2020217286A1 PCT/JP2019/017084 JP2019017084W WO2020217286A1 WO 2020217286 A1 WO2020217286 A1 WO 2020217286A1 JP 2019017084 W JP2019017084 W JP 2019017084W WO 2020217286 A1 WO2020217286 A1 WO 2020217286A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
transmission
unit
cycle
signal
Prior art date
Application number
PCT/JP2019/017084
Other languages
English (en)
French (fr)
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 PCT/JP2019/017084 priority Critical patent/WO2020217286A1/ja
Priority to JP2019552645A priority patent/JP6707209B1/ja
Priority to US17/429,352 priority patent/US11277253B2/en
Priority to CN201980095470.1A priority patent/CN113711158A/zh
Priority to DE112019007074.6T priority patent/DE112019007074T5/de
Publication of WO2020217286A1 publication Critical patent/WO2020217286A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0008Synchronisation information channels, e.g. clock distribution lines
    • H04L7/0012Synchronisation information channels, e.g. clock distribution lines by comparing receiver clock with transmitter clock
    • 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/12Synchronisation of different clock signals provided by a plurality of clock generators
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0421Multiprocessor system
    • 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/14Time supervision arrangements, e.g. real time clock
    • 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/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0652Synchronisation among time division multiple access [TDMA] nodes, e.g. time triggered protocol [TTP]
    • H04J3/0655Synchronisation among time division multiple access [TDMA] nodes, e.g. time triggered protocol [TTP] using timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0008Synchronisation information channels, e.g. clock distribution lines
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/22Pc multi processor system
    • G05B2219/2231Master slave

Definitions

  • the present invention relates to a time synchronization system, a master device, a slave device, and a program.
  • a master device that manages a reference time is determined from a plurality of devices, and the time of the slave device is based on the time information transmitted by the master device to a slave device other than the master device. Is generally set to the time of the master device.
  • Patent Document 1 a dedicated signal line is newly established between the station with the master clock and the station with the slave clock, and the station with the master clock transmits a time cycle pulse signal on the dedicated signal line at a predetermined cycle to form a network.
  • a technique is disclosed above in which the time information at the time of transmission of the time cycle pulse signal is transmitted, and the station with the child clock adjusts the time using the time cycle pulse signal and the time information.
  • each time the station with a master clock transmits a time cycle pulse signal via a dedicated signal line, the time at the time of sending the time cycle pulse signal via the data communication line of the network. Since the information is transmitted, the arrival of the time information at the station with the slave clock is delayed from the arrival of the time cycle pulse signal due to the influence of the propagation delay time and the jitter of the data communication line.
  • the propagation delay time for the time information transmitted to the data communication line and the maximum delay time due to the influence of jitter become longer than the cycle for transmitting the time cycle pulse signal, the time corresponding to the previous time cycle pulse signal Since the next time cycle pulse signal may arrive before the information arrives, the cycle for transmitting the time cycle pulse signal cannot be shorter than the maximum delay time of the data communication line. That is, there is a problem that the accuracy of time synchronization is limited by the propagation delay time and jitter of the data communication line.
  • the present invention has been made in view of the above circumstances, and an object of the present invention is to realize more accurate time synchronization in time synchronization for adjusting the time of the slave device to the time of the master device.
  • the time synchronization system of the present invention includes a master device and a slave device.
  • the master device and the slave device are connected by a data communication line and a dedicated signal line for transmitting a fixed-period signal.
  • the master device includes a master timekeeping unit, a constant cycle signal transmission unit, a start time transmission unit, a transmission cycle storage unit, and a transmission cycle transmission unit.
  • the master timekeeper measures the time.
  • the constant-period signal transmission unit generates a constant-period signal at a constant transmission cycle, and transmits the constant-period signal to the slave device via a signal line.
  • the start time transmission unit transmits the start time information indicating the transmission start time of the fixed cycle signal to the slave device via the data communication line.
  • the transmission cycle storage unit stores transmission cycle information indicating the transmission cycle of the constant cycle signal.
  • the transmission cycle transmission unit transmits the transmission cycle information stored in the transmission cycle storage unit to the slave device via the data communication line.
  • the slave device includes a slave timekeeping unit, a constant cycle signal receiving unit, a start time receiving unit, a start time storage unit, a transmission cycle receiving unit, a transmission cycle storage unit, a counting unit, a time calculation unit, and a time. It is provided with a correction unit.
  • the slave timekeeper measures the time.
  • the fixed-period signal receiving unit receives a fixed-period signal from the master device via a signal line.
  • the start time receiving unit receives the start time information from the master device via the data communication line.
  • the start time storage unit stores the start time information received by the start time reception unit.
  • the transmission cycle receiving unit receives transmission cycle information from the master device via the data communication line.
  • the transmission cycle storage unit stores the transmission cycle information received by the transmission cycle reception unit.
  • the counting unit counts the number of times that the fixed-period signal receiving unit receives the fixed-period signal. Based on the transmission start time indicated by the start time information, the transmission cycle indicated by the transmission cycle information, and the number of times the constant cycle signal is received, the time calculation unit determines the transmission time of the fixed cycle signal in the master device as the current state of the master device. Calculated as time.
  • the time correction unit corrects the time of the slave timekeeping unit to the current time of the master device calculated by the time calculation unit.
  • a fixed cycle signal is transmitted from the master device to the slave device via a dedicated signal line, and the number of times the fixed cycle signal is received and transmission.
  • Block diagram showing the configuration of the time synchronization system according to the first embodiment of the present invention The block diagram which shows the functional structure of the master apparatus which concerns on Embodiment 1.
  • FIG. 3 A flowchart showing the time reception process according to the third embodiment.
  • the time synchronization system 100 As shown in FIG. 1, the time synchronization system 100 according to the first embodiment includes a master device 1 and slave devices 2A to 2C connected by a signal line 3 and a data bus 4. The time synchronization system 100 synchronizes the time of the slave devices 2A to 2C with the time of the master device 1.
  • the slave devices 2A to 2C are generically referred to, they are referred to as slave devices 2.
  • the master device 1 transmits a constant-period signal at a constant transmission cycle via the signal line 3.
  • the signal line 3 is a dedicated communication line for transmitting a constant cycle signal.
  • the master device 1 transmits the start time information indicating the transmission start time of the constant cycle signal and the transmission cycle information indicating the transmission cycle of the constant cycle signal via the data bus 4.
  • the data bus 4 is a data communication line for transmitting and receiving data between the master device 1 and the slave device 2, and may be used for transmitting and receiving information other than start time information and transmission cycle information.
  • the data bus 4 is an example of a data communication line.
  • the slave device 2 counts the number of times the constant cycle signal is received, and is based on the number of times the fixed cycle signal is received, the transmission start time indicated by the start time information, and the transmission cycle indicated by the transmission cycle information. Calculate the time. The slave device 2 corrects its own time to the calculated current time of the master device 1.
  • the network connecting the master device 1 and the slave devices 2A to 2C is not limited to the bus type, and may be, for example, a star type.
  • the master device 1 has, as a functional configuration, a master time measuring unit 11 for measuring time, a fixed period signal transmitting unit 12 for transmitting a fixed period signal, and a start indicating a transmission start time of the fixed period signal. It includes a start time transmission unit 13 for transmitting time information, a transmission cycle storage unit 14 for storing transmission cycle information indicating a transmission cycle of a constant cycle signal, and a transmission cycle transmission unit 15 for transmitting transmission cycle information.
  • the time of the master device 1, that is, the time of the master time unit 11 is referred to as a master time.
  • the constant cycle signal transmission unit 12 generates a constant cycle signal at the transmission cycle indicated by the transmission cycle information stored in the transmission cycle storage unit 14 based on the master time, and determines the constant cycle signal to the slave devices 2A to 2C via the signal line 3.
  • the constant period signal is, for example, a 1-bit pulse signal. Since the propagation delay time and jitter for transmitting a constant-period signal via the dedicated signal line 3 are sufficiently smaller than those for transmitting via the data bus 4, the transmission time of the constant-period signal in the master device 1 and the slave device The reception time of the fixed period signal in 2 can be regarded as the same time.
  • the start time transmission unit 13 performs a time stamp process for acquiring the master time when the fixed-period signal transmission unit 12 starts transmitting the fixed-period signal.
  • the start time transmission unit 13 generates master time when transmission of a fixed-period signal is started, that is, start time information indicating a transmission start time.
  • the start time transmission unit 13 transmits the start time information to the slave devices 2A to 2C via the data bus 4.
  • the transmission cycle transmission unit 15 transmits the transmission cycle information stored in the transmission cycle storage unit 14 to the slave devices 2A to 2C via the data bus 4.
  • the timing at which the transmission cycle transmission unit 15 transmits the transmission cycle information may be before the start time transmission unit 13 transmits the start time information.
  • FIG. 3 shows the functional configuration of the slave device 2A as a representative
  • the slave devices 2B and 2C also have the same functional configuration.
  • the slave device 2A has, as a functional configuration, a slave time measuring unit 21 that measures the time, a fixed period signal receiving unit 22 that receives a fixed period signal, and a count that counts the number of times the fixed period signal is received.
  • Unit 23 start time receiving unit 24 for receiving start time information
  • start time storage unit 25 for storing start time information
  • transmission cycle receiving unit 26 for receiving transmission cycle information
  • transmission for storing transmission cycle information It includes a periodic storage unit 27, a time calculation unit 28 that calculates the current master time, and a time correction unit 29 that corrects the time of the slave metering unit 21.
  • the fixed-period signal receiving unit 22 receives a fixed-period signal from the master device 1 via the signal line 3.
  • the counting unit 23 counts the number of times the fixed-period signal receiving unit 22 has received the fixed-period signal, and notifies the time calculation unit 28 of the number of receptions.
  • the start time receiving unit 24 receives the start time information from the master device 1 via the data bus 4.
  • the start time storage unit 25 stores the start time information received by the start time reception unit 24.
  • the transmission cycle receiving unit 26 receives transmission cycle information from the master device 1 via the data bus 4.
  • the transmission cycle storage unit 27 stores the transmission cycle information received by the transmission cycle reception unit 26.
  • the time calculation unit 28 includes the number of times the fixed period signal is received notified to the counting unit 23 and the start time information stored in the start time storage unit 25. Based on the transmission cycle information stored in the transmission cycle storage unit 27, the transmission time of the constant cycle signal in the master device 1 is calculated as the current master time. Specifically, the time calculation unit 28 adds the time obtained by multiplying the transmission start time indicated by the start time information by the transmission cycle indicated by the transmission cycle information multiplied by the value obtained by subtracting 1 from the number of receptions of the fixed cycle signal. That is, the transmission time of the constant period signal in the master device 1 is calculated.
  • the time calculation unit 28 can determine the constant-period signal in the master device 1. Calculate the transmission time as the current master time.
  • the time correction unit 29 corrects the time of the slave timekeeping unit 21 to the current master time calculated by the time calculation unit 28.
  • the time of the slave device 2 that is, the time of the slave clock unit 21 is referred to as the slave time.
  • the fixed-period signal receiving unit 22 of the slave device 2 receives the fixed-period signal at regular time intervals.
  • the time interval for receiving the constant cycle signal is the transmission cycle P in the master time.
  • the counting unit 23 counts the number of times a fixed cycle signal is received and notifies the time calculation unit 28.
  • the start time receiving unit 24 receives the transmission start time, that is, the start time information indicating the master time M1, and stores it in the start time storage unit 25. In the example of FIG. 4, it is assumed that the start time receiving unit 24 receives the start time information between the reception timing of the first fixed cycle signal and the reception timing of the second fixed cycle signal.
  • the transmission cycle receiving unit 26 receives the transmission cycle information indicating the transmission cycle P before the start time receiving unit 24 receives the start time information, and stores the transmission cycle information in the transmission cycle storage unit 27.
  • the transmission cycle P indicated by the transmission cycle information is set to the master time M1 indicated by the start time information.
  • the time obtained by adding the time obtained by subtracting 1 from the number of times of receiving a fixed-period signal and multiplying by 1 is calculated as the master time M2.
  • the transmission cycle P indicated by the transmission cycle information is set to the master time M1 indicated by the start time information.
  • the time obtained by adding the time obtained by subtracting 1 from the number of times of receiving a constant period signal 3 and multiplying by 2 is calculated as the master time M3.
  • the time calculation unit 28 uses the master time M1 and the transmission cycle P to formulate the current master time according to the following equation (1). Calculate Mn. n ⁇ 2.
  • Mn M1 + P ⁇ (n-1) (1)
  • the time correction unit 29 corrects the slave time to the current master time Mn every time the time calculation unit 28 calculates the current master time Mn. In this way, the slave time is corrected to the current master time each time the slave device 2 receives a fixed-period signal.
  • the start time information is received between the reception timing of the first fixed cycle signal and the reception timing of the second fixed cycle signal, and the time calculation unit 28 is after the master time M2.
  • the master time Mn is calculated, but the present invention is not limited to this.
  • the time calculation unit 28 calculates the master time Mn from the time when the fixed-period signal receiving unit 22 receives the fixed-period signal after the start time receiving unit 24 receives the start time information and stores it in the start time storage unit 25. Just do it.
  • the time transmission process shown in FIG. 5 starts when the power of the master device 1 is turned on.
  • the transmission cycle transmission unit 15 of the master device 1 transmits the transmission cycle information stored in the transmission cycle storage unit 14 to the slave device 2 via the data bus 4 (step S11).
  • the transmission cycle transmission unit 15 transmits the transmission cycle information indicating the transmission cycle P to the slave device 2.
  • the fixed-period signal transmitting unit 12 generates a fixed-period signal and transmits the fixed-period signal to the slave device 2 via the signal line 3 (step S12).
  • the start time transmitting unit 13 transmits the constant-period signal transmitting unit 12 starting to transmit the fixed-period signal based on the master time.
  • the start time information indicating the start time is generated, and the start time information is transmitted to the slave device 2 via the data bus 4 (step S14).
  • the start time transmission unit 13 transmits the start time information indicating the master time M1 to the slave device 2.
  • step S15 when the transmitted fixed-period signal is not the first fixed-period signal (step S13; NO), the process proceeds to step S15.
  • the constant cycle signal transmission unit 12 determines whether or not the transmission cycle indicated by the transmission cycle information stored in the transmission cycle storage unit 14 has elapsed after transmitting the constant cycle signal in step S12. (Step S15). If the transmission cycle has not elapsed (step S15; NO), the constant cycle signal transmission unit 12 repeats step S15 and waits for the elapse of the transmission cycle.
  • step S15 When the transmission cycle has elapsed (step S15; YES), if the power of the master device 1 is not turned off (step S16; NO), the process returns to step S12, and steps S12 to S16 are repeated.
  • the constant cycle signal is transmitted from the master device 1 to the slave device 2 at the transmission cycle indicated by the transmission cycle information stored in the transmission cycle storage unit 14.
  • a constant cycle signal is transmitted from the master device 1 to the slave device 2 in the transmission cycle P.
  • step S16 when the power of the master device 1 is turned off (step S16; YES), the process ends.
  • the time reception process shown in FIG. 6 starts when the power of the slave device 2 is turned on.
  • the transmission cycle receiving unit 26 of the slave device 2 receives transmission cycle information from the master device 1 via the data bus 4 (step S21).
  • the transmission cycle storage unit 27 stores the transmission cycle information received by the transmission cycle reception unit 26.
  • the transmission cycle receiving unit 26 receives the transmission cycle information indicating the transmission cycle P from the master device 1.
  • the transmission cycle storage unit 27 stores transmission cycle information indicating the transmission cycle P.
  • the fixed-period signal receiving unit 22 receives the fixed-period signal from the master device 1 via the signal line 3 (step S22).
  • the counting unit 23 counts the number of times the fixed-period signal receiving unit 22 has received the fixed-period signal (step S23), and notifies the time calculation unit 28 of the number of receptions.
  • the start time receiving unit 24 determines whether or not the start time information has been received from the master device 1 via the data bus 4 (step S24). If the start time information has not been received (step S24; NO), the process returns to step S22, repeats steps S22 to S24, and waits for the start time information to be received.
  • the start time storage unit 25 stores the start time information received by the start time reception unit 24.
  • the start time storage unit 25 stores start time information indicating the master time M1 received by the start time reception unit 24.
  • the time calculation unit 28 receives the number of times the constant cycle signal notified to the count unit 23 is received, the start time information stored in the start time storage unit 25, and the transmission cycle information stored in the transmission cycle storage unit 27. Based on the above, the current master time is calculated (step S25). In the example of FIG. 4, the time calculation unit 28 calculates the current master time Mn by the above equation (1).
  • the time correction unit 29 corrects the slave time to the current master time calculated in step S25 (step S26). If the power of the slave device 2 is not turned off (step S27; NO), the process returns to step S22, and steps S22 to S27 are repeated. As a result, each time the slave device 2 receives a fixed-period signal, the slave time is corrected to the current master time. When the power of the slave device 2 is turned off (step S27; YES), the process ends.
  • a dedicated signal line 3 is provided from the master device 1 to the slave device 2.
  • a constant cycle signal is transmitted via the system, and the time of the slave device 2 is corrected to the time of the master device 1 based on the number of times the fixed cycle signal is received, the transmission cycle, and the transmission start time.
  • the cycle for transmitting the constant cycle signal is set regardless of the propagation delay time and jitter of the data bus 4. It can be shortened, and more accurate time synchronization can be realized.
  • the start time information and the transmission cycle information are transmitted only once via the data bus 4, the time information at the time of transmission is transmitted via the data bus 4 every time a constant cycle signal is transmitted.
  • the bandwidth consumption of the data bus 4 due to time synchronization can be reduced as compared with the above.
  • the transmission start time of the fixed-period signal is predetermined.
  • the configuration of the time synchronization system 100 of the second embodiment and the functional configuration of the slave device 2 are the same as those of the first embodiment.
  • the master device 1 has, as a functional configuration, a master timekeeping unit 11, a constant cycle signal transmission unit 12, a start time transmission unit 13, a transmission cycle storage unit 14, and a transmission cycle transmission unit 15.
  • a start time storage unit 16 is provided.
  • the start time storage unit 16 stores start time information indicating a predetermined transmission start time.
  • the fixed-period signal transmitting unit 12 starts transmitting a fixed-period signal when the master time reaches the transmission start time indicated by the start time information stored in the start time storage unit 16.
  • the start time transmission unit 13 transmits the start time information stored in the start time storage unit 16 to the slave devices 2A to 2C via the data bus 4.
  • the timing at which the start time transmission unit 13 transmits the start time information may be before the fixed-period signal transmission unit 12 starts transmitting the fixed-period signal.
  • Other functions of the master device 1 are the same as those of the first embodiment.
  • the time transmission process shown in FIG. 8 starts when the power of the master device 1 is turned on.
  • the transmission cycle transmission unit 15 of the master device 1 transmits the transmission cycle information stored in the transmission cycle storage unit 14 to the slave device 2 via the data bus 4 (step S31).
  • the start time transmission unit 13 transmits the start time information stored in the start time storage unit 16 to the slave device 2 via the data bus 4 (step S32).
  • the fixed-cycle signal transmission unit 12 determines whether or not the master time has reached the transmission start time indicated by the start time information stored in the start time storage unit 16 (step S33). If the master time is not the transmission start time (step S33; NO), the fixed-cycle signal transmission unit 12 repeats step S33 and waits until the transmission start time is reached. When the master time reaches the transmission start time (step S33; YES), the fixed-period signal transmitting unit 12 generates a fixed-period signal and transmits the fixed-period signal to the slave device 2 via the signal line 3 (step S34). ..
  • the constant cycle signal transmission unit 12 determines whether or not the transmission cycle indicated by the transmission cycle information stored in the transmission cycle storage unit 14 has elapsed after transmitting the constant cycle signal based on the master time (step S35). ). If the transmission cycle has not elapsed (step S35; NO), the constant cycle signal transmission unit 12 repeats step S35 and waits for the elapse of the transmission cycle. When the transmission cycle has elapsed (step S35; YES), if the power of the master device 1 is not turned off (step S36; NO), the process returns to step S34, and steps S34 to S36 are repeated. When the power of the master device 1 is turned off (step S36; YES), the process ends.
  • the time reception process shown in FIG. 9 starts when the power of the slave device 2 is turned on.
  • the transmission cycle receiving unit 26 of the slave device 2 receives transmission cycle information from the master device 1 via the data bus 4 (step S41).
  • the transmission cycle storage unit 27 stores the transmission cycle information received by the transmission cycle reception unit 26.
  • the start time receiving unit 24 receives the start time information from the master device 1 via the data bus 4 (step S42).
  • the start time storage unit 25 stores the start time information received by the start time reception unit 24.
  • the fixed-period signal receiving unit 22 receives a fixed-period signal from the master device 1 via the signal line 3 (step S43).
  • the counting unit 23 counts the number of times the fixed-period signal receiving unit 22 has received the fixed-period signal (step S44), and notifies the time calculation unit 28 of the number of receptions.
  • the time calculation unit 28 is based on the number of times a fixed cycle signal is received notified to the count unit 23, the start time information stored in the start time storage unit 25, and the transmission cycle information stored in the transmission cycle storage unit 27.
  • the current master time is calculated (step S45).
  • the time correction unit 29 corrects the slave time to the current master time calculated in step S45 (step S46). If the power of the slave device 2 is not turned off (step S47; NO), the process returns to step S43, and steps S43 to S47 are repeated. As a result, the slave time is corrected to the master time each time the slave device 2 receives a fixed-period signal. In the second embodiment, since the slave device 2 receives the start time information before receiving the fixed cycle signal, the slave time is corrected to the current master time from the time of receiving the first fixed cycle signal. Can be done. When the power of the slave device 2 is turned off (step S47; YES), the process ends.
  • a dedicated signal line 3 is provided from the master device 1 to the slave device 2.
  • a constant cycle signal is transmitted via the system, and the time of the slave device 2 is corrected to the time of the master device 1 based on the number of times the fixed cycle signal is received, the transmission cycle, and the transmission start time.
  • the cycle for transmitting the constant cycle signal is set regardless of the propagation delay time and jitter of the data bus 4. It can be shortened, and more accurate time synchronization can be realized.
  • the start time storage unit 16 stores the start time information in advance and the start time transmission unit 13 does not need to perform the time stamp processing as in the first embodiment, the accuracy of the time synchronization is the time stamp processing. Not affected by accuracy.
  • the slave device 2 corrects the time at the time correction timing during the transmission cycle.
  • the configuration of the time synchronization system 100 of the third embodiment and the functional configuration of the master device 1 are the same as those of the second embodiment.
  • FIG. 10 shows the functional configuration of the slave device 2A as a representative
  • the slave devices 2B and 2C also have the same functional configuration.
  • the slave device 2A has, as functional configurations, a slave timekeeping unit 21, a constant cycle signal receiving unit 22, a counting unit 23, a start time receiving unit 24, a start time storage unit 25, and a transmission cycle receiving unit 26.
  • a slave timekeeping unit 21 a slave timekeeping unit 21, a constant cycle signal receiving unit 22, a counting unit 23, a start time receiving unit 24, a start time storage unit 25, and a transmission cycle receiving unit 26.
  • the time calculation unit 28, and the time correction unit 29 an uncorrected timekeeping unit 30 is provided.
  • the uncorrected timekeeping unit 30 clocks the same time as the slave timekeeping unit 21 when the time correction unit 29 does not correct.
  • the time of the slave device 2 when not corrected that is, the time of the uncorrected timekeeping unit 30, is referred to as an uncorrected slave time.
  • the time calculation unit 28 includes the number of times the fixed period signal is received notified to the counting unit 23 and the start time information stored in the start time storage unit 25.
  • the transmission time of the constant cycle signal in the master device 1 is calculated based on the transmission cycle information stored in the transmission cycle storage unit 27. Specifically, the time calculation unit 28 adds the time obtained by multiplying the transmission start time indicated by the start time information by the transmission cycle indicated by the transmission cycle information multiplied by the value obtained by subtracting 1 from the number of receptions of the fixed cycle signal. , Calculated as the transmission time of the constant period signal in the master device 1.
  • the time calculation unit 28 is the time correction timing during the transmission cycle, that is, the transmission time of the fixed cycle signal in the master device 1 and the time of the uncorrected time counting section 30 when the fixed cycle signal receiving unit 22 receives the fixed cycle signal. And the current time of the uncorrected timekeeping unit 30, the current master time is calculated. Specifically, the time calculation unit 28 sets the transmission time of the fixed-period signal in the master device 1 calculated at the timing of receiving the immediately preceding fixed-period signal to the master time from the timing of receiving the immediately preceding fixed-period signal to the present. The time obtained by adding the elapsed time of is calculated as the current master time.
  • the time calculation unit 28 does not correct the elapsed time of the master time from the timing of receiving the immediately preceding fixed cycle signal to the present, and the elapsed time of the uncorrected slave time from the timing of receiving the immediately preceding fixed cycle signal to the present. Calculated by multiplying the ratio of the advance of the master time to the advance of the slave time.
  • the time correction unit 29 corrects the time of the slave timekeeping unit 21 to the current master time calculated by the time calculation unit 28.
  • the fixed-period signal receiving unit 22 of the slave device 2 receives the fixed-period signal at regular time intervals.
  • the time interval for receiving the constant cycle signal is the transmission cycle P in the master time.
  • the counting unit 23 counts the number of times a fixed cycle signal is received and notifies the time calculation unit 28.
  • the start time receiving unit 24 receives the transmission start time, that is, the start time information indicating the master time M1 before the master time M1, and stores the start time information in the start time storage unit 25.
  • the transmission cycle receiving unit 26 receives the transmission cycle information indicating the transmission cycle P before the master time M1 and stores it in the transmission cycle storage unit 27.
  • the time calculation unit 28 calculates the master time Mn by the above equation (1) every time the counting unit 23 notifies the number of times of receiving the constant cycle signal.
  • the time calculation unit 28 adds the elapsed time ⁇ Mn'of the master time from the timing of receiving the immediately preceding fixed cycle signal to the present to the master time Mn to obtain the current time.
  • the master time Mn' is calculated.
  • the time calculation unit 28 determines the ratio of the elapsed time ⁇ Fn'of the uncorrected slave time from the timing of receiving the immediately preceding fixed period signal to the present and the advance of the master time to the advance of the uncorrected slave time (Mn—M (n-1).
  • the transmission cycle P indicated by the transmission cycle information may be used instead of Mn—M (n-1).
  • the time correction unit 29 corrects the slave time to the current master time Mn'every time the time calculation unit 28 calculates the current master time Mn'. In this way, the slave time is corrected to the current master time at the time correction timing during the transmission cycle.
  • the time correction timing during the transmission cycle may be set by the user or may be determined by the processing capacity of the slave device 2.
  • the time reception process shown in FIG. 12 starts when the power of the slave device 2 is turned on. Since steps S51 to S54 are the same as steps S41 to S44 of the flowchart shown in FIG. 9, description thereof will be omitted.
  • the time calculation unit 28 of the slave device 2 includes the number of times the constant cycle signal notified to the count unit 23 is received, the start time information stored in the start time storage unit 25, and the transmission cycle information stored in the transmission cycle storage unit 27. Based on the above, the transmission time of the fixed-period signal in the master device 1 is calculated (step S55). In the example of FIG. 11, the time calculation unit 28 calculates the transmission time Mn of the constant cycle signal in the master device 1 by the above equation (1).
  • the time calculation unit 28 determines whether or not the time correction timing has arrived (step S56). When the time correction timing has not arrived (step S56; NO), the time calculation unit 28 repeats step S56 and waits for the arrival of the time correction timing. When the time correction timing has arrived (step S56; YES), the time calculation unit 28 determines the transmission time of the fixed-period signal in the master device 1 and the time without correction when the fixed-period signal receiving unit 22 receives the fixed-period signal. The current master time is calculated based on the time of unit 30 and the current time of timekeeping unit 30 without correction (step S57). In the example of FIG.
  • the time calculation unit 28 calculates the current master time Mn'by adding the elapsed time ⁇ Mn'of the master time from the timing of receiving the immediately preceding fixed period signal to the present to the master time Mn. To do.
  • the time calculation unit 28 calculates the elapsed time ⁇ Mn ′ of the master time from the timing at which the immediately preceding constant period signal is received to the present by the above equation (2).
  • the time correction unit 29 corrects the slave time to the master time calculated in step S57 (step S58). If the power of the slave device 2 is not turned off (step S59; NO), the process returns to step S53, and steps S53 to S59 are repeated. As a result, the slave time is corrected to the master time at the time correction timing during the transmission cycle. When the power of the slave device 2 is turned off (step S59; YES), the process ends.
  • a dedicated signal line 3 is provided from the master device 1 to the slave device 2.
  • a constant cycle signal is transmitted via the system, and the time of the slave device 2 is corrected to the time of the master device 1 based on the number of times the fixed cycle signal is received, the transmission cycle, and the transmission start time.
  • the cycle for transmitting the constant cycle signal is set regardless of the propagation delay time and jitter of the data bus 4. It can be shortened, and more accurate time synchronization can be realized.
  • the slave time can be corrected to the master time at the time correction timing during the transmission cycle, it is not necessary to immediately correct the slave time to the master time at the timing when the constant cycle signal is received. As a result, it is possible to prevent a decrease in accuracy even when the process of correcting the slave time to the master time is realized by software.
  • FIG. 13 shows the functional configuration of the slave device 2A as a representative
  • the slave devices 2B and 2C also have the same functional configuration.
  • the slave device 2A has a slave timing unit 21, a constant cycle signal receiving unit 22, a counting unit 23, a start time receiving unit 24, a start time storage unit 25, and a transmission cycle receiving unit 26.
  • the time calculation unit 28, and the time correction unit 29 a time advance correction unit 31 that corrects the advance of the slave time to match the advance of the master time is provided.
  • the time calculation unit 28 includes the number of times the fixed period signal is received notified to the counting unit 23 and the start time information stored in the start time storage unit 25.
  • the current master time is calculated based on the transmission cycle information stored in the transmission cycle storage unit 27. Specifically, the time calculation unit 28 adds the time obtained by multiplying the transmission start time indicated by the start time information by the transmission cycle indicated by the transmission cycle information multiplied by the value obtained by subtracting 1 from the number of receptions of the fixed cycle signal. That is, the transmission time of the constant cycle signal in the master device 1 is calculated as the current master time.
  • the time advance correction unit 31 determines the transmission time of the fixed-period signal in the master device 1 and the time when the fixed-period signal receiving unit 22 receives the fixed-period signal.
  • the advance of the master time and the advance of the slave time are calculated based on the time of the slave time unit 21.
  • the time advance correction unit 31 corrects the slave timekeeping unit 21 so that the advance of the slave time matches the advance of the master time.
  • the fixed-period signal receiving unit 22 of the slave device 2 receives the fixed-period signal at regular time intervals.
  • the time interval for receiving the constant cycle signal is the transmission cycle P in the master time.
  • the counting unit 23 counts the number of receptions of the fixed-period signal and notifies the time calculation unit 28 of the number of receptions.
  • the start time receiving unit 24 receives the transmission start time, that is, the start time information indicating the master time M1 before the master time M1, and stores the start time information in the start time storage unit 25.
  • the transmission cycle receiving unit 26 receives the transmission cycle information indicating the transmission cycle P before the master time M1 and stores it in the transmission cycle storage unit 27.
  • the time calculation unit 28 calculates the master time Mn by the above equation (1) every time the counting unit 23 notifies the number of times of receiving the constant cycle signal.
  • the time correction unit 29 corrects the slave time to the current master time Mn each time the time calculation unit 28 calculates the current master time Mn.
  • the time advance correction unit 31 calculates the advance ⁇ Mn of the master time and the advance ⁇ Jn of the slave time each time the time calculation unit 28 calculates the master time Mn.
  • the advance ⁇ Mn of the master time the elapsed time (Mn—M (n-1)) of the master time from the master time at the time of receiving the previous fixed cycle signal to the master time at the time of receiving the current fixed cycle signal is used.
  • the transmission cycle P indicated by the transmission cycle information may be used.
  • the advance ⁇ Jn of the slave time is the elapsed time of the master time from the corrected slave time at the time of receiving the previous fixed-period signal to the slave time before correction at the time of receiving the current fixed-period signal (Jn-M (n). -1)) is used.
  • n ⁇ 2.
  • the time advance correction unit 31 corrects the slave timekeeping unit 21 so that the advance ⁇ Jn of the slave time matches the advance ⁇ Mn of the master time. In this way, each time the slave device 2 receives a fixed-period signal, the slave time is corrected to the current master time, and the advance of the slave time is corrected according to the advance of the master time.
  • the time reception process shown in FIG. 15 starts when the power of the slave device 2 is turned on. Since steps S61 to S66 are the same as steps S41 to S46 of the flowchart shown in FIG. 9, description thereof will be omitted.
  • the time advance correction unit 31 of the slave device 2 is a master based on the transmission time of the fixed cycle signal in the master device 1 and the time of the slave time measuring section 21 when the fixed cycle signal receiving unit 22 receives the fixed cycle signal.
  • the time advance and the slave time advance are calculated (step S67).
  • the time advance correction unit 31 calculates the advance ⁇ Mn of the master time and the advance ⁇ Jn of the slave time.
  • the elapsed time (Mn—M (n-1)) of the master time from the master time at the time of receiving the previous fixed cycle signal to the master time at the time of receiving the current fixed cycle signal is used.
  • the transmission cycle P indicated by the transmission cycle information may be used.
  • the advance ⁇ Jn of the slave time is the elapsed time of the master time from the corrected slave time at the time of receiving the previous fixed-period signal to the slave time before correction at the time of receiving the current fixed-period signal (Jn-M (n). -1)) is used.
  • the time advance correction unit 31 corrects the slave timekeeping unit 21 so that the advance of the slave time matches the advance of the master time (step S68). If the power of the slave device 2 is not turned off (step S69; NO), the process returns to step S63, and steps S63 to S69 are repeated. As a result, each time the slave device 2 receives a fixed-period signal, the slave time is corrected to the current master time, and the advance of the slave time is corrected according to the advance of the master time. When the power of the slave device 2 is turned off (step S69; YES), the process ends.
  • a dedicated signal line 3 is provided from the master device 1 to the slave device 2.
  • a constant cycle signal is transmitted via the system, and the time of the slave device 2 is corrected to the time of the master device 1 based on the number of times the fixed cycle signal is received, the transmission cycle, and the transmission start time.
  • the cycle for transmitting the constant cycle signal is set regardless of the propagation delay time and jitter of the data bus 4. It can be shortened, and more accurate time synchronization can be realized. Further, since the correction is performed so that the advance of the slave time matches the advance of the master time, the difference between the slave time and the master time becomes small.
  • the slave device 2 of the third and fourth embodiments is combined with the master device 1 of the second embodiment, but the present invention is not limited to this.
  • the slave devices 2 of the third and fourth embodiments may be combined with the master device 1 of the first embodiment.
  • the slave device 2 has a slave timing unit 21, a constant cycle signal receiving unit 22, a counting unit 23, a start time receiving unit 24, a start time storage unit 25, a transmission cycle receiving unit 26, and a transmission cycle storage unit. 27, a time calculation unit 28, a time correction unit 29, a timekeeping unit 30 without correction, and a time advance correction unit 31 are provided.
  • the time advance correction unit 31 corrects the slave timekeeping unit 21 so that the advance of the slave time matches the advance of the master time.
  • the time calculation unit 28 of the slave device 2 starts, and each time the counting unit 23 notifies the reception number of the fixed-period signal, the number of receptions of the fixed-period signal notified to the counting unit 23. Based on the start time information stored in the time storage unit 25 and the transmission cycle information stored in the transmission cycle storage unit 27, the transmission time of the constant cycle signal in the master device 1 is calculated as the current master time.
  • the timing at which the unit 28 calculates the transmission time of the fixed-period signal in the master device 1 as the current master time is not limited to this.
  • the time calculation unit 28 calculates the transmission time of the fixed-period signal in the master device 1 as the current master time each time the counting unit 23 notifies the reception number of the fixed-period signal a plurality of times (for example, twice). Good. That is, the number of times a fixed period signal is received per unit time may be larger than the number of times of time synchronization.
  • the master device 1 and the slave device 2 each include a temporary storage unit 101, a storage unit 102, a calculation unit 103, a timer 104, an operation unit 105, an input / output unit 106, and a display unit 107, respectively.
  • the temporary storage unit 101, the storage unit 102, the timer 104, the operation unit 105, the input / output unit 106, and the display unit 107 are all connected to the calculation unit 103 via the BUS.
  • the calculation unit 103 is, for example, a CPU (Central Processing Unit).
  • the calculation unit 103 includes the constant cycle signal transmission unit 12 and the start time transmission unit 13 of the master device 1, the count unit 23 of the slave device 2, the time calculation unit 28, and the time correction according to the control program stored in the storage unit 102. Each process of unit 29 and time advance correction unit 31 is executed.
  • the temporary storage unit 101 is, for example, a RAM (Random-Access Memory).
  • the temporary storage unit 101 loads the control program stored in the storage unit 102 and is used as a work area of the calculation unit 103.
  • the storage unit 102 is a non-volatile memory such as a flash memory, a hard disk, a DVD-RAM (Digital Versatile Disc-Random Access Memory), and a DVD-RW (Digital Versatile Disc-ReWritable).
  • the storage unit 102 stores in advance a program for causing the calculation unit 103 to perform the processing of the master device 1 and the slave device 2, and supplies the data stored by this program to the calculation unit 103 according to the instruction of the calculation unit 103. Then, the data supplied from the calculation unit 103 is stored.
  • the transmission cycle storage unit 14 and the start time storage unit 16 of the master device 1 and the start time storage unit 25 and the transmission cycle storage unit 27 of the slave device 2 are configured in the storage unit 102.
  • the timer 104 is a crystal oscillator, an oscillation circuit, a clock IC (Integrated Circuit), or the like.
  • the timer 104 functions as the master timekeeping unit 11 of the master device 1 and the slave timekeeping unit 21 of the slave device 2.
  • the operation unit 105 is an interface device that connects an input device such as a keyboard and a pointing device and an input device such as a keyboard and a pointing device to the BUS. For example, in the case of a configuration in which information is directly input to the master device 1 and the slave device 2, the input information is supplied to the calculation unit 103 via the operation unit 105.
  • the input / output unit 106 is a network termination device or wireless communication device connected to the network, and a serial interface or LAN (Local Area Network) interface connected to them.
  • the input / output unit 106 includes a fixed-period signal transmission unit 12, a start time transmission unit 13, and a transmission cycle transmission unit 15 of the master device 1, and a fixed-period signal reception unit 22, a start time reception unit 24, and a transmission cycle reception of the slave device 2. It functions as a unit 26.
  • the display unit 107 is a display device such as a CRT (Cathode Ray Tube) or an LCD (Liquid Crystal Display). For example, in the case of a configuration in which information is directly input to the master device 1 and the slave device 2, the display unit 107 displays the operation screen.
  • CTR Cathode Ray Tube
  • LCD Liquid Crystal Display
  • the control program uses the temporary storage unit 101, the calculation unit 103, the storage unit 102, the timer 104, the operation unit 105, the input / output unit 106, the display unit 107, and the like as resources. Execute by processing.
  • the central part that processes the master device 1 and the slave device 2, such as the temporary storage unit 101, the storage unit 102, the calculation unit 103, the timer 104, the operation unit 105, the input / output unit 106, and the display unit 107, is a dedicated system. Regardless, it can be realized by using a normal computer system.
  • a computer program for executing the above operation can be a computer-readable recording medium such as a flexible disk, a CD-ROM (Compact Disc-Read Only Memory), or a DVD-ROM (Digital Versatile Disc-Read Only Memory).
  • the master device 1 and the slave device 2 that execute the above-described processing may be configured by storing and distributing the computer program in the computer and installing the computer program in the computer. Further, the master device 1 and the slave device 2 may be configured by storing the computer program in a storage device of a server device on a communication network such as the Internet and downloading it by a normal computer system.
  • the functions of the master device 1 and the slave device 2 are realized by sharing the OS (Operating System) and the application program, or by coordinating the OS and the application program, only the application program part is stored as a recording medium. It may be stored in a device or the like.
  • OS Operating System
  • a computer program may be posted on a bulletin board system (BBS, Bulletin Board System) on the communication network, and the above-mentioned computer program may be provided via the communication network. Then, by starting this computer program and executing it in the same manner as other application programs under the control of the OS, the above-mentioned processing may be executed.
  • BSS bulletin board System

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Electric Clocks (AREA)
  • Small-Scale Networks (AREA)

Abstract

時刻同期システム(100)は、データバス(4)、および、定周期信号を送信する専用の信号線(3)で接続されたマスタ装置(1)とスレーブ装置(2A,2B,2C)とを備える。マスタ装置(1)は、信号線(3)を介して、定周期信号を一定の送信周期で送信する。マスタ装置(1)は、データバス(4)を介して、定周期信号の送信開始時刻を示す開始時刻情報と、定周期信号の送信周期を示す送信周期情報とを送信する。スレーブ装置(2A,2B,2C)は、定周期信号の受信回数をカウントし、定周期信号の受信回数と、開始時刻情報が示す送信開始時刻と、送信周期情報が示す送信周期とに基づいて、マスタ装置(1)における定周期信号の送信時刻をマスタ装置(1)の現在時刻として算出する。スレーブ装置(2A,2B,2C)は、算出したマスタ装置(1)の現在時刻に自身の時刻を補正する。

Description

時刻同期システム、マスタ装置、スレーブ装置およびプログラム
 本発明は、時刻同期システム、マスタ装置、スレーブ装置およびプログラムに関する。
 例えば、PLC(Programmable Logic Controller)のような時計が内蔵された複数の装置が連携している場合に各装置の時刻を同期させる技術がある。このような技術における時刻同期の方法は、複数の装置の中から基準時刻を管理するマスタ装置を決めて、マスタ装置がマスタ装置以外のスレーブ装置に送信した時刻情報に基づいて、スレーブ装置の時刻をマスタ装置の時刻に合わせる方法が一般的である。
 特許文献1には、親時計付局と子時計付局との間に専用の信号線を新設し、親時計付局が決められた周期で専用信号線上に時刻周期パルス信号を送信し、ネットワーク上に時刻周期パルス信号の送出時点の時刻情報を送信し、子時計付局は時刻周期パルス信号および時刻情報を用いて時刻合わせを行う技術が開示されている。
特開平4-294413号公報
 特許文献1に記載の技術では、親時計付局が、専用の信号線を介して時刻周期パルス信号を送信する度に、ネットワークのデータ用通信線を介して時刻周期パルス信号の送出時点の時刻情報を送信するので、子時計付局への時刻情報の到着は、データ用通信線の伝搬遅延時間及びジッタの影響を受けて、時刻周期パルス信号の到着よりも遅れる。データ用通信線に送信される時刻情報に対する伝搬遅延時間及びジッタの影響による最大遅延時間が、時刻周期パルス信号を送信する周期よりも長くなってしまうと、前の時刻周期パルス信号に対応した時刻情報が到着する前に次の時刻周期パルス信号が到着してしまう可能性があるので、時刻周期パルス信号を送信する周期をデータ用通信線の最大遅延時間よりも短くすることができない。つまり、時刻同期の精度がデータ用通信線の伝搬遅延時間及びジッタによって制限されてしまうという問題がある。
 本発明は、上記の事情に鑑みてなされたものであり、スレーブ装置の時刻をマスタ装置の時刻に合わせる時刻同期において、より高精度の時刻同期を実現することを目的とする。
 上記目的を達成するため、本発明の時刻同期システムは、マスタ装置とスレーブ装置とを備える。マスタ装置とスレーブ装置とは、データ用通信線、および、定周期信号を送信する専用の信号線で接続される。マスタ装置は、マスタ計時部と、定周期信号送信部と、開始時刻送信部と、送信周期記憶部と、送信周期送信部とを備える。マスタ計時部は、時刻を計時する。定周期信号送信部は、一定の送信周期で定周期信号を生成し、スレーブ装置に信号線を介して定周期信号を送信する。開始時刻送信部は、定周期信号の送信開始時刻を示す開始時刻情報をスレーブ装置にデータ用通信線を介して送信する。送信周期記憶部は、定周期信号の送信周期を示す送信周期情報を記憶する。送信周期送信部は、送信周期記憶部が記憶する送信周期情報をスレーブ装置にデータ用通信線を介して送信する。スレーブ装置は、スレーブ計時部と、定周期信号受信部と、開始時刻受信部と、開始時刻記憶部と、送信周期受信部と、送信周期記憶部と、カウント部と、時刻算出部と、時刻補正部とを備える。スレーブ計時部は、時刻を計時する。定周期信号受信部は、マスタ装置から定周期信号を信号線を介して受信する。開始時刻受信部は、マスタ装置から開始時刻情報をデータ用通信線を介して受信する。開始時刻記憶部は、開始時刻受信部が受信した開始時刻情報を記憶する。送信周期受信部は、マスタ装置から送信周期情報をデータ用通信線を介して受信する。送信周期記憶部は、送信周期受信部が受信した送信周期情報を記憶する。カウント部は、定周期信号受信部が定周期信号を受信した回数をカウントする。時刻算出部は、開始時刻情報が示す送信開始時刻と、送信周期情報が示す送信周期と、定周期信号の受信回数とに基づいて、マスタ装置における定周期信号の送信時刻を、マスタ装置の現在時刻として算出する。時刻補正部は、スレーブ計時部の時刻を時刻算出部が算出したマスタ装置の現在時刻に補正する。
 本発明によれば、スレーブ装置の時刻をマスタ装置の時刻に合わせる時刻同期において、マスタ装置からスレーブ装置に、専用の信号線を介して定周期信号を送信し、定周期信号の受信回数と送信周期と送信開始時刻とに基づいて、スレーブ装置の時刻をマスタ装置の時刻に補正することで、定周期信号を送信する度にデータ用通信線を介して送出時点の時刻情報を送信する必要がないので、データ用通信線の伝搬遅延時間及びジッタに関係なく定周期信号を送信する周期を短くすることができ、より高精度の時刻同期を実現することが可能になる。
本発明の実施の形態1に係る時刻同期システムの構成を示すブロック図 実施の形態1に係るマスタ装置の機能構成を示すブロック図 実施の形態1に係るスレーブ装置の機能構成を示すブロック図 実施の形態1に係る時刻補正を説明する図 実施の形態1に係る時刻送信処理を示すフローチャート 実施の形態1に係る時刻受信処理を示すフローチャート 本発明の実施の形態2に係るマスタ装置の機能構成を示すブロック図 実施の形態2に係る時刻送信処理を示すフローチャート 実施の形態2に係る時刻受信処理を示すフローチャート 本発明の実施の形態3に係るスレーブ装置の機能構成を示すブロック図 実施の形態3に係る時刻補正を説明する図 実施の形態3に係る時刻受信処理を示すフローチャート 本発明の実施の形態4に係るスレーブ装置の機能構成を示すブロック図 実施の形態4に係る時刻補正を説明する図 実施の形態4に係る時刻受信処理を示すフローチャート 実施の形態1から4に係るマスタ装置およびスレーブ装置のハードウェア構成の一例を示す図
 以下、図面を参照して、本発明の実施の形態に係る時刻同期システム、マスタ装置、スレーブ装置およびプログラムについて詳細に説明する。なお、図中、同一または相当する部分には、同じ符号を付す。
(実施の形態1)
 図1に示すように、本実施の形態1に係る時刻同期システム100は、信号線3およびデータバス4で接続されたマスタ装置1とスレーブ装置2A~2Cとを備える。時刻同期システム100は、スレーブ装置2A~2Cの時刻をマスタ装置1の時刻と同期させる。スレーブ装置2A~2Cを総称する場合は、スレーブ装置2と呼ぶ。
 マスタ装置1は、信号線3を介して、定周期信号を一定の送信周期で送信する。信号線3は定周期信号を送信するための専用の通信線である。マスタ装置1は、データバス4を介して、定周期信号の送信開始時刻を示す開始時刻情報と、定周期信号の送信周期を示す送信周期情報とを送信する。データバス4は、マスタ装置1およびスレーブ装置2がデータを送受信するデータ用通信線であって、開始時刻情報および送信周期情報以外の情報の送受信に用いられてもよい。データバス4は、データ用通信線の例である。スレーブ装置2は、定周期信号の受信回数をカウントし、定周期信号の受信回数と、開始時刻情報が示す送信開始時刻と、送信周期情報が示す送信周期とに基づいて、マスタ装置1の現在時刻を算出する。スレーブ装置2は、算出したマスタ装置1の現在時刻に自身の時刻を補正する。
 図1の例では、スレーブ装置2を3台記載したが、スレーブ装置2は何台でもよい。また、マスタ装置1およびスレーブ装置2A~2Cを接続するネットワークはバス型に限らず、例えばスター型でもよい。
 続いて、マスタ装置1の機能について図2を用いて説明する。図2に示すように、マスタ装置1は、機能構成として、時刻を計時するマスタ計時部11と、定周期信号を送信する定周期信号送信部12と、定周期信号の送信開始時刻を示す開始時刻情報を送信する開始時刻送信部13と、定周期信号の送信周期を示す送信周期情報を記憶する送信周期記憶部14と、送信周期情報を送信する送信周期送信部15とを備える。以下、マスタ装置1の時刻、つまりマスタ計時部11の時刻をマスタ時刻と呼ぶ。
 定周期信号送信部12は、マスタ時刻に基づいて、送信周期記憶部14が記憶する送信周期情報が示す送信周期で定周期信号を生成し、信号線3を介してスレーブ装置2A~2Cに定周期信号を送信する。定周期信号は、例えば1ビットのパルス信号である。専用の信号線3を介して定周期信号を送信する伝搬遅延時間及びジッタは、データバス4を介して送信する場合に比べて十分小さいので、マスタ装置1における定周期信号の送信時刻とスレーブ装置2における定周期信号の受信時刻は同時刻とみなすことができる。
 開始時刻送信部13は、定周期信号送信部12が定周期信号の送信を開始したマスタ時刻を取得するタイムスタンプ処理を行う。開始時刻送信部13は、定周期信号の送信を開始したマスタ時刻、つまり送信開始時刻を示す開始時刻情報を生成する。開始時刻送信部13は、データバス4を介してスレーブ装置2A~2Cに開始時刻情報を送信する。
 送信周期送信部15は、送信周期記憶部14が記憶する送信周期情報を、データバス4を介してスレーブ装置2A~2Cに送信する。送信周期送信部15が送信周期情報を送信するタイミングは、開始時刻送信部13が開始時刻情報を送信する前であればよい。
 続いて、スレーブ装置2の機能について図3を用いて説明する。図3には代表してスレーブ装置2Aの機能構成を示しているが、スレーブ装置2Bおよび2Cも同様の機能構成である。図3に示すように、スレーブ装置2Aは、機能構成として、時刻を計時するスレーブ計時部21と、定周期信号を受信する定周期信号受信部22と、定周期信号の受信回数をカウントするカウント部23と、開始時刻情報を受信する開始時刻受信部24と、開始時刻情報を記憶する開始時刻記憶部25と、送信周期情報を受信する送信周期受信部26と、送信周期情報を記憶する送信周期記憶部27と、現在のマスタ時刻を算出する時刻算出部28と、スレーブ計時部21の時刻を補正する時刻補正部29とを備える。
 定周期信号受信部22は、信号線3を介してマスタ装置1から定周期信号を受信する。カウント部23は、定周期信号受信部22が定周期信号を受信した回数をカウントし、時刻算出部28に受信回数を通知する。開始時刻受信部24は、データバス4を介してマスタ装置1から開始時刻情報を受信する。開始時刻記憶部25は、開始時刻受信部24が受信した開始時刻情報を記憶する。送信周期受信部26は、データバス4を介してマスタ装置1から送信周期情報を受信する。送信周期記憶部27は、送信周期受信部26が受信した送信周期情報を記憶する。
 時刻算出部28は、カウント部23から定周期信号の受信回数を通知されるたびに、カウント部23に通知された定周期信号の受信回数と、開始時刻記憶部25が記憶する開始時刻情報と、送信周期記憶部27が記憶する送信周期情報とに基づいて、マスタ装置1における定周期信号の送信時刻を現在のマスタ時刻として算出する。具体的には、時刻算出部28は、開始時刻情報が示す送信開始時刻に、送信周期情報が示す送信周期に定周期信号の受信回数から1を減算した値を乗算した時間を加えた時刻、つまりマスタ装置1における定周期信号の送信時刻を算出する。前述のように、マスタ装置1における定周期信号の送信時刻とスレーブ装置2における定周期信号の受信時刻は同時刻とみなすことができるので、時刻算出部28は、マスタ装置1における定周期信号の送信時刻を現在のマスタ時刻として算出する。時刻補正部29は、スレーブ計時部21の時刻を、時刻算出部28が算出した現在のマスタ時刻に補正する。以下、スレーブ装置2の時刻、つまりスレーブ計時部21の時刻をスレーブ時刻という。
 ここで、スレーブ装置2で行われる時刻補正について図4を用いて説明する。図4に示すように、スレーブ装置2の定周期信号受信部22は、定周期信号を一定の時間間隔で受信する。定周期信号を受信する時間間隔は、マスタ時刻では送信周期Pである。カウント部23は、定周期信号の受信回数をカウントして、時刻算出部28に通知する。開始時刻受信部24は、送信開始時刻、つまりマスタ時刻M1を示す開始時刻情報を受信し、開始時刻記憶部25に記憶する。図4の例では、開始時刻受信部24は、1回目の定周期信号の受信タイミングと2回目の定周期信号の受信タイミングとの間に開始時刻情報を受信しているものとする。送信周期受信部26は、開始時刻受信部24が開始時刻情報を受信するよりも前に送信周期Pを示す送信周期情報を受信しており、送信周期記憶部27に記憶している。
 時刻算出部28は、2回目の定周期信号の受信時にカウント部23から定周期信号の受信回数2を通知されると、開始時刻情報が示すマスタ時刻M1に、送信周期情報が示す送信周期Pに定周期信号の受信回数2から1を減算した1を乗算した時間を加えた時刻をマスタ時刻M2として算出する。時刻算出部28は、3回目の定周期信号の受信時にカウント部23から定周期信号の受信回数3を通知されると、開始時刻情報が示すマスタ時刻M1に、送信周期情報が示す送信周期Pに定周期信号の受信回数3から1を減算した2を乗算した時間を加えた時刻をマスタ時刻M3として算出する。このように、時刻算出部28は、カウント部23から定周期信号の受信回数を通知されるたびに、マスタ時刻M1と送信周期Pとを用いて、下記の(1)式で現在のマスタ時刻Mnを算出する。n≧2である。
 Mn=M1+P×(n-1)          (1)
 時刻補正部29は、時刻算出部28が現在のマスタ時刻Mnを算出するごとに、スレーブ時刻を現在のマスタ時刻Mnに補正する。このように、スレーブ時刻は、スレーブ装置2が定周期信号を受信するごとに現在のマスタ時刻に補正される。なお、図4の例では、1回目の定周期信号の受信タイミングと2回目の定周期信号の受信タイミングとの間に開始時刻情報を受信するものとし、時刻算出部28はマスタ時刻M2以降のマスタ時刻Mnを算出しているが、これに限らない。時刻算出部28は、開始時刻受信部24が開始時刻情報を受信して開始時刻記憶部25に記憶した後に、定周期信号受信部22が定周期信号を受信した時からマスタ時刻Mnを算出すればよい。
 ここで、マスタ装置1が実行する時刻送信処理のフローについて、図5を用いて説明する。図5に示す時刻送信処理は、マスタ装置1の電源が投入されたことで開始する。マスタ装置1の送信周期送信部15は、送信周期記憶部14が記憶する送信周期情報を、データバス4を介してスレーブ装置2に送信する(ステップS11)。図4の例では、送信周期送信部15は、送信周期Pを示す送信周期情報を、スレーブ装置2に送信する。
 図5に戻り、定周期信号送信部12は、定周期信号を生成し、信号線3を介してスレーブ装置2に定周期信号を送信する(ステップS12)。送信した定周期信号が最初の定周期信号である場合(ステップS13;YES)、開始時刻送信部13は、マスタ時刻に基づいて、定周期信号送信部12が定周期信号の送信を開始した送信開始時刻を示す開始時刻情報を生成し、データバス4を介してスレーブ装置2に開始時刻情報を送信する(ステップS14)。図4の例では、開始時刻送信部13は、マスタ時刻M1を示す開始時刻情報をスレーブ装置2に送信する。
 図5に戻り、送信した定周期信号が最初の定周期信号でない場合(ステップS13;NO)、処理はステップS15に移行する。定周期信号送信部12は、マスタ時刻に基づいて、ステップS12で定周期信号を送信してから、送信周期記憶部14が記憶する送信周期情報が示す送信周期が経過したか否かを判定する(ステップS15)。送信周期が経過していなければ(ステップS15;NO)、定周期信号送信部12は、ステップS15を繰り返し、送信周期の経過を待機する。送信周期が経過した場合(ステップS15;YES)、マスタ装置1の電源がOFFになっていなければ(ステップS16;NO)、処理はステップS12に戻り、ステップS12~ステップS16を繰り返す。これにより、送信周期記憶部14が記憶する送信周期情報が示す送信周期でマスタ装置1からスレーブ装置2に定周期信号が送信される。図4の例では、送信周期Pでマスタ装置1からスレーブ装置2に定周期信号が送信されている。
 図5に戻り、マスタ装置1の電源がOFFになると(ステップS16;YES)、処理は終了する。
 続いて、スレーブ装置2が実行する時刻受信処理のフローについて、図6を用いて説明する。図6に示す時刻受信処理は、スレーブ装置2の電源が投入されたことで開始する。スレーブ装置2の送信周期受信部26は、データバス4を介してマスタ装置1から送信周期情報を受信する(ステップS21)。送信周期記憶部27は、送信周期受信部26が受信した送信周期情報を記憶する。図4の例では、送信周期受信部26は、マスタ装置1から送信周期Pを示す送信周期情報を受信する。送信周期記憶部27は、送信周期Pを示す送信周期情報を記憶する。
 図6に戻り、定周期信号受信部22は、信号線3を介してマスタ装置1から定周期信号を受信する(ステップS22)。カウント部23は、定周期信号受信部22が定周期信号を受信した回数をカウントし(ステップS23)、時刻算出部28に受信回数を通知する。開始時刻受信部24は、データバス4を介してマスタ装置1から開始時刻情報を受信済みであるか否かを判定する(ステップS24)。開始時刻情報を受信済みでない場合(ステップS24;NO)、処理はステップS22に戻り、ステップS22~ステップS24を繰り返し、開始時刻情報の受信を待機する。開始時刻情報を受信済みである場合(ステップS24;YES)、開始時刻記憶部25には、開始時刻受信部24が受信した開始時刻情報が記憶されている。図4の例では、開始時刻記憶部25には、開始時刻受信部24が受信したマスタ時刻M1を示す開始時刻情報が記憶されている。
 図6に戻り、時刻算出部28は、カウント部23に通知された定周期信号の受信回数と、開始時刻記憶部25が記憶する開始時刻情報と、送信周期記憶部27が記憶する送信周期情報とに基づいて、現在のマスタ時刻を算出する(ステップS25)。図4の例では、時刻算出部28は、上記の(1)式で現在のマスタ時刻Mnを算出する。
 図6に戻り、時刻補正部29は、スレーブ時刻を、ステップS25で算出した現在のマスタ時刻に補正する(ステップS26)。スレーブ装置2の電源がOFFになっていなければ(ステップS27;NO)、処理はステップS22に戻り、ステップS22~ステップS27を繰り返す。これにより、スレーブ装置2が定周期信号を受信するごとに、スレーブ時刻が現在のマスタ時刻に補正される。スレーブ装置2の電源がOFFになると(ステップS27;YES)、処理は終了する。
 以上説明したとおり、実施の形態1に係る、スレーブ装置2の時刻をマスタ装置1の時刻に合わせる時刻同期を行う時刻同期システム100では、マスタ装置1からスレーブ装置2に、専用の信号線3を介して定周期信号を送信し、定周期信号の受信回数と送信周期と送信開始時刻とに基づいて、スレーブ装置2の時刻をマスタ装置1の時刻に補正する。これにより、定周期信号を送信する度にデータバス4を介して送出時点の時刻情報を送信する必要がないので、データバス4の伝搬遅延時間及びジッタに関係なく定周期信号を送信する周期を短くすることができ、より高精度の時刻同期を実現することが可能になる。また、データバス4を介して開始時刻情報および送信周期情報を送信するのは1回だけであるので、定周期信号を送信する度にデータバス4を介して送出時点の時刻情報を送信する場合に比べて、時刻同期によるデータバス4の帯域消費量を小さくすることができる。
(実施の形態2)
 実施の形態2では、定周期信号の送信開始時刻があらかじめ決まっている。実施の形態2の時刻同期システム100の構成、スレーブ装置2の機能構成は、実施の形態1と同様である。
 実施の形態2のマスタ装置1の機能について図7を用いて説明する。図7に示すように、マスタ装置1は、機能構成として、マスタ計時部11、定周期信号送信部12と、開始時刻送信部13、送信周期記憶部14および送信周期送信部15に加えて、開始時刻記憶部16を備える。
 開始時刻記憶部16は、あらかじめ決められた送信開始時刻を示す開始時刻情報を記憶している。定周期信号送信部12は、マスタ時刻が、開始時刻記憶部16に記憶された開始時刻情報が示す送信開始時刻になったら定周期信号の送信を開始する。開始時刻送信部13は、開始時刻記憶部16が記憶する開始時刻情報を、データバス4を介してスレーブ装置2A~2Cに送信する。開始時刻送信部13が開始時刻情報を送信するタイミングは、定周期信号送信部12が定周期信号の送信を開始する前であればよい。マスタ装置1のその他の機能は、実施の形態1と同様である。
 ここで、マスタ装置1が実行する時刻送信処理のフローについて、図8を用いて説明する。図8に示す時刻送信処理は、マスタ装置1の電源が投入されたことで開始する。マスタ装置1の送信周期送信部15は、送信周期記憶部14が記憶する送信周期情報を、データバス4を介してスレーブ装置2に送信する(ステップS31)。開始時刻送信部13は、開始時刻記憶部16が記憶する開始時刻情報を、データバス4を介してスレーブ装置2に送信する(ステップS32)。
 定周期信号送信部12は、マスタ時刻が、開始時刻記憶部16に記憶された開始時刻情報が示す送信開始時刻になったか否かを判定する(ステップS33)。マスタ時刻が送信開始時刻になっていなければ(ステップS33;NO)、定周期信号送信部12は、ステップS33を繰り返し、送信開始時刻になるまで待機する。マスタ時刻が送信開始時刻になると(ステップS33;YES)、定周期信号送信部12は、定周期信号を生成し、信号線3を介してスレーブ装置2に定周期信号を送信する(ステップS34)。
 定周期信号送信部12は、マスタ時刻に基づいて、定周期信号を送信してから、送信周期記憶部14が記憶する送信周期情報が示す送信周期が経過したか否かを判定する(ステップS35)。送信周期が経過していなければ(ステップS35;NO)、定周期信号送信部12は、ステップS35を繰り返し、送信周期の経過を待機する。送信周期が経過した場合(ステップS35;YES)、マスタ装置1の電源がOFFになっていなければ(ステップS36;NO)、処理はステップS34に戻り、ステップS34~ステップS36を繰り返す。マスタ装置1の電源がOFFになると(ステップS36;YES)、処理は終了する。
 続いて、スレーブ装置2が実行する時刻受信処理のフローについて、図9を用いて説明する。図9に示す時刻受信処理は、スレーブ装置2の電源が投入されたことで開始する。スレーブ装置2の送信周期受信部26は、データバス4を介して、マスタ装置1から送信周期情報を受信する(ステップS41)。送信周期記憶部27は、送信周期受信部26が受信した送信周期情報を記憶する。開始時刻受信部24は、データバス4を介して、マスタ装置1から開始時刻情報を受信する(ステップS42)。開始時刻記憶部25は、開始時刻受信部24が受信した開始時刻情報を記憶する。
 定周期信号受信部22は、信号線3を介して、マスタ装置1から定周期信号を受信する(ステップS43)。カウント部23は、定周期信号受信部22が定周期信号を受信した回数をカウントし(ステップS44)、時刻算出部28に受信回数を通知する。時刻算出部28は、カウント部23に通知された定周期信号の受信回数と、開始時刻記憶部25が記憶する開始時刻情報と、送信周期記憶部27が記憶する送信周期情報とに基づいて、現在のマスタ時刻を算出する(ステップS45)。
 時刻補正部29は、スレーブ時刻を、ステップS45で算出した現在のマスタ時刻に補正する(ステップS46)。スレーブ装置2の電源がOFFになっていなければ(ステップS47;NO)、処理はステップS43に戻り、ステップS43~ステップS47を繰り返す。これにより、スレーブ時刻は、スレーブ装置2が定周期信号を受信するごとにマスタ時刻に補正される。実施の形態2では、スレーブ装置2が定周期信号を受信する前に開始時刻情報を受信しているので、1回目の定周期信号の受信時から、スレーブ時刻を現在のマスタ時刻に補正することができる。スレーブ装置2の電源がOFFになると(ステップS47;YES)、処理は終了する。
 以上説明したとおり、実施の形態2に係る、スレーブ装置2の時刻をマスタ装置1の時刻に合わせる時刻同期を行う時刻同期システム100では、マスタ装置1からスレーブ装置2に、専用の信号線3を介して定周期信号を送信し、定周期信号の受信回数と送信周期と送信開始時刻とに基づいて、スレーブ装置2の時刻をマスタ装置1の時刻に補正する。これにより、定周期信号を送信する度にデータバス4を介して送出時点の時刻情報を送信する必要がないので、データバス4の伝搬遅延時間及びジッタに関係なく定周期信号を送信する周期を短くすることができ、より高精度の時刻同期を実現することが可能になる。また、開始時刻記憶部16が開始時刻情報をあらかじめ記憶しており、実施の形態1のように開始時刻送信部13がタイムスタンプ処理を行う必要がないので、時刻同期の精度がタイムスタンプ処理の精度の影響を受けない。
(実施の形態3)
 実施の形態3では、スレーブ装置2が、送信周期の間の時刻補正タイミングで時刻補正を行う。実施の形態3の時刻同期システム100の構成、マスタ装置1の機能構成は、実施の形態2と同様である。
 実施の形態3のスレーブ装置2の機能について図10を用いて説明する。図10には代表してスレーブ装置2Aの機能構成を示しているが、スレーブ装置2Bおよび2Cも同様の機能構成である。図10に示すように、スレーブ装置2Aは、機能構成として、スレーブ計時部21、定周期信号受信部22、カウント部23、開始時刻受信部24、開始時刻記憶部25、送信周期受信部26、送信周期記憶部27、時刻算出部28とおよび時刻補正部29に加えて、補正なし計時部30を備える。
 補正なし計時部30は、時刻補正部29が補正しなかった場合のスレーブ計時部21の時刻と同じ時刻を計時する。以下、補正しなかった場合のスレーブ装置2の時刻、つまり補正なし計時部30の時刻を補正なしスレーブ時刻という。
 時刻算出部28は、カウント部23から定周期信号の受信回数を通知されるたびに、カウント部23に通知された定周期信号の受信回数と、開始時刻記憶部25が記憶する開始時刻情報と、送信周期記憶部27が記憶する送信周期情報とに基づいて、マスタ装置1における定周期信号の送信時刻を算出する。具体的には、時刻算出部28は、開始時刻情報が示す送信開始時刻に、送信周期情報が示す送信周期に定周期信号の受信回数から1を減算した値を乗算した時間を加えた時刻を、マスタ装置1における定周期信号の送信時刻として算出する。
 時刻算出部28は、送信周期の間の時刻補正タイミングで、マスタ装置1における定周期信号の送信時刻と、定周期信号受信部22が定周期信号を受信した時の補正なし計時部30の時刻と、補正なし計時部30の現在時刻とに基づいて、現在のマスタ時刻を算出する。具体的には、時刻算出部28は、直前の定周期信号を受信したタイミングで算出したマスタ装置1における定周期信号の送信時刻に、直前の定周期信号を受信したタイミングから現在までのマスタ時刻の経過時間を加えた時刻を現在のマスタ時刻として算出する。時刻算出部28は、直前の定周期信号を受信したタイミングから現在までのマスタ時刻の経過時間を、直前の定周期信号を受信したタイミングから現在までの補正なしスレーブ時刻の経過時間に、補正なしスレーブ時刻の進みに対するマスタ時刻の進みの比を乗算して算出する。時刻補正部29は、スレーブ計時部21の時刻を、時刻算出部28が算出した現在のマスタ時刻に補正する。
 ここで、スレーブ装置2で行われる時刻補正について図11を用いて説明する。図11に示すように、スレーブ装置2の定周期信号受信部22は、定周期信号を一定の時間間隔で受信する。定周期信号を受信する時間間隔は、マスタ時刻では送信周期Pである。カウント部23は、定周期信号の受信回数をカウントして、時刻算出部28に通知する。開始時刻受信部24は、マスタ時刻M1よりも前に、送信開始時刻、つまりマスタ時刻M1を示す開始時刻情報を受信しており、開始時刻記憶部25に記憶している。送信周期受信部26は、マスタ時刻M1よりも前に送信周期Pを示す送信周期情報を受信しており、送信周期記憶部27に記憶している。
 時刻算出部28は、カウント部23から定周期信号の受信回数を通知されるたびに、上記の(1)式でマスタ時刻Mnを算出する。時刻算出部28は、送信周期の間の時刻補正タイミングが到来すると、マスタ時刻Mnに、直前の定周期信号を受信したタイミングから現在までのマスタ時刻の経過時間ΔMn’を加算して、現在のマスタ時刻Mn’を算出する。時刻算出部28は、直前の定周期信号を受信したタイミングから現在までの補正なしスレーブ時刻の経過時間ΔFn’と補正なしスレーブ時刻の進みに対するマスタ時刻の進みの比(Mn-M(n-1)/(Fn-F(n-1))とを用いて、下記の(2)式で直前の定周期信号を受信したタイミングから現在までのマスタ時刻の経過時間ΔMn’を算出する。n≧2である。
 ΔMn’=ΔFn’×(Mn-M(n-1)/(Fn-F(n-1))    (2)
 Mn-M(n-1)の代わりに送信周期情報が示す送信周期Pを用いてもよい。時刻補正部29は、時刻算出部28が現在のマスタ時刻Mn’を算出するごとに、スレーブ時刻を現在のマスタ時刻Mn’に補正する。このように、スレーブ時刻は、送信周期の間の時刻補正タイミングで現在のマスタ時刻に補正される。なお、送信周期の間の時刻補正タイミングは、ユーザが設定してもよいし、スレーブ装置2の処理能力によって決まってもよい。
 ここで、スレーブ装置2が実行する時刻受信処理のフローについて、図12を用いて説明する。図12に示す時刻受信処理は、スレーブ装置2の電源が投入されたことで開始する。ステップS51~ステップS54は、図9に示すフローチャートのステップS41~ステップS44と同様であるので説明を省略する。スレーブ装置2の時刻算出部28は、カウント部23に通知された定周期信号の受信回数と、開始時刻記憶部25が記憶する開始時刻情報と、送信周期記憶部27が記憶する送信周期情報とに基づいて、マスタ装置1における定周期信号の送信時刻を算出する(ステップS55)。図11の例では、時刻算出部28は、上記の(1)式でマスタ装置1における定周期信号の送信時刻Mnを算出する。
 図12に戻り、時刻算出部28は、時刻補正タイミングが到来したか否かを判定する(ステップS56)。時刻補正タイミングが到来していない場合(ステップS56;NO)、時刻算出部28は、ステップS56を繰り返し、時刻補正タイミングの到来を待機する。時刻補正タイミングが到来した場合(ステップS56;YES)、時刻算出部28は、マスタ装置1における定周期信号の送信時刻と、定周期信号受信部22が定周期信号を受信した時の補正なし計時部30の時刻と、補正なし計時部30の現在時刻とに基づいて、現在のマスタ時刻を算出する(ステップS57)。図11の例では、時刻算出部28は、マスタ時刻Mnに、直前の定周期信号を受信したタイミングから現在までのマスタ時刻の経過時間ΔMn’を加算して、現在のマスタ時刻Mn’を算出する。時刻算出部28は、上記の(2)式で直前の定周期信号を受信したタイミングから現在までのマスタ時刻の経過時間ΔMn’を算出する。
 図12に戻り、時刻補正部29は、スレーブ時刻を、ステップS57で算出したマスタ時刻に補正する(ステップS58)。スレーブ装置2の電源がOFFになっていなければ(ステップS59;NO)、処理はステップS53に戻り、ステップS53~ステップS59を繰り返す。これにより、スレーブ時刻は、送信周期の間の時刻補正タイミングでマスタ時刻に補正される。スレーブ装置2の電源がOFFになると(ステップS59;YES)、処理は終了する。
 以上説明したとおり、実施の形態3に係る、スレーブ装置2の時刻をマスタ装置1の時刻に合わせる時刻同期を行う時刻同期システム100では、マスタ装置1からスレーブ装置2に、専用の信号線3を介して定周期信号を送信し、定周期信号の受信回数と送信周期と送信開始時刻とに基づいて、スレーブ装置2の時刻をマスタ装置1の時刻に補正する。これにより、定周期信号を送信する度にデータバス4を介して送出時点の時刻情報を送信する必要がないので、データバス4の伝搬遅延時間及びジッタに関係なく定周期信号を送信する周期を短くすることができ、より高精度の時刻同期を実現することが可能になる。また、送信周期の間の時刻補正タイミングでスレーブ時刻をマスタ時刻に補正することができるので、定周期信号の受信したタイミングで即時にスレーブ時刻をマスタ時刻に補正する必要がなくなる。これにより、スレーブ時刻をマスタ時刻に補正する処理をソフトウェアで実現する場合も精度の低下を防ぐことができる。
(実施の形態4)
 実施の形態4では、スレーブ時刻の進みをマスタ時刻の進みと一致させる補正を行う。実施の形態4の時刻同期システム100の構成、マスタ装置1の機能構成は、実施の形態2と同様である。
 実施の形態4のスレーブ装置2の機能について図13を用いて説明する。図13には代表してスレーブ装置2Aの機能構成を示しているが、スレーブ装置2Bおよび2Cも同様の機能構成である。図13に示すように、スレーブ装置2Aは、機能構成として、スレーブ計時部21、定周期信号受信部22、カウント部23、開始時刻受信部24、開始時刻記憶部25、送信周期受信部26、送信周期記憶部27、時刻算出部28とおよび時刻補正部29に加えて、スレ-ブ時刻の進みをマスタ時刻の進みと一致させる補正を行う時刻進み補正部31を備える。
 時刻算出部28は、カウント部23から定周期信号の受信回数を通知されるたびに、カウント部23に通知された定周期信号の受信回数と、開始時刻記憶部25が記憶する開始時刻情報と、送信周期記憶部27が記憶する送信周期情報とに基づいて、現在のマスタ時刻を算出する。具体的には、時刻算出部28は、開始時刻情報が示す送信開始時刻に、送信周期情報が示す送信周期に定周期信号の受信回数から1を減算した値を乗算した時間を加えた時刻、つまりマスタ装置1における定周期信号の送信時刻を、現在のマスタ時刻として算出する。
 時刻進み補正部31は、定周期信号受信部22が定周期信号を受信するたびに、マスタ装置1における定周期信号の送信時刻と、定周期信号受信部22が定周期信号を受信した時のスレーブ計時部21の時刻とに基づいて、マスタ時刻の進みおよびスレーブ時刻の進みを算出する。時刻進み補正部31は、スレーブ計時部21に対し、スレーブ時刻の進みをマスタ時刻の進みと一致させる補正を行う。
 ここで、スレーブ装置2で行われる時刻の進みの補正について図14を用いて説明する。図14に示すように、スレーブ装置2の定周期信号受信部22は、定周期信号を一定の時間間隔で受信する。定周期信号を受信する時間間隔は、マスタ時刻では送信周期Pである。カウント部23は、定周期信号の受信回数をカウントして、時刻算出部28に受信回数を通知する。開始時刻受信部24は、マスタ時刻M1よりも前に、送信開始時刻、つまりマスタ時刻M1を示す開始時刻情報を受信しており、開始時刻記憶部25に記憶している。送信周期受信部26は、マスタ時刻M1よりも前に送信周期Pを示す送信周期情報を受信しており、送信周期記憶部27に記憶している。
 時刻算出部28は、カウント部23から定周期信号の受信回数を通知されるたびに、上記の(1)式でマスタ時刻Mnを算出する。時刻補正部29は、時刻算出部28が現在のマスタ時刻Mnを算出するごとに、スレーブ時刻を現在のマスタ時刻Mnに補正する。時刻進み補正部31は、時刻算出部28がマスタ時刻Mnを算出するたびに、マスタ時刻の進みΔMnとスレーブ時刻の進みΔJnとを算出する。マスタ時刻の進みΔMnには、前回の定周期信号の受信時のマスタ時刻から今回の定周期信号の受信時のマスタ時刻までのマスタ時刻の経過時間(Mn-M(n-1))を用いてもよいし、送信周期情報が示す送信周期Pを用いてもよい。スレーブ時刻の進みΔJnには、前回の定周期信号の受信時の補正後のスレーブ時刻から今回の定周期信号の受信時の補正前のスレーブ時刻までのマスタ時刻の経過時間(Jn-M(n-1))を用いる。n≧2である。時刻進み補正部31は、スレーブ計時部21に対し、スレーブ時刻の進みΔJnをマスタ時刻の進みΔMnと一致させる補正を行う。このように、スレーブ装置2が定周期信号を受信するごとに、スレーブ時刻が現在のマスタ時刻に補正され、スレーブ時刻の進みがマスタ時刻の進みに合わせて補正される。
 ここで、スレーブ装置2が実行する時刻受信処理のフローについて、図15を用いて説明する。図15に示す時刻受信処理は、スレーブ装置2の電源が投入されたことで開始する。ステップS61~ステップS66は、図9に示すフローチャートのステップS41~ステップS46と同様であるので説明を省略する。スレーブ装置2の時刻進み補正部31は、マスタ装置1における定周期信号の送信時刻と、定周期信号受信部22が定周期信号を受信した時のスレーブ計時部21の時刻とに基づいて、マスタ時刻の進みおよびスレーブ時刻の進みを算出する(ステップS67)。図14の例では、時刻進み補正部31は、マスタ時刻の進みΔMnとスレーブ時刻の進みΔJnとを算出する。マスタ時刻の進みΔMnには、前回の定周期信号の受信時のマスタ時刻から今回の定周期信号の受信時のマスタ時刻までのマスタ時刻の経過時間(Mn-M(n-1))を用いてもよいし、送信周期情報が示す送信周期Pを用いてもよい。スレーブ時刻の進みΔJnには、前回の定周期信号の受信時の補正後のスレーブ時刻から今回の定周期信号の受信時の補正前のスレーブ時刻までのマスタ時刻の経過時間(Jn-M(n-1))を用いる。
 図15に戻り、時刻進み補正部31は、スレーブ計時部21に対し、スレーブ時刻の進みをマスタ時刻の進みと一致させる補正を行う(ステップS68)。スレーブ装置2の電源がOFFになっていなければ(ステップS69;NO)、処理はステップS63に戻り、ステップS63~ステップS69を繰り返す。これにより、スレーブ装置2が定周期信号を受信するごとに、スレーブ時刻が現在のマスタ時刻に補正され、スレーブ時刻の進みがマスタ時刻の進みに合わせて補正される。スレーブ装置2の電源がOFFになると(ステップS69;YES)、処理は終了する。
 以上説明したとおり、実施の形態4に係る、スレーブ装置2の時刻をマスタ装置1の時刻に合わせる時刻同期を行う時刻同期システム100では、マスタ装置1からスレーブ装置2に、専用の信号線3を介して定周期信号を送信し、定周期信号の受信回数と送信周期と送信開始時刻とに基づいて、スレーブ装置2の時刻をマスタ装置1の時刻に補正する。これにより、定周期信号を送信する度にデータバス4を介して送出時点の時刻情報を送信する必要がないので、データバス4の伝搬遅延時間及びジッタに関係なく定周期信号を送信する周期を短くすることができ、より高精度の時刻同期を実現することが可能になる。また、スレーブ時刻の進みをマスタ時刻の進みに一致させる補正を行うので、スレーブ時刻とマスタ時刻との差が小さくなる。
 上述した実施の形態では、実施の形態3および4のスレーブ装置2を実施の形態2のマスタ装置1と組みあわせたが、これに限らない。実施の形態3および4のスレーブ装置2を実施の形態1のマスタ装置1と組みあわせてもよい。
 上述した実施の形態では、実施の形態3および4を別々に記載したが、実施の形態3および4を組みあわせてもよい。この場合、スレーブ装置2は、機能構成として、スレーブ計時部21、定周期信号受信部22、カウント部23、開始時刻受信部24、開始時刻記憶部25、送信周期受信部26、送信周期記憶部27、時刻算出部28、時刻補正部29、補正なし計時部30および時刻進み補正部31を備える。時刻進み補正部31は、送信周期の間の時刻補正タイミングが到来するたびに、スレーブ計時部21に対し、スレーブ時刻の進みをマスタ時刻の進みと一致させる補正を行う。
 上述した実施の形態では、スレーブ装置2の時刻算出部28は、カウント部23から定周期信号の受信回数を通知されるたびに、カウント部23に通知された定周期信号の受信回数と、開始時刻記憶部25が記憶する開始時刻情報と、送信周期記憶部27が記憶する送信周期情報とに基づいて、マスタ装置1における定周期信号の送信時刻を現在のマスタ時刻として算出するが、時刻算出部28がマスタ装置1における定周期信号の送信時刻を現在のマスタ時刻として算出するタイミングは、これに限らない。時刻算出部28は、カウント部23から定周期信号の受信回数を複数回(例えば2回)通知されるごとに、マスタ装置1における定周期信号の送信時刻を現在のマスタ時刻として算出してもよい。つまり、単位時間あたりの定周期信号の受信回数は、時刻同期の回数より多くてもよい。
 続いて、実施の形態1~4に係るマスタ装置1およびスレーブ装置2のハードウェア構成について説明する。図16に示すように、マスタ装置1およびスレーブ装置2はそれぞれ、一時記憶部101、記憶部102、計算部103、タイマ104、操作部105、入出力部106および表示部107を備える。一時記憶部101、記憶部102、タイマ104、操作部105、入出力部106および表示部107はいずれもBUSを介して計算部103に接続されている。
 計算部103は、例えばCPU(Central Processing Unit)である。計算部103は、記憶部102に記憶されている制御プログラムに従って、マスタ装置1の定周期信号送信部12および開始時刻送信部13と、スレーブ装置2のカウント部23、時刻算出部28、時刻補正部29および時刻進み補正部31との各処理を実行する。
 一時記憶部101は、例えばRAM(Random-Access Memory)である。一時記憶部101は、記憶部102に記憶されている制御プログラムをロードし、計算部103の作業領域として用いられる。
 記憶部102は、フラッシュメモリ、ハードディスク、DVD-RAM(Digital Versatile Disc - Random Access Memory)、DVD-RW(Digital Versatile Disc - ReWritable)などの不揮発性メモリである。記憶部102は、マスタ装置1およびスレーブ装置2の処理を計算部103に行わせるためのプログラムを予め記憶し、また、計算部103の指示に従って、このプログラムが記憶するデータを計算部103に供給し、計算部103から供給されたデータを記憶する。マスタ装置1の送信周期記憶部14および開始時刻記憶部16と、スレーブ装置2の開始時刻記憶部25および送信周期記憶部27とは、記憶部102に構成される。
 タイマ104は、水晶振動子、発振回路、時計用IC(Integrated Circuit)などである。タイマ104は、マスタ装置1のマスタ計時部11およびスレーブ装置2のスレーブ計時部21として機能する。
 操作部105は、キーボード、ポインティングデバイスなどの入力装置と、キーボード、ポインティングデバイスなどの入力装置をBUSに接続するインターフェース装置である。例えば、マスタ装置1およびスレーブ装置2に直接情報を入力する構成の場合、操作部105を介して、入力された情報が計算部103に供給される。
 入出力部106は、ネットワークに接続する網終端装置または無線通信装置、およびそれらと接続するシリアルインターフェースまたはLAN(Local Area Network)インターフェースである。入出力部106は、マスタ装置1の定周期信号送信部12、開始時刻送信部13および送信周期送信部15と、スレーブ装置2の定周期信号受信部22、開始時刻受信部24および送信周期受信部26として機能する。
 表示部107は、CRT(Cathode Ray Tube)、LCD(Liquid Crystal Display)などの表示装置である。例えば、マスタ装置1およびスレーブ装置2に直接情報を入力する構成の場合、表示部107は、操作画面を表示する。
 図2に示すマスタ装置1のマスタ計時部11、定周期信号送信部12、開始時刻送信部13、送信周期記憶部14、送信周期送信部15および開始時刻記憶部16と、図3に示すスレーブ装置2のスレーブ計時部21、定周期信号受信部22、カウント部23、開始時刻受信部24、開始時刻記憶部25、送信周期受信部26、送信周期記憶部27、時刻算出部28、時刻補正部29および時刻進み補正部31との処理は、制御プログラムが、一時記憶部101、計算部103、記憶部102、タイマ104、操作部105、入出力部106および表示部107などを資源として用いて処理することによって実行する。
 その他、上述のハードウェア構成およびフローチャートは一例であり、任意に変更および修正が可能である。
 一時記憶部101、記憶部102、計算部103、タイマ104、操作部105、入出力部106、表示部107などのマスタ装置1およびスレーブ装置2の処理を行う中心となる部分は、専用のシステムによらず、通常のコンピュータシステムを用いて実現可能である。例えば、上述の動作を実行するためのコンピュータプログラムを、フレキシブルディスク、CD-ROM(Compact Disc - Read Only Memory)、DVD-ROM(Digital Versatile Disc - Read Only Memory)などのコンピュータが読み取り可能な記録媒体に格納して配布し、当該コンピュータプログラムをコンピュータにインストールすることにより、上述の処理を実行するマスタ装置1およびスレーブ装置2を構成してもよい。また、インターネットなどの通信ネットワーク上のサーバ装置が有する記憶装置に当該コンピュータプログラムを格納しておき、通常のコンピュータシステムがダウンロードなどすることでマスタ装置1およびスレーブ装置2を構成してもよい。
 また、マスタ装置1およびスレーブ装置2の機能を、OS(Operating System)とアプリケーションプログラムの分担、またはOSとアプリケーションプログラムとの協働により実現する場合などには、アプリケーションプログラム部分のみを記録媒体、記憶装置などに格納してもよい。
 また、搬送波にコンピュータプログラムを重畳し、通信ネットワークを介して提供することも可能である。例えば、通信ネットワーク上の掲示板(BBS, Bulletin Board System)に上述のコンピュータプログラムを掲示し、通信ネットワークを介して上述のコンピュータプログラムを提供してもよい。そして、このコンピュータプログラムを起動し、OSの制御下で、他のアプリケーションプログラムと同様に実行することにより、上述の処理を実行できる構成としてもよい。
 本発明は、本発明の広義の精神と範囲を逸脱することなく、様々な実施の形態および変形が可能とされるものである。また、上述した実施の形態は、本発明を説明するためのものであり、本発明の範囲を限定するものではない。本発明の範囲は、実施の形態ではなく、請求の範囲によって示される。そして、請求の範囲内およびそれと同等の発明の意義の範囲内で施される様々な変形が、本発明の範囲内とみなされる。
 1 マスタ装置、2,2A,2B,2C スレーブ装置、3 信号線、4 データバス、11 マスタ計時部、12 定周期信号送信部、13 開始時刻送信部、14 送信周期記憶部、15 送信周期送信部、16 開始時刻記憶部、21 スレーブ計時部、22 定周期信号受信部、23 カウント部、24 開始時刻受信部、25 開始時刻記憶部、26 送信周期受信部、27 送信周期記憶部、28 時刻算出部、29 時刻補正部、30 補正なし計時部、31 時刻進み補正部、100 時刻同期システム、101 一時記憶部、102 記憶部、103 計算部、104 タイマ、105 操作部、106 入出力部、107 表示部。

Claims (12)

  1.  データ用通信線、および、定周期信号を送信する専用の信号線で接続されたマスタ装置とスレーブ装置とを備える時刻同期システムであって、
     前記マスタ装置は、
     時刻を計時するマスタ計時部と、
     一定の送信周期で前記定周期信号を生成し、前記スレーブ装置に前記信号線を介して前記定周期信号を送信する定周期信号送信部と、
     前記定周期信号の送信開始時刻を示す開始時刻情報を前記スレーブ装置に前記データ用通信線を介して送信する開始時刻送信部と、
     前記定周期信号の送信周期を示す送信周期情報を記憶する送信周期記憶部と、
     前記送信周期記憶部が記憶する送信周期情報を前記スレーブ装置に前記データ用通信線を介して送信する送信周期送信部と、を備え、
     前記スレーブ装置は、
     時刻を計時するスレーブ計時部と、
     前記マスタ装置から前記定周期信号を前記信号線を介して受信する定周期信号受信部と、
     前記マスタ装置から前記開始時刻情報を前記データ用通信線を介して受信する開始時刻受信部と、
     前記開始時刻受信部が受信した前記開始時刻情報を記憶する開始時刻記憶部と、
     前記マスタ装置から前記送信周期情報を前記データ用通信線を介して受信する送信周期受信部と、
     前記送信周期受信部が受信した前記送信周期情報を記憶する送信周期記憶部と、
     前記定周期信号受信部が前記定周期信号を受信した回数をカウントするカウント部と、
     前記開始時刻情報が示す送信開始時刻と、前記送信周期情報が示す送信周期と、前記定周期信号の受信回数とに基づいて、前記マスタ装置における前記定周期信号の送信時刻を前記マスタ装置の現在時刻として算出する時刻算出部と、
     前記スレーブ計時部の時刻を前記時刻算出部が算出した前記マスタ装置の現在時刻に補正する時刻補正部と、
     を備える時刻同期システム。
  2.  前記時刻算出部は、前記カウント部が前記定周期信号の受信回数をカウントするたびに、前記開始時刻情報が示す送信開始時刻と、前記送信周期情報が示す送信周期と、前記定周期信号の受信回数とに基づいて、前記マスタ装置における前記定周期信号の送信時刻を前記マスタ装置の現在時刻として算出する、
     請求項1に記載の時刻同期システム。
  3.  前記マスタ装置は、
     あらかじめ決められた前記定周期信号の送信開始時刻を示す前記開始時刻情報を記憶する時刻記憶部をさらに備え、
     前記開始時刻送信部は、前記時刻記憶部が記憶する前記開始時刻情報を前記データ用通信線を介して前記スレーブ装置に送信し、
     前記定周期信号送信部は、前記マスタ計時部の時刻が前記開始時刻情報が示す送信開始時刻になったら前記定周期信号の送信を開始する、
     請求項1または2に記載の時刻同期システム。
  4.  前記スレーブ装置は、
     前記時刻補正部が補正しなかった場合の前記スレーブ計時部の時刻と同じ時刻を計時する補正なし計時部を更に備え、
     前記時刻算出部は、前記開始時刻情報が示す送信開始時刻と、前記送信周期情報が示す送信周期と、前記定周期信号の受信回数とに基づいて、前記マスタ装置における前記定周期信号の送信時刻を算出し、前記送信周期の間の時刻補正タイミングで、前記マスタ装置における前記定周期信号の送信時刻と、前記定周期信号受信部が前記定周期信号を受信した時の前記補正なし計時部の時刻と、前記補正なし計時部の現在時刻とに基づいて、前記マスタ装置の現在時刻を算出する、
     請求項1から3のいずれか1項に記載の時刻同期システム。
  5.  前記マスタ装置における前記定周期信号の送信時刻と、前記定周期信号受信部が前記定周期信号を受信した時の前記スレーブ計時部の時刻とに基づいて、前記スレーブ計時部の時刻の進みおよび前記マスタ計時部の時刻の進みを算出し、前記スレーブ計時部の時刻の進みを前記マスタ計時部の時刻の進みと一致させる補正を行う時刻進み補正部をさらに備える、
     請求項1から4のいずれか1項に記載の時刻同期システム。
  6.  前記時刻算出部は、前記開始時刻情報が示す送信開始時刻に、前記送信周期情報が示す送信周期に前記定周期信号の受信回数から1を減算した値を乗算した時間を加えて、前記マスタ装置における前記定周期信号の送信時刻を算出する、
     請求項1から5のいずれか1項に記載の時刻同期システム。
  7.  データ用通信線、および、定周期信号を送信する専用の信号線でスレーブ装置と接続されるマスタ装置であって、
     時刻を計時するマスタ計時部と、
     一定の送信周期で前記定周期信号を生成し、前記スレーブ装置に前記信号線を介して前記定周期信号を送信する定周期信号送信部と、
     前記定周期信号の送信開始時刻を示す開始時刻情報を前記スレーブ装置に前記データ用通信線を介して送信する開始時刻送信部と、
     前記定周期信号の送信周期を示す送信周期情報を記憶する送信周期記憶部と、
     前記送信周期記憶部が記憶する送信周期情報を前記スレーブ装置に前記データ用通信線を介して送信する送信周期送信部と、
     を備えるマスタ装置。
  8.  データ用通信線、および、定周期信号を送信する専用の信号線でマスタ装置と接続されるスレーブ装置であって、
     時刻を計時するスレーブ計時部と、
     前記マスタ装置から一定の送信周期で送信される前記定周期信号を前記信号線を介して受信する定周期信号受信部と、
     前記マスタ装置から前記定周期信号の送信開始時刻を示す開始時刻情報を前記データ用通信線を介して受信する開始時刻受信部と、
     前記開始時刻受信部が受信した前記開始時刻情報を記憶する開始時刻記憶部と、
     前記マスタ装置から前記定周期信号の送信周期を示す送信周期情報を前記データ用通信線を介して受信する送信周期受信部と、
     前記送信周期受信部が受信した前記送信周期情報を記憶する送信周期記憶部と、
     前記定周期信号受信部が前記定周期信号を受信した回数をカウントするカウント部と、
     前記開始時刻情報が示す送信開始時刻と、前記送信周期情報が示す送信周期と、前記定周期信号の受信回数とに基づいて、前記マスタ装置における前記定周期信号の送信時刻を前記マスタ装置の現在時刻として算出する時刻算出部と、
     前記スレーブ計時部の時刻を前記時刻算出部が算出した前記マスタ装置の現在時刻に補正する時刻補正部と、
     を備えるスレーブ装置。
  9.  前記時刻算出部は、前記開始時刻情報が示す送信開始時刻に、前記送信周期情報が示す送信周期に前記定周期信号の受信回数から1を減算した値を乗算した時間を加えた前記マスタ装置における前記定周期信号の送信時刻を、前記マスタ装置の現在時刻として算出する、
     請求項8に記載のスレーブ装置。
  10.  データ用通信線、および、定周期信号を送信する専用の信号線でスレーブ装置と接続されるコンピュータを、
     時刻を計時するマスタ計時部、
     一定の送信周期で前記定周期信号を生成し、前記スレーブ装置に前記信号線を介して前記定周期信号を送信する定周期信号送信部、
     前記定周期信号の送信開始時刻を示す開始時刻情報を前記スレーブ装置に前記データ用通信線を介して送信する開始時刻送信部、および、
     前記定周期信号の送信周期を示す送信周期情報を前記スレーブ装置に前記データ用通信線を介して送信する送信周期送信部、
     として機能させるプログラム。
  11.  データ用通信線、および、定周期信号を送信する専用の信号線でマスタ装置と接続されるコンピュータを、
     時刻を計時するスレーブ計時部、
     前記マスタ装置から一定の送信周期で送信される前記定周期信号を前記信号線を介して受信する定周期信号受信部、
     前記マスタ装置から前記定周期信号の送信開始時刻を示す開始時刻情報を前記データ用通信線を介して受信する開始時刻受信部、
     前記マスタ装置から前記定周期信号の送信周期を示す送信周期情報を前記データ用通信線を介して受信する送信周期受信部、
     前記定周期信号受信部が前記定周期信号を受信した回数をカウントするカウント部、
     前記開始時刻情報が示す送信開始時刻と、前記送信周期情報が示す送信周期と、前記定周期信号の受信回数とに基づいて、前記マスタ装置における前記定周期信号の送信時刻を前記マスタ装置の現在時刻として算出する時刻算出部、および、
     前記スレーブ計時部の時刻を前記時刻算出部が算出した前記マスタ装置の現在時刻に補正する時刻補正部、
     として機能させるプログラム。
  12.  前記時刻算出部は、前記開始時刻情報が示す送信開始時刻に、前記送信周期情報が示す送信周期に前記定周期信号の受信回数から1を減算した値を乗算した時間を加えた前記マスタ装置における前記定周期信号の送信時刻を、前記マスタ装置の現在時刻として算出する、
     請求項11に記載のプログラム。
PCT/JP2019/017084 2019-04-22 2019-04-22 時刻同期システム、マスタ装置、スレーブ装置およびプログラム WO2020217286A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
PCT/JP2019/017084 WO2020217286A1 (ja) 2019-04-22 2019-04-22 時刻同期システム、マスタ装置、スレーブ装置およびプログラム
JP2019552645A JP6707209B1 (ja) 2019-04-22 2019-04-22 時刻同期システム、マスタ装置、スレーブ装置およびプログラム
US17/429,352 US11277253B2 (en) 2019-04-22 2019-04-22 Time synchronization system, master device, slave device, and program
CN201980095470.1A CN113711158A (zh) 2019-04-22 2019-04-22 时刻同步系统、主控装置、从属装置及程序
DE112019007074.6T DE112019007074T5 (de) 2019-04-22 2019-04-22 Zeitsynchronisationssystem, Master-Gerät, Slave-Gerät und Programm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2019/017084 WO2020217286A1 (ja) 2019-04-22 2019-04-22 時刻同期システム、マスタ装置、スレーブ装置およびプログラム

Publications (1)

Publication Number Publication Date
WO2020217286A1 true WO2020217286A1 (ja) 2020-10-29

Family

ID=70976329

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/017084 WO2020217286A1 (ja) 2019-04-22 2019-04-22 時刻同期システム、マスタ装置、スレーブ装置およびプログラム

Country Status (5)

Country Link
US (1) US11277253B2 (ja)
JP (1) JP6707209B1 (ja)
CN (1) CN113711158A (ja)
DE (1) DE112019007074T5 (ja)
WO (1) WO2020217286A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022215359A1 (ja) * 2021-04-09 2022-10-13 パナソニックIpマネジメント株式会社 通信システム、マスタ装置、スレーブ装置、および通信システムの制御方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR3119287B1 (fr) * 2021-01-26 2023-12-22 St Microelectronics Grenoble 2 Procédé de synchronisation de domaines temporels d’un système sur puce.
CN114791896A (zh) 2021-01-26 2022-07-26 意法半导体(格勒诺布尔2)公司 片上系统中的时域同步

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04294413A (ja) * 1991-03-25 1992-10-19 Fuji Facom Corp ネットワークシステムの時刻合わせ装置
JPH05134062A (ja) * 1991-11-11 1993-05-28 Toshiba Corp プロセス監視装置の時刻同期方式
JPH11203250A (ja) * 1998-01-12 1999-07-30 Nec Eng Ltd 時計情報補正システム

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5717704A (en) * 1996-04-16 1998-02-10 Ltx Corporation Test system including a local trigger signal generator for each of a plurality of test instruments
DE602008003129D1 (de) * 2007-06-14 2010-12-02 Koninkl Philips Electronics Nv Netzwerkvorrichtung zur verwendung in einem netzwerk
JP5141972B2 (ja) 2007-12-07 2013-02-13 オムロン株式会社 産業用コントローラ
JP5206184B2 (ja) * 2008-07-11 2013-06-12 株式会社デンソー 無線通信システム及び通信装置
US20170041688A1 (en) * 2013-11-12 2017-02-09 Qualcomm Incorporated Apparatus and methods for timestamping in a system synchronizing controller and sensors
US9553713B2 (en) * 2014-04-30 2017-01-24 Harman International Industries, Inc. Method and system for transmitting clock reference streams with timestamps directly to audio/video end nodes in an audio/video bridging network
US9854548B2 (en) * 2014-10-17 2017-12-26 Qulsar, Inc. Method for constructing a distributed boundary clock over a dedicated communication channel
CN107111280B (zh) * 2015-06-24 2019-05-07 三菱电机株式会社 通信装置、时刻校正方法以及网络系统
JP6449518B2 (ja) * 2015-07-20 2019-01-09 ラティス セミコンダクタ コーポレーションLattice Semiconductor Corporation 低速バスタイムスタンプの方法及び回路
US10353424B2 (en) * 2016-07-01 2019-07-16 Imagination Technologies Limited Clock synchronisation
JP6683137B2 (ja) 2017-01-11 2020-04-15 三菱電機株式会社 産業用コントローラシステム

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04294413A (ja) * 1991-03-25 1992-10-19 Fuji Facom Corp ネットワークシステムの時刻合わせ装置
JPH05134062A (ja) * 1991-11-11 1993-05-28 Toshiba Corp プロセス監視装置の時刻同期方式
JPH11203250A (ja) * 1998-01-12 1999-07-30 Nec Eng Ltd 時計情報補正システム

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022215359A1 (ja) * 2021-04-09 2022-10-13 パナソニックIpマネジメント株式会社 通信システム、マスタ装置、スレーブ装置、および通信システムの制御方法

Also Published As

Publication number Publication date
JPWO2020217286A1 (ja) 2021-05-06
CN113711158A (zh) 2021-11-26
JP6707209B1 (ja) 2020-06-10
US20220045836A1 (en) 2022-02-10
US11277253B2 (en) 2022-03-15
DE112019007074T5 (de) 2022-01-27

Similar Documents

Publication Publication Date Title
WO2020217286A1 (ja) 時刻同期システム、マスタ装置、スレーブ装置およびプログラム
US11177896B2 (en) Time synchronization device and time synchronization method
US7596153B2 (en) Clock-state correction and/or clock-rate correction using relative drift-rate measurements
TWI415497B (zh) 時間同步裝置、系統及其方法
US7072432B2 (en) System and method for correcting the clock drift and maintaining the synchronization of low quality clocks in wireless networks
US11606155B2 (en) Method for exchanging time synchronization packet and network apparatus
US20140362960A1 (en) Receiver, method of calculating time difference, and program
JP2016123009A (ja) 半導体装置、電子デバイス・モジュール、及びネットワークシステム
TW200821588A (en) Efficient clock calibration in electronic equipment
US20200127808A1 (en) Image transmission system, imaging terminal, display terminal, adjustment method, adjustment assistance method, and non-transitory computer-readable recording medium storing program
US10771229B2 (en) Synchronizing method and system
JP2013029319A (ja) スレーブ装置、電子機器システム、マスタ装置、時刻同期方法およびプログラム
US20170117980A1 (en) Time synchronization for network device
US20220200779A1 (en) Communication apparatus, method of controlling communication apparatus, and storage medium
JP2012023705A (ja) タイミング調整装置、タイミング情報生成装置、および時刻同期システム
JP4699250B2 (ja) 無線装置
US20090243731A1 (en) Apparatus With Clock Generation Function, Method For Setting Reference Frequency, And Method For Adjusting Reference Frequency
US20210397211A1 (en) Delay time detection circuit, stamping information generation device, and delay time detection method
US10554319B2 (en) Wireless communications with time synchronization processing
JP4230808B2 (ja) 時刻同期方法および通信システム
JP2013168884A (ja) 時刻同期システム、時刻送信装置、時刻受信装置、時刻同期方法およびプログラム
CN112602031B (zh) 系统间的精确定时
JP7387546B2 (ja) 無線装置およびインバータシステム
JP3562145B2 (ja) 送受信タイミング変更回路
JP2012050059A (ja) 発振周波数補正方法及び発振周波数補正装置

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2019552645

Country of ref document: JP

Kind code of ref document: A

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

Ref document number: 19925593

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 19925593

Country of ref document: EP

Kind code of ref document: A1