WriteMemory (FB)
FUNCTION_BLOCK WriteMemory EXTENDS CBM.ETrigA
This function block is for writing the memory of EtherCAT slaves.
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
xExecuteBOOLRising edge: Action startsFalling edge: Resets outputsIf 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,iError) are present at the outputs for exactly one cycle.ETrigA
xAbortBOOLTRUE: Action is stopped immediately and all outputs are reset to their initial values.ETrigA
Output
xDoneBOOLTRUE: Action successfully completedETrigA
xBusyBOOLTRUE: Function block activeETrigA
xErrorBOOLTRUE: Error occurred, function block aborts actionFALSE: No errorETrigA
xAbortedBOOLTRUE: Action aborted by userETrigA
Input
usiComUSINT1
index of master 1: first Ethercat master
wSlaveAddressWORDaddress either auto increment address or physical address of device
xAutoIncAdrBOOLflag that determines which way to use the given address
xBroadcastBOOLflag if broadcast read should be used, if true then wSlaveAddress and bAutoIncAdr are not used
uiMemOffsetUINToffset of memory
iSizeINTbytes to write
pSrcPOINTER TO BYTE
buffer to data that should be written
udiTimeOutUDINTTimeout for operation in ms
Output
uiWorkingCounterUINTworking counter of received command