ETC_FoE_Download (FB)ΒΆ
FUNCTION_BLOCK ETC_FoE_Download
Function block to download a file from the EtherCAT Slave. Could be also used for downloading a firmware file to the slave. Slave must be set to boot mode with pSlave^.SetOpMode(3); first in this case.
- InOut:
Scope
Name
Type
Initial
Comment
Input
xExecuteBOOLRising edge: ACTION starts Falling edge: Resets outputs If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values (xDone, xError) are present at the outputs for exactly one cycle.
usiComUSINT1
Index of master 1: first ETC master
uiDeviceUINTThe physical slave address to access the EtherCAT slave
usiChannelUSINT1
not used in the moment because channel is set automatically
pbyDataPOINTER TO BYTE
Pointer to the data of the file
udiDataSizeUDINTSize of data
dwPasswordDWORDPassword for file transfer
strFilenameSTRINGFilenname to save on the EtherCAT slave
Output
xDoneBOOLTRUE: Action successfully completed
xBusyBOOLTRUE: Function block active
xErrorBOOLTRUE: Error occurred, function block aborts action, FALSE: No error
Errorcodeif xError is true, then this output shows the error reason
strErrorTextSTRINGError code as an string