Time synchronization system, master control device, slave device, and program

文档序号:1895023 发布日期:2021-11-26 浏览:10次 中文

阅读说明:本技术 时刻同步系统、主控装置、从属装置及程序 (Time synchronization system, master control device, slave device, and program ) 是由 日置荣太郎 内山直哉 于 2019-04-22 设计创作,主要内容包括:时刻同步系统(100)具有通过数据总线(4)及发送固定周期信号的专用信号线(3)而连接的主控装置(1)和从属装置(2A、2B、2C)。主控装置(1)经由信号线(3)以固定发送周期发送固定周期信号。主控装置(1)经由数据总线(4)对表示固定周期信号的发送开始时刻的开始时刻信息、表示固定周期信号的发送周期的发送周期信息进行发送。从属装置(2A、2B、2C)对固定周期信号的接收次数进行计数,基于固定周期信号的接收次数、开始时刻信息所示的发送开始时刻、发送周期信息所示的发送周期,计算主控装置(1)中的固定周期信号的发送时刻作为主控装置(1)的当前时刻。从属装置(2A、2B、2C)将自身的时刻校正为计算出的主控装置(1)的当前时刻。(A time synchronization system (100) is provided with a master device (1) and slave devices (2A, 2B, 2C) connected by a data bus (4) and a dedicated signal line (3) for transmitting a fixed-cycle signal. The master control device (1) transmits a fixed cycle signal at a fixed transmission cycle via a signal line (3). The master device (1) transmits start time information indicating the start time of transmission of a fixed cycle signal and transmission cycle information indicating the transmission cycle of the fixed cycle signal via a data bus (4). The slave devices (2A, 2B, 2C) count the number of times of reception of the fixed cycle signal, and calculate the transmission time of the fixed cycle signal in the master device (1) as the current time of the master device (1) based on the number of times of reception of the fixed cycle signal, the transmission start time indicated by the start time information, and the transmission cycle indicated by the transmission cycle information. The slave devices (2A, 2B, 2C) correct their own time to the calculated current time of the master device (1).)

1. A time synchronization system comprising a master device and a slave device connected to each other via a data communication line and a dedicated signal line for transmitting a fixed-cycle signal,

in the time-of-day synchronization system,

the master control device has:

a master control timing unit for timing a time;

a fixed-cycle signal transmitting unit that generates the fixed-cycle signal at a fixed transmission cycle and transmits the fixed-cycle signal to the slave device via the signal line;

a start time transmitting unit that transmits start time information indicating a transmission start time of the fixed cycle signal to the slave device via the data communication line;

a transmission cycle storage unit that stores transmission cycle information indicating a transmission cycle of the fixed cycle signal; and

a transmission cycle transmission unit that transmits the transmission cycle information stored in the transmission cycle storage unit to the slave device via the data communication line,

the slave device has:

a slave timing unit for timing a time;

a fixed cycle signal receiving unit that receives the fixed cycle signal from the master control device via the signal line;

a start time receiving unit that receives the start time information from the master device via the data communication line;

a start time storage unit that stores the start time information received by the start time receiving unit;

a transmission cycle receiving unit that receives the transmission cycle information from the master device via the data communication line;

a transmission cycle storage unit that stores the transmission cycle information received by the transmission cycle reception unit;

a counting unit that counts the number of times the fixed period signal is received by the fixed period signal receiving unit;

a time calculation unit that calculates a transmission time of the fixed cycle signal in the master control apparatus as a current time of the master control apparatus based on a transmission start time indicated by the start time information, a transmission cycle indicated by the transmission cycle information, and the number of times of reception of the fixed cycle signal; and

and a time correction unit that corrects the time of the slave timer unit to the current time of the master device calculated by the time calculation unit.

2. The time of day synchronization system of claim 1,

the time calculation unit calculates the transmission time of the fixed cycle signal in the master control device as the current time of the master control device 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 of reception of the fixed cycle signal each time the count unit counts the number of times of reception of the fixed cycle signal.

3. The time of day synchronization system of claim 1 or 2,

the master control device further includes a time storage unit that stores the start time information indicating a predetermined transmission start time of the fixed cycle signal,

the start time transmitting unit transmits the start time information stored in the time storage unit to the slave device via the data communication line,

the fixed cycle signal transmission unit starts transmission of the fixed cycle signal if the time of the master timing unit becomes the transmission start time indicated by the start time information.

4. The time of day synchronization system of any one of claims 1-3,

the slave device further includes an uncorrected timer unit that counts the same time as the slave timer unit when the time correction unit has not corrected the time,

the time calculation unit calculates the transmission time of the fixed cycle signal in the master control device 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 of receiving the fixed cycle signal, and calculates the current time of the master control device based on the transmission time of the fixed cycle signal in the master control device, the time of the uncorrected timer unit when the fixed cycle signal is received by the fixed cycle signal reception unit, and the current time of the uncorrected timer unit at the time of correcting the time during the transmission cycle.

5. The time of day synchronization system of any one of claims 1-4,

the master control device may further include a time advance amount correction unit that calculates an advance amount at the time of the slave timing unit and an advance amount at the time of the master timing unit based on the transmission time of the fixed cycle signal in the master control device and the time of the slave timing unit when the fixed cycle signal is received by the fixed cycle signal reception unit, and corrects the advance amount at the time of the slave timing unit to match the advance amount at the time of the master timing unit.

6. The time of day synchronization system of any one of claims 1-5,

the time calculation unit calculates the transmission time of the fixed cycle signal in the master device by adding, to the transmission start time indicated by the start time information, a time obtained by multiplying the transmission cycle indicated by the transmission cycle information by a value obtained by subtracting 1 from the number of times of reception of the fixed cycle signal.

7. A master device connected to a slave device via a data communication line and a dedicated signal line for transmitting a fixed cycle signal,

the main control device has:

a master control timing unit for timing a time;

a fixed-cycle signal transmitting unit that generates the fixed-cycle signal at a fixed transmission cycle and transmits the fixed-cycle signal to the slave device via the signal line;

a start time transmitting unit that transmits start time information indicating a transmission start time of the fixed cycle signal to the slave device via the data communication line;

a transmission cycle storage unit that stores transmission cycle information indicating a transmission cycle of the fixed cycle signal; and

and a transmission cycle transmission unit that transmits the transmission cycle information stored in the transmission cycle storage unit to the slave device via the data communication line.

8. A slave device connected to a master device via a data communication line and a dedicated signal line for transmitting a fixed-cycle signal,

the slave device includes:

a slave timing unit for timing a time;

a fixed cycle signal receiving unit that receives the fixed cycle signal transmitted from the master control device at a fixed transmission cycle via the signal line;

a start time receiving unit that receives start time information indicating a transmission start time of the fixed cycle signal from the master device via the data communication line;

a start time storage unit that stores the start time information received by the start time receiving unit;

a transmission cycle receiving unit that receives, from the master control apparatus, transmission cycle information indicating a transmission cycle of the fixed cycle signal via the data communication line;

a transmission cycle storage unit that stores the transmission cycle information received by the transmission cycle reception unit;

a counting unit that counts the number of times the fixed period signal is received by the fixed period signal receiving unit;

a time calculation unit that calculates a transmission time of the fixed cycle signal in the master control apparatus as a current time of the master control apparatus based on a transmission start time indicated by the start time information, a transmission cycle indicated by the transmission cycle information, and the number of times of reception of the fixed cycle signal; and

and a time correction unit that corrects the time of the slave timer unit to the current time of the master device calculated by the time calculation unit.

9. The slave device of claim 8,

the time calculation unit calculates, as the current time of the master device, a transmission time of the fixed cycle signal in the master device obtained by adding, to a transmission start time indicated by the start time information, a time obtained by multiplying a transmission cycle indicated by the transmission cycle information by a value obtained by subtracting 1 from the number of times of reception of the fixed cycle signal.

10. A program for causing a computer connected to a slave device via a data communication line and a dedicated signal line for transmitting a fixed-cycle signal to function as:

a master control timing unit for timing a time;

a fixed-cycle signal transmitting unit that generates the fixed-cycle signal at a fixed transmission cycle and transmits the fixed-cycle signal to the slave device via the signal line;

a start time transmitting unit that transmits start time information indicating a transmission start time of the fixed cycle signal to the slave device via the data communication line; and

and a transmission cycle transmission unit that transmits transmission cycle information indicating a transmission cycle of the fixed cycle signal to the slave device via the data communication line.

11. A program for causing a computer connected to a main control device via a data communication line and a dedicated signal line for transmitting a fixed-cycle signal to function as:

a slave timing unit for timing a time;

a fixed cycle signal receiving unit that receives the fixed cycle signal transmitted from the master control device at a fixed transmission cycle via the signal line;

a start time receiving unit that receives start time information indicating a transmission start time of the fixed cycle signal from the master device via the data communication line;

a transmission cycle receiving unit that receives, from the master control apparatus, transmission cycle information indicating a transmission cycle of the fixed cycle signal via the data communication line;

a counting unit that counts the number of times the fixed period signal is received by the fixed period signal receiving unit;

a time calculation unit that calculates a transmission time of the fixed cycle signal in the master control apparatus as a current time of the master control apparatus based on a transmission start time indicated by the start time information, a transmission cycle indicated by the transmission cycle information, and the number of times of reception of the fixed cycle signal; and

and a time correction unit that corrects the time of the slave timer unit to the current time of the master device calculated by the time calculation unit.

12. The program according to claim 11, wherein,

the time calculation unit calculates, as the current time of the master device, a transmission time of the fixed cycle signal in the master device obtained by adding, to a transmission start time indicated by the start time information, a time obtained by multiplying a transmission cycle indicated by the transmission cycle information by a value obtained by subtracting 1 from the number of times of reception of the fixed cycle signal.

Technical Field

The invention relates to a time synchronization system, a master device, a slave device, and a program.

Background

For example, there is a technique of synchronizing the time of each device when a plurality of devices having a built-in clock, such as a plc (programmable Logic controller), cooperate with each other. In such a technique, a method of time synchronization is generally a method of determining a master device that manages a reference time from among a plurality of devices, and the master device matches the time of a slave device with the time of the master device based on time information transmitted to a slave device other than the master device.

Patent document 1 discloses a technique in which a dedicated signal line is newly provided between a station with a mother clock and a station with a child clock, the station with the mother clock transmits a time period pulse signal on the dedicated signal line at a predetermined cycle, time information of the transmission time point of the time period pulse signal is transmitted on a network, and the station with the child clock performs time synchronization using the time period pulse signal and the time information.

Patent document 1: japanese laid-open patent publication No. 4-294413

Disclosure of Invention

In the technique described in patent document 1, each time a station with a master clock transmits a time period pulse signal via a dedicated signal line, time information of the transmission time point of the time period pulse signal is transmitted via a data communication line of a network, and therefore, the arrival of the time information at the station with a slave clock is delayed from the arrival of the time period pulse signal due to the influence of the transmission delay time and jitter of the data communication line. If the maximum delay time due to the influence of propagation delay time and jitter with respect to the time information transmitted on the data communication line is longer than the transmission period of the time-period pulse signal, the next time-period pulse signal may arrive before the arrival of the time information corresponding to the previous time-period pulse signal, and therefore the transmission period of the time-period pulse signal cannot be made 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 transmission delay time and jitter of the data communication line.

The present invention has been made in view of the above circumstances, and an object thereof is to achieve more accurate time synchronization in which the time of a slave device is made to coincide with the time of a master device.

In order to achieve the above object, a time synchronization system according to 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 cycle signal. The master control device includes a master timing unit, a fixed cycle signal transmission unit, a start time transmission unit, a transmission cycle storage unit, and a transmission cycle transmission unit. The main control timing part times the time. The fixed-period signal transmitting unit generates a fixed-period signal at a fixed transmission period, and transmits the fixed-period signal to the slave device via the signal line. The start time transmitter transmits start time information indicating a 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 a transmission cycle of the fixed cycle signal. The transmission cycle transmitting 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 timer unit, a fixed-cycle signal receiving unit, a start time storage unit, a transmission cycle receiving unit, a transmission cycle storage unit, a counting unit, a time calculating unit, and a time correcting unit. The slave timing unit times the time. The fixed period signal receiving unit receives a fixed period signal from the master control device via a signal line. The start time receiving unit receives 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 the fixed period signal is received by the fixed period signal receiving unit. The time calculation unit calculates the transmission time of the fixed cycle signal in the master device as the current time of the master device 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 of reception of the fixed cycle signal. The time adjustment unit adjusts the time of the slave timer unit to the current time of the master device calculated by the time calculation unit.

ADVANTAGEOUS EFFECTS OF INVENTION

According to the present invention, in time synchronization in which the time of the slave device coincides with the time of the master device, the master device transmits the fixed cycle signal to the slave device via the dedicated signal line, and the time of the slave device is corrected to the time of the master device based on the number of times of reception, the transmission cycle, and the transmission start time of the fixed cycle signal, so that it is not necessary to transmit time information at the transmission time point via the data communication line every time the fixed cycle signal is transmitted.

Drawings

Fig. 1 is a block diagram showing a configuration of a time synchronization system according to embodiment 1 of the present invention.

Fig. 2 is a block diagram showing a functional configuration of the master control apparatus according to embodiment 1.

Fig. 3 is a block diagram showing a functional configuration of a slave device according to embodiment 1.

Fig. 4 is a diagram for explaining the time adjustment according to embodiment 1.

Fig. 5 is a flowchart showing the time transmission processing according to embodiment 1.

Fig. 6 is a flowchart showing the time reception process according to embodiment 1.

Fig. 7 is a block diagram showing a functional configuration of a master control apparatus according to embodiment 2 of the present invention.

Fig. 8 is a flowchart showing the time transmission processing according to embodiment 2.

Fig. 9 is a flowchart showing the time reception processing according to embodiment 2.

Fig. 10 is a block diagram showing a functional configuration of a slave device according to embodiment 3 of the present invention.

Fig. 11 is a diagram for explaining the time adjustment according to embodiment 3.

Fig. 12 is a flowchart showing the time reception processing according to embodiment 3.

Fig. 13 is a block diagram showing a functional configuration of a slave device according to embodiment 4 of the present invention.

Fig. 14 is a diagram for explaining the time adjustment according to embodiment 4.

Fig. 15 is a flowchart showing the time reception processing according to embodiment 4.

Fig. 16 is a diagram showing an example of the hardware configuration of the master device and the slave device according to embodiments 1 to 4.

Detailed Description

Next, a time synchronization system, a master device, a slave device, and a program according to embodiments of the present invention will be described in detail with reference to the drawings. In the drawings, the same or corresponding portions are denoted by the same reference numerals.

(embodiment mode 1)

As shown in fig. 1, a time synchronization system 100 according to embodiment 1 includes a master device 1 and slave devices 2A to 2C connected via a signal line 3 and a data bus 4. The time synchronization system 100 synchronizes the times of the slave devices 2A to 2C with the time of the master device 1. When the slave devices 2A to 2C are collectively referred to, they are referred to as a slave device 2.

The master control apparatus 1 transmits a fixed cycle signal at a fixed transmission cycle via the signal line 3. The signal line 3 is a dedicated communication line for transmitting a fixed-cycle signal. The master device 1 transmits start time information indicating a transmission start time of a fixed cycle signal and transmission cycle information indicating a transmission cycle of the fixed cycle signal via the data bus 4. The data bus 4 is a data communication line for transmitting and receiving data to and from the master device 1 and the slave device 2, and may be used for transmitting and receiving information other than the start time information and the transmission cycle information. The data bus 4 is an example of a data communication line. The slave device 2 counts the number of times of reception of the fixed cycle signal, and calculates the current time of the master device 1 based on the number of times of reception of the fixed cycle signal, the transmission start time indicated by the start time information, and the transmission cycle indicated by the transmission cycle information. The slave device 2 corrects its own time to the calculated current time of the master device 1.

In the example of fig. 1, 3 slave devices 2 are described, but the slave device 2 may be any slave device. The network connecting the master 1 and the slaves 2A to 2C is not limited to a bus type, and may be a star type, for example.

Next, the function of the master control apparatus 1 will be described with reference to fig. 2. As shown in fig. 2, the master control apparatus 1 has, as functional configurations: a main control timing unit 11 that counts time; a fixed cycle signal transmitting unit 12 that transmits a fixed cycle signal; a start time transmitting unit 13 that transmits start time information indicating a transmission start time of the fixed cycle signal; a transmission cycle storage unit 14 that stores transmission cycle information indicating a transmission cycle of a fixed cycle signal; and a transmission cycle transmitting unit 15 that transmits transmission cycle information. Hereinafter, the time of the master device 1, that is, the time of the master timer unit 11 is referred to as the master time.

The fixed cycle signal transmission unit 12 generates a fixed cycle signal at a transmission cycle indicated by the transmission cycle information stored in the transmission cycle storage unit 14 based on the master time, and transmits the fixed cycle signal to the slave devices 2A to 2C via the signal line 3. The fixed period signal is, for example, a 1-bit pulse signal. Since the transmission delay time and jitter of the fixed cycle signal transmitted via the dedicated signal line 3 are sufficiently small compared to the case of transmission via the data bus 4, the transmission timing of the fixed cycle signal in the master device 1 and the reception timing of the fixed cycle signal in the slave device 2 can be regarded as the same timing.

The start time transmitter 13 performs a time stamp process of acquiring a master time at which the fixed-cycle signal transmitter 12 starts transmission of the fixed-cycle signal. The start time transmitter 13 generates start time information indicating a transmission start time that is a master time at which transmission of the fixed cycle signal is started. The start time transmitting unit 13 transmits start time information to the slave devices 2A to 2C via the data bus 4.

The transmission cycle transmitting 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 (timing) at which the transmission cycle transmitting unit 15 transmits the transmission cycle information may be before the start time transmitting unit 13 transmits the start time information.

Next, the function of the slave device 2 will be described with reference to fig. 3. As is typical in fig. 3, the slave device 2A is shown in functional configuration, but the slave devices 2B and 2C are also similar in functional configuration. As shown in fig. 3, the slave device 2A has, as a functional configuration: a slave timing unit 21 for timing; a fixed-period signal receiving unit 22 that receives a fixed-period signal; a counting unit 23 that counts the number of times of reception of the fixed cycle signal; a start time receiving unit 24 that receives start time information; a start time storage unit 25 that stores start time information; a transmission cycle receiving unit 26 that receives transmission cycle information; a transmission cycle storage unit 27 that stores transmission cycle information; a time calculation unit 28 that calculates the current master time; and a time correction unit 29 that corrects the time of the slave timer unit 21.

The fixed cycle signal receiving unit 22 receives a fixed cycle signal from the master control apparatus 1 via the signal line 3. The counting unit 23 counts the number of times the fixed cycle signal receiving unit 22 receives the fixed cycle signal, and notifies the time calculating unit 28 of the number of times of reception. The start time receiver 24 receives start time information from the master control apparatus 1 via the data bus 4. The start time storage unit 25 stores the start time information received by the start time receiving 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.

Each time the count unit 23 notifies the number of times of reception of the fixed cycle signal, the time calculation unit 28 calculates the transmission time of the fixed cycle signal in the master device 1 as the current master time based on the number of times of reception of the fixed cycle signal notified by the count unit 23, the start time information stored by the start time storage unit 25, and the transmission cycle information stored by the transmission cycle storage unit 27. Specifically, the time calculation unit 28 calculates the transmission time of the fixed cycle signal in the master device 1 by adding the time obtained by multiplying the transmission cycle indicated by the transmission cycle information by the value obtained by subtracting 1 from the number of times of reception of the fixed cycle signal to the transmission start time indicated by the start time information. As described above, since the transmission timing of the fixed cycle signal in the master device 1 and the reception timing of the fixed cycle signal in the slave device 2 can be regarded as the same timing, the timing calculation unit 28 calculates the transmission timing of the fixed cycle signal in the master device 1 as the current master timing. The time correction unit 29 corrects the time of the slave timer unit 21 to the current master time calculated by the time calculation unit 28. Hereinafter, the time of the slave device 2, that is, the time of the slave timer unit 21 is referred to as slave time.

Here, the time correction performed by the slave device 2 will be described with reference to fig. 4. As shown in fig. 4, the fixed period signal receiving section 22 of the slave device 2 receives the fixed period signal at fixed time intervals. For the master control time, the time interval for receiving the fixed periodic signal is the transmission period P. The counting unit 23 counts the number of times of reception of the fixed cycle signal and notifies the time calculation unit 28 of the count. The start time receiver 24 receives start time information indicating master time M1 as the transmission start time, and stores the start time information in the start time storage 25. In the example of fig. 4, the start time receiving unit 24 receives the start time information between the reception timing of the 1 st fixed period signal and the reception timing of the 2 nd fixed period 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.

When the count unit 23 notifies the 2 nd reception of the fixed cycle signal that the number of times of reception of the fixed cycle signal is "2", the time calculation unit 28 calculates, as the master time M2, a time obtained by adding, to the master time M1 indicated by the start time information, a time obtained by multiplying the transmission cycle P indicated by the transmission cycle information by 1 obtained by subtracting 1 from the number of times of reception of the fixed cycle signal 2. When the count unit 23 notifies the 3 rd reception of the fixed cycle signal of the reception count "3" of the fixed cycle signal, the time calculation unit 28 calculates, as the master time M3, a time obtained by adding, to the master time M1 indicated by the start time information, a time obtained by multiplying the transmission cycle P indicated by the transmission cycle information by 2 obtained by subtracting 1 from the reception count 3 of the fixed cycle signal. In this way, each time the count unit 23 notifies the number of times of reception of the fixed cycle signal, the time calculation unit 28 calculates the current master time Mn by the following expression (1) using the master time M1 and the transmission cycle P. n is more than or equal to 2.

Mn=M1+P×(n-1) (1)

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. In this way, the slave time is corrected to the current master time each time a fixed periodic signal is received by the slave device 2. In the example of fig. 4, the start time information is received between the reception timing of the 1 st fixed cycle signal and the reception timing of the 2 nd fixed cycle signal, and the time calculation unit 28 calculates the master time Mn after the master time M2, but the present invention is not limited to this. The time calculation unit 28 may calculate the master time Mn after the start time information is received by the start time reception unit 24 and stored in the start time storage unit 25 and after the fixed cycle signal is received by the fixed cycle signal reception unit 22.

Here, a flow of the time transmission process executed by the master control apparatus 1 will be described with reference to fig. 5. The time transmission process shown in fig. 5 is started by turning on the power of the master control apparatus 1. The transmission cycle transmitting 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). In the example of fig. 4, the transmission cycle transmitting unit 15 transmits transmission cycle information indicating the transmission cycle P to the slave device 2.

Returning to fig. 5, the fixed cycle signal transmitting unit 12 generates a fixed cycle signal and transmits the fixed cycle signal to the slave device 2 via the signal line 3 (step S12). When the transmitted fixed cycle signal is the initial fixed cycle signal (YES in step S13), the start time transmitter 13 generates start time information indicating the transmission start time at which the fixed cycle signal transmitter 12 starts transmission of the fixed cycle signal based on the master time, and transmits the start time information to the slave device 2 via the data bus 4 (step S14). In the example of fig. 4, the start time transmitter 13 transmits start time information indicating the master time M1 to the slave device 2.

Returning to fig. 5, if the transmitted fixed period signal is not the initial fixed period signal (step S13; NO), the process proceeds to step S15. The fixed cycle signal transmitter 12 determines whether or not the transmission cycle indicated by the transmission cycle information stored in the transmission cycle storage 14 has elapsed since the fixed cycle signal was transmitted in step S12, based on the master time (step S15). If the transmission cycle has not elapsed (step S15; NO), the fixed cycle signal transmitting section 12 repeats step S15, waiting for the transmission cycle to elapse. If the transmission cycle has elapsed (step S15; YES), if the power of the master control apparatus 1 has not turned OFF (step S16; NO), the process returns to step S12, and steps S12 to S16 are repeated. Thereby, the fixed 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. In the example of fig. 4, a fixed cycle signal is transmitted from the master device 1 to the slave device 2 at a transmission cycle P.

Returning to fig. 5, if the power of the main control apparatus 1 becomes OFF (step S16; YES), the process ends.

Next, a flow of the time reception process executed by the slave device 2 will be described with reference to fig. 6. The time reception process shown in fig. 6 is started by turning on the power of the slave device 2. The transmission cycle receiving unit 26 of the slave device 2 receives the 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. In the example of fig. 4, the transmission cycle receiving unit 26 receives transmission cycle information indicating a transmission cycle P from the master device 1. The transmission cycle storage unit 27 stores transmission cycle information indicating the transmission cycle P.

Returning to fig. 6, the fixed cycle signal receiving unit 22 receives the fixed cycle signal from the master control apparatus 1 via the signal line 3 (step S22). The counting unit 23 counts the number of times the fixed cycle signal is received by the fixed cycle signal receiving unit 22 (step S23), and notifies the time calculation unit 28 of the number of times of reception. The start time receiver 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 reception of the start time information. When the start time information has been received (step S24; YES), the start time information received by the start time receiving unit 24 is stored in the start time storage unit 25. In the example of fig. 4, the start time storage unit 25 stores start time information indicating the master time M1 received by the start time receiving unit 24.

Returning to fig. 6, the time calculation unit 28 calculates the current master time based on the number of times of reception of the fixed cycle signal notified by the counting unit 23, the start time information stored by the start time storage unit 25, and the transmission cycle information stored by the transmission cycle storage unit 27 (step S25). In the example of fig. 4, the time calculation unit 28 calculates the current master time Mn by the above expression (1).

Returning to fig. 6, 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 does not become OFF (step S27; NO), the process returns to step S22, and steps S22 to S27 are repeated. Thus, each time a fixed cycle signal is received by the slave device 2, the slave time is corrected to the current master time. If the power of the slave device 2 becomes OFF (step S27; YES), the process ends.

As described above, in the time synchronization system 100 according to embodiment 1, which synchronizes the time of the slave device 2 with the time of the master device 1, the master device 1 transmits the fixed cycle signal to the slave device 2 via the dedicated signal line 3, and the time of the slave device 2 is corrected to the time of the master device 1 based on the reception count, the transmission cycle, and the transmission start time of the fixed cycle signal. Accordingly, since it is not necessary to transmit the time information at the transmission time via the data bus 4 every time the fixed cycle signal is transmitted, the transmission cycle of the fixed cycle signal can be shortened regardless of the propagation delay time and jitter of the data bus 4, and more accurate time synchronization can be realized. Further, since the number of times of transmitting the start time information and the transmission cycle information via the data bus 4 is only 1, the bandwidth consumption amount of the data bus 4 due to the time synchronization can be reduced as compared with the case where the time information at the transmission time is transmitted via the data bus 4 every time the fixed cycle signal is transmitted.

(embodiment mode 2)

In embodiment 2, the transmission start time of the fixed cycle signal is predetermined. The configuration of the time synchronization system 100 according to embodiment 2 and the functional configuration of the slave device 2 are the same as those of embodiment 1.

The function of the master control apparatus 1 according to embodiment 2 will be described with reference to fig. 7. As shown in fig. 7, the master control apparatus 1 includes, as functional configurations, a start time storage unit 16 in addition to the master timer unit 11, the fixed cycle signal transmission unit 12, the start time transmission unit 13, the transmission cycle storage unit 14, and the transmission cycle transmission unit 15.

The start time storage unit 16 stores start time information indicating a predetermined transmission start time. The fixed cycle signal transmission unit 12 starts transmission of the fixed cycle signal if the master time becomes the transmission start time indicated by the start time information stored in the start time storage unit 16. The start time transmitting 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 transmitting unit 13 transmits the start time information may be set before the fixed cycle signal transmitting unit 12 starts transmission of the fixed cycle signal. Other functions of the master control apparatus 1 are the same as those of embodiment 1.

Here, a flow of the time transmission process executed by the master control apparatus 1 will be described with reference to fig. 8. The time transmission process shown in fig. 8 is started by turning on the power of the master control apparatus 1. The transmission cycle transmitting 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 transmitter 13 transmits the start time information stored in the start time storage 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 has not become the transmission start time (step S33; NO), the fixed cycle signal transmitter 12 repeats step S33 and waits until the transmission start time is reached. If the master time becomes the transmission start time (step S33; YES), the fixed cycle signal transmitting section 12 generates a fixed cycle signal and transmits the fixed cycle signal to the slave device 2 via the signal line 3 (step S34).

The fixed-cycle signal transmitting 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 since the transmission of the fixed-cycle signal, based on the master time (step S35). If the transmission cycle has not elapsed (step S35; NO), the fixed cycle signal transmitting section 12 repeats step S35, waiting for the transmission cycle to elapse. If the transmission cycle has elapsed (step S35; YES), if the power of the master control apparatus 1 has not turned OFF (step S36; NO), the process returns to step S34, and steps S34 to S36 are repeated. If the power of the main control apparatus 1 becomes OFF (step S36; YES), the process ends.

Next, a flow of the time reception process executed by the slave device 2 will be described with reference to fig. 9. The time reception process shown in fig. 9 is started by turning on the power of the slave device 2. The transmission cycle receiving unit 26 of the slave device 2 receives the 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 receiver 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 receiving unit 24.

The fixed cycle signal receiving unit 22 receives the fixed cycle signal from the master control apparatus 1 via the signal line 3 (step S43). The counting unit 23 counts the number of times the fixed cycle signal is received by the fixed cycle signal receiving unit 22 (step S44), and notifies the time calculation unit 28 of the number of times of reception. The time calculation unit 28 calculates the current master time based on the number of times of reception of the fixed cycle signal notified by the counting unit 23, the start time information stored by the start time storage unit 25, and the transmission cycle information stored by the transmission cycle storage unit 27 (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 does not become OFF (step S47; NO), the process returns to step S43, and steps S43 to S47 are repeated. Thus, the slave timing is corrected to the master timing each time the slave device 2 receives the fixed cycle signal. In embodiment 2, since the start time information is received before the slave device 2 receives the fixed cycle signal, the slave time can be corrected to the current master time from the 1 st reception of the fixed cycle signal. If the power of the slave device 2 becomes OFF (step S47; YES), the process ends.

As described above, in the time synchronization system 100 according to embodiment 2, which synchronizes the time of the slave device 2 with the time of the master device 1, the master device 1 transmits the fixed cycle signal to the slave device 2 via the dedicated signal line 3, and the time of the slave device 2 is corrected to the time of the master device 1 based on the reception count, the transmission cycle, and the transmission start time of the fixed cycle signal. Accordingly, since it is not necessary to transmit the time information at the transmission time via the data bus 4 every time the fixed cycle signal is transmitted, the transmission cycle of the fixed cycle signal can be shortened regardless of the propagation delay time and jitter of the data bus 4, and more accurate time synchronization can be realized. Further, since the start time storage unit 16 stores the start time information in advance, it is not necessary to perform the time stamp processing by the start time transmission unit 13 as in embodiment 1, and therefore the accuracy of the time synchronization is not affected by the accuracy of the time stamp processing.

(embodiment mode 3)

In embodiment 3, the slave device 2 performs time correction at the time correction timing of the transmission cycle. The configuration of the time synchronization system 100 and the functional configuration of the master control apparatus 1 according to embodiment 3 are the same as those according to embodiment 2.

The function of the slave device 2 according to embodiment 3 will be described with reference to fig. 10. As a representative example, fig. 10 shows a functional configuration of the slave device 2A, but the slave devices 2B and 2C also have the same functional configuration. As shown in fig. 10, the slave device 2A has an uncorrected timer unit 30 as a functional configuration, in addition to the slave timer unit 21, the fixed cycle signal receiving unit 22, the counting unit 23, the start time receiving unit 24, the start time storage unit 25, the transmission cycle receiving unit 26, the transmission cycle storage unit 27, the time calculation unit 28, and the time correction unit 29.

The uncorrected timer unit 30 counts the same time as the slave timer unit 21 when the time correction unit 29 has not performed the correction. Hereinafter, the time of the slave device 2 when no correction is performed, that is, the time of the uncorrected timer unit 30 is referred to as an uncorrected slave time.

Each time the count unit 23 notifies the number of times of reception of the fixed cycle signal, the time calculation unit 28 calculates the transmission time of the fixed cycle signal in the master device 1 based on the number of times of reception of the fixed cycle signal notified by the count unit 23, the start time information stored by the start time storage unit 25, and the transmission cycle information stored by the transmission cycle storage unit 27. Specifically, the time calculation unit 28 calculates, as the transmission time of the fixed cycle signal in the master device 1, the time obtained by adding the transmission cycle indicated by the transmission cycle information to the transmission start time indicated by the start time information, the time obtained by multiplying the value obtained by subtracting 1 from the number of times of reception of the fixed cycle signal.

The time calculation unit 28 calculates the current master time at the time correction timing of the transmission cycle period based on the transmission time of the fixed cycle signal in the master device 1, the time of the uncorrected timer unit 30 when the fixed cycle signal is received by the fixed cycle signal reception unit 22, and the current time of the uncorrected timer unit 30. Specifically, the time calculation unit 28 calculates the current master time as the time obtained by adding the elapsed time from the reception timing of the previous fixed period signal to the transmission time of the fixed period signal in the master device 1 calculated at the timing of receiving the previous fixed period signal to the master time up to the current master time. The time calculation unit 28 calculates the elapsed time from the timing at which the previous fixed-period signal was received to the current master time by multiplying the elapsed time from the timing at which the previous fixed-period signal was received to the current uncorrected slave time by the ratio of the pushed amount at the master time to the pushed amount at the uncorrected slave time. The time correction unit 29 corrects the time of the slave timer unit 21 to the current master time calculated by the time calculation unit 28.

Here, the time correction performed by the slave device 2 will be described with reference to fig. 11. As shown in fig. 11, the fixed period signal receiving section 22 of the slave device 2 receives the fixed period signal at fixed time intervals. For the master control time, the time interval for receiving the fixed periodic signal is the transmission period P. The counting unit 23 counts the number of times of reception of the fixed cycle signal and notifies the time calculation unit 28 of the count. The start time receiver 24 receives start time information indicating master time M1, which is transmission start time, before master time M1, and stores the start time information in the start time storage 25. The transmission cycle receiving unit 26 receives the transmission cycle information indicating the transmission cycle P before the master time M1, and stores the transmission cycle information in the transmission cycle storage unit 27.

Each time the count unit 23 notifies the number of times of reception of the fixed cycle signal, the time calculation unit 28 calculates the master time Mn by the above expression (1). When the time adjustment timing of the transmission cycle period is reached, the time calculation unit 28 adds the elapsed time Δ Mn 'from the timing of receiving the previous fixed cycle signal to the current master time Mn to the master time Mn, and calculates the current master time Mn'. The time calculation unit 28 calculates an elapsed time Δ Mn 'from the timing of receiving the previous fixed cycle signal to the current master time by the following expression (2) using the elapsed time Δ Fn' from the timing of receiving the previous fixed cycle signal to the current uncorrected slave time and the ratio (Mn-M (n-1)/(Fn-F (n-1)) of the pushed amount at the master time to the pushed amount at the uncorrected slave time.

ΔMn’=ΔFn’×(Mn-M(n-1)/(Fn-F(n-1)) (2)

The transmission cycle P indicated by the transmission cycle information may be used instead of Mn-M (n-1). Each time the time calculation unit 28 calculates the current master time Mn ', the time correction unit 29 corrects the slave time to 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 period. The timing of correcting the time of the transmission period may be set by the user or may be determined by the processing capability of the slave device 2.

Here, the flow of the time reception process executed by the slave device 2 will be described with reference to fig. 12. The time reception process shown in fig. 12 is started by turning on the power of the slave device 2. Since steps S51 to S54 are the same as steps S41 to S44 of the flowchart shown in fig. 9, description thereof is omitted. The time calculation unit 28 of the slave device 2 calculates the transmission time of the fixed cycle signal in the master device 1 based on the number of times of reception of the fixed cycle signal notified by the counting unit 23, the start time information stored by the start time storage unit 25, and the transmission cycle information stored by the transmission cycle storage unit 27 (step S55). In the example of fig. 11, the time calculation unit 28 calculates the transmission time Mn of the fixed cycle signal in the master control apparatus 1 by the above expression (1).

Returning to fig. 12, the time calculation unit 28 determines whether or not the time adjustment timing has reached (step S56). If the time adjustment timing has not been reached (step S56; NO), the time calculator 28 repeats step S56 and waits for the time adjustment timing to be reached. When the time adjustment timing is reached (YES in step S56), the time calculation unit 28 calculates the current master time based on the transmission time of the fixed cycle signal in the master 1, the time of the uncorrected timer unit 30 when the fixed cycle signal is received by the fixed cycle signal reception unit 22, and the current time of the uncorrected timer unit 30 (step S57). In the example of fig. 11, the time calculation unit 28 adds the elapsed time Δ Mn 'from the timing when the previous fixed-cycle signal was received to the current master time Mn, and calculates the current master time Mn'. The time calculation unit 28 calculates the elapsed time Δ Mn' from the timing when the previous fixed-period signal was received to the current master time by the above expression (2).

Returning to fig. 12, 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 does not become OFF (step S59; NO), the process returns to step S53, and steps S53 to S59 are repeated. Thereby, the slave time is corrected to the master time at the time correction timing of the transmission period. If the power of the slave device 2 becomes OFF (step S59; YES), the process ends.

As described above, in the time synchronization system 100 according to embodiment 3, which synchronizes the time of the slave device 2 with the time of the master device 1, the master device 1 transmits the fixed cycle signal to the slave device 2 via the dedicated signal line 3, and the time of the slave device 2 is corrected to the time of the master device 1 based on the reception count, the transmission cycle, and the transmission start time of the fixed cycle signal. Accordingly, since it is not necessary to transmit the time information at the transmission time via the data bus 4 every time the fixed cycle signal is transmitted, the transmission cycle of the fixed cycle signal can be shortened regardless of the propagation delay time and jitter of the data bus 4, and more accurate time synchronization can be realized. Further, since the slave time can be corrected to the master time at the time correction timing of the transmission period, it is not necessary to correct the slave time to the master time immediately at the timing when the fixed cycle signal is received. Thus, even when the process of correcting the slave time to the master time is realized by software, the accuracy can be prevented from being lowered.

(embodiment mode 4)

In embodiment 4, correction is performed to match the amount of advance at the slave time with the amount of advance at the master time. The configuration of the time synchronization system 100 and the functional configuration of the master control apparatus 1 according to embodiment 4 are the same as those of embodiment 2.

The function of the slave device 2 according to embodiment 4 will be described with reference to fig. 13. As a representative example, fig. 13 shows a functional configuration of the slave device 2A, but the slave devices 2B and 2C also have the same functional configuration. As shown in fig. 13, the slave device 2A includes, as functional configurations, a time advance amount correction unit 31 for performing correction to match the advance amount at the slave time with the advance amount at the master time, in addition to the slave timing unit 21, the fixed cycle signal reception unit 22, the counting unit 23, the start time reception unit 24, the start time storage unit 25, the transmission cycle reception unit 26, the transmission cycle storage unit 27, the time calculation unit 28, and the time correction unit 29.

Each time the count unit 23 notifies the number of times of reception of the fixed cycle signal, the time calculation unit 28 calculates the current master time based on the number of times of reception of the fixed cycle signal notified by the count unit 23, the start time information stored by the start time storage unit 25, and the transmission cycle information stored by the transmission cycle storage unit 27. Specifically, the time calculation unit 28 calculates, as the current master time, the transmission time of the fixed cycle signal in the master device 1, which is the time obtained by adding, to the transmission start time indicated by the start time information, the time obtained by multiplying the transmission cycle indicated by the transmission cycle information by the value obtained by subtracting 1 from the number of times of reception of the fixed cycle signal.

The time advance amount correction unit 31 calculates the advance amount at the master time and the advance amount at the slave time based on the transmission time of the fixed cycle signal in the master device 1 and the time of the slave timing unit 21 when the fixed cycle signal is received by the fixed cycle signal reception unit 22 each time the fixed cycle signal is received by the fixed cycle signal reception unit 22. The time advance amount correction unit 31 corrects the slave timer unit 21 so that the advance amount at the slave time coincides with the advance amount at the master time.

Here, the correction of the time advance amount by the slave device 2 will be described with reference to fig. 14. As shown in fig. 14, the fixed cycle signal receiving section 22 of the slave device 2 receives the fixed cycle signal at fixed time intervals. For the master control time, the time interval for receiving the fixed periodic signal is the transmission period P. The counting unit 23 counts the number of times of reception of the fixed cycle signal, and notifies the time calculation unit 28 of the number of times of reception. The start time receiver 24 receives start time information indicating master time M1, which is transmission start time, before master time M1, and stores the start time information in the start time storage 25. The transmission cycle receiving unit 26 receives the transmission cycle information indicating the transmission cycle P before the master time M1, and stores the transmission cycle information in the transmission cycle storage unit 27.

Each time the count unit 23 notifies the number of times of reception of the fixed cycle signal, the time calculation unit 28 calculates the master time Mn by the above expression (1). 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 amount correction unit 31 calculates the advance amount Δ Mn at the master time and the advance amount Δ Jn at the slave time each time the master time Mn is calculated by the time calculation unit 28. The pushed amount Δ Mn of the master timing may use an elapsed time (Mn-M (n-1)) from the master timing at the time of reception of the previous fixed cycle signal to the master timing at the time of reception of the next fixed cycle signal, or may use a transmission cycle P indicated by the transmission cycle information. The slave time advance amount Δ Jn uses the elapsed time (Jn-M (n-1)) of the master time from the slave time after correction at the time of reception of the previous fixed cycle signal to the slave time before correction at the time of reception of the current fixed cycle signal. n is more than or equal to 2. The time advance amount correction unit 31 corrects the slave timer unit 21 so that the advance amount Δ Jn at the slave time coincides with the advance amount Δ Mn at the master time. In this way, each time the slave device 2 receives a fixed cycle signal, the slave time is corrected to the current master time, and the amount of advance at the slave time is corrected so as to match the amount of advance at the master time.

Here, the flow of the time reception process executed by the slave device 2 will be described with reference to fig. 15. The time reception processing shown in fig. 15 is started by turning on the power of the slave device 2. Since steps S61 to S66 are the same as steps S41 to S46 of the flowchart shown in fig. 9, description thereof is omitted. The time advance amount correction unit 31 of the slave device 2 calculates the advance amount at the master time and the advance amount at the slave time based on the transmission time of the fixed cycle signal in the master device 1 and the time of the slave timer unit 21 when the fixed cycle signal is received by the fixed cycle signal reception unit 22 (step S67). In the example of fig. 14, the time advance amount correction unit 31 calculates the advance amount Δ Mn at the master time and the advance amount Δ Jn at the slave time. The pushed amount Δ Mn of the master timing may use an elapsed time (Mn-M (n-1)) from the master timing at the time of reception of the previous fixed cycle signal to the master timing at the time of reception of the next fixed cycle signal, or may use a transmission cycle P indicated by the transmission cycle information. The slave time advance amount Δ Jn uses the elapsed time (Jn-M (n-1)) of the master time from the slave time after correction at the time of reception of the previous fixed cycle signal to the slave time before correction at the time of reception of the current fixed cycle signal.

Returning to fig. 15, the time advance amount correction unit 31 corrects the slave timer unit 21 so that the advance amount at the slave time matches the advance amount at the master time (step S68). If the power of the slave device 2 does not become OFF (step S69; NO), the process returns to step S63, and steps S63 to S69 are repeated. Thus, each time the slave device 2 receives a fixed cycle signal, the slave time is corrected to the current master time, and the amount of advance at the slave time is corrected so as to match the amount of advance at the master time. If the power of the slave device 2 becomes OFF (step S69; YES), the process ends.

As described above, in the time synchronization system 100 according to embodiment 4, which synchronizes the time of the slave device 2 with the time of the master device 1, the master device 1 transmits the fixed cycle signal to the slave device 2 via the dedicated signal line 3, and the time of the slave device 2 is corrected to the time of the master device 1 based on the reception count, the transmission cycle, and the transmission start time of the fixed cycle signal. Accordingly, since it is not necessary to transmit the time information at the transmission time via the data bus 4 every time the fixed cycle signal is transmitted, the transmission cycle of the fixed cycle signal can be shortened regardless of the propagation delay time and jitter of the data bus 4, and more accurate time synchronization can be realized. In addition, since correction is performed so that the pushed amount at the slave time coincides with the pushed amount at the master time, the difference between the slave time and the master time is small.

In the above embodiment, the slave devices 2 according to embodiments 3 and 4 are combined with the master device 1 according to embodiment 2, but the present invention is not limited to this. The slave devices 2 according to embodiments 3 and 4 may be combined with the master device 1 according to embodiment 1.

In the above embodiments, embodiments 3 and 4 are described separately, but embodiments 3 and 4 may be combined. In this case, the slave device 2 includes, as functional configurations, a slave timing unit 21, a fixed 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, a transmission cycle storage unit 27, a time calculating unit 28, a time correcting unit 29, an uncorrected timing unit 30, and a time advance correcting unit 31. The time advance amount correction unit 31 performs correction to match the advance amount at the slave time with the advance amount at the master time, for the slave timer unit 21, each time the time correction timing at the transmission cycle period is reached.

In the above embodiment, each time the count unit 23 notifies the count unit 23 of the number of times of reception of the fixed cycle signal, the time calculation unit 28 of the slave device 2 calculates the transmission time of the fixed cycle signal in the master device 1 as the current master time based on the number of times of reception of the fixed cycle signal notified by the count unit 23, the start time information stored by the start time storage unit 25, and the transmission cycle information stored by the transmission cycle storage unit 27, but the timing at which the time calculation unit 28 calculates the transmission time of the fixed cycle signal in the master device 1 as the current master time is not limited to this. The time calculation unit 28 may calculate the transmission time of the fixed cycle signal in the master device 1 as the current master time when the number of times of reception of the fixed cycle signal is notified from the counting unit 23 every plural times (for example, 2 times). That is, the number of times of reception of the fixed cycle signal per unit time may be larger than the number of times of time synchronization.

Next, the hardware configuration of the master device 1 and the slave device 2 according to embodiments 1 to 4 will be described. As shown in fig. 16, 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. 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 a BUS (BUS).

The calculation unit 103 is, for example, a cpu (central Processing unit). The calculation unit 103 executes the processes of the fixed cycle signal transmission unit 12 and the start time transmission unit 13 of the master device 1, the counting unit 23, the time calculation unit 28, the time correction unit 29, and the time advance correction unit 31 of the slave device 2, in accordance with the control program stored in the storage unit 102.

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 nonvolatile Memory such as a flash Memory, a hard disk, a DVD-RAM (Digital Versatile Disc-Random Access Memory), or a DVD-RW (Digital Versatile Disc-ReWritable). The storage unit 102 stores a program for causing the calculation unit 103 to perform processing of the master device 1 and the slave device 2 in advance, supplies data stored in the program to the calculation unit 103 in accordance with an instruction from the calculation unit 103, and stores data supplied from the calculation unit 103. 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 timing unit 11 of the master device 1 and the slave timing unit 21 of the slave device 2.

The operation unit 105 is an interface device for connecting an input device such as a keyboard or a pointing device, or an input device such as a keyboard or 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 terminal device or a wireless communication device connected to a network, and a serial interface or a lan (local Area network) interface connected thereto. The input/output unit 106 functions as the fixed cycle signal transmitting unit 12, the start time transmitting unit 13, and the transmission cycle transmitting unit 15 of the master device 1, and the fixed cycle signal receiving unit 22, the start time receiving unit 24, and the transmission cycle receiving unit 26 of the slave device 2.

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 an operation screen.

The processing of the master timing unit 11, the fixed cycle signal transmission unit 12, the start time transmission unit 13, the transmission cycle storage unit 14, the transmission cycle transmission unit 15, and the start time storage unit 16 of the master device 1 shown in fig. 2, the slave timing unit 21, the fixed cycle signal reception unit 22, the counting unit 23, the start time reception unit 24, the start time storage unit 25, the transmission cycle reception unit 26, the transmission cycle storage unit 27, the time calculation unit 28, the time correction unit 29, and the time advance amount correction unit 31 of the slave device 2 shown in fig. 3 is executed by processing using 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, and the display unit 107 as resources by a control program.

The hardware configuration and the flowchart are examples, and can be changed or modified arbitrarily.

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, the display unit 107, and the like, which are central to the processing of the master device 1 and the slave device 2, can be implemented using a general computer system without depending on a dedicated system. For example, the master device 1 and the slave device 2 that execute the above-described processing may be configured by storing and distributing computer programs for executing the above-described operations on a flexible disk, a computer-readable recording medium such as a CD-ROM (Compact Disc-Read Only Memory) or a DVD-ROM (Digital Versatile Disc-Read Only Memory), and installing the computer programs in the computer. The master device 1 and the slave device 2 may be configured by storing the computer program in a storage device included in a server device on a communication network such as the internet in advance, downloading the computer program from a normal computer system, or the like.

When the functions of the master apparatus 1 and the slave apparatus 2 are realized by sharing the OS (operating system) and the application programs or by cooperative operation of the OS and the application programs, only the application program portion may be stored in the recording medium, the storage device, or the like.

The computer program may be superimposed on a carrier wave and provided via a communication network. For example, the computer program may be published on a Bulletin Board System (BBS) on a communication network, and the computer program may be provided via the communication network. The computer program may be started up to be executed under the control of the OS in the same manner as other application programs, thereby enabling the above-described processing to be executed.

The present invention can be embodied in various forms and modifications without departing from the spirit and scope of the invention in its broadest form. The above embodiments are provided to illustrate the present invention, and do not limit the scope of the present invention. The scope of the present invention is indicated not by the embodiments but by the claims. Further, various modifications made within the scope of the claims and the scope of the equivalent meaning of the invention are considered to be within the scope of the present invention.

Description of the reference numerals

1 master device, 2A, 2B, 2C slave devices, 3 signal lines, 4 data buses, 11 master timing unit, 12 fixed cycle signal transmitting unit, 13 start time transmitting unit, 14 transmission cycle storing unit, 15 transmission cycle transmitting unit, 16 start time storing unit, 21 slave timing unit, 22 fixed cycle signal receiving unit, 23 counting unit, 24 start time receiving unit, 25 start time storing unit, 26 transmission cycle receiving unit, 27 transmission cycle storing unit, 28 time calculating unit, 29 time correcting unit, 30 uncorrected timing unit, 31 time advance correcting unit, 100 time synchronizing system, 101 temporary storing unit, 102 storing unit, 103 calculating unit, 104 timer, 105 operating unit, 106 input/output unit, and 107 display unit.

32页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:信息处理系统双枢轴铰链信号路径

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!