A method for detecting and correcting the timing of a slave device in IO-Link communication, and a slave device in IO-Link communication.
The method synchronizes slave devices with master devices in IO-Link communication by analyzing INIT requests and data transmissions, enhancing timing accuracy using internal oscillators and multiple transceiver modules, addressing the limitations of existing systems.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- RENESAS ELECTRONICS GERMANY GMBH
- Filing Date
- 2022-02-22
- Publication Date
- 2026-07-29
AI Technical Summary
Existing IO-Link communication systems face challenges in achieving accurate timing between master and slave devices due to the limitations of internal oscillators and the need for external crystal-based timing references, which are space-consuming.
A method for detecting and correcting the timing of slave devices by analyzing INIT requests and data transmissions to synchronize with the master device's actual timing, using internal oscillators and multiple asynchronous transceiver modules with different initial settings to enhance accuracy.
Improves timing accuracy between master and slave devices, especially over temperature variations, by synchronizing slave devices to the master's timing, allowing reliable communication without external components.
Smart Images

Figure 0007897019000002 
Figure 0007897019000003 
Figure 0007897019000004
Abstract
Description
Technical Field
[0001] The present invention relates to a method for detecting and correcting the timing of slave devices in IO-Link communication, where the master device and the slave device operate at a common basic timing. The present invention further relates to a slave device for IO-Link communication, where the master device and the slave device operate at a common basic timing.
Background Art
[0002] IO-Link is a short-distance industrial communication network standard (IEC 61131-9). Communication via IO-Link is bidirectional, digital, between two points, and can be wired or wireless. IO-Link is used, for example, to connect digital sensors and actuators in industrial applications. IO-Link comprises a master device and at least one slave device, i.e., a sensor or an actuator. The master device provides an interface to a higher-level controller (PLC) and controls, particularly initiates, communication with the slave device. IO-Link communication between the master device and at least one slave device is based on Universal Asynchronous Receiver / Transmitter (UART) communication.
[0003] Universal Asynchronous Receiver / Transmitter (UART) communication is asynchronous serial communication where the data format and transmission speed can be structured. The main design aspect and requirement (asynchronous) of UART communication is the timing accuracy between the master device and the slave device. Timing is defined, for example, by an agreed baud rate, and the master device and the slave device use a crystal-based timing reference or an oscillator. However, the internal oscillator cannot provide the required timing accuracy over the full temperature range, and an external crystal-based timing reference requires additional space.
Summary of the Invention
[0004] Therefore, the objective of the present invention is to improve the timing accuracy between the master device and the slave device in IO-Link communication.
[0005] This objective is addressed by a time detection and correction method for the slave device in IO-Link communication, where the master and slave devices operate with a common basic timing, including the following procedure: During communication setup, detect the INIT request sent from the master device to the slave device. The actual timing of the master device is calculated from the received INIT request. Based on the calculated timing of the master device, the initial timing of the slave device is corrected to the actual timing.
[0006] In IO-Link communication, particularly in general-purpose asynchronous transceiver communication, the master and slave devices operate on a common base timing. For example, the slave device includes a UART module to detect INIT requests sent from the master device during communication setup, as is known in prior art. To improve timing accuracy, the slave device, in particular the UART module, analyzes the received INIT request and calculates the actual timing of the master device from the received INIT request. Because the master and slave devices operate on a common base timing, the slave device has information about the base timing, and based on this, the slave device can calculate the actual timing from the received INIT request by detecting the difference from the expected base timing.
[0007] The initial timing of a slave device, based on a common base timing, is corrected to the actual timing based on the calculated actual timing of the master device. Because the initial timing of the slave device is corrected to the actual timing of the master device based on the INIT request transmitted and received by the master device, the slave device can use an internal oscillator as a timing reference for the common base timing. Such an oscillator does not provide the required accuracy, especially over high-temperature ranges, but the method according to the present invention improves accuracy based on the actual timing of the master device calculated from the received INIT request. Thus, using the method according to the present invention, the slave device can use the oscillator timing reference while simultaneously providing the timing accuracy required for protocol communication.
[0008] According to a preferred modification of the present invention, the common basic timing is defined as the baud rate, and the correction of the initial timing of the slave device is based on the baud rate offset. The baud rate specifies the speed of communication over a data channel in telecommunications or electronic equipment. The unit of baud rate is the number of symbols per second or the number of pulses per second. The baud rate offset specifies how the initial timing, i.e., the initial baud rate, must be corrected (corrected) to correspond to the actual timing of the master device, i.e., the actual baud rate.
[0009] In an advantageous modification of the present invention, the method further comprises the step of continuously tracking the actual timing of the master device and correcting the actual timing of the slave device. Thus, the timing of the slave device is corrected not only at the start of communication, i.e., not only by correcting the initial timing of the slave device, but also continuously by tracking the actual timing of the master device and correcting the actual timing of the slave device.
[0010] According to a modified version of the present invention, continuous tracking of the master device's actual timing comprises the step of calculating the master device's actual timing from at least one received data transmission at the slave device. Thus, instead of analyzing an INIT request sent by the master device during communication setup, the slave device continuously corrects its actual timing by analyzing normal received data transmissions.
[0011] According to a modified version of the present invention, the step of calculating the actual timing of the master device from at least one received data transmission at the slave device is performed after each received data transmission or at regular intervals. Depending on the accuracy of the timing reference of the slave device, the step of calculating the actual timing of the master device from the received data transmission at the slave device is performed after each received data transmission or at regular intervals.
[0012] In a further modification of the present invention, the actual timing of the slave device is corrected after the completion of one or more complete master telegrams, each master telegram comprising two or more data transmissions. The first master telegram comprises an INIT request and one or more data transmissions. In this modification, the slave device receives multiple data transmissions from the master device in the so-called master telegram, i.e., it receives an INIT request and one or more data transmissions. After receiving the complete master telegram, the slave device corrects its timing based on an analysis of each data transmission, i.e., based on the INIT request and data transmissions in the master telegram. At the same time, the slave device can prepare a response to the master telegram and send that response to the master device using the slave device's corrected actual timing.
[0013] According to a modified version of the present invention, the actual timing correction of the slave device is based on multiplexed data transmission of low-pass filtering in one or more master telegrams. Again, the first master telegram contains an INIT request, which may also be considered during low-pass filtering.
[0014] According to an advantageous modification of the present invention, the step of calculating the actual timing of a master device from an received INIT request and / or a received data transmission includes the step of extracting timing information from the received INIT request and / or a received data transmission. The step of extracting timing information from the received INIT request and / or a received data transmission is based, for example, on an analysis of the bits of the INIT request and / or a received data transmission.
[0015] In a particularly preferred variation of the present invention, the step of extracting timing information from an received INIT request and / or received data transmission includes the step of detecting rising and / or falling edges in the INIT request and / or received data transmission. By calculating the time between specific rising and / or falling edges of bits in the INIT request and / or received data transmission, the slave device can calculate the actual timing of the master device.
[0016] According to a modified version of the present invention, the step of extracting timing information from a received INIT request and / or a received data transmission is performed by a hardware component of the slave device. Extraction of timing information from a received INIT request and / or a received data transmission can be easily performed by the hardware component, for example, by detecting the rising and / or falling edges of bits in the received INIT request and / or a received data transmission using a comparator. The hardware component provides even higher accuracy.
[0017] According to another modification of the present invention, the step of calculating the actual timing of the master device from the received INIT request and / or received data transmission is performed by a software component of the slave device, and the software component processes the timing information extracted from the received INIT request and / or received data transmission. The software component has the advantage that it can easily correct, optimize, and / or replace the algorithm used to calculate the actual timing from the timing information extracted from the received INIT request and / or received data transmission.
[0018] In an advantageous modification of the present invention, the initial timing and / or actual timing of the slave device is corrected only when a certain threshold is exceeded. Therefore, slight deviations in the actual timing of the slave device from the actual timing of the master device do not adversely affect data transmission and are not corrected every time. Only when a certain threshold is exceeded does the actual timing of the slave device have to be corrected to the actual timing of the master device in order to avoid any adverse effects on data transmission. The threshold level can be parameterized or adaptive, for example; that is, the threshold can depend on a specific parameter or can be modified.
[0019] According to a modified version of the present invention, the step of calculating the actual timing of a master device from an received INIT request and / or from at least one received data transmission includes the step of counting clock pulses in the INIT request, in at least one data transmission, and / or in the master telegram.
[0020] According to a preferred modification of the present invention, an IO-Link communication slave device comprises at least one general-purpose asynchronous transceiver (UART) module that performs the following method steps: During communication setup, the slave device detects an INIT request sent from the master device. The actual timing of the master device is calculated from the received INIT request. Based on the calculated timing of the master device, the initial timing of the slave device is corrected to the actual timing.
[0021] In a particularly preferred modification of the present invention, the IO-Link communication slave device comprises multiple general-purpose asynchronous transceiver (UART) modules, each performing the method steps described above and having different initial timing settings. Thus, the IO-Link slave device has multiple UART modules, each configured with a different initial timing. For example, the slave device comprises four UART modules with different initial timings distributed over + / - 5%. The different initial timing settings increase the chances that one UART module will correctly receive an INIT request sent from the master device during communication setup. This UART module is then used for IO-Link communication. Increasing the number of UART modules allows for detection of INIT requests over a wider timing range.
[0022] This objective is further addressed by an IO-Link communication slave device, where the master and slave devices operate with a common base timing, and the slave device comprises at least one general-purpose asynchronous transceiver module that performs the method according to the present invention. The slave device may include specific hardware and / or software for performing the method of the present invention. Preferably, the slave device is implemented within an integrated circuit without external components such as a crystal-based timing device, for example. The integrated circuit may include memory for storing the software components of the slave device.
[0023] According to a preferred modification of the present invention, the slave device includes multiple general-purpose asynchronous transceiver modules having different initial timing settings, each of which executes the method according to the present invention. Therefore, the IO-Link slave device has multiple UART modules, each of which is configured with a different initial timing. For example, the slave device includes four UART modules having different initial timings distributed over + / - 5%. Since the initial timing settings are different, the chance that one UART module correctly receives the INIT request transmitted from the master device during the communication setup is increased. Thereafter, this UART module is used for IO-Link communication. Increasing the number of UART modules makes it possible to detect the INIT request within a wider timing range.
Brief Description of Drawings
[0024] Hereinafter, the present invention will be further described with respect to the embodiments shown in the attached drawings. It is shown below. [Figure 1] It is a flowchart of the first embodiment of the timing and detection method of the slave device in IO-Link communication according to the present invention. [Figure 2] It is a flowchart of the second embodiment of the timing and detection method of the slave device in IO-Link communication according to the present invention. [Figure 3] It is a signal diagram of the extraction of the timing information from the INIT request of the IO-Link communication and the received INIT request.
Modes for Carrying Out the Invention
[0025] FIG. 1 shows a flowchart of the first embodiment of the timing and detection method of the slave device in IO-Link communication.
[0026] IO-Link communication is asynchronous, meaning the master and slave devices operate on a common base timing. In asynchronous communication, there is no common timing reference between the master and slave devices. Timing is defined, for example, by an agreed baud rate, and the master and slave devices use crystal-based timing references or oscillators. A key design aspect and requirement of IO-Link communication (asynchronous) is timing accuracy between the master and slave devices.
[0027] According to the timing detection and correction method of the present invention, the slave device detects the actual timing of the master device and corrects its initial timing to the actual timing of the slave device. In a preferred embodiment, the slave device continuously tracks the actual timing of the master device and corrects its actual timing to the actual timing of the master device.
[0028] As shown in Figure 1, the method of the present invention is initiated, i.e., the slave device prepares for communication and listens on the communication channel. This is initiated by the master device, for example, by sending a Wake Up Request (WURQ) to the slave device.
[0029] After the slave device prepares for communication and listens on the communication channel, the master device sends an INIT request to the slave device via the communication channel to set up communication between the master and slave devices. The slave device detects the INIT request sent from the master.
[0030] From the received INIT request, the slave device calculates the actual timing of the master device. Before sending a response to the master device, the slave device corrects its initial timing to the calculated actual timing of the master device, thereby improving the timing accuracy between the master and slave devices.
[0031] After communication between the master and slave devices is established, the slave device continuously tracks the master device's actual timing and corrects it accordingly. This is achieved by the slave device receiving data transmissions from the master device and calculating the master device's actual timing from the received data transmissions. This can be done, for example, after each received data transmission or after a predefined number of data transmissions.
[0032] The step of calculating the actual timing of the master device from the received INIT request and / or received data transmission preferably includes the step of extracting timing information from the received INIT request and / or received data transmission. Extracting timing information from the received INIT request and / or received data transmission includes, for example, the step of detecting rising and / or falling edges in the INIT request and / or received data transmission. The difference between the rising and / or falling edges detected in the INIT request and / or received data transmission is used to calculate the actual timing of the master device.
[0033] The step of calculating the actual timing of the master device from an received INIT request and / or from at least one received data transmission includes the step of counting clock pulses of the INIT request or at least one data transmission. For example, clock pulses between predefined rising or falling edges of an INIT request, or at least one data transmission, are counted.
[0034] The step of extracting timing information from the received INIT request and / or received data transmission is performed by the slave device's hardware components. For example, a hardware comparator detects the rising and / or falling edges of the INIT request and / or received data transmission.
[0035] The step of calculating the actual timing of the master device from the received INIT request and / or received data transmission is performed by the slave device's software component, which processes the timing information extracted from the received INIT request and / or received data transmission.
[0036] According to a preferred modification of the present invention, the initial timing and / or actual timing of the slave device is corrected only if it exceeds a certain threshold. Therefore, if there is only a slight difference in timing between the master device and the slave device and it does not adversely affect communication, the timing of the slave device is not corrected.
[0037] The method according to the present invention is performed by the slave device until communication with the master device is completed.
[0038] Advantageously, IO-Link communication slave devices feature multiple general-purpose asynchronous transceiver modules, each performing the following steps: During communication setup, the master device sends an INIT request to the slave device, The actual timing of the master device is calculated from the received INIT request. Based on the calculated timing of the master device, the initial timing of the slave device is corrected to the actual timing.
[0039] Furthermore, each of the multiple general-purpose asynchronous transceiver modules has a different initial timing setting. This increases the likelihood that the INIT request sent by the master device during communication setup will be correctly received by at least one general-purpose asynchronous transceiver module. The module that correctly receives the INIT request is selected for further communication between the slave and master devices. If multiple modules correctly receive the INIT request, it is desirable to select the fastest module.
[0040] Figure 2 shows a flowchart of a second embodiment of the timing and detection method for a slave device in IO-Link communication.
[0041] The second embodiment shown in Figure 2 differs from the first embodiment shown in Figure 1 in that the actual timing of the slave device is corrected after the completion of one or more complete master telegrams. The master telegram comprises two or more data transmissions or INIT requests and at least one data transmission.
[0042] When a slave device receives one or more complete master telegrams, the slave device can calculate the master device's actual timing from the received master telegrams, i.e., from the INIT request and one or more data transmissions, each consisting of two or more data transmissions.
[0043] In this modified version, the actual timing correction of the slave device can be based, for example, on low-pass filtered multiplexed data transmissions in one or more master telegrams.
[0044] Figure 3 shows the signal diagram for an INIT request in IO-Link communication and the extraction of timing information from the received INIT request.
[0045] When the slave device detects the falling edge of the INIT request's start bit, the following counter is started: Telegram_counter, Bit Time Counter, Bit_num_counter.
[0046] The telegram_counter counts the clock pulses from the first falling edge of the protocol to the end of the protocol. The protocol is an INIT request or data transmission according to the first embodiment shown in Figure 1, or a data telegram according to the second embodiment shown in Figure 2. The clock pulses are generated by the timing reference of the slave device.
[0047] The bit_time_counter counts the number of nominal clock pulses for each configured bit_time. The configured bit_time depends on a common base timing, in particular, on the baud rate agreed upon between the master and slave devices. The bit_time_counter completes one rotation when it reaches the bit_time_clock value. The bit_time_counter triggers a count pulse for the bit_num_counter at approximately 50% of the bit_time, taking into account the early / late arrival of the next edge.
[0048] The bit_num_counter counts the bit time elapsed since the protocol's first falling edge, based on a checkmark triggered by the bit_time_counter.
[0049] As soon as the first rising edge of the protocol is detected, the value of the telegram_counter is stored in the register ct_first_rising, and the value of the bit_num_counter is stored in the register nbit_first_rising.
[0050] As soon as the protocol detects a falling edge after the first falling edge, the value of the telegram_counter is stored in the register ct_falling, and the value of the bit_num_counter is stored in the register nbit_falling. This is repeated until the protocol terminates.
[0051] As soon as the protocol detects a rising edge after the first rising edge, the value of the telegram_counter is stored in the register ct_rising, and the value of the bit_num_counter is stored in the register nbit_rising. This is repeated until the protocol terminates.
[0052] The acquired timing values are shown in Figure 3.
[0053] The actual timing of the slave device is corrected as follows:
[0054]
number
[0055] While continuously tracking the actual timing of the master device, the slave device, for example, checks whether the timing is within a specific limit defined by a threshold. The threshold is defined, for example, by the register x_counts. The slave device continues to extract the above timing information from the received data transmission (protocol).
[0056] The actual timing of the slave device is corrected, for example, as follows: If(((bit_time_clock * nbit_rising)+ pulse_asymmetry)<(ct_rising - x_counts)) then increase bit_time_clock else if(((bit_time_clock * nbit_rising)+ pulse_asymmetry)>(ct_rising + x_counts)) then decrease bit_time_clock Otherwise, no change.
[0057] This is just one example of an algorithm for correcting the initial and / or actual timing of a slave device to the actual timing of a master device. Other, more complex approaches, such as low-pass filtering, can also be used.
Claims
1. A method for detecting and correcting the timing of a slave device in IO-Link communication, wherein the master device and the slave device operate with a common basic timing, the method includes the following steps: During communication setup, the slave device detects an INIT request sent from the master device. The actual timing of the master device is calculated from the received INIT request. Based on the calculated actual timing of the master device, the initial timing of the slave device is corrected to the actual timing. Furthermore, the method includes a number of general-purpose asynchronous transceiver modules, each performing the method steps and having different initial timing settings, wherein the slave device for the IO-Link communication includes multiple such modules.
2. In the timing detection and correction method described in claim 1, A method in which the aforementioned common basic timing is defined as the baud rate, and the correction of the initial timing of the slave device is based on a baud rate offset.
3. A timing detection and correction method according to claim 1 or claim 2, further comprising the steps of continuously tracking the actual timing of the master device and correcting the actual timing of the slave device.
4. In the timing detection and correction method described in claim 3, A method for continuously tracking the actual timing of the master device, comprising the step of calculating the actual timing of the master device from at least one received data transmission at the slave device.
5. In the timing detection and correction method described in claim 4, The step of calculating the actual timing of the master device from at least one received data transmission at the slave device is performed after each received data transmission.
6. In the timing detection and correction method according to claim 4 or claim 5, The actual timing of the slave device is corrected after the completion of one or more complete master telegrams, and one master telegram includes two or more data transmissions.
7. In the timing detection and correction method described in claim 6, The actual timing correction of the slave device is based on a method of low-pass filtered multiplexed data transmission from one or more master telegrams.
8. In the timing detection and correction method according to any one of claims 4 to 7, Calculating the actual timing of the master device from the received INIT request and / or the received data transmission is a method comprising the step of extracting timing information from the received INIT request and / or the received data transmission.
9. In the timing detection and correction method described in claim 8, A method comprising the step of extracting timing information from the received INIT request and / or the received data transmission, the step of detecting rising edges and / or falling edges in the INIT request and / or the received data transmission.
10. In the timing detection and correction method according to claim 8 or 9, A method in which the step of extracting timing information from the received INIT request and / or the received data transmission is performed by the hardware components of the slave device.
11. In the timing detection and correction method according to any one of claims 8 to 10, The step of calculating the actual timing of the master device from the received INIT request and / or the received data transmission is performed by a software component of the slave device, and the software component processes the timing information extracted from the received INIT request and / or the received data transmission.
12. In the timing detection and correction method according to any one of claims 8 to 10, A method by which the initial timing and / or actual timing of the slave device are corrected only when a certain threshold is exceeded.
13. In the timing detection and correction method according to any one of claims 4 to 7, A method for calculating the actual timing of the master device from the received INIT request and / or from at least one received data transmission, comprising the steps of counting the INIT request, the at least one received data transmission, and / or clock pulses in the master telegram.
14. A slave device for IO-Link communication that operates with the same basic timing as the master device, A slave device that performs the method according to any one of claims 1 to 13.