A PROFINET distributed IO synchronization method

By configuring the scan lock timer to adjust the timer count value, high-precision synchronization of PROFINET distributed IO is achieved, which solves the synchronization problem of communication interface modules and IO modules, reduces hardware costs and synchronization jitters, and improves synchronization accuracy.

CN116719758BActive Publication Date: 2025-01-17EURA DRIVES ELECTRIC

Patent Information

Application Number
CN202310705294.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-14
Publication Date
2025-01-17
Estimated Expiration
2043-06-14

AI Technical Summary

Technical Problem

The lack of synchronization between the communication interface module in PROFINET distributed IO and the input module and output module in the slot, resulting in inconsistent signal sampling and update. Existing solutions such as backplane bus synchronization frames and IEEE1588 methods are cost-effective and difficult to implement.

Method used

By configuring the scan lock timer Ttim, set the same target reload cycle time and synchronous lock offset time, adjust the reload cycle count value of the timer according to the actual synchronization deviation, realize synchronization between the interface module and the IO module, and adopt low cost Hardware achieves high-precision synchronization.

Benefits of technology

The high-precision synchronization between the PROFINET communication interface module and the IO module is realized, and the synchronization jitter is less than 1us, which reduces hardware requirements, is easy to implement on FPGA or MCU, and optimizes the input and output synchronization of the IO module.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116719758B_ABST
    Figure CN116719758B_ABST
Patent Text Reader

Abstract

The present invention discloses a PROFINET distributed IO synchronization method, comprising configuring a scan lock timer T for an interface module and each IO module respectively. tim , all modules T tim Have the same target reload cycle time and target synchronization lock offset time; each time the synchronization pulse edge arrives, according to each module T tim The deviation between the actual synchronization lock offset time and the target synchronization lock offset time dynamically adjusts the T of each module tim The reload cycle count value is used to realize each module T tim The synchronization between modules is tim The synchronization period is calculated and determined in the overload event and the synchronization pulse edge event, and the synchronization of input and output is realized. The present invention is easy to implement with FPGA or ARM, MCU peripherals, and can effectively improve the synchronization accuracy between the PROFINET communication interface module and the IO modules in each slot, and realize the high-precision synchronization of the input and output of the IO modules in each slot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial automation control, and in particular to a distributed IO synchronization method under the PROFINET standard. Background Art

[0002] With the continuous improvement of modern industrial automation in my country, especially the popularization of industrial Internet of Things in recent years, more and more production lines are beginning to adopt distributed IO solutions for synchronous control. As an important part of industrial Internet of Things, PROFINET distributed IO has also become a hot topic for domestic industrial automation manufacturers.

[0003] However, due to various factors, the current PROFINET distributed IO still has the following problems: there is no synchronization between the PROFINET communication interface module and the input and output modules in each slot, and there is no synchronization between the sampling of input signals and the updating of output signals by the modules in each slot. To address this problem, some manufacturers use backplane bus synchronization frames to synchronize modules and signals, but the final synchronization jitter is much greater than 1us. Other manufacturers use Ethernet clock synchronization (IEEE1588) to synchronize modules and signals, but this method is difficult to implement based on FPGA or MCU, and the cost is relatively high. Summary of the invention

[0004] The present invention proposes a PROFINET distributed IO synchronization method, the purpose of which is to achieve high-precision synchronization between a PROFINET communication interface module and IO modules in each slot with lower hardware requirements and costs, as well as high-precision synchronization of input signal sampling and updated output by the IO modules in the slots.

[0005] The technical solution of the present invention is as follows:

[0006] A PROFINET distributed IO synchronization method, wherein a scan lock timer T is configured for each interface module and each IO module. tim , each timer T tim Have the same target reload cycle time T scan The target synchronization lock offset time T lock ; Each timer T tim According to their respective clock frequencies f soc , respectively determine the initial value C of its heavy load cycle count value prd ;

[0007] Each time the synchronization pulse edge arrives, according to each timer T tim Actual genlock offset time Synchronous lock offset time T with target lock The deviation between the timers T timThe reload cycle count value is adjusted to achieve each timer T tim Synchronization between

[0008] The interface module and each IO module are locked based on their respective scan timers T tim Achieve input and output synchronization.

[0009] As a further improvement of the PROFINET distributed IO synchronization method, the following steps are specifically included:

[0010] S1: Configure scan lock timer T tim , set the same target reload cycle time T scan The target synchronization lock offset time T lock , calculate the initial reload cycle count value C of each prd ;

[0011] When each module is waiting for the edge of the synchronization pulse, for a synchronization pulse at any time, its sequence number is set to k, and steps S2-S4 are executed synchronously:

[0012] S2: From the (k-1)th sync pulse edge event to the (k)th sync pulse edge event, at T tim In each reload event, the number of reloads X is accumulated k Synchronous cycle with cumulative measurement

[0013] When the (k)th synchronization pulse edge arrives, lock T tim Count value C k , calculate the actual synchronization lock offset time Update the measurement synchronization period and edge locked after T tim The remaining time residual value Then reset X k+1 is zero;

[0014] S3: After the (k)th synchronization pulse edge arrives, each module and T lock Calculate the sync lock deviation count value Get T tim Reload cycle count value And in the subsequent T tim Update the reload cycle count value in the reload event

[0015] S4: Each IO module latches its own input at the (k-1)th synchronization pulse edge event; or each IO module satisfies the current calculated measurement synchronization period. Latch their respective inputs when Tsi The total time for the interface module to poll the input of each IO module and the necessary processing, T i Set the input synchronization time for the master station;

[0016] Each IO module updates its own output at the (k+1)th synchronization pulse edge event; or each IO module satisfies the current calculated measurement synchronization cycle. Update their respective outputs when T so The total time for the interface module to poll the output of each IO module and the necessary processing, T o Set the output synchronization time for the master station.

[0017] As a further improvement of the PROFINET distributed IO synchronization method, step S1 should satisfy:

[0018]

[0019] Where N is a positive integer, f soc For each module T tim The clock frequency can be different.

[0020] As a further improvement of the PROFINET distributed IO synchronization method, the synchronization period is determined in step S2 The calculation formula is:

[0021]

[0022] Among them, the number of reloads In T tim Zero in the event of a reload, when the (k)th sync pulse edge arrives T after the (k-1)th synchronization pulse edge is locked tim The remaining time residual value;

[0023] When the (k)th sync pulse edge arrives, the sync pulse edge is locked after T tim The remaining time residual value

[0024] As a further improvement of the PROFINET distributed IO synchronization method, the synchronization lock deviation count value in step S3 The calculation formula is:

[0025]

[0026] The limiting function flmt(z) is defined as

[0027] T timReload cycle count value The calculation formula is:

[0028]

[0029] Compared with the prior art, the present invention has the following beneficial effects: the present invention has low hardware requirements and is easy to implement using FPGA or ARM, MCU peripherals. The synchronization jitter between the PROFINET communication interface module and the IO modules in each slot is much less than 1us. The input and output synchronization sources of each IO module can also be optimized according to the backplane bus scanning rate to achieve high-precision synchronization of the IO module's input signal sampling and output update. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 This is a schematic diagram of PROFINET distributed IO;

[0031] Figure 2 It is a synchronous logic schematic diagram of the present invention;

[0032] Figure 3 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0033] The preferred technical solution of the present invention is described in detail below with reference to the accompanying drawings:

[0034] like Figure 3 , a PROFINET distributed IO synchronization method, the steps comprising:

[0035] S1: Configure the scan lock timer T for the interface module and each IO module tim , which have the same target reload cycle time T scan The target synchronization lock offset time T lock . Set each module T tim T scan 、T lock and the initial reload cycle count value C prd satisfy:

[0036]

[0037] Where N is a positive integer, f soc For each module T tim The clock frequency can be different, and each module T needs to be calculated separately tim The initial reload cycle count value.

[0038] like Figure 1 As shown, there is a backplane bus C-Bus and a synchronization pulse PN between the interface module and each IO module. cyc connected.

[0039] In this embodiment, a positive integer N=2 is selected, and the target reload cycle time T scan =125us, target synchronization lock offset time T lock =62.5us. With interface module T tim The clock frequency f soc =120MHz as an example, then its initial reload cycle count value C prd =15000.

[0040] The master station sets the period T of the synchronization pulse cyc =(2*M)*250us, where the positive integer M∈[1,8], then the period of the synchronization pulse is T cyc ∈[0.5, 4.0]ms.

[0041] like Figure 2 As shown, in the process of each module waiting for the edge of the synchronization pulse, for a synchronization pulse at any time, its sequence number is set to k, and steps S2-S4 are executed synchronously:

[0042] S2: From the (k-1)th sync pulse edge event to the (k)th sync pulse edge event, at T tim In each reload event, the number of reloads X is accumulated k Synchronous cycle with cumulative measurement

[0043] Determine the synchronization period The calculation formula is:

[0044]

[0045] Among them, the number of reloads In T tim Zero in the event of a reload, T after the (k-1)th synchronization pulse edge is locked tim The remaining time residual value.

[0046] When the (k)th synchronization pulse edge arrives, lock T tim Count value C k , calculate the corresponding actual synchronization lock offset time according to The current value is updated at the determination synchronization period:

[0047] After the (k)th synchronization pulse edge arrives, it is also necessary to calculate the T after edge locking. tim The remaining time residual value And reset the reload count X k+1 is zero.

[0048] The above steps preferably use the target reload cycle time T scan calculate.

[0049] S3: After the (k)th synchronization pulse edge arrives, each module calculates the synchronization lock deviation count value Get T tim Reload cycle count value And in the subsequent T tim Update the reload cycle count value in the reload event The relevant calculation formula is:

[0050]

[0051] Among them, the limiting function satisfies And from S1 we know that T tim Reload cycle time

[0052] S4: The interface module and each IO module are locked based on their own scan timer T tim Achieve input and output synchronization.

[0053] S4.1: Each IO module latches its own input at the (k-1)th synchronization pulse edge event; or each IO module satisfies the current calculated measurement synchronization period. Latch their respective inputs. T si The total time for the interface module to poll the input of each IO module and the necessary processing, T i Set the input synchronization time for the master station. In this embodiment, each IO module is set to T tim The maximum number of reload events that meet this condition Latch input.

[0054] S4.2: Each IO module updates its own output at the (k+1)th synchronization pulse edge event; or each IO module satisfies the current calculated measurement synchronization period. Update their respective outputs. so The total time for the interface module to poll the output of each IO module and the necessary processing, T o Set the output synchronization time for the master station. In this embodiment, each IO module is set to T tim The minimum number of reload events that meet this condition Update the output.

[0055] In actual work, users can select the input and output synchronization sources of each IO module based on objective factors. For example, when the backplane bus C-bus scan rate is low, you can choose to latch or update in the synchronization pulse edge event to reserve enough polling time for the interface module; when the rate is high, latch or update according to the measured synchronization cycle in the overload event.

[0056] Engineering application measurements have confirmed that the present invention can effectively improve the synchronization accuracy between the PROFINET communication interface module and the IO modules in each slot, and achieve high-precision synchronization of the input and output of the IO modules in each slot.

Claims

1. A PROFINET distributed IO synchronization method, characterized in that: Configure the scan lock timer T for the interface module and each IO module respectively tim , each timer T tim Have the same target reload cycle time T scan The target synchronization lock offset time T lock ; Each timer T tim According to their respective clock frequencies f soc , respectively determine the initial value C of its heavy load cycle count value prd ; Each time the synchronization pulse edge arrives, according to each timer T tim Actual genlock offset time Synchronous lock offset time T with target lock The deviation between the timers T tim The reload cycle count value is adjusted to achieve each timer T tim Synchronization between The interface module and each IO module are locked based on their respective scan timers T tim Achieve input and output synchronization; The synchronization method specifically comprises the following steps: S1: Configure scan lock timer T tim , set the same target reload cycle time T scan And the target synchronization lock offset time T lock , calculate the initial reload cycle count value C of each prd ; In the process of each module waiting for the synchronization pulse edge, for a synchronization pulse at any time, set its sequence number to k, and execute steps S2-S4 synchronously: S2: From the (k-1)th sync pulse edge event to the (k)th sync pulse edge event, at T tim In each reload event, the number of reloads X is accumulated k Synchronous cycle with cumulative measurement When the (k)th synchronization pulse edge arrives, lock T tim Count value C k , calculate the actual synchronization lock offset time Update the measurement synchronization period and edge locked after T tim The remaining time residual value Then reset X k +1 is zero; S3: After the (k)th synchronization pulse edge arrives, each module and T lock Calculate the sync lock deviation count value Get T tim Reload cycle count value And in the subsequent T tim Update the reload cycle count value in the reload event S4: Each IO module latches its own input at the (k-1)th synchronization pulse edge event; or each IO module satisfies the current calculated measurement synchronization period. Latch their respective inputs when T si The total time for the interface module to poll the input of each IO module and the necessary processing, T i Set the input synchronization time for the master station; Each IO module updates its own output at the (k+1)th synchronization pulse edge event; or each IO module satisfies the current calculated measurement synchronization cycle. Update their respective outputs when T so The total time for the interface module to poll the output of each IO module and the necessary processing, T o Set the output synchronization time for the master station.

2. The PROFINET distributed IO synchronization method according to claim 1, characterized in that: Step S1 should satisfy: Where N is a positive integer, f soc For each module T tim The clock frequency can be different.

3. The PROFINET distributed IO synchronization method according to claim 1, characterized in that: In step S2, the synchronization period is measured The calculation formula is: Among them, the number of reloads In T tim Zero in the event of a reload, when the (k)th sync pulse edge arrives T after the (k-1)th synchronization pulse edge is locked tim The remaining time residual value; When the (k)th sync pulse edge arrives, the sync pulse edge is locked after T tim The remaining time residual value 4. The PROFINET distributed IO synchronization method according to claim 1, characterized in that: The synchronization lock deviation count value in step S3 The calculation formula is: The limiting function flmt(z) is defined as T tim Reload cycle count value The calculation formula is:

Citation Information

Patent Citations

  • Apparatus and method for realizing synchronization between Ethernet chain-like network nodes

    CN101039173A

  • Sequence of event (SOE) recording module and adjusting method thereof

    CN102081400A

Cited By

  • Distributed IO data preprocessing and feedback system based on edge nodes

    CN120974089A

  • Edge node-based distributed IO data preprocessing and feedback system

    CN120974089B