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
xExecute
BOOL
Rising 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.
usiCom
USINT
1
Index of master 1: first ETC master
uiDevice
UINT
The physical slave address to access the EtherCAT slave
usiChannel
USINT
1
not used in the moment because channel is set automatically
pbyData
POINTER TO BYTE
Pointer to the data of the file
udiDataSize
UDINT
Size of data
dwPassword
DWORD
Password for file transfer
strFilename
STRING
Filenname to save on the EtherCAT slave
Output
xDone
BOOL
TRUE: Action successfully completed
xBusy
BOOL
TRUE: Function block active
xError
BOOL
TRUE: Error occurred, function block aborts action, FALSE: No error
Errorcode
if xError is true, then this output shows the error reason
strErrorText
STRING
Error code as an string