ReadWriteEEprom (FB)ΒΆ

FUNCTION_BLOCK ReadWriteEEprom

Read or write the EEprom of an EtherCAT slave device

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

Instance of master

uiSlaveAddress

UINT

Address of slave 1001 + n or Autoincrement address if bAutoIncrementAddress is set

pbyData

POINTER TO BYTE

Pointer to 2048 bytes

udiByteSize

UDINT

2048

Number of Bytes to write or read

xWrite

BOOL

FALSE

True: EEprom should be written

uiStartEEpromAddress

UINT

16#0

Start of Eeprom address to read or write

bAutoIncrementAddress

BOOL

FALSE

True: access should be done with auto increment address, False: Access with physical address

bWaitForPackets

BOOL

TRUE

True: The function block should wait for the packets.

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