Requirements for FoE under TwinCAT
Programming in TwinCAT
For programming it is necessary to integrate the library “Tc2_EtherCAT” with function blocks for accessing EtherCAT master and slave devices ("Tc2_.." is usable for TwinCAT 3). The following function blocks contained in it enable the following accesses for data or file transport:
- FUNCTION_BLOCK FB_EcFoeOpen (opens the communication port)
- FUNCTION_BLOCK FB_EcFoeAccess (writing/reading of data)
- FUNCTION_BLOCK FB_EcFoeClose (closes the communication port)
Further details are available on the Beckhoff information page (infosys.beckhoff.com).
Note: the FoE transfer cannot check itself for a regular file end and thus complete data transfer. It is recommended to transmit the file size or the file completeness via other channels, e.g. verifiable meta information in the file itself.
An FoE data exchange via the EL6695 follows the following pattern:
- FoE data sets, each up to max. 32 kB in size, can be transmitted via the EL6695
- The acyclic EtherCAT communication via the EL6695 mailbox (default 1024 bytes) is used
- The EL6695 serves only as a data buffer without any FoE processing of its own