8 mailbox, 1 foe (file transfer over ethercat), 1 testing foe – BECKHOFF ET9300 User Manual

Page 49: 2 eoe (ethernet over ethercat), 1 implementation, 1 sending eoe datagrams, Mailbox, Foe (file transfer over ethercat), Testing foe, Eoe (ethernet over ethercat)

Advertising
background image

Application Note ET9300

47

8

Mailbox

8.1

FoE (File Transfer over EtherCAT)

FoE can be used to download and upload a file to an EtherCAT device. The protocol is similar to
TFTP service.

8.1.1

Testing FoE

The Slave Stack Code supports FoE not by default but it can be activated and tested:

1.) Set the defines in

“ecat_def.h”

a. FOE_SUPPORTED 1

b. FOE_SAVE_FILES 1

(FoE is also available if this define is not set but the downloaded file will not be saved)

2.) Build a binary file (*.hex) (see [3] )

3.) Write binary to the PIC controller of the Evaluation Kit (see Application Note EL9800 [3] ).

4.) Check if FoE flag in ESI file

a. Open ESI file (..\SlaveStackCode\VXiXX\esi\SlaveStackCode.xml)

b. Open corresponding entry

i. Board 4a (new board): EL9800-SPI-PIC24

ii. Board 2 (former board): EL9800-SPI-PIC18

iii. If CiA 402 example is used: EL9800-CiA402

c. Check if the element EtherCATInfo : Descriptions : Devices : Device : Mailbox : FoE is

available. It has only to be present. No content is necessary.

5.) If the ESI file was edited replace the original ESI file from TwinCAT

(../Io/Ethercat/SlaveStackCode.xml) with the edited one.

6.) Rewrite SII if ESI file was edited (see[3] )

7.) Restart device and restart TwinCAT

8.) Scan Network

9.) Select device (Evaluation Kit with FoE activated)

10.) Select Tab-

“Online” and read or write a file to the slave device be pressing the corresponding

buttons in the File Access over EtherCAT

– group box.

8.2

EoE (Ethernet over EtherCAT)

EoE is used to send Ethernet telegrams to EtherCAT devices (supporting a Ethernet stack). EoE is
used for Ethernet communication i.e. a device supports a web server that can be accessed via
browser.

8.2.1

Implementation

The EoE stack is Implemented in the files ecateoe.* (basic EoE handling) and eoeappl.* (EoE
application handling).To support EoE the switch “EOE_SUPPORTED” need to be set to 1 and the EoE
flag need to be set in the ESI (REF.[4]

). Depending on the switch “STATIC_ETHERNET_BUFFER”

dynamic memory is allocated for Ethernet frame handling or a fixed memory is used (1514 Bytes).
By default the stack only handles ICMP and ARP frames.

8.2.1.1

Sending EoE datagrams

To send EoE datagram from the EtherCAT slave to the EtherCAT master the function
“EOE_SendFrameReq()” shall be called.

Advertising