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

Slave station identification method based on EtherCAT technology Download PDF

Info

Publication number
CN115086103B
CN115086103B CN202210645261.3A CN202210645261A CN115086103B CN 115086103 B CN115086103 B CN 115086103B CN 202210645261 A CN202210645261 A CN 202210645261A CN 115086103 B CN115086103 B CN 115086103B
Authority
CN
China
Prior art keywords
slave station
communication
esi
station
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.)
Active
Application number
CN202210645261.3A
Other languages
Chinese (zh)
Other versions
CN115086103A (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
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

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)
  • Communication Control (AREA)

Abstract

The invention discloses a slave station identification method based on an EtherCAT technology, and relates to the technical field of communication. The configuration file ESI of the slave station can be loaded, the slave station of the current networking can be identified, the communication text of the master station and the slave station in the networking can be established according to the matched ESI file, and then the communication text is stored for the communication application of the current networking, and the slave station does not need to be identified again to establish a new communication text unless the networking is changed. Reading a locally stored secondary station configuration file ESI; secondary station information VendorID and ProductCode in the networking are acquired and matched with information in a local ESI file; generating a communication text of the current networking and storing the communication text; according to the site address of the slave station, the synchronous management configuration register of each slave station is addressed by setting, the FMMU configuration register and the DC clock are configured according to the generated communication text; and configuring the PDO objects of each slave station through a mailbox, and establishing a PDO communication mechanism and communication objects. The method makes the master station software more universal 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 EtherCAT technology.
Background
Master station software for communicating with EtherCAT slave station products in the market at present 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, 1) the method can only be applied to the occasion that the EtherCAT networking is fixed; 2) The slave station software object has a change, so that the master station software needs to be synchronously updated; 3) When the equipment is updated and different demands are made on the networking, the master station software needs to be updated again to adapt to the change of the networking.
The method for establishing communication between 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 the configuration file of the EtherCAT slave station equipment, when the equipment is updated on the customer site, the technician needs to bring the updated equipment back, read the slave station ESI through the TwinCAT3 and generate an ENI file, then read the ENI file through a configuration tool, and then can go to the customer site to establish communication between the master station and the slave station. The method has the advantages of complex process, incapability of operating on site of clients, longer working period and lower working efficiency.
Disclosure of Invention
Aiming at the problems, the invention provides a slave station identification method based on EtherCAT technology, which comprises the steps of loading a slave station configuration file ESI, identifying a slave station of the current networking, establishing a communication text of a master station and the slave station in the networking according to the matched ESI file, and storing the communication text for the communication application of the current networking, wherein the slave station is not required to be identified again to establish a new communication text unless the networking is changed.
The technical scheme of the invention is as follows: the method comprises the following steps:
step 1, reading a locally stored secondary station configuration file ESI;
Step 2, obtaining the number of slave stations in the networking on line through a broadcast frame;
step 3, obtaining slave station information VendorID and ProductCode in the networking on line 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, reading the information of the slave station in the ESI file, and determining the object, the process data and the mailbox channel of the communication of the slave station;
Step 5, distributing a logic starting address and a bit length to the process data of each slave station, reading a mailbox receiving and transmitting address, mailbox capacity and PDO information in an ESI file, generating a communication text of the current networking, and storing the communication text;
Specifically, firstly determining a channel of a slave station RxPDO/TxPDO and an object contained in the channel, calculating RxPDO/TxPDO bit length, matching a logic starting address and a space, reading a mailbox receiving and sending address and a mailbox capacity in a local ESI file, determining initialization parameters of a mailbox of the slave station in networking, and when a plurality of slave stations are faced, carrying out the process one by one until the number of the slave stations to be processed=0, namely after the processing of all the slave stations is finished, 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 site address;
step 7, according to the site address of the slave station, setting a synchronous management configuration register, an FMMU configuration register and a DC clock of each slave station by setting addressing, and configuring according to the generated communication text;
step8, entering a Pre-OP through setting addressing switching communication state, and activating a mailbox;
and 9, configuring the PDO objects of each slave station through a mailbox, and establishing a PDO communication mechanism and a communication object.
After the identification is finished, the communication between the master station and the slave station is started, and the established communication text is saved.
Further, the slave station profile ESI is read in step 1 using msxml a 4.
Further, in step 3, the master station reads the VendorID and ProductCode information of the slave station by sequentially addressing and reading the EEPROM of the slave station controller ESC, and matches the VendorID and ProductCode information in the local ESI file.
Furthermore, when the power-off restarting is met, the stored communication text is loaded to communicate with the current networking, if the previous networking is not changed, networking communication can be directly established, and the networking slave station does not need to be identified again.
Further, when the slave station device is updated, the corresponding slave station configuration file ESI needs to be added or deleted in advance before step 1.
Compared with the method for integrating the Information of the secondary station in the primary station and establishing communication, the method has the advantages that the Information source of the secondary station is the ESI (ETHERCAT SLAVE Information) of the configuration file of the secondary station, and the ESI file is stored locally and read by software, so that the secondary station can be flexibly updated without changing the primary station software; meanwhile, when networking is performed each time, the VendorID and ProductCode information of the slave station of the networking can be automatically identified and matched with corresponding ESI files, and the master station directly acquires communication and object information with the slave station from the ESI files; and finally, generating a network communication text according to the slave stations of the networking and ESI files corresponding to the slave stations, wherein the network communication text is used for communicating with the master station and each slave station in the networking, and simultaneously, the network communication text is saved for the current networking use, so that the current networking use is not required to be identified again, and even the similar slave stations are maintained or replaced, the network communication text is not affected.
The beneficial effects of the invention are as follows:
By adopting the method of the invention, the EtherCAT master station software can support the communication between the master station and the slave station only by updating the configuration file ESI of the slave station, and the addition or deletion of the support to the slave station is convenient, so that the master station software is more universal when in use, and the supported slave station is not limited. In addition, the defects of complicated process, long working period and low working efficiency in the prior art when the communication is established by means of the ESI of the slave station are overcome.
Drawings
Fig. 1 is a flow chart of the present case.
Detailed Description
In order to clearly illustrate the technical features of the present patent, the following detailed description will make reference to the accompanying drawings.
As shown in fig. 1, the following steps are performed:
Step 1, taking a computer as a master station, installing a 100 meganetwork card on the computer, connecting a computer networking with two slave stations of an EtherCAT bus servo and an EtherCAT coupler, and placing ESI configuration files of the EtherCAT bus servo and the EtherCAT coupler slave stations under a local folder of the computer;
Reading an EtherCAT bus servo and EtherCAT coupler slave station ESI file under a local folder by using msxml4 as reading software of the ESI file, and placing information of the EtherCAT bus servo and EtherCAT coupler slave station ESI file into a buffer area opened by a master station for standby;
Step 2, connecting two EtherCAT slave stations in the networking with a power supply;
the master station sends a broadcast frame, and according to 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 the VendorID and ProductCode information of the slave station through sequentially addressing and reading the EEPROM of the slave station Controller ESC (ETHERCAT SLAVE Controller), and the VendorID and ProductCode information in the local ESI file are matched and consistent;
step 4, reading FMMU (Fieldbus Memory Management Unit), SM (SyncManager), rxPD, txPD information in the local ESI file;
Step 5, distributing a logic starting address and a bit length to the process data of each slave station, simultaneously reading a mail receiving and transmitting address and a mail capacity in a local ESI file, generating a communication text of the current networking, and storing the communication text;
Step 6, initializing a slave station register by a master station in a sequential addressing mode, and configuring slave station addresses, wherein the two slave station addresses are 1001 and 1002 respectively;
Step 7, after the site address configuration of the slave station is completed, respectively configuring synchronous management configuration registers (SM) of each slave station through setting addressing, and configuring the FMMU configuration registers and the DC clock according to a communication text;
step 8, the master station switches the communication state between the master station and the slave station into a Pre-OP through setting an addressing mode, and activates a mailbox;
Step 9, the master station configures PDO objects 0x1C12, 0x1C13, 0x1A0x, 0x160x (x is the PDO channel number of the slave station) of the two slave stations through the mailbox, and establishes a PDO communication mechanism and a communication object.
Verification begins as follows:
reading an object 0x607a of the EtherCAT bus servo through a master station, wherein the read value is 0, writing the object value into the master station to be 100, reading the object when the read value is 100, and reading and writing are normal, which means 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, so 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 similar EtherCAT bus servo is replaced, and after the master station and the slave station are powered on, the master station and the slave station can read and write normally, so that the communication between the master station and the slave station is normal.
While there have been described what are believed to be the preferred embodiments of the present invention, it will be apparent to those skilled in the art that many more modifications are possible without departing from the principles of the invention.

Claims (4)

1. The slave station identification method based on the EtherCAT technology is characterized by comprising the following steps of:
step 1, reading a locally stored secondary station configuration file ESI;
Step 2, obtaining the number of slave stations in the networking on line through a broadcast frame;
step 3, obtaining slave station information VendorID and ProductCode in the networking on line in a sequential addressing mode, and matching information in a local ESI file;
in the step 3, the master station reads the VendorID and ProductCode information of the slave station through sequentially addressing and reading the EEPROM of the slave station controller ESC, and matches with the VendorID and ProductCode information in the local ESI file;
Step 4, reading the information of the slave station in the ESI file, and determining the object, the process data and the mailbox channel of the communication of the slave station;
Step 5, distributing a logic starting address and a bit length to the process data of each slave station, reading a mailbox receiving and transmitting address, mailbox capacity and PDO information in an 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 site address;
step 7, according to the site address of the slave station, setting a synchronous management configuration register, an FMMU configuration register and a DC clock of each slave station by setting addressing, and configuring according to the generated communication text;
step8, entering a Pre-OP through setting addressing switching communication state, and activating a mailbox;
and 9, configuring the PDO objects of each slave station through a mailbox, and establishing a PDO communication mechanism and a communication object.
2. The slave station identification method based on EtherCAT technology of claim 1, wherein the slave station configuration file ESI is read using msxml to 4 in step 1.
3. The slave station identification method based on the EtherCAT technology according to any one of claims 1-2, wherein when a power-off restart is encountered, the stored communication text is loaded to communicate with the current network, and if the previous network has not been changed, the network communication is directly established.
4. The method for identifying a slave station based on EtherCAT technology according to any one of claims 1-2, wherein when the slave station device is updated, the corresponding slave station configuration file ESI is added or deleted in advance before step 1.
CN202210645261.3A 2022-06-08 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 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 2022-06-08 Slave station identification method based on EtherCAT technology

Publications (2)

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

Family

ID=83252347

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN115086103B (en)

Citations (2)

* 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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102017214893A1 (en) * 2017-08-25 2019-02-28 Lenze Automation Gmbh Method for operating an EtherCAT fieldbus system and EtherCAT fieldbus system

Patent Citations (2)

* 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

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于FPGA的EtherCAT从站控制器FMMU模块设计;姚旺君等;信息技术与网络安全;第1-2章 *
基于X86平台的EtherCAT主站设计;蒋杰;高军礼;徐超蓝;张小花;;机床与液压(第07期);全文 *

Also Published As

Publication number Publication date
CN115086103A (en) 2022-09-20

Similar Documents

Publication Publication Date Title
US8996721B2 (en) Embedding controllers and devices with data to facilitate up-to-date control and configuration information
CN108551665B (en) System and method for realizing personalized electrical function of vehicle
US11080404B2 (en) Firmware upgrade method, slave station of robot, and machine readable storage medium
US20070121527A1 (en) System and method for remote dynamic network configuration
CN101848105B (en) Number setting method and system for communication equipment
CN102855146A (en) Firmware updating system and method
CN111464419B (en) Data transmission control method based on bus network communication
CN103326887B (en) A kind of interface managerial method and system
CN115086103B (en) Slave station identification method based on EtherCAT technology
CN106130771B (en) Method for upgrading FLASH on line based on in-band Ethernet
CN114285695B (en) Communication method, device, apparatus, system and storage medium
CN105634635A (en) Real-time clock (RTC) sharing method, device and system
JP4623291B2 (en) Method for teaching network configuration information in PLC system
CN108234203B (en) Configuration issuing method and device, configuration method and device and network system
JP2009206764A (en) Wireless communication system, and wireless communication apparatus
CN101251831B (en) Mobile memory supporting master-salve equipment interchange and method of master-salve equipment interchange
CN111881063B (en) Multi-platform adaptive Internet of things module based on Flash cutting and control method thereof
CN111580857B (en) Equipment firmware online configuration method, device and system
CN112311736B (en) Remote control device, household appliance and communication protocol configuration method and device thereof
CN114253205A (en) PLC data reading method, device and system
KR20070083004A (en) Remote module for use in plc system and control method thereof
CN111176164B (en) Method, device and medium for expanding multiple remote input and output modules
CN114598643B (en) Data backup method and device
JPH05233501A (en) Physical address setting system
CN114124699B (en) System and method for remotely refreshing BMC firmware based on network

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
GR01 Patent grant