Y_EC_FoE_CopyFromSlave
The function block is used to copy a file from an EtherCAT slave device to the PLC's file system using the FoE (File over EtherCAT) protocol
Parameters
| * | Parameter | Data Type | Description | Default |
|---|---|---|---|---|
| VAR_INPUT | ||||
| B | Execute | BOOL | Upon the rising edge of the Execute input, all other inputs are read, and the function block becomes operational. If an input needs to be modified, the value must be changed, and the Execute input must be re-triggered. | FALSE |
| E | DstFilePath | STRING |
Destination file path on the PLC file system where the retrieved file will be stored. Must be write-accessible.
|
STRING#'' |
| E | SrcFilePath | STRING | Source file path on the EtherCAT slave. Device-specific; check the slave's manual for valid paths or file system access restrictions | STRING#'' |
| E | NetworkID | WORD | Network ID of the EtherCATmaster. A value of 0 is not allowed and will be treated as the default (1). | WORD#1 |
| E | StationAddress | WORD | EtherCAT station address of the slave/master. The EtherCATMaster has StationAddress 0. |
WORD#0 |
| E | Password | UDINT |
The input Password is FoE specific. Password is optional and may not be supported by the connected slave. The user must check the manual of the connected device.
|
UDINT#0 |
| E | Timeout | UDINT | Timeout value in ms. A value of 0 is not allowed and will be treated as the default (60000). | UDINT#60000 |
| VAR_OUTPUT | ||||
| B | Done | BOOL | The Done output is set to TRUE when the commanded action has completed successfully. If another function block takes control before the action is completed, the Done output will never become TRUE. This output is reset when Execute becomes FALSE. | |
| B | Busy | BOOL | For function blocks with Execute input, the Busy output is set to TRUE upon the rising edge of the Execute, and set to FALSE when Done, CommandAborted or Error outputs become TRUE. In the case of a function block with an Enable input, Busy indicates that the function block is operating, but may not be ready to provide valid outputs. | |
| B | Error | BOOL | The Error output is set to TRUE if an error has occurred during the operation of the function block. The output is cleared when the Execute or Enable input becomes FALSE. | |
| E | ErrorID | UINT | The ErrorID output provides the identifier of the error when there is an active error in the function block execution. The output is cleared when the Execute or Enable input becomes FALSE. | |
Notes
- The source file (SrcFilePath) must exist on the connected EtherCAT slave and be accessible using the FoE protocol. File path syntax and access rules depend on the slave device—refer to the device’s user manual.
- The destination path (DstFilePath) must be valid within the PLC’s file system and must allow write access. The transferred file will be stored at this location after a successful operation.
- The Password input is optional and only required if the connected slave enforces password protection for file access. Not all devices support this feature.
- Ensure sufficient free space exists on the PLC before starting a transfer.
- File transfer may fail if the slave device does not support FoE or if the FoE service is disabled or restricted on the device.
Error Description
See the Function Block ErrorID List.
- 14250–14299: Errors with internal function block operation.
- 14300–14500: Errors reported by the underlying EtherCAT stack (e.g., FoE protocol errors, access denied, timeout, etc.).