Skip to main content

FoE — file transfer

FoE (File over EtherCAT) uploads files to and downloads files from a slave.

Feature overview​

CapabilityDescription
Upload / downloadFile-level PUT / GET; a progress bar shows the transfer status in real time
Cancel buttonAbort the current FoE operation mid-transfer so it does not keep the slave occupied
Default timeoutConfigure the default FoE operation timeout on the FoE tab; all transfers share it
Default passwordCache frequently used vendor passwords (such as a firmware unlock password) so you do not type them every time
BUSY progress callbackWhen the slave returns BUSY, the progress bar extends and shows a waiting state instead of reporting failure
Error code explanationOn a failed transfer, resolves the error code per ETG.1000.6 Table 92 and shows a Chinese explanation

Typical use: firmware updates, flexible configuration switching, log export, parameter backup/restore.

Generated code: tick FoE file operations in the export window to generate a file transfer example in the code.

Quick start​

  1. Put the slave into the BOOT or PRE_OP state (firmware updates usually need BOOT)
  2. Open the FoE tab in the configuration tool
  3. Enter the unlock password supplied by the vendor in the Default password field (if required)
  4. Adjust the Default timeout field for the file size (10 seconds for an ordinary file, 60~120 seconds for a large firmware image)
  5. Select a local file and click Upload to write it to the slave; or enter a file name and click Download to read it from the slave
  6. Watch the progress bar; click Cancel to abort the transfer if needed

Cancelling a transfer​

A large firmware file can take tens of seconds in a single transfer, so the FoE tab provides a Cancel button:

  • The Cancel button becomes available as soon as the transfer starts
  • Clicking it sends an abort request to the slave immediately; the progress bar stops at the current percentage
  • Once the cancel completes, the slave is back in BOOT/PRE_OP and you can retry immediately

Default timeout​

Configure the default timeout in the settings area at the top of the FoE tab:

  • Ordinary files — 10 seconds is recommended
  • Large firmware files — 60~120 seconds is recommended
  • Once set, all FoE operations share it; there is no need to set it per transfer

Default password​

Some vendors require a password on FoE writes (to prevent accidental firmware flashing). The FoE tab provides a Default password field:

  • Enter it once and it is saved in the project file, then filled in automatically next time
  • It is attached to uploads and downloads by default; a checkbox lets you omit it for one transfer
  • Stored locally only; it is not uploaded to the cloud

BUSY progress display​

While the slave erases or writes Flash it replies FoE BUSY together with an estimated remaining time:

  • The progress bar switches to a waiting style (flowing horizontally) and keeps the current percentage
  • The status bar shows BUSY: 从站正在擦写, 约剩 N 秒
  • This is not mistaken for a timeout failure

Error code explanation table​

On a failed transfer, a dialog resolves the error code per ETG.1000.6 Table 92:

  • 0x8000 NotDefined — undefined error
  • 0x8001 NotFound — file not found
  • 0x8002 AccessDenied — access denied (permission or password error)
  • 0x8003 DiskFull — not enough storage space on the slave
  • 0x8004 Illegal — illegal operation (file name or path not allowed)
  • 0x8005 PacketNumberWrong — wrong packet number (retry is recommended)
  • 0x8006 AlreadyExists — the file already exists (overwriting is not allowed)
  • 0x8007 NoUser — the current user does not exist
  • 0x8008 BootstrapOnly — this operation is allowed only in the BOOT state
  • 0x8009 NotInBootstrap — the slave is not in the BOOT state
  • 0x800A NoRights — no file operation rights (wrong password)
  • 0x800B ProgramError — internal programming error in the slave