CN115086103A - Slave station identification method based on EtherCAT technology - Google Patents

Slave station identification method based on EtherCAT technology Download PDF

Info

Publication number
CN115086103A
CN115086103A CN202210645261.3A CN202210645261A CN115086103A CN 115086103 A CN115086103 A CN 115086103A CN 202210645261 A CN202210645261 A CN 202210645261A CN 115086103 A CN115086103 A CN 115086103A
Authority
CN
China
Prior art keywords
slave station
communication
slave
esi
networking
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210645261.3A
Other languages
Chinese (zh)
Other versions
CN115086103B (en
Inventor
宋春桃
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing Estun Automation Co Ltd
Original Assignee
Nanjing Estun Automation Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing Estun Automation Co Ltd filed Critical Nanjing Estun Automation Co Ltd
Priority to CN202210645261.3A priority Critical patent/CN115086103B/en
Priority claimed from CN202210645261.3A external-priority patent/CN115086103B/en
Publication of CN115086103A publication Critical patent/CN115086103A/en
Application granted granted Critical
Publication of CN115086103B publication Critical patent/CN115086103B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a slave station identification method based on an EtherCAT technology, and relates to the technical field of communication. The method can load the configuration file ESI of the slave station, can identify the slave station of the current networking, establishes a communication text of the master station and the slave station in the networking according to the matched ESI file, then stores the communication text for the communication application of the current networking, and does not need to re-identify the slave station to establish a new communication text unless the networking is changed. Reading a slave station configuration file ESI stored locally; acquiring slave station information VendorID and ProductCode in networking, and matching information in a local ESI file; generating a communication text of the current networking, and storing the communication text; according to the site addresses of the slave stations, a synchronous management configuration register, an FMMU configuration register and a DC clock of each slave station are configured through setting addressing; and configuring PDO objects of all the slave stations through the mailbox, and establishing a PDO communication mechanism and a communication object. Therefore, the master station software is more universal when in use, and the supported slave stations are not limited.

Description

Slave station identification method based on EtherCAT technology
Technical Field
The invention relates to the technical field of communication, in particular to a slave station identification method based on an EtherCAT technology.
Background
The master station software which is currently in the market and communicates with the EtherCAT slave station product needs to integrate slave station communication information in the master station software, and the master station software can only be used for communication and control operation of the slave stations. The application has great limitation, and 1) the method can be only applied to the fixed and unchangeable situation of the EtherCAT networking; 2) if the slave station software object changes, the master station software must be synchronously updated; 3) when the device is updated and has different requirements for the networking, the software of the main station needs to be updated again to adapt to the change of the networking.
The communication establishing method of the master station and the Slave station is that the Slave station ESI is used, the Slave station equipment description file ESI (EtherCAT Slave information) is a configuration file of EtherCAT Slave station equipment, when equipment is updated on a client site, as the client site does not have TwinCAT3, technicians need to bring back the updated equipment, read the Slave station ESI through TwinCAT3 and generate an ENI file, then read the ENI file through a configuration tool, and then go to the client site to establish communication between the master station and the Slave station. The process is complicated, the operation can not be carried out on the client site, the working period is long, and the working efficiency is low.
Disclosure of Invention
The invention provides a slave station identification method based on EtherCAT technology, which aims at the problems, and comprises the steps of loading a slave station configuration file ESI, identifying a slave station of the current networking, establishing communication texts of the master station and the slave station in the networking according to the matched ESI file, storing the communication texts, applying the communication texts to the current networking, and establishing a new communication text without re-identifying the slave station unless the networking is changed.
The technical scheme of the invention is as follows: the method comprises the following steps:
step 1, reading a slave station configuration file ESI stored locally;
step 2, acquiring the number of slave stations in the network online through the broadcast frame;
step 3, acquiring slave station information VendorID and ProductCode in networking online in a sequential addressing mode, matching information in a local ESI file, and if the information is not matched, failing to establish normal networking communication;
step 4, slave station information in the ESI file is read, and a slave station communication object, process data and a mailbox channel are determined;
step 5, allocating a logic starting address and a bit length to the process data of each slave station, reading a mailbox transceiving address, mailbox capacity and PDO information in the ESI file, generating a communication text of the current networking, and storing the communication text;
specifically, firstly determining a slave station RxPDO/TxPDO channel and an included object, calculating the length of the RxPDO/TxPDO bit, matching a logic initial address and a logic initial space, reading a mailbox transceiving address and mailbox capacity in a local ESI file, determining initialization parameters of a slave station mailbox in networking, and when facing a plurality of slave stations, performing the process one by one until the number of the slave stations to be processed =0, namely after all the slave stations are processed, generating a communication text of the current networking, and storing the communication text;
step 6, initializing a slave station register in a sequential addressing mode, and configuring a slave station address;
step 7, according to the site addresses of the slave stations, setting and addressing a synchronous management configuration register, an FMMU configuration register and a DC clock of each slave station to configure according to the generated communication texts;
step 8, entering Pre-OP by setting an addressing switching communication state, and activating a mailbox;
and 9, configuring PDO objects of all the slave stations through the mailboxes, and establishing a PDO communication mechanism and a communication object.
And after the identification is finished, the communication between the master station and the slave station is started, and the established communication text is stored.
Further, in step 1, slave station configuration file ESI is read by using msxml 4.
Further, in step 3, the master station reads and writes the EEPROM of the slave station controller ESC through sequential addressing, reads the VendorID and the ProductCode information of the slave station, and matches the VendorID and the ProductCode information in the local ESI file.
Furthermore, when the network is in outage and restarted, the stored communication text can be loaded to communicate with the current networking, if the networking is not changed, networking communication can be directly established, and the networking slave stations do not need to be identified again.
Further, when the slave device is updated, the corresponding slave configuration file ESI needs to be added or deleted in advance before the step 1.
Compared with the method that the Slave station information is integrated in the master station and the communication is established, the Slave station information source of the method is the Slave station configuration file ESI (EtherCAT Slave information), the ESI file is stored locally and read by software, and the ESI file can be flexibly updated without changing the master station software; meanwhile, when networking is carried out each time, VendorID and ProductCode information of the slave station of the networking can be automatically identified and matched with a corresponding ESI file, and the master station directly obtains communication and object information with the slave station from the ESI file; finally, according to the slave stations of the networking and the ESI files corresponding to the slave stations, a network communication text is generated and used for communication between the master station and each slave station in the networking, and meanwhile, the network communication text is stored and used for current networking, re-identification is not needed, and even if the same slave stations are maintained or replaced, the network communication text is not influenced.
The invention has the beneficial effects that:
by adopting the method, the EtherCAT master station software can support the communication between the master station and the slave station only by updating the slave station configuration file ESI, and the addition or deletion of the support for the slave station is very convenient, so that the master station software is more universal in use, and the supported slave stations are not limited. And the defects of complex process, long working period and low working efficiency when the communication is established by the slave station ESI in the prior art are overcome.
Drawings
Fig. 1 is a work flow diagram of the present disclosure.
Detailed Description
In order to clearly explain the technical features of the present patent, the following detailed description of the present patent is provided in conjunction with the accompanying drawings.
As shown in fig. 1, the method comprises the following steps:
step 1, taking a computer as a master station, installing a 100-million network card on the computer, connecting a computer network with two slave stations of an EtherCAT bus servo and an EtherCAT coupler, and placing ESI configuration files of the slave stations of the EtherCAT bus servo and the EtherCAT coupler under a local folder of the computer;
reading an EtherCAT bus servo and an EtherCAT coupler slave station ESI file in a local folder by using msxml4 as reading software of the ESI file, and putting the information of the slave station ESI file in a buffer area opened by a master station for later use;
step 2, connecting two EtherCAT slave stations in the network with a power supply;
the master station sends a broadcast frame, and according to the message frame information Working Cnt =2 responded by the slave stations, the number of the slave stations in the networking is 2;
step 3, the master station reads and writes EEPROM of the Slave station controller ESC (EtherCAT Slave controller) through sequential addressing, reads VendorID and ProductCode information of the Slave station, and matches with the VendorID and ProductCode information in the local ESI file;
step 4, reading information of FMMU (Fieldbus Memory Management Unit), SM (SyncMarager), RxPDO and TxPDO in the local ESI file;
step 5, allocating a logic starting address and a bit length to the process data of each slave station, reading a mailbox transceiving address and mailbox capacity in the local ESI file at the same time, generating a communication text of the current networking, and storing the communication text;
step 6, the master station initializes the slave station registers in a sequential addressing mode and configures slave station addresses, wherein the two slave station addresses are 1001 and 1002 respectively;
step 7, after the slave station site address configuration is completed, a synchronous management configuration register (SM), an FMMU configuration register and a DC clock of each slave station can be respectively configured through setting addressing;
step 8, the master station switches the communication state between the master station and the slave station to Pre-OP and activates the mailbox by setting an addressing mode;
and 9, configuring PDO objects 0x1C12, 0x1C13, 0x1A0x and 0x160x (x is a slave station PDO channel number) of two slave stations by the master station through a mailbox, and establishing a PDO communication mechanism and a communication object.
Verification begins with:
reading an object 0x607a served by the EtherCAT bus through a master station, wherein the read value is 0, the written object value is 100, the read value when reading the object is 100, and the read-write is normal and indicates that normal communication connection is established;
the master station and the slave station are powered off and then powered on, and the master station and the slave station can read and write normally to indicate that the communication between the master station and the slave station is normal;
after the master station and the slave station are powered off, the same EtherCAT bus servo is replaced, and after the master station and the slave station are powered on, normal reading and writing can be carried out, so that the normal communication between the master station and the slave station is represented.
While the invention has been described in terms of its preferred embodiments, it will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention.

Claims (5)

1. A slave station identification method based on the EtherCAT technology is characterized by comprising the following steps:
step 1, reading a slave station configuration file ESI stored locally;
step 2, acquiring the number of slave stations in the network online through the broadcast frame;
step 3, acquiring slave station information VendorID and ProductCode in the networking online in a sequential addressing mode, and matching information in a local ESI file;
step 4, slave station information in the ESI file is read, and a slave station communication object, process data and a mailbox channel are determined;
step 5, allocating a logic starting address and a bit length to the process data of each slave station, reading a mailbox transceiving address, mailbox capacity and PDO information in the ESI file, generating a communication text of the current networking, and storing the communication text;
step 6, initializing a slave station register in a sequential addressing mode, and configuring a slave station address;
step 7, according to the site addresses of the slave stations, setting and addressing a synchronous management configuration register, an FMMU configuration register and a DC clock of each slave station to configure according to the generated communication texts;
step 8, entering Pre-OP by setting an addressing switching communication state, and activating a mailbox;
and 9, configuring PDO objects of all the slave stations through the mailboxes, and establishing a PDO communication mechanism and a communication object.
2. The slave station identification method based on the EtherCAT technology as claimed in claim 1, wherein the slave station configuration file ESI is read by using msxml4 in step 1.
3. The slave station identification method based on the EtherCAT technology as claimed in claim 1, wherein the master station reads the VendorID and ProductCode information of the slave station by reading and writing the EEPROM of the slave station controller ESC in the step 3 through sequential addressing, and matches the VendorID and ProductCode information in the local ESI file.
4. A slave station identification method based on EtherCAT technology according to any of claims 1-3, characterized in that when a power failure and a restart are encountered, the stored communication text is loaded to communicate with the current networking, and if the previous networking is not changed, networking communication is directly established.
5. A slave station identification method based on EtherCAT technology according to any of claims 1-3, characterized in that when the slave station equipment is updated, the corresponding slave station configuration file ESI is added or deleted in advance before step 1.
CN202210645261.3A 2022-06-08 Slave station identification method based on EtherCAT technology Active CN115086103B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210645261.3A CN115086103B (en) 2022-06-08 Slave station identification method based on EtherCAT technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210645261.3A CN115086103B (en) 2022-06-08 Slave station identification method based on EtherCAT technology

Publications (2)

Publication Number Publication Date
CN115086103A true CN115086103A (en) 2022-09-20
CN115086103B CN115086103B (en) 2024-05-10

Family

ID=

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106814657A (en) * 2015-12-02 2017-06-09 沈阳高精数控智能技术股份有限公司 Embedded real-time EtherCAT main websites construction method based on ARM
CN110166335A (en) * 2019-04-02 2019-08-23 深圳市汇川技术股份有限公司 EtherCAT slave station and slave station synchronous communication method, control system, equipment and storage medium
US20210160096A1 (en) * 2017-08-25 2021-05-27 Lenze Automation Gmbh Method for Operating an Ethercat Fieldbus System, and Ethercat Fieldbus System

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106814657A (en) * 2015-12-02 2017-06-09 沈阳高精数控智能技术股份有限公司 Embedded real-time EtherCAT main websites construction method based on ARM
US20210160096A1 (en) * 2017-08-25 2021-05-27 Lenze Automation Gmbh Method for Operating an Ethercat Fieldbus System, and Ethercat Fieldbus System
CN110166335A (en) * 2019-04-02 2019-08-23 深圳市汇川技术股份有限公司 EtherCAT slave station and slave station synchronous communication method, control system, equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
姚旺君;林浩;王永利;邢计元;张鹏;: "基于FPGA的EtherCAT从站控制器FMMU模块设计", 信息技术与网络安全, no. 08, pages 1 - 2 *
蒋杰;高军礼;徐超蓝;张小花;: "基于X86平台的EtherCAT主站设计", 机床与液压, no. 07 *

Similar Documents

Publication Publication Date Title
US8996721B2 (en) Embedding controllers and devices with data to facilitate up-to-date control and configuration information
US8266261B2 (en) Server system, collective server apparatus, and MAC address management method
CN101848105B (en) Number setting method and system for communication equipment
CN102143229A (en) Method and system for upgrading terminals in batches
CN104714757A (en) Refresh Apparatus and Electronic Device
CN115086103A (en) Slave station identification method based on EtherCAT technology
CN115086103B (en) Slave station identification method based on EtherCAT technology
CN103761135A (en) Firmware write-in method of embedded device
CN105634635A (en) Real-time clock (RTC) sharing method, device and system
CN110618828B (en) Data updating method and device
US20030221096A1 (en) Information processing apparatus, information processing method, IC card, program, and record medium
CN101251831B (en) Mobile memory supporting master-salve equipment interchange and method of master-salve equipment interchange
CN107908418B (en) Method for upgrading logic program of fiber channel node card and fiber channel bus equipment
CN111176164B (en) Method, device and medium for expanding multiple remote input and output modules
CN114253205A (en) PLC data reading method, device and system
JP3681859B2 (en) Information processing device
US10192080B2 (en) Method for configuring a communication module of at least one radio-frequency identification (RFID) reader and communication module
CN105120013A (en) Method and system for distributing network addresses of probe and central station
CN110471620B (en) Data boot method, device and equipment of flash memory
CN117708004A (en) Method for reading information of adapter cards with different specifications and substrate management control module
CN101739217A (en) Recognition system and method of just bundle of disks with single-wire cascading topological structure
CN101615124A (en) The update system of portable executive program and method thereof
JP3005379B2 (en) Communication system between programmable controllers
JPH05233501A (en) Physical address setting system
CN113656081A (en) Method and device for synchronizing configuration information of baseboard management controller and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant