Modular slave station identification method and system based on CC-Link IE TSN

By introducing a modular slave identification method based on CC-Link IE TSN into the coupler module, and utilizing the backplane bus and configuration parser to automatically identify and configure new model functional modules, the problems of poor identification flexibility and communication failure in the existing technology are solved, and efficient and accurate modular slave identification is achieved.

CN121530619APending Publication Date: 2026-02-13NANJING SHIDIAN ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511464619.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2026-02-13

AI Technical Summary

Technical Problem

The existing modular slave identification process suffers from poor identification flexibility, low identification efficiency, and is prone to identification anomalies and communication failures.

Method used

By introducing a modular slave identification method based on CC-Link IE TSN into the coupler module, the target physical slot is located by using a backplane bus broadcast query command, the description file of the functional module is obtained, and the description file is parsed by a hierarchical checksum and configuration parser to obtain type parameters and configuration parameters. Memory space is dynamically allocated and directly uploaded to the master station for identification.

Benefits of technology

It enables automatic identification and configuration of new model function modules, avoiding firmware upgrades and hardware modifications, improving the flexibility and accuracy of identification, reducing the risk of communication failures, and simplifying the installation and maintenance process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121530619A_ABST
    Figure CN121530619A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of industrial communication networks, and discloses a modular slave station identification method and system based on a CC-Link IE TSN. Comprising the steps that when a coupler module judges that a new function module is inserted into a backboard bus, a query instruction is broadcasted to each physical slot position to lock a target physical slot position corresponding to the new function module, and a description file of the new function module is acquired; when the description file is subjected to hierarchical verification to judge that data stored in the description file is complete and accurate, analyzing the description file based on a configuration analyzer to obtain type parameters stored in a module identification area, configuration parameters of a configuration description area and the data volume of the whole function module; and allocating a process mapping area for the target physical slot based on the data volume, and uploading the acquired type parameter and configuration parameter to a master station based on a CC-Link IE TSN network to realize the identification of the new function module. The method has the technical advantages of being high in identification flexibility, high in efficiency and good in identification accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of industrial communication network, in particular to a modular slave station identification method and system based on CC-Link IE TSN. BACKGROUND

[0002] In the industrial communication process based on master station and slave station deployment, the modular slave station design has the technical advantages of high deployment reliability, low cost and strong compatibility, and can more efficiently and stably implement the execution and feedback of the master station instructions.

[0003] For the modular slave station, it includes a coupler module (i.e. a master module) and each functional module connected based on a backplane bus. The coupler module manages each functional module connected on the backplane bus and realizes the communication between each functional module and the master station. Before management and communication, the functional module needs to be identified. Specifically, the coupler module judges whether the configuration information of the functional module is consistent with the corresponding information pre-stored in its firmware, and if so, connects the functional module; and assigns a station number or a type ID to the newly connected functional module based on a dial switch. Then the newly connected functional module can be manually configured in the configuration software for detailed parameters (such as channel number, diagnosis function, manufacturer information, etc.).

[0004] However, the above identification process of the functional module has the following defects: first, the pre-stored model of the functional module in the coupler module is limited, and when a new model of the functional module needs to be identified, the firmware of the coupler module needs to be upgraded, or even the hardware needs to be replaced. Second, the station number assignment method relying on the dial switch not only increases the complexity of the overall hardware, but also easily causes system communication failure due to dialing error. Third, the manual parameter configuration process also has the defects of being prone to communication failure due to configuration error and low overall efficiency. SUMMARY

[0005] The present application aims to provide a modular slave station identification method and system based on CC-Link IE TSN to solve the technical problems of poor identification flexibility, low identification efficiency, and being prone to identification abnormalities and communication failure in the existing modular slave station identification process.

[0006] To achieve the above-mentioned purpose, the present application proposes the following technical solutions: In a first aspect, a modular slave station identification method based on CC-Link IE TSN is provided, characterized by comprising: When the coupler module judges that there is a new functional module inserted on the backplane bus, it broadcasts a query instruction to each physical slot through the backplane bus to lock the target physical slot corresponding to the new functional module, and obtains the description file of the new functional module. The description file comprises a module identification area, a function description area and a configuration description area in sequence. When the description file is checked layer by layer to determine that the data stored therein is complete and accurate, a configuration parser is used to parse the description file to obtain the type parameter stored in the module identification area, the configuration parameter of the configuration description area and the data volume of the entire function module. The layer-by-layer checking comprises: checking the function description area based on a fast checking algorithm to confirm the integrity of core configuration data, checking the function description area based on a segmented checking algorithm to confirm the correctness of the core configuration data, and checking the description file based on a full-frame checking algorithm to confirm the integrity of the overall data. The data volume is used to allocate a process image area for the target physical slot, and the obtained type parameter and configuration parameter are uploaded to a master station based on a CC-Link IE TSN network to identify the new function module.

[0007] Further, the query instruction is broadcast to each physical slot through the backplane bus to lock the target physical slot corresponding to the new function module, and the description file of the new function module is obtained. The coupler module locks the target physical slot based on the level change of the in-place detection pin of the backplane bus, and obtains an interrupt signal triggered based on the level change of the in-place detection pin. The description file is read and stored in a buffer based on the I2C protocol based on the interrupt signal.

[0008] Further, the data volume is used to allocate a process image area for the target physical slot. When the data volume does not exceed the remaining memory capacity of the coupler module and the module width obtained based on the module identification area matches the actual insertion slot number of the target physical slot, the corresponding input byte number and output byte number in the data volume are obtained. The memory space corresponding to the input byte number is allocated for the target physical slot in the input image area with the current input allocation offset as the starting address, and the memory space corresponding to the output byte number is allocated for the target physical slot in the output image area with the current output allocation offset as the starting address.

[0009] Further, the method comprises: The coupler module judges that a new function module is inserted into the backplane bus, constructs a mapping entry corresponding to the target physical slot, and stores it in a pre-constructed mapping table copy; wherein the mapping table copy stores each mapping entry corresponding to the remaining function modules; wherein the items of the mapping entry include: slot activation state, module identification information, memory mapping address, data length, function characteristics, and configuration management information; When the layered verification of the description file passes, the mapping table copy is taken as a new global mapping table based on atomic operation.

[0010] Further, comprising: When the new function module has parameter updates, the corresponding mapping entry is updated based on the fast access path and stored in the new mapping table copy; When the new description file passes the layered verification, the new mapping table copy is taken as the latest global mapping table based on atomic operation.

[0011] Further, after the data volume is allocated to the target physical slot based on the process image, and the type parameters and configuration parameters obtained are uploaded to the master station to realize identification of the new function module, comprising: The coupler module sends a diagnostic query command to the new function module to obtain diagnostic state information in a diagnostic state area corresponding to the new function module; wherein the diagnostic state area is a storage space allocated based on the diagnostic function flag field obtained by parsing the description file; When the fault type recorded in the diagnostic state information is an emergency fault, the new function module reports diagnostic state information corresponding to the emergency fault to the coupler module through an interrupt mechanism; Based on the diagnostic state information, a processing instruction is issued to the new function module, and a diagnostic variable is updated to upload to the master station In a second aspect, the technical solution provides a modular slave station identification system based on CC-Link IE TSN, comprising: The acquisition module is used to broadcast a query instruction to each physical slot through the backplane bus to lock a target physical slot corresponding to the new function module when the coupler module judges that a new function module is inserted into the backplane bus, and to acquire a description file of the new function module; The description file comprises a module identification area, a function description area, and a configuration description area in sequence; The analysis module is used to analyze the description file to determine that the data stored therein is complete and accurate, to analyze the description file based on a configuration analyzer to obtain type parameters stored in the module identification area, to obtain configuration parameters of the configuration description area, and to obtain the data volume of the entire function module; The layered verification comprises: verifying the function description area based on a fast verification algorithm to confirm the integrity of core configuration data, verifying the function description area based on a segmented verification algorithm to confirm the correctness of core configuration data, and verifying the description file based on a full-frame verification algorithm to confirm the integrity of overall data. The identification module is configured to allocate a process image area to the target physical slot based on the data volume, and upload the acquired type parameter and configuration parameter to a master station on a CC-Link IE TSN network to identify the new function module.

[0012] Further, the acquisition module comprises: The acquisition unit is configured to lock the target physical slot based on a level change of an in-situ detection pin of the coupler module based on a backplane bus, and acquire an interrupt signal triggered by the level change of the in-situ detection pin. The reading unit is configured to read the description file once based on the interrupt signal and store the description file in a buffer area through an I2C protocol.

[0013] Further, the identification module comprises: The judging unit is configured to acquire input byte numbers and output byte numbers corresponding to the data volume when the data volume does not exceed a remaining memory capacity of the coupler module and a module width acquired based on a module identification area matches an actual insertion slot number of the target physical slot. The allocating unit is configured to allocate memory spaces corresponding to the input byte numbers and the output byte numbers to the target physical slot in an input image area and an output image area respectively, with a current input allocation offset serving as a starting address.

[0014] In a third aspect, the technical solution provides an electronic device, comprising at least one processor, the processor being coupled with a memory, the memory storing a computer program, the computer program being configured to be run by the processor to execute the method.

[0015] In a fourth aspect, a computer readable storage medium is provided, the computer readable storage medium storing a computer program, the computer program being configured to be executed by a processor to implement the method.

[0016] Advantages: According to the above technical solution, the technical solution of the present application provides a modular slave station identification method and system based on CC-Link IE TSN, which can solve the technical defects of poor identification flexibility, low identification efficiency and identification abnormality in the existing modular slave station identification process.

[0017] The method considers adopting a software-defined module identity recognition mechanism, so that the identity and capability of each functional module are defined by a description file stored therein rather than being predefined by the firmware of the coupler module. In this way, the recognition of new functional modules by the firmware in the coupler is avoided.

[0018] Specifically, first, when the coupler module determines that a new functional module is inserted on the backplane bus, the coupler module broadcasts a query instruction to each physical slot on the backplane bus to lock a target physical slot corresponding to the new functional module and obtain a description file of the new functional module. Second, when the data stored in the description file is complete and accurate after hierarchical verification, the description file is parsed based on a configuration parser to obtain a type parameter stored in a module identification area, a configuration parameter of a configuration description area, and a data volume of the entire functional module. The hierarchical verification includes, in sequence, verifying the functional description area based on a quick verification algorithm to confirm the integrity of core configuration data, verifying the functional description area based on a segmented verification algorithm to confirm the correctness of the core configuration data, and verifying the description file based on a full-frame verification algorithm to confirm the integrity of the overall data. Finally, the target physical slot is allocated a process image area based on the data volume, and the obtained type parameter and configuration parameter are uploaded to a master station to realize recognition of the new functional module.

[0019] Based on the above technical solution, only a general configuration parser (the logic of which is independent of the specific module model) needs to be integrated on the coupler module. Any newly developed functional module that obtains a functional module provided by any manufacturer only needs to store a description file in a corresponding format in the functional module, and the coupler module can automatically recognize and use the functional module. At this time, the coupler module does not need to be upgraded in firmware or modified in hardware, thereby realizing the concept of a "universal coupler" and breaking the traditional closed and fixed ecological mode of the system. In order to avoid the data accuracy defects introduced by the use of the description file, the technical solution further performs three-layer verification on the description file before parsing to ensure the integrity and accuracy of the data. At the same time, since the specific numbering information (i.e., the slave station number) of the new functional module is directly locked based on the physical slot on the backplane bus, the use of a dial switch is avoided, and the communication failure that may be caused by the dial switch is also avoided. Since the configuration information is directly reported to the master station based on the CC-Link IE TSN network, the master station does not need to know the specific composition of the slave station, and can complete network configuration and data exchange according to the reported information. The efficiency defects and accuracy defects introduced by manual configuration are avoided.

[0020] It should be understood that all combinations of the foregoing concepts and additional concepts described in greater detail below can be seen as being part of the subject matter of the present disclosure as long as such concepts are not mutually inconsistent.

[0021] The foregoing and other aspects, embodiments and features of the present teachings are more fully described below, in connection with the accompanying drawings. Other aspects, embodiments and features of the present teachings will become apparent from the following description, including the descriptions of the examples, and from the claims. BRIEF DESCRIPTION OF DRAWINGS

[0022] The accompanying drawings are not intended to be drawn to scale. In the drawings, each identical, or nearly identical, component that is illustrated in various figures is represented with a like numeral. For purposes of clarity, not every component is called out in every drawing. Embodiments of various aspects of the present teachings will now be described, by way of example only, with reference to the attached figures, wherein: Figure 1 Flow chart of the CC-Link IE TSN based modular slave station identification method described in the present embodiment; Figure 2 Flow chart for description file acquisition and storage; Figure 3 Flow chart for process image area allocation; Figure 4 Flow chart for global mapping table update based on new function module insertion; Figure 5 Flow chart for global mapping table update based on new function module parameter update; Figure 6 Flow chart for new function module diagnostic processing; Figure 7 Structure block diagram of the CC-Link IE TSN based modular slave station identification system described in the present embodiment; Figure 8 Structure block diagram of the electronic device described in the present embodiment. DETAILED DESCRIPTION

[0023] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the embodiments of the present application will be described clearly and completely below with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are some, but not all of the embodiments of the present application. Based on the described embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application. Unless otherwise defined, the technical terms or scientific terms used herein should be understood as the common meanings thereof by those of ordinary skill in the art.

[0024] The terms "first", "second", and similar terms used herein do not denote any order, quantity, or importance, but are used to distinguish different components. Also, the singular forms "a", "an", and "the" do not denote the quantity limitation, but denote the existence of at least one, unless the context clearly indicates otherwise. The terms "comprise", "comprising", and similar terms mean that the elements or objects before the "comprise" or "comprising" encompass the features, integers, steps, operations, elements, and / or components listed after the "comprise" or "comprising", and do not exclude one or more other features, integers, steps, operations, elements, components, and / or groups thereof. The terms "upper", "lower", "left", "right", and the like are used only to indicate relative positional relationships, and when the absolute positions of the described objects are changed, the relative positional relationships can also be changed accordingly.

[0025] The existing modular slave station is usually composed of a coupler module and multiple extended function modules. However, when identifying the extended function modules, the following limitations exist: (1) The configuration information of limited types of function modules is pre-stored in the firmware of the coupler module. When a new type of function module needs to be connected, the firmware of the master module must be upgraded, or even the hardware must be replaced, which has poor flexibility and high upgrade and maintenance costs. (2) Some systems set their station numbers or type IDs through the code switches on the function modules, which are read by the master module. This method increases the hardware complexity, is prone to system failure due to code errors, and has low automation level. (3) The existing identification methods can usually only identify the types of the modules, and cannot automatically obtain the detailed parameters of the modules, which need to be manually configured in the configuration software, which is prone to errors and has low engineering efficiency. Therefore, the embodiment aims to provide a method capable of automatically, accurately, and flexibly identifying various types of function modules to meet the flexible and plug-and-play requirements of function modules in intelligent manufacturing.

[0026] The CC-Link IE TSN-based modular slave station identification method disclosed in the embodiment will be specifically introduced below with reference to the accompanying drawings.

[0027] As shown in the drawings, the method comprises the following steps. Figure 1 Step 202: When the coupler module determines that a new function module is inserted into the backplane bus, the coupler module broadcasts a query instruction to each physical slot through the backplane bus to lock the target physical slot corresponding to the new function module, and obtains the description file of the new function module.

[0028] ​The new function module can be a DI module, a DO module, an AI module, an AO module, etc. Specifically, the coupler module includes a CC-Link IE TSN network controller, a microprocessor, a backplane bus controller, a module information database, and a general configuration parser. The new function module includes a function circuit and a non-volatile memory.

[0029] As a specific implementation, the description file is stored in the non-volatile memory of the new function module and sequentially includes a frame header area, a module identification area, a function description area, a configuration description area, and a check protection area. Taking 64 bytes as a fixed length, the standardized format of the description file is as follows: Frame header part (8 bytes) Offset 0-3: Protocol identifier "CCIE" (fixed ASCII string) Offset 4-5: Format version number (16 bits, current version 0x0100) Offset 6-7: Frame header check CRC16 (covers offset 0-5) Module identification area (16 bytes) Offset 8-11: Manufacturer ID (16 bits) + low 16 bits of module serial number (16 bits) Offset 12-13: Module type ID (16 bits) Offset 14: Hardware version number (8 bits) Offset 15: Firmware version number (8 bits) Offset 16-19: Complete serial number (32 bits) Offset 20-23: Configuration parameter area information (32 bits) Bit 0-15: Configuration parameter start address (EEPROM offset address) Bit 16-23: Total length of configuration parameters (number of bytes) Bit 24-31: Number of modifiable parameters Function description area (24 bytes) Offset 24-25: Size_IN of input data byte number (16 bits) Offset 26-27: Size_OUT of output data byte number (16 bits) Offset 28-31: Diagnostics function bitmap (32 bits) Offset 32: Module width (slot number, 8 bits) Offset 33: Channel configuration information (8 bits) Bit 0-3: Number of input channels (0-15) Bit 4-7: Number of output channels (0-15) Offset 34-35: Module feature flags (16 bits) Bit 0: Hot plug supported Bit 1: External 24V power required Bit 2: Safety related module Bit 3: High speed module (requires special slot) Bit 4: Online parameter modification supported Bit 5: Parameter import / export supported Bit 6-15: Reserved Offset 36: Default configuration index (8 bits) Points to pre-defined configuration scheme number (0-255) Offset 37: Module authentication code (8 bits, based on vendor ID + serial number hash) Offset 38-39: Sectional check CRC16 (covers offset 24-37) Offset 40-43: Key configuration parameter summary (32 bits) Core parameter snapshot defined according to module type AI module: Range + resolution + filter time + calibration coefficients DI module: Input type + filter time + trigger mode DO module: Output type + protection function + pulse width Offset 44: Configuration status flags (8 bits) Bit 0: Default configuration used Bit 1: Configuration modified Bit 2: Configuration needs verification Bit 3: Configuration locked (read only) Bit 4: Configuration backup available Bit 5-7: Reserved Offset 45: Configuration check code (8 bits) Checksum over all configuration parameters Offset 46: EEPROM health (8 bits, 0-255) Offset 47: Extended function enable bits (8 bits) Bit 0: Online firmware upgrade supported Bit 1: Remote configuration supported Bit 2: Diagnostic data export supported Bit 3: Redundancy configuration supported Bit 4-7: Reserved vendor functions Configuration description area (8 bytes) Offset 48-49: Configuration Parameter Type Bitmap (16 bits) Bit 0: Input Range Parameter Bit 1: Output Range Parameter Bit 2: Filter Parameter Bit 3: Alarm Threshold Parameter Bit 4: Calibration Parameter Bit 5: Timing Parameter Bit 6: Communication Parameter Bit 7: Security Parameter Bit 8-15: Vendor Extension Parameter Type Offset 50: Manufacturing Batch Code (8 bits) Offset 51: Test Signature (8 bits) Offset 52-53: Fast Configuration Template Index (16 bits) Points to the address of a preset configuration template in the EEPROM Offset 54: Data Integrity Counter (8 bits) Offset 55: Format Compatibility Identifier (8 bits) Check protection area (8 bytes) Offset 56-59: Full-frame Data CRC32 Check Code Offset 60-63: Format Reserved Field

[0030] As a specific implementation, in combination with Figure 2 As shown in the figure, the step S202 further includes: Step S20202, the coupler module locks the target physical slot based on the level change of the in-situ detection pin of the backplane bus, and acquires an interrupt signal triggered based on the level change of the in-situ detection pin.

[0031] Step S20204, based on the interrupt signal, triggers a one-time reading of the description file through the I2C protocol and stores it in the buffer.

[0032] At this time, based on the steps S20202-S20204, the embodiment can acquire the target physical slot through physical insertion detection, and avoid the two-time access overhead of reading the length field first and then reading the complete data in the traditional scheme through one-time reading.

[0033] Step S204, when the description file is verified to be complete and accurate in storage, the configuration parser is used to parse the description file to acquire the type parameters stored in the module identification area, the configuration parameters of the configuration description area, and the data volume of the entire function module.

[0034] In a specific implementation, the layered verification comprises: verifying the function description area based on a fast verification algorithm to confirm the integrity of the core configuration data, verifying the function description area based on a segmented verification algorithm to confirm the correctness of the core configuration data, and verifying the description file based on a full-frame verification algorithm to confirm the integrity of the overall data. In this embodiment, the fast verification algorithm is XOR verification, the segmented verification algorithm is CRC16 verification, and the full-frame verification algorithm is CRC32 verification. In this way, the integrity and accuracy of various parameter data obtained when using the description file can be effectively ensured, and subsequent identification exceptions can be avoided.

[0035] In step S206, a process image area is allocated to the target physical slot based on the data amount, and the obtained type parameter and configuration parameter are uploaded to the master station based on the CC-Link IE TSN network to realize identification of the new function module.

[0036] In this embodiment, the master station is a controller such as a PLC running a CC-Link IE TSN master protocol stack.

[0037] In the prior art, a fixed-size memory space is usually pre-allocated for each physical slot (for example, 4 bytes of input and 4 bytes of output are fixedly pre-reserved for each slot), which means that if a module (such as an 8-point DI module) requiring only 1 byte of input is inserted, 3 bytes of memory will be wasted. If a module (such as a 4-channel AO module) requiring 8 bytes of input is inserted, the pre-allocated space is insufficient, which causes the system to fail to work normally and necessitates reconfiguration or firmware upgrade. In this way, flexibility is lacking, and resources are wasted and the system is unstable. Based on this, a dynamic memory allocation mode is adopted in this embodiment, and after successfully identifying the new function module, the coupler module allocates exactly the required memory space for the new function module according to the accurate data amount field in the parsed description frame, thereby completely eliminating the resource waste caused by the traditional fixed pre-allocation mode. In a specific implementation, the dynamic memory allocation mode is combined with the layered verification mode. Figure 3 As shown in FIG. 6, the following steps are performed: In step S20602, when it is determined that the data amount does not exceed the remaining memory capacity of the coupler module and the module width obtained based on the module identification area matches the actual insertion slot number of the target physical slot, the input byte number and the output byte number corresponding to the data amount are obtained.

[0038] In step S20604, the input byte number and the output byte number corresponding to the target physical slot are respectively allocated memory spaces in the input image area and the output image area, respectively, with the current input allocation offset as the starting address and the current output allocation offset as the starting address.

[0039] As another specific embodiment, the coupler module in this embodiment adopts a CP620 type chip, and in view of the performance characteristics of the ARM architecture therein, a four-byte aligned address is allocated to a new function module for high-frequency access to improve access performance, and a tightly packed allocation is used for a common module to maximize memory utilization.

[0040] This embodiment also maintains a global software mapping table to facilitate management and tracking of the insertion of a new function module and subsequent related parameter updates. Specifically, in combination with Figure 4 as shown, when a new function module is inserted, the global mapping table is updated: Step S302, when the coupler module determines that a new function module is inserted on the backplane bus, a mapping entry corresponding to the target physical slot is constructed and stored in the pre-constructed mapping table copy.

[0041] In this embodiment, the mapping table copy stores each mapping entry corresponding to the remaining function modules. Specifically, the items of the mapping entry include: slot activation state, module identification information, memory mapping address, data length, function characteristics, and configuration management information.

[0042] Step S304, when the layered verification of the description file passes, the mapping table copy is taken as a new global mapping table based on atomic operation.

[0043] Continuing, in combination with Figure 5 as shown, when a new function module has parameter updates, the global mapping table is updated again: Step S306, when it is determined that a new function module has parameter updates, the corresponding mapping entry is updated based on the fast access path and stored in a new mapping table copy.

[0044] Step S308, when the layered verification of the new description file passes, the new mapping table copy is taken as the latest global mapping table based on atomic operation.

[0045] In specific implementation, when the coupler module reads the description information of a new function module, it parses a diagnostic function flag bit field (specifically, a bitmap), each bit of which represents a diagnostic function supported by the new function module. For example, a digital input module may support open circuit detection, short circuit detection, and power failure detection. Then its diagnostic flag bit can be defined as: the 0th bit represents support for open circuit detection, the 1st bit represents support for short circuit detection, and the 2nd bit represents power monitoring. If all three functions are supported, the flag bit is 0x07. When the coupler module gets this information, it allocates a corresponding diagnostic state area in memory according to the setting of the flag bit. If the module does not support a certain diagnostic function, it will not allocate the corresponding diagnostic variable to avoid memory waste.

[0046] In the implementation, in combination with Figure 6 As shown, the diagnosis is performed by the following steps: Step S208, the coupler module sends a diagnostic query command to the new function module to obtain the diagnostic status information in the diagnostic status area corresponding to the new function module.

[0047] Specifically, when the fault type recorded in the diagnostic status information is an emergency fault, the new function module reports the diagnostic status information corresponding to the emergency fault to the coupler module through an interrupt mechanism. For example, when the diagnostic status information is a short circuit or overload, the new function module actively notifies the coupler module through the interrupt mechanism of the backplane bus at this time. After receiving the interrupt, the coupler module will immediately read the detailed diagnostic information of the fault module and take corresponding protection measures, such as cutting off the output, recording fault logs, etc.

[0048] Step S210, issuing a processing instruction to the new function module based on the diagnostic status information, and updating the diagnostic variable for uploading to the host station.

[0049] At this time, the host station can monitor the health status of the new function module and each channel in it in real time. When the maintenance personnel need to troubleshoot the problem, they can directly see which module and which channel have problems through the upper computer software, and even view the historical diagnostic records to analyze the rules of fault occurrence.

[0050] As can be seen from the above, the embodiment provides a new identification method, which has the following technical advantages: (1) completely solves the "fixed configuration" problem, and realizes high flexibility and scalability. The coupler module only needs to integrate a universal configuration parser, and any function module, as long as its module description file complies with the public format defined in the scheme, can be automatically identified and used by the coupler module. (2) The identity information of the function module is stored in a digital form in the non-volatile memory and is automatically read by the coupler module through the backplane bus. The dependence on the physical dial switch is completely eliminated. At this time, the engineer does not need to perform any manual setting when installing or replacing the function module. This greatly simplifies the installation and maintenance work, completely avoids system failure caused by dial code errors, and realizes high automation and reliability. (3) fundamentally solves the "single identification information" problem and provides rich and comprehensive module information. The description file defined in the embodiment is a structured data frame, and its content greatly enriches the traditional simple type ID. It contains module model ID, hardware / software version, manufacturer information, accurate input / output data volume, complete diagnostic function flag bit, module occupancy width, serial number, etc. The coupler module can obtain all the information required for configuring the module in the identification stage.

[0051] The above-described processes can be implemented on a processor, or can be stored on a memory (or computer readable storage medium), which includes permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape disk storage or other magnetic storage device, or any other non-transmission medium that can be used to store information accessible by a computing device. According to the definition herein, computer readable medium does not include temporary computer readable medium such as modulated data signals and carriers.

[0052] These computer programs can also be loaded into a computer or other programmable data processing device, so that a series of operation steps are performed on the computer or other programmable device to generate a computer implemented process, so that the instructions executed on the computer or other programmable device provide a process for implementing the functions specified in the flowchart Figure 1 One flow or multiple flows and / or blocks Figure 1 One block or multiple blocks, the steps of the functions specified in the flowchart or multiple flowcharts and / or blocks can be implemented by different modules.

[0053] The embodiment also provides a CC-Link IE TSN based modular slave station identification system, which combines Figure 7 As shown in the figure, comprising: The acquisition module is configured to, when the coupler module determines that a new function module is inserted into the backplane bus, broadcast a query instruction to each physical slot through the backplane bus to lock a target physical slot corresponding to the new function module, and acquire a description file of the new function module. The description file comprises, in sequence, a frame header area, a module identification area, a function description area, a configuration description area and a verification protection area.

[0054] The parsing module is configured to perform hierarchical verification on the description file to determine whether the data stored therein is complete and accurate, and to parse the description file based on a configuration parser to obtain a type parameter stored in a module identification area, a configuration parameter of a configuration description area, and a data amount of the entire function module. The hierarchical verification comprises, in sequence, verifying the function description area based on a quick verification algorithm to confirm the integrity of core configuration data, verifying the function description area based on a segmented verification algorithm to confirm the correctness of the core configuration data, and verifying the description file based on a full-frame verification algorithm to confirm the integrity of the overall data.

[0055] The identification module is configured to allocate a process image area to the target physical slot based on the data amount, and upload the obtained type parameter and configuration parameter to a master station based on a CC-Link IE TSN network to identify the new function module.

[0056] Since the system is built based on the method, the above-mentioned has been explained, and will not be repeated here.

[0057] For example, the obtaining module comprises: The obtaining unit is configured to detect a level change of an in-situ detection pin of the coupler module based on a backplane bus to lock the target physical slot, and obtain an interrupt signal triggered based on the level change of the in-situ detection pin.

[0058] The reading unit is configured to trigger one-time reading of the description file based on the interrupt signal and store the description file in a buffer area through an I2C protocol.

[0059] For example, the identification module comprises: The judging unit is configured to judge that the data amount does not exceed a remaining memory capacity of the coupler module, and obtain corresponding input byte numbers and output byte numbers in the data amount when the module width obtained based on the module identification area matches an actual insertion slot number of the target physical slot.

[0060] The allocating unit is configured to allocate memory spaces corresponding to the input byte numbers to the target physical slot in an input image area with a current input allocation offset as a starting address, and allocate memory spaces corresponding to the output byte numbers to the target physical slot in an output image area with a current output allocation offset as a starting address.

[0061] In combination with Figure 8 As shown in the accompanying drawings, the embodiment further provides an electronic device comprising at least one processor coupled with a memory, wherein the memory stores a computer program configured to be executed by the processor to implement the method.

[0062] Also provided is a computer readable storage medium having stored thereon a computer program for being executed by a processor to implement the method.

[0063] Since the system, the electronic device and the storage medium are all based on the method or used to implement the method, in actual application, the system, the electronic device and the storage medium also have the related technical advantages of strong identification flexibility, high efficiency, good identification accuracy and the like.

[0064] Although the present application has been disclosed with reference to the preferred embodiments, it is not intended to limit the present application. Those skilled in the art, without departing from the spirit and scope of the present application, can make various modifications and improvements. Therefore, the protection scope of the present application shall be subject to the scope defined by the claims.

Claims

1. A modular slave identification method based on CC-Link IE TSN, characterized in that, include: When the coupler module determines that a new functional module has been inserted on the backplane bus, it broadcasts a query command to each physical slot through the backplane bus to lock the target physical slot corresponding to the new functional module and obtain the description file of the new functional module. The description file includes, in sequence, a module identifier area, a function description area, and a configuration description area; When performing layered verification on the description file to determine that the data stored within it is complete and accurate, the description file is parsed based on the configuration parser to obtain the type parameters stored in the module identifier area, the configuration parameters in the configuration description area, and the data volume of the entire functional module. The layered verification includes, in sequence: verifying the function description area based on a fast verification algorithm to confirm the integrity of the core configuration data; verifying the function description area based on a segmented verification algorithm to confirm the correctness of the core configuration data; and verifying the description file based on a full-frame verification algorithm to confirm the integrity of the overall data. Based on the data volume, a process image area is allocated for the target physical slot, and the acquired type parameters and configuration parameters are uploaded to the main station via the CC-Link IE TSN network to enable the identification of the new functional module.

2. The modular slave identification method based on CC-Link IE TSN according to claim 1, characterized in that, The step of broadcasting a query command to each physical slot via the backplane bus to lock the target physical slot corresponding to the new functional module and obtaining the description file of the new functional module includes: The coupler module locks the target physical slot based on the in-situ detection pin level change of the backplane bus, and acquires the interrupt signal triggered by the in-situ detection pin level change. Based on the interrupt signal, the description file is read and stored in the buffer in one go via the I2C protocol.

3. The modular slave identification method based on CC-Link IE TSN according to claim 1, characterized in that, The process of allocating a process image area for the target physical slot based on the data volume includes: If the data volume does not exceed the remaining memory capacity of the coupler module, and the module width obtained based on the module identification area matches the actual number of slots inserted in the target physical slot, then the number of input bytes and the number of output bytes corresponding to the data volume are obtained. Starting from the current input allocation offset, the memory space within the input image area is the memory space corresponding to the number of input bytes for each target physical slot. Simultaneously, starting from the current output allocation offset, the memory space within the output image area is the memory space corresponding to the number of output bytes for each target physical slot.

4. The modular slave identification method based on CC-Link IE TSN according to claim 1, characterized in that, include: When the coupler module determines that a new functional module has been inserted into the backplane bus, it constructs a mapping entry corresponding to the target physical slot and stores it in a pre-constructed mapping table copy. The mapping table copy stores mapping entries corresponding to the other functional modules. The mapping entries include: slot activation status, module identification information, memory mapping address, data length, functional characteristics, and configuration management information. When the hierarchical verification of the description file passes, the copy of the mapping table is used as the new global mapping table based on atomic operations.

5. The modular slave identification method based on CC-Link IE TSN according to claim 4, characterized in that, include: When it is determined that a new functional module has updated parameters, the corresponding mapping entries are updated based on the fast access path and then stored in a new copy of the mapping table; When the hierarchical verification of the new description file passes, the new copy of the mapping table is used as the latest global mapping table based on atomic operations.

6. The modular slave identification method based on CC-Link IE TSN according to claim 1, characterized in that, After allocating a process image area to the target physical slot based on the data volume, and uploading the acquired type parameters and configuration parameters to the main station via the CC-Link IE TSN network to achieve the identification of the new functional module, the process includes: The coupler module sends a diagnostic query command to the new functional module to obtain diagnostic status information in the diagnostic status area corresponding to the new functional module; wherein, the diagnostic status area is the storage space allocated based on the diagnostic function flag bit field obtained by parsing the description file; When the fault type recorded in the diagnostic status information is an emergency fault, the new function module reports the diagnostic status information corresponding to the emergency fault to the coupler module through an interrupt mechanism. Based on the diagnostic status information, processing instructions are sent to the new functional module, and diagnostic variables are updated and uploaded to the main station.

7. A modular slave identification system based on CC-Link IE TSN, characterized in that, include: The acquisition module is used to broadcast a query command to each physical slot through the backplane bus when the coupler module determines that a new functional module has been inserted, in order to lock the target physical slot corresponding to the new functional module and obtain the description file of the new functional module. The description file includes, in sequence, a module identifier area, a function description area, and a configuration description area; The parsing module is used to perform layered verification on the description file to determine whether the data stored in it is complete and accurate. Based on the configuration parser, the description file is parsed to obtain the type parameters stored in the module identifier area, the configuration parameters in the configuration description area, and the data volume of the entire functional module. The layered verification includes, in sequence: verifying the function description area based on a fast verification algorithm to confirm the integrity of the core configuration data; verifying the function description area based on a segmented verification algorithm to confirm the correctness of the core configuration data; and verifying the description file based on a full-frame verification algorithm to confirm the integrity of the overall data. The identification module is used to allocate a process image area to the target physical slot based on the data volume, and upload the acquired type parameters and configuration parameters to the main station via the CC-Link IE TSN network to realize the identification of the new functional module.

8. The modular slave identification system based on CC-Link IE TSN according to claim 7, characterized in that, The acquisition module includes: The acquisition unit is used to lock the target physical slot by detecting the change in the level of the in-situ detection pin based on the backplane bus in the coupler module, and to acquire the interrupt signal triggered by the change in the level of the in-situ detection pin. The reading unit is used to read the description file once and store it in the buffer via the I2C protocol based on the interrupt signal.

9. An electronic device, characterized in that, It includes at least one processor coupled to a memory storing a computer program configured to be executed by the processor to perform the method of any one of claims 1-6.

10. A computer-readable storage medium, characterized in that, It stores a computer program thereon, which is executed by a processor to implement the method of any one of claims 1-6.