Data exchange method and master / slave fieldbus system

By introducing status information and recalculating counter fields in the telegram, the problem of data loss caused by inactive functional modules in the modular switchgear system was solved, ensuring the effectiveness of data transmission and the continuity of production.

CN122162349APending Publication Date: 2026-06-05BECKHOFF AUTOMATION GMBH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BECKHOFF AUTOMATION GMBH
Filing Date
2024-11-07
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In modular switchgear systems, because sub-connections and functional connections are implemented in separate units, the main user cannot identify inactive functional modules, leading to erroneous data loss, communication interruptions, and unwanted production failures.

Method used

By introducing status information into the telegram, the master user can identify whether the functional connection in the sub-user is active, and recalculate the expected value of the working counter using the counter fields of the status datagram and the data datagram to ensure that only valid data is received.

Benefits of technology

Effective identification and processing of valid data in telegrams avoids communication interruptions and production failures caused by inactive functional modules, thereby improving the reliability and flexibility of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122162349A_ABST
    Figure CN122162349A_ABST
Patent Text Reader

Abstract

In a field bus system, the sub-users (3) each have a sub-connection (33) and a functional connection (34) connected to the sub-connection (33), wherein in each sub-user status information is acquired which indicates whether the functional connection is active or inactive. A telegram output by a master user in the field bus system has at least one data report, wherein the status information of the sub-users (3) addressed in the data report is acquired together with the telegram. Furthermore, a counter field of the data report is changed by the sub-connections (33) of the sub-users (3) which have processed the useful data field in a manner predefined for the data transmission operation performed in each case. The data report is assigned an expected value of the counter field which arises when the useful data field has been processed by the sub-users (3) addressed in accordance with the data transmission operation predetermined in the command field. The master user (2) then determines the expected value of the counter field of the data report on the basis of the status information acquired with the telegram and compares it with the value of the counter field in the data report processed by the sub-users (3) addressed in order to determine a processing error in the data report processed by the sub-users (3) addressed in the event of a deviation.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This patent application claims priority to German patent application 10 2023 130 771.1, the disclosure of which is incorporated herein by reference. Technical Field

[0002] This invention relates to a data exchange method based on the master user / sub-user principle and a master user / sub-user fieldbus system. Background Technology

[0003] In manufacturing and process automation, fieldbus systems are used, in which distributed machine peripherals, such as input and / or output modules, drives, and operator terminals, are connected to the control unit via a fieldbus.

[0004] Data exchange on a fieldbus is typically based on a master / slave user principle. The control unit on the fieldbus is the active bus user, hereinafter referred to as the master user. The master user has bus access permissions and determines the data transmission on the fieldbus. Passive users, hereinafter referred to as slave users, are usually peripheral devices of the machine. Slave users do not have bus access permissions and can only acknowledge received data or send data upon request from the master user.

[0005] On a fieldbus, data is preferably transmitted between bus users in the form of data packets (hereinafter also referred to as telegrams). In this case, the processing of data from telegrams is typically performed in the sub-users by providing sub-connections within the sub-users.

[0006] When a telegram is generated in the master user’s master connection, the telegram is pre-configured so that for each sub-user on the fieldbus, it is determined which part of the useful data area of ​​the telegram the sub-user’s sub-connection should exchange data with during transit, or which data transfer operation should be performed.

[0007] Furthermore, the primary user's main connection assigns an additional counter field, known as the working counter, to the useful data area in the telegram. This additional counter field is incremented by the sub-connection in the sub-user when it exchanges data with the relevant portion of the useful data area in the telegram during transit. In this case, the change in the counter field caused by the sub-connection in the sub-user occurs in a predefined manner, which specifies the data transmission operation performed in each case.

[0008] As part of the telegram pre-configuration, the master user determines the value of the working counter assigned to the telegram, expecting this value if the useful data area in the telegram has been successfully processed by all addressed sub-users according to the predetermined data transmission operation. Then, upon receiving the processed telegram, the master user can check whether the complete telegram processing has been completed by comparing the expected value of the working counter with the actual value of the working counter in the processed telegram.

[0009] If the master user detects a processing error of the addressed sub-user during comparison, the master user discards the message to prevent tampering with the control tasks performed by the master user in the fieldbus system due to erroneous message processing.

[0010] However, for example in a modular switchgear system, if in a sub-user, the sub-connection and the functional connection that provides the data to be exchanged with the useful data area of ​​the telegram are implemented in separate units so that the functional module containing the functional connection can be activated or deactivated during the current operation, then even if one or more sub-users are not involved in the processing due to inactive functional modules, except for the sub-users in the fieldbus system that correctly process the data in the useful data area of ​​the telegram, the master user can determine the processing error when comparing the counter field value.

[0011] However, in the event of such a practically permissible processing error indicated by the working counter in the telegram, the master user discarding the telegram data can be critical for the fieldbus system. Discarding the data causes a communication interruption on the fieldbus, thus preventing the active functional module from being addressed by the controller. Undesirable production failures can occur when using functional modules in the context of manufacturing and process automation. Summary of the Invention

[0012] One object of the present invention is to provide a data exchange method based on the master user / sub-user principle and a master user / sub-user fieldbus system, wherein the master user can identify which data in a telegram is valid and which data is invalid when the sub-user is processing the telegram.

[0013] This objective is achieved through the features of the independent claim. The dependent claims describe the implementation methods.

[0014] A fieldbus system includes a transmission path, through which at least one master user and multiple sub-users are interconnected, wherein each sub-user has a sub-connection and a functional connection connected to the sub-connection. Status information indicating whether the functional connection is active or inactive is obtained in each sub-user. The master user sends a telegram on the transmission path, wherein the sub-connections of the sub-users process the telegram in transmission, wherein the telegram sent by the master user has at least one datagram including a control data field, a useful data field, and a counter field. The control data field includes an address field and a command field, wherein the address field specifies the sub-user to exchange data with the useful data field, and wherein the command field defines the data transfer operation to be performed by the sub-user with the useful data field. If the command field of the datagram specifies a write operation as the data transfer operation to be performed by the sub-user, then when the functional connection is active, the data to be written to the useful data field of the datagram is provided by the functional connection to the sub-connection of the sub-user, wherein the counter field is changed by the sub-connection of the sub-user that has already processed the useful data field in a predefined manner for the data transfer operation performed in each case. The status information of the sub-user addressed in the datagram is obtained together with the telegram. The datagram is assigned an expected value for a counter field, which is generated when a useful data field has been processed by the addressed sub-user according to the data transmission operation pre-defined in the command field. The master user determines the expected value of the counter field of the datagram based on the status information obtained from the telegram and compares it with the value of the counter field in the datagram processed by the addressed sub-user in order to determine the processing error in the datagram processed by the addressed sub-user in case of discrepancies.

[0015] The master user can identify whether a sub-user has successfully processed a datagram by the value of the counter field in the datagram. If one or more sub-users fail to process the datagram or only partially process it, the master user can determine such a processing error by comparing the expected value of the counter field with the actual value of the counter field. To enable the master user to identify which data in a datagram is valid and which is invalid with minimal overhead in Ethernet telegrams, status information is used in sub-users to detect whether the functional connections in the sub-users are active. The sub-user status information indicating whether the functional connections are active or inactive can be obtained along with the master user's telegram so that the expected value of the counter field of the datagram can be calculated based on the obtained status information.

[0016] Messages sent from the master user may include status datagrams and data datagrams, where the address fields of the status datagram and the data datagram specify the same sub-user. For each addressed sub-user, a data area for status information is provided in the useful data field of the status datagram, and a data area for the data to be exchanged is provided in the useful data field of the data datagram, where the command field of the status datagram specifies the write operation. The master user can then determine the expected value of the counter field of the data datagram based on the status information obtained from the status datagram processed by the addressed sub-user, and compare it with the value of the counter field in the data datagram processed by the addressed sub-user to determine processing errors in the data datagram processed by the addressed sub-user in case of discrepancies. This process ensures that the master user receives status datagrams in a manner consistent with the data datagrams, since both datagrams are in the same message. However, the arrangement of datagrams in the message and the arrangement of data areas in a single datagram are freely selectable to suit the requirements of the fieldbus system.

[0017] The master user can also check whether the value in the counter field of the status datagram is the expected value, which is generated when all addressed sub-users have successfully performed the write operation to input status information into the useful data field of the status datagram. This additional check makes it easier for the master user to pinpoint the cause of processing errors in the fieldbus system.

[0018] The datagram can be a status / data datagram. Optionally, for each addressed sub-user in the useful data field, it has a portion in the data area allocated to the addressed sub-user for status information. This status information is initialized by the master user using an indicator function to connect inactive status information. Write operations in the command field of the status / data datagram serve as data transmission operations to be performed by the sub-user. The master user determines the expected value of the counter field of the status / data datagram based on the status information obtained from the status / data datagram processed by the addressed sub-user and compares it with the value of the counter field in the status / data datagram processed by the addressed sub-user to determine processing errors in the status / data datagram processed by the addressed sub-user in case of discrepancies. Through this process, status information can be obtained without changing the telegram structure.

[0019] The status information indicating whether the function connection is active or inactive can be 1 bit of data, which keeps the amount of extra data to a minimum.

[0020] Telegrams can be constructed as Ethernet telegrams, where the EtherCAT protocol is used as the Ethernet protocol type for interpreting the datagrams.

[0021] In a fieldbus system, sub-connections and functional connections can be implemented in separate units within a sub-user. A fieldbus system can be constructed with basic modules and functional modules, wherein the basic modules include sub-connections connected to basic connection elements, and the functional modules include functional connections connected to module connection elements, and wherein the basic connection elements and module connection elements form a plug connection.

[0022] Fieldbus systems can be modularly designed in such a way that, within sub-users, sub-connections and the functional connections that provide data to the sub-connections for exchange with the useful data area of ​​the telegram are implemented in separate units. Utilizing the status information in the status datagram, and based on the expected value of the datagram's counter field, this prevents the master user from detecting processing errors when comparing counter field values, even if one or more sub-users, other than those who correctly processed the data in the useful data area of ​​the telegram within the fieldbus system, are not involved in processing due to inactive functional modules.

[0023] The functional module may include multiple sub-connections that are connected to each other via a serial data bus and to fieldbus terminals, wherein each sub-connection is connected to a basic connection element, and the module connection element of the functional module can be inserted into the basic connection element. Attached Figure Description

[0024] The invention will now be explained in more detail with reference to the accompanying drawings. The same reference numerals denote the same or equivalent components.

[0025] Figure 1 The structure of a fieldbus system is illustrated schematically.

[0026] Figure 2 The structure of an Ethernet telegram is illustrated schematically.

[0027] Figure 3 The structure of a datagram in Ethernet telegram is illustrated schematically.

[0028] Figure 4 A modular switchgear system with basic modules and functional modules is schematically shown.

[0029] Figure 5 It shows Figure 4 The basic modules.

[0030] Figure 6 It shows Figure 4 Functional modules.

[0031] Figure 7 Schematic illustration of crossing Figure 4 The cross-section of the basic module in the text.

[0032] Figure 8The structure of a status datagram and status datagram in Ethernet telegram is illustrated schematically.

[0033] Figure 9 The structure of a status / data datagram in Ethernet telegram is shown. Detailed Implementation

[0034] In industrial automation, communication networks are used in the form of serial bus systems, where distributed machine peripherals communicate with control units. Bus users are interconnected via fieldbuses. Data exchange between bus users is conducted in a packet-oriented manner using a master / sub-user principle, where the master user determines the data transmission on the fieldbus.

[0035] Fieldbus systems with a master / sub-user architecture can operate using different transmission protocols, among which Ethernet-based protocols are preferred for telegraph transmission.

[0036] The default length of an Ethernet telegram is 1518 bytes, of which 18 bytes are reserved for the header and trailer. The header of an Ethernet telegram includes a data field that defines which Ethernet protocol type should be used to interpret the useful data in the telegram.

[0037] Furthermore, in industrial automation, protocols that guarantee real-time capabilities are preferred. The EtherCAT protocol is a real-time standard for Ethernet technology, where the processing of useful data in Ethernet telegrams is performed by sub-users during transmission.

[0038] In the EtherCAT protocol, useful data blocks in an Ethernet telegram are divided into a header section (hereinafter also referred to as the EtherCAT header) and one or more datagrams. The EtherCAT header contains characteristic data fields that define the length of the datagram.

[0039] A datagram consists of a header, a trailer, and a data portion in between. The header, also known as the datagram header, provides an address field and a command field. The address field specifies the sub-user who will exchange data with the data portion of the datagram during its transit. The command field then defines the data transfer operation to be performed with the addressed sub-user, which can be a read operation, a write operation, or a combination of read and write operations.

[0040] The invention is explained below using an example of an Ethernet-based fieldbus system, where the EtherCAT protocol is used for data transmission. However, the invention is neither limited to Ethernet-based fieldbus systems nor to the EtherCAT protocol. In principle, the invention can be used in all fieldbus systems where sub-users will process telegraph data during transmission. For example, as an alternative, the Ethernet-based Sercos-3 protocol can be used.

[0041] Figure 1 A possible design for a fieldbus system is illustrated schematically. The fieldbus system has a transmission path 1, such as a wire or optical fiber. Bus users connect to transmission path 1. Figure 1 The design scheme with a main user 2 and four sub-users 3, namely the first sub-user 301, the second sub-user 302, the third sub-user 303 and the fourth sub-user 304 is shown.

[0042] Using EtherCAT technology, a master user can be networked with up to 65,534 sub-users. Several master users can also connect to the transmission path simultaneously. Master users and sub-users can be directly integrated into the transmission path, or they can connect to the transmission path through independent interface modules. For illustration... Figure 1 The expansion possibilities of the fieldbus system are shown, with a circuit drawn as a placeholder between the second sub-user 302 and the third sub-user 303.

[0043] The execution of data transmission to transmission path 1 is defined by a communication protocol, which in this embodiment is defined by the EtherCAT protocol. The EtherCAT protocol is implemented in master user 2 in master connection 23. The communication protocol portion required by sub-user 3 is stored in sub-connection 33.

[0044] An EtherCAT network logically represents an open ring bus, where master user 2 outputs Ethernet messages to transmission path 1 at one end and receives processed messages from sub-user 3 at the other end.

[0045] like Figure 1 As shown, telegram transmission is carried out in such a way that the main connection 23 of the main user 2 outputs an Ethernet telegram via the main transmitter 22 on the transmission path 1 to the first sub-user 301 seen by the main transmitter 22 in the main user 2.

[0046] The first sub-user 301 receives an Ethernet telegram via the first sub-receiver 311, processes the Ethernet telegram during the process of passing through the first sub-connection 331, and forwards the processed Ethernet telegram to the second sub-user 302 via the first sub-transmitter 321 on transmission path 1 with a delay of several bits.

[0047] The second sub-user 302 receives the Ethernet telegram via the second sub-receiver 312, processes the Ethernet telegram during the process of passing through the second sub-connection 332, and forwards the processed Ethernet telegram to the third sub-user 303 via the second sub-transmitter 322 on transmission path 1 with a delay of several bits.

[0048] The third sub-user 303 receives the Ethernet telegram via the third sub-receiver 313, processes the Ethernet telegram during the process of passing through the third sub-connection 333, and forwards the processed Ethernet telegram to the fourth sub-user 304 via the third sub-transmitter 323 on transmission path 1 with a delay of several bits.

[0049] The fourth sub-user 304 receives Ethernet telegrams via the fourth sub-receiver 314, processes the Ethernet telegrams during the process of passing through the fourth sub-connection 334, and returns the processed Ethernet telegrams to the master receiver 21 of the master user 2 via the fourth sub-transmitter 324 after a delay of a few bits.

[0050] In networks operating using the EtherCAT protocol, and Figure 1 Unlike the previous example, the transmission path can also be directional, where, from the master user's perspective, the transmission path forms a physical chain, and the Ethernet telegram is traversed twice by all sub-users, i.e., in the outbound and return journeys. In this case, the telegram processing of sub-connections within a sub-user preferably occurs en route. The return path is used for signal amplification and for locating and closing interruptions on the transmission path. The chain structure can also be extended to form a flexible tree structure by branching at any desired sub-user.

[0051] The telegram generation occurs in the master connection 23 of master user 2. In the case of the EtherCAT protocol, master connection 23 in master user 2 generates Ethernet telegram 100, such as... Figure 2 As shown. An Ethernet telegram consists of a header data field 110 (hereinafter also referred to as the Ethernet header), a useful data field 120, and a test character field 130 at the end.

[0052] The destination and source addresses are defined in the Ethernet header 110. Furthermore, the Ethernet header 110 specifies which protocol is used to interpret the data in the Useful Data field 120. In the illustrated embodiment, the EtherCAT protocol is displayed in the Ethernet header 110. The test character field 130 at the end of the Ethernet telegram indicates a so-called FCS (Frame Check Sequence) to enable the detection of errors in data transmission.

[0053] Then, the useful data field 120 in the Ethernet telegram 100 contains the actual EtherCAT data packet, which can be up to 1500 bytes long in the case of a standard Ethernet telegram frame. The EtherCAT data packet consists of a header section (also called the EtherCAT header) and one or more datagrams. If the entire Ethernet telegram is less than 64 bytes, so-called padding bytes are inserted after the datagram at the end of the EtherCAT data packet. The EtherCAT header contains length information, reserved bits, and protocol type information.

[0054] Figure 3 An example of a datagram structure is shown. Datagram 200 consists of a control data field 201, a useful data field 202, and a termination field 203. The control data field 201 includes a command field Cmd, an identifier field Idx, an address field Address, a length field Length, and an interrupt field IRQ.

[0055] The command field Cmd specifies, among other things, how the sub-user should process the datagram. In this case, the command field Cmd can be used with a first value to identify the datagram as a read datagram, where the sub-user should read the useful data field 202 from the datagram. With a second value, the command field Cmd can alternatively identify the datagram as a write datagram, whereby the sub-user will write data into its useful data field 202. A third value in the command field Cmd can identify the datagram as a read / write datagram, where the sub-user will perform both reading data from and writing data to the useful data field 202. With a fourth value, the command field Cmd can identify the datagram as an empty datagram, whereby the sub-user should leave the useful data field unchanged.

[0056] The primary user uses the Idx field to identify datagram 200 so that it can redistribute datagrams after receiving them.

[0057] The Address field indicates which sub-users(s) are selected to perform the data exchange operation specified in the Command field Cmd. In this case, addressing can be performed in various ways to suit network requirements.

[0058] In the context of broadcast telegrams, there is the possibility of physical addressing for a single sub-user, multiple sub-users, or all sub-users. However, logical addressing can also be performed optionally. In logical addressing, the physical address of the sub-user is pre-assigned a logical address, wherein the assignment is pre-stored in an FMMU (Fieldbus Memory Management Unit) unit, which is part of the sub-connection of the sub-user.

[0059] When a logically addressed datagram is received, the sub-connection in the sub-user checks if there is an address match with the stored logical address, and then determines the corresponding physical address allocated in the sub-user. Logical addressing allows any desired storage area within a sub-user to be mapped, even bit-by-bit, to any desired logical address, thus enabling simultaneous addressing of multiple sub-users, for example, with a datagram. Logical addressing is particularly suitable for transmitting process data between master and sub-users. Physical addressing is preferred for transmitting parameter data.

[0060] The Length field in the control data field 201 of datagram 200 indicates the length of the useful data field 202.

[0061] The interrupt field IRQ defines the interrupt that is displayed from the sub-user to the master user.

[0062] Data packets to be exchanged between the primary user and the sub-user are contained in the useful data field 202 of datagram 200.

[0063] The end field 203 is a counter field, hereinafter also referred to as the working counter, for example, with a size of 16 bits. Each addressed sub-user who processes datagram 200 according to the specifications in the command field Cmd increments the value in working counter 203. When the master connection 23 of master user 2 generates a telegram, working counter 203 is set to a predetermined value, typically 0. Then, if the addressed sub-user successfully performs a read operation, write operation, or read / write operation, the value in working counter 203 is changed by the addressed sub-user in a predetermined manner. Table 1 below shows the possible processes of the sub-user when counter field 203 is incremented:

[0064] Table 1

[0065]

[0066] Therefore, each datagram can be assigned a working counter value that is expected after the telegram has passed through all sub-users. The master user can then check whether the datagram has been successfully processed by comparing the expected value of the working counter with the actual value of the working counter that has arrived after passing through all sub-users.

[0067] like Figure 1 As further shown, the primary connection 23 in primary user 2 is connected to the processor 24 in primary user 2. The processor 24 of primary user 2 executes control tasks, wherein the processor 24 uses input process images to determine the output process image of a single control task. At least one datagram in an Ethernet telegram is typically assigned an input or output process image for a single control task.

[0068] For reference Figure 1As explained, the processing of datagram 200 in sub-user 3 occurs during the passage through the corresponding sub-connection 33. In this case, Ethernet telegram 100 is transmitted from one sub-user 3 to the next with a delay of a few bits. The sub-connection in sub-user 3 evaluates the control data field 201 of datagram 200 to determine, based on the command field Cmd, which data transmission operation to perform on the useful data field 202 of the datagram 200. Then, based on the address field Address, the sub-connection 33 in sub-user 3 determines whether a data area in sub-user 3 is addressed, and when the useful data field 202 passes, sub-user 3 will exchange data with that data area.

[0069] Sub-connection 33 of sub-user 3 is also connected to functional connection 34 to process useful data provided to sub-user 3. Figure 1 In the design scheme shown, the first sub-user 301 has a first functional connection 341, the second sub-user 302 has a second functional connection 342, the third sub-user 303 has a third functional connection 343, and the fourth sub-user 304 has a fourth functional connection 344.

[0070] During the read operation, sub-connection 33 of sub-user 3 reads the useful data assigned to sub-user 3 as the useful data field 202 in the datagram 200 from Ethernet telegram 100 passes by, and forwards the useful data to the assigned functional connection 34, which then stores the useful data in the addressed storage area in sub-user 3.

[0071] During a write operation, functional connection 34 in sub-user 3 makes the useful data from the storage area addressed by sub-connection 33 in sub-user 3 available, so that sub-connection 33 can then write the useful data into the allocation area in the useful data field 202 of datagram 200.

[0072] In the application of fieldbus systems in industrial automation, sub-connections and functional connections are often implemented in separate units within the sub-user. A possible example is a modular switchgear system, which has basic modules including basic sub-connections and pluggable functional modules including functional connections.

[0073] Basically, functional modules can provide any desired functionality. Functional modules in a switchgear system can be, for example, input modules, output modules, control modules, power filter modules, contactor modules, frequency converter modules, power supply modules, or combinations thereof.

[0074] Figure 4 The possible structure of the modular switchgear system 400 is schematically shown in perspective, having a basic module 410 and multiple functional modules 420, here eight functional modules.

[0075] Basic module 410 in Figure 5 The diagram is shown in more detail below. Within the rectangular housing 411, there are eight openings on the top side, one for each functional module. Basic connecting elements 413 with contacts 414 are arranged in the area of ​​each opening 412. The contacts 414 can be configured as pins or contact openings for use as plugs or sockets.

[0076] Figure 6 Functional module 420 is shown schematically in perspective view. Functional module 420 has a module housing 421 with an opening 422 on its lower side. Module connecting element 423 with contacts 424 is arranged in the area of ​​the opening 422 of functional module 420. The contacts 424 of module connecting element 423 can be configured in sequence as pins or contact openings to engage corresponding contacts of basic connecting elements in the basic module.

[0077] Basic connection elements and module connection elements typically include data terminals, low-voltage terminals, and low-voltage terminals. Instead of a single row of openings with basic connection elements, a basic module can also have multiple rows of openings with basic connection elements arranged adjacent to each other. Functional modules can also include multiple openings with module connection elements, instead of openings with module connection elements. Furthermore, functional modules can then cover the multiple openings in the basic module with basic connection elements.

[0078] like Figure 7 As shown in the schematic cross-section through the basic module 410, each basic connection element 413 is assigned a basic sub-connection 415, wherein the basic sub-connection 415 is connected to one of the basic connection elements 413 via a data line 416 in each case in order to exchange data with the functional module 420 inserted in the corresponding basic connection element 413.

[0079] The basic sub-connections 415 are interconnected via a serial data bus 417 and are also connected to a fieldbus terminal 418. Telegraphs can be fed into the data bus 417 via the fieldbus terminal 418.

[0080] Fieldbus terminals can also be formed from basic connection elements. If fieldbus terminals are constructed as basic connection elements, the assigned basic sub-connections can be omitted because there is no need to process the incoming data.

[0081] In addition, another fieldbus terminal (not shown) may be provided in the base module 410 so that a telegraph fed into the base module 410 via a fieldbus terminal 418 may be transmitted to another downstream base module via the other fieldbus terminal.

[0082] Another fieldbus terminal can be configured as a basic connection element again, thereby again omitting the assigned basic sub-connection, since no processing of the fed-in data is required. Another fieldbus terminal can also share a basic connection element with fieldbus terminal 418.

[0083] The modular switchgear system 400 offers the advantage that, in the event of a defective or replaced functional module, other functional modules installed on the basic module can be addressed. Therefore, when using the switchgear system 400 in production equipment, it can, for example, prevent production failures during functional module replacement.

[0084] As described above, the master user can identify whether a sub-user has successfully processed a datagram by checking the value of the working counter in the datagram that has been transmitted via Ethernet telegrams to the sub-user on the fieldbus system. If one or more sub-users have not processed the datagram or have only partially processed it, the master user can determine such a processing error by comparing the expected value of the working counter with the actual value of the working counter that has been processed.

[0085] If the master user detects such a processing error, the master user can discard the data in the datagram. This is necessary, for example, when an error exists in a sub-user of the fieldbus system, causing the input or output process image of a control task performed by the master user to be falsified.

[0086] However, if, as in the switchgear system in the sub-user, the sub-connections and functional connections are implemented in separate units so that functional modules containing functional connections can be inserted into or removed from the fieldbus system in the form of pull-in units during current operation, then even if the sub-users in the fieldbus system actually process the data in the datagram correctly, the master user will detect a processing error because one or more sub-users are not involved in the processing of the datagram due to inactive or uninserted functional modules.

[0087] In fieldbus systems such as switchgear systems, control tasks performed by the master user do not depend on all sub-users on the fieldbus system being active and processing data. In such fieldbus systems, functional modules can be activated or deactivated during the current operation, for example, in... Figure 4 In the switchgear system shown, functional modules are inserted into or removed from the basic module.

[0088] In the Ethernet telegram generation in the primary connection of the primary user, the datagrams in the EtherCAT data packets are pre-configured in such a way that, for each sub-user on the fieldbus system, it is determined which data area of ​​the useful data field in the sub-user's datagram should be exchanged with which data area as it passes through, or which data transmission operation should be performed in the process.

[0089] As part of this pre-configuration, the master user also determines the value of the work counter assigned to each datagram, which is the expected value when the datagram has been successfully processed by all addressed sub-users. However, the master user's pre-configuration does not consider whether the sub-user's functional modules are active; that is, in Figure 4 In the switch cabinet system shown, are the functional modules of the corresponding sub-users inserted into the basic modules?

[0090] If, during the passage of an Ethernet telegram, an addressed sub-user does not process the datagram with its sub-connection according to the data transfer operation provided in the command field of the datagram due to an inactive connection that does not provide data, the sub-connection will not increment the working counter in the datagram. Therefore, when the expected value of the working counter is compared with the actual value of the working counter that arrives after all sub-users have passed through, the master user determines the discrepancy and will typically discard the data in the datagram.

[0091] However, even in this practically permissible scenario of processing errors, the primary user discarding data in the middle of an ongoing operation can be critical for fieldbus systems with sub-users that operate with minimal error tolerance. Discarding data causes a communication interruption on the fieldbus, preventing the controller from addressing active functional modules. When functional modules are used, for example, in production equipment, this could mean undesirable production failures.

[0092] If the fieldbus system is used as a modular switchgear system, such as Figure 4 As shown, discarding data packets will also prevent the exchange of functional modules during the current operation. In the worst case, production equipment operating with modular switchgear systems must be shut down so that communication on the fieldbus can be restarted after a functional module is replaced.

[0093] To enable primary users to identify which data in an Ethernet telegram is valid and which is invalid with minimal overhead, a method is provided for sub-users to use state information to detect whether functional connections within the sub-user are active. For example, in... Figure 4 In the switchgear system shown, is the functional module inserted into the sub-connection of the basic module?

[0094] The status information of a sub-user, indicating whether the corresponding functional connection is active or inactive, can be obtained from the master user via Ethernet telegram. Based on this status information, the master user can then recalculate the expected value of the datagram's working counter in the Ethernet telegram.

[0095] The status information indicating whether a functional connection is active or inactive can be a single bit of data. To obtain this status information, a functional connection query unit for checking the operational status of a functional connection can be provided within the sub-connection. This can be done, for example, in... Figure 4 In the case of the modular switchgear system 400 shown, this occurs because the functional connection query unit in the basic sub-connection 415 checks via data line 416 whether data exchange with the functional module 420 in the basic connection element 413 associated with the insertion is possible. Instead of checking the activity of the sub-connection, the functional connection in the functional module 420 can also be designed to output corresponding status information to the sub-connection when it is active. The status information is then input into the corresponding status register in the sub-connection.

[0096] Status information can be obtained through additional datagrams in telegrams sent by the master user. This telegram then contains both status datagrams and data datagrams. As an example, Figure 8 The structure of a status datagram 210 for reading status information and a data datagram 220 for transmitting data are shown. The structures of status datagram 210 and data datagram 220 correspond to... Figure 3 The datagram structure shown has a control data field, a useful data field, and a tail field.

[0097] The control data fields 211 of status datagram 210 and 221 of data datagram 220 respectively include a command field (Cmd), an identifier field (Idx), an address field (Address), a length field (Length), and an interrupt field (IRQ). The master user's master connection configures the control data fields 211 of status datagram 210 and 221 of data datagram 220 so that the same sub-users are addressed in the address field (Address). The command field (Cmd) of the control data field 211 of status datagram 210 is set to a write operation by the master user's master connection, while the command field (Cmd) of the control data field 221 of datagram 220 can be any data transfer operation, i.e., a read operation, a write operation, or a read / write operation.

[0098] For each sub-user, a data area for status bits exists in the useful data field 212 of the status datagram 210. Figure 8 The terms S1, S2, S3, etc., are used to represent the data to be exchanged, and the useful data field 222 of the datagram 220 contains a data area for the data to be exchanged. Figure 8 In this case, the order in which the data areas allocated to each sub-user in the useful data field of the status datagram may differ from the order in which the data areas are allocated to each sub-user in the useful data field of the data datagram.

[0099] The end field 213 in status datagram 210 and the end field 223 in data datagram 220 are each work counters, incremented by each sub-user of the assigned data area in useful data field 212 of status datagram 210 or useful data field 222 of data datagram 220.

[0100] In the case of status datagram 210, each addressed sub-user with a sub-connection performs a write operation according to the data exchange operation specified in the command field Cmd of the control data field 211 of status datagram 210, such that if the status bit has been successfully entered from the sub-connection into the allocated data area in the useful data field 212 of status datagram 210, the counter value in the working counter 213 of status datagram 210 is incremented by 1 according to Table 1.

[0101] In the case of datagram 220, if a data exchange operation with the working counter 223 in the useful data field 222 of datagram 220 is successfully performed, the sub-user with sub-connection increments the working counter 223 of datagram 220. In the case of a successful read or write operation, according to Table 1, the sub-user's sub-connection increments the working counter 223 by 1 in each case. In the case of a read / write operation, according to Table 1, the sub-user's sub-connection increments the working counter 223 by 1 for a successful read operation and by 2 for a successful write operation, such that for a fully executed read / write operation, the working counter 223 increments by 3.

[0102] Status datagram 210 and data datagram 220 can be placed anywhere within an EtherCAT data packet. Additionally, other datagrams can also be inserted into an EtherCAT data packet.

[0103] After passing through the sub-user, the master user receives a status datagram 210 that is identical to the data datagram, since both datagrams are in the same Ethernet telegram.

[0104] The master user can then first check whether the value in the working counter 213 corresponds to the expected value in the status datagram 210. In this case, the expected value of the working counter 213 in the status datagram 210 is the value obtained when all addressed sub-users have successfully performed the write operation to input the status bits into the useful data field 212 of the status datagram 210. Through this check, the master user can determine whether the sub-connection of the sub-user is working properly. When a fault is detected, the master user can react to such abnormal behavior in the fieldbus system according to presets. For example, a diagnostic process for accurately detecting errors in the sub-connection of the sub-user can be triggered.

[0105] The master user can also evaluate the status bits in the useful data field 212 of status datagram 210 to calculate the expected value of the work counter 223 of datagram 220. The master user performs this evaluation in such a way that the number of addressed sub-users is reduced by their status bits indicating functional connections to inactive sub-users. Based on the corrected number of sub-users, the master user then calculates the expected value of datagram 220 based on the data transfer operation provided in the command field Cmd of datagram 220.

[0106] The master user then compares the actual value in the work counter 223 of data packet 220 with the expected value to determine whether successful processing of the useful data field 222 of data packet 220 has been performed. If a processing error is detected, the master user can then discard the data in data packet 220. Furthermore, the master user can perform more precise fault diagnosis again.

[0107] exist Figures 3 to 6 In the modular switchgear system 400 shown, the eight basic sub-connections 415 can be addressed in the control data field 211 of status datagram 210 and the control data field 221 of data datagram 220, respectively. Then, the useful data field 212 of status datagram 210 will have eight data areas for status bits, and the useful data field 222 of data datagram 220 will have eight data areas for the data to be exchanged. If data datagram 220 in the command field Cmd of control data field 221 is marked as a read / write datagram, the expected value for the modular switchgear system 400 according to Table 1 will be 24.

[0108] Assuming no functional module is inserted in the modular switchgear system 400, the status bit of the assigned basic sub-connection 415 will have a value of 0, instead of a value of 1 as with an inserted functional module. Based on the successfully processed status datagram 210, the status information will indicate that the expected value of datagram 220 is 21 instead of 24. The main circuit will then check the actual value in the working counter 223 of the processed datagram 220 based on this corrected expected value to determine a processing error.

[0109] Status information can also be obtained through a single datagram also used for data transmission, instead of using an additional status datagram in a telegram sent by the master user. Then, for each addressed sub-user, the datagram (hereinafter referred to as the status / datagram) additionally includes a portion of the data area for status information assigned to the addressed sub-user in the useful data field.

[0110] As an example, Figure 9 The structure of a status / data datagram 230 for reading status information and transmitting data is shown. The structure of the status / data datagram 230 corresponds to... Figure 3 The datagram structure shown has a control data field, a useful data field, and a tail field.

[0111] The control data fields 231 of the status / data datagram 230 include the command field Cmd, the identifier field Idx, the address field Address, the length field Length, and the interrupt field IRQ. In the command field Cmd, the primary user's primary connection specifies a write operation or a read / write operation as a data transfer operation.

[0112] For each sub-user addressed in the Address field of control data field 231, a portion for status bits exists in the useful data field 232 of the status / data datagram 230, within the data area allocated to the addressed sub-user. This portion for status bits can be placed at any desired location within the data area, and... Figure 9 All are indicated by shading. The master user initializes a portion of the status bits in the data area allocated to the addressed sub-user to indicate that the functional connection is not active.

[0113] The end field 233 in the status / data datagram 230 includes a work counter, which is incremented by each sub-user who has processed the assigned data area in the useful data field 232.

[0114] During telegram transmission, if the functional connection is active, the sub-connection in the addressed sub-user performs at least one write operation according to the data exchange operation specified in the command field Cmd of the control data field 232 of the status / data datagram 230. Then, the sub-connection in the addressed sub-user overwrites a portion of the status bits in the data area allocated to the addressed sub-user with the status bit indicating functional connection activity. Furthermore, according to Table 1, in the case of successfully executing the data exchange operation in the allocated data area of ​​the useful data field 232, the sub-connection in the addressed sub-user increments the working counter 233 of the status / data datagram 230.

[0115] After receiving the processed status / data packet 230, the master user can then evaluate the status bits in the useful data field 232 of the status / data packet 230 to calculate the expected value of the work counter 233 of the status / data packet 230. The master user performs this evaluation in such a manner that the number of addressed sub-users is reduced by the number of sub-users whose status bits indicate inactive functional connections; that is, portions of the status bits are not overwritten, and according to the master user's initialization, portions of the status bits continue to indicate inactive functional connections. Based on the corrected number of sub-users, the master user then calculates the expected value of the status / data packet 230 based on the data transfer operation provided in the command field Cmd of the status / data packet 230.

[0116] The master user further compares the actual value in the work counter 233 of the status / data datagram 230 with the expected value to determine whether the processing of the useful data field 232 of the status / data datagram 230 has been successfully performed. If a processing error is detected, the master user can then discard the data in the status / data datagram 230. Additionally, the master user can perform fault diagnosis.

[0117] If in Figures 3 to 6 In the modular switchgear system 400 shown, addressing the eight basic sub-connections 415, in each case, in the useful data field 232 of the status / data datagram 230, the status bit indicating that the functional connection is inactive, i.e., the value 0, is entered into the status bit portion of the eight data areas.

[0118] Assuming the functional module is not inserted into the modular switchgear system 400, unlike other basic sub-connections, the assigned basic sub-connection will not cover part of the status bit with the status bit indicating functional connection activity (i.e., value 1). The status information in the processed status / data datagram 230 will indicate the expected value of status / data datagram 230 in Table 1, which shows a change in the working counter, as 21. The main switch will then check the actual value in the working counter 233 of the processed status / data datagram 230 based on this corrected expected value to determine any processing errors.

[0119] List of reference numerals

[0120]

[0121]

Claims

1. A method for transmitting data in a fieldbus system, comprising a transmission path (1), at least one master user (2) and multiple sub-users (3) interconnected therethrough, in, Each of the sub-users (3) has a sub-connection (33) and a functional connection (34) connected to the sub-connection (33). Specifically, for each sub-user, status information indicating whether the functional connection is active or inactive is obtained. The main user (2) sends a telegram (100) on the transmission path (1). The sub-connection (33) of the sub-user (3) processes the telegram (100) during transmission. The telegram (100) sent by the master user (2) has at least one datagram (200) which includes a control data field (201), a useful data field (202) and a counter field (203). The control data field (201) includes an address field and a command field. The address field specifies the sub-user (3) to exchange data with the useful data field (202). The command field defines the data transfer operation to be performed by the sub-user (3) and the useful data field (202). If the command field of the datagram (200) specifies a write operation as a data transmission operation to be performed by the sub-user (3), then when the functional connection (34) is active, the data to be written to the useful data field (202) of the datagram (200) is provided by the functional connection (34) to the sub-connection (33) of the sub-user (3). The counter field (203) is changed by the sub-connection (33) of the sub-user (3) that has already processed the useful data field (202) in a predefined manner for the data transmission operation performed in each case. The status information of the sub-user (3) addressed in the datagram (200) is obtained together with the telegram. The datagram (200) is assigned the expected value of the counter field (203), which is generated when the useful data field (202) has been processed by the addressed sub-user (3) according to the predetermined data transmission operation in the command field. The master user (2) determines the expected value of the counter field (203) of the data packet (200) based on the status information obtained by the telegram, and compares it with the value of the counter field (203) in the data packet (200) processed by the addressed sub-user (3) in order to determine the processing error in the data packet (200) processed by the addressed sub-user (3) in case of deviation.

2. The method according to claim 1, in, The telegram (100) sent from the master user (2) includes a status datagram (210) and a data datagram (220). The address field of the status datagram (210) and the address field of the data datagram (220) specify the same sub-user (3). Specifically, for each addressed sub-user (3), a data area for status information is provided in the useful data field (212) of the status datagram (210), and a data area for data to be exchanged is provided in the useful data field (222) of the data datagram (220). The command field of the status datagram (210) specifies a write operation. The master user (2) determines the expected value of the counter field (223) of the data datagram (220) based on the status information obtained from the status datagram (210) processed by the addressing sub-user (3), and compares it with the value of the counter field (223) in the data datagram (220) processed by the addressing sub-user (3) in order to determine the processing error in the data datagram (220) processed by the addressing sub-user (3) in case of deviation.

3. The method according to claim 2, wherein, The master user further checks whether the value in the counter field (213) of the status datagram (210) corresponds to the expected value obtained when all addressed sub-users have successfully performed the write operation to input status information into the useful data field (212) of the status datagram (210).

4. The method according to claim 1, in, The datagram is a status / data datagram (230), which, for each addressed sub-user (3) in the useful data field (232), has a portion for status information in the data area assigned to the addressed sub-user (3), the status information being initialized by the master user (2) with status information indicating that the functional connection is inactive. The write operation in the command field of the status / data packet (230) is a data transmission operation to be performed by the sub-user. The master user (2) determines the expected value of the counter field (233) of the status / data packet (230) based on the status information obtained from the status / data packet (230) processed by the addressing sub-user (3), and compares it with the value of the counter field (233) in the status / data packet (230) processed by the addressing sub-user (3) in order to determine the processing error in the status / data packet (230) processed by the addressing sub-user (3) in case of deviation.

5. The method according to any one of claims 1 to 4, wherein, The status information indicating whether the function connection is active or inactive is a 1-bit data.

6. The method according to any one of claims 1 to 5, wherein, The telegram is an Ethernet telegram, and the EtherCAT protocol is used as the Ethernet protocol type for interpreting the datagram.

7. A fieldbus system comprising a transmission path (1), at least one master user (2) and multiple sub-users (3) interconnected therethrough, in, Each of the sub-users (3) has a sub-connection (33) and a functional connection (34) connected to the sub-connection (33). In this process, status information indicating whether the functional connection is active or inactive is obtained in each sub-user, wherein the master user (2) sends a telegram (100) on the transmission path (1). The sub-connection (33) of the sub-user (3) processes the telegram (100) during transmission. The telegram (100) sent by the master user (2) has at least one datagram (200) which includes a control data field (201), a useful data field (202) and a counter field (203). The control data field (201) includes an address field and a command field. The address field specifies the sub-user (3) to exchange data with the useful data field (202). The command field defines the data transfer operation to be performed by the sub-user (3) and the useful data field (202). If the command field of the datagram (200) specifies a write operation as a data transmission operation to be performed by the sub-user (3), then when the functional connection (34) is active, the data to be written to the useful data field (202) of the datagram (200) is provided by the functional connection (34) to the sub-connection (33) of the sub-user (3). The counter field (203) is changed by the sub-connection (33) of the sub-user (3) that has already processed the useful data field (202) in a predefined manner for the data transmission operation performed in each case. The status information of the sub-user (3) addressed in the datagram (200) is obtained together with the telegram. The datagram (200) is assigned the expected value of the counter field (203), which is generated when the useful data field (202) has been processed by the addressed sub-user (3) according to the predetermined data transmission operation in the command field. The master user (2) determines the expected value of the counter field (203) of the data packet (200) based on the status information obtained by the telegram, and compares it with the value of the counter field (203) in the data packet (200) processed by the addressed sub-user (3) in order to determine the processing error in the data packet (200) processed by the addressed sub-user (3) in case of deviation.

8. The fieldbus system according to claim 7, in, The telegram (100) sent from the master user (2) includes a status datagram (210) and a data datagram (220). The address field of the status datagram (210) and the address field of the data datagram (220) specify the same sub-user (3). Specifically, for each addressed sub-user (3), a data area for status information is provided in the useful data field (212) of the status datagram (210), and a data area for data to be exchanged is provided in the useful data field (222) of the data datagram (220). The command field of the status datagram (210) specifies a write operation. The master user (2) determines the expected value of the counter field (223) of the data datagram (220) based on the status information obtained from the status datagram (210) processed by the addressing sub-user (3), and compares it with the value of the counter field (223) in the data datagram (220) processed by the addressing sub-user (3) in order to determine the processing error in the data datagram (220) processed by the addressing sub-user (3) in case of deviation.

9. The fieldbus system according to claim 8, wherein, The master user further checks whether the value in the counter field (213) of the status datagram (210) corresponds to the expected value obtained when all addressed sub-users have successfully performed the write operation to input status information into the useful data field (212) of the status datagram (210).

10. The fieldbus system according to claim 7, in, The datagram is a status / data datagram (230), which, for each addressed sub-user (3) in the useful data field (232), has a portion for status information in the data area assigned to the addressed sub-user (3), the status information being initialized by the master user (2) with status information indicating that the functional connection is inactive. The write operation in the command field of the status / data packet (230) is a data transmission operation to be performed by the sub-user. The master user (2) determines the expected value of the counter field (233) of the status / data packet (230) based on the status information obtained from the status / data packet (230) processed by the addressing sub-user (3), and compares it with the value of the counter field (233) in the status / data packet (230) processed by the addressing sub-user (3) in order to determine the processing error in the status / data packet (230) processed by the addressing sub-user (3) in case of deviation.

11. The fieldbus system according to any one of claims 7 to 10, wherein, The telegram is an Ethernet telegram, and the EtherCAT protocol is used as the Ethernet protocol type for interpreting the datagram.

12. The fieldbus system according to any one of claims 7 to 11, wherein, The sub-connection (33) and the functional connection (34) are implemented in the sub-user (3) as separable units.

13. The fieldbus system according to claim 12, comprising a basic module (410) and a functional module (420), wherein, The basic module (410) includes the sub-connection (415) connected to the basic connecting element (413), wherein the functional module (420) includes the functional connection (34) connected to the module connecting element (423), and wherein the basic connecting element (413) and the module connecting element (423) form a plug connection.

14. The fieldbus system according to claim 13, wherein, The functional module (420) includes a plurality of sub-connections (415) that are connected to each other via a serial data bus (417) and connected to a fieldbus terminal (418), wherein each sub-connection (415) is connected to a basic connection element (413), into which the module connection element (423) of the functional module (420) can be inserted.