Clock synchronization method of real-time industrial Ethernet EtherCAT redundant system

The invention discloses a clock synchronization method of a real-time industrial Ethernet EtherCAT redundant system, which adopts a personal computer (PC) as a master station, and is connected with a plurality of EtherCAT slave stations to form the EtherCAT redundant system; two network cards, i.e. a network card 1 and a network card 2, are arranged on the PC; the master station comprises a sending unit and a receiving unit; the clock synchronization method comprises the steps that: A1. the master station judges and detects faults, and selects transmission strategies in different frames according to the judgment and detection results; A2. the transmission time delay is calculated; and A3. and the time of the slave stations is corrected. The clock synchronization method of the real-time industrial Ethernet EtherCAT redundant system can realize the compatibility of an EtherCAT redundant mechanism and a distribution clock, can ensure the master station and the slave stations can communicate normally when the system has single-point faults and improve the communication reliability on the one hand, and can ensure the time synchronization of the master station and the slave stations of the redundant system and does not affect the collaborate work of the system on the other hand.