This function block returns the content of a specific attribute of an object instance.
To use the function block, you must add a at least one EtherNet/IP device under the protocol manager. Refer to Add a Device.
This table describes the input variables:
Input |
Data type |
Comment |
---|---|---|
i_xExecute |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE. A rising edge of the input Execute starts the function block. The function block continues execution and the output Busy is set to TRUE. Another rising edge of the Execute input while the function block is executing is ignored.
|
i_xAbort |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE.
|
i_xMsgType |
BOOL |
|
i_adTargetIP |
TCP_ADDR |
IP address of target. |
i_dwClass |
DWORD |
Target class. Refer to How To Find Object Information in Device Documentation. It must be 0xFFFFFFFF if the class is not part of the request. |
i_dwInstance |
DWORD |
Target instance. Refer to How To Find Object Information in Device Documentation. It can be 0 if the target is class instance. It must be 0xFFFFFFFF if the instance is not part of the request. |
i_dwAttribute |
DWORD |
Target attribute. Refer to How To Find Object Information in Device Documentation. It must be 0xFFFFFFFF if the attribute is not part of the request. |
This table describes the output variables:
Output |
Data type |
Comment |
---|---|---|
q_xDone |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE.
|
q_xBusy |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE.
|
q_xAborted |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE.
|
q_xError |
BOOL |
Value range: FALSE, TRUE. Default value: FALSE.
|
q_byCommError |
BYTE |
Gives information about the detected error. Refer to CommunicationErrorCodes: Communication Error Codes. |
q_dwOperError |
DWORD |
Gives information about the detected error. Refer to OperationErrorCodes: Operation Error Codes. |
q_abyResponseData |
ARRAY OF BYTE 0…MAX_EIP_REQUEST_DATA_SIZE |
Response data in case of a success. |
q_wDataSize |
WORD |
The size of the response data in bytes. |