EipDataExch: Send an Explicit Message
This function block sends an explicit message.
The time to perform the operation is configurable from the protocol manager.
There is a timeout value for connected messages and a timeout value for unconnected messages.
This generic function block may be used for features not implemented in the EtherNet/IP Explicit messaging Library.
To see the general representation in IL or ST language, refer to Function and Function Block Representation
This table describes the input variable:
Input |
Type |
Inherited from |
Comment |
---|---|---|---|
i_xExecute |
BOOL |
BASE |
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. oFALSE: If Enable is set to FALSE, the outputs Done, Error, or CommandAborted are set to TRUE for one cycle. oTRUE: If Enable is set to FALSE, the outputs Done, Error, or CommandAborted remain set to TRUE. |
i_xAbort |
BOOL |
BASE |
Default value: FALSE. oFALSE: Execution has not been aborted. oTRUE: Execution has been aborted by another function block. |
i_xMsgType |
BOOL |
- |
oFALSE: UCCM oTRUE: Connected (Class 3) message |
i_adTargetIP |
- |
IP address of target |
|
i_byService |
BYTE |
- |
Service to be performed (service code see above) |
i_dwClass |
DWORD |
- |
Target class. Refer to How To Find Object Information in Device Documentation. Must be 0xFFFFFFFF if the class should not be a part of request |
i_dwInstance |
DWORD |
- |
Target instance. Refer to How To Find Object Information in Device Documentation. Can be 0 if the target is class instance. Must be 0xFFFFFFFF if the instance should not be a part of request |
i_dwAttribute |
DWORD |
- |
Target attribute. Refer to How To Find Object Information in Device Documentation. Must be 0xFFFFFFFF if the attribute should not be a part of request |
i_dwMember |
DWORD |
- |
Target member. Refer to How To Find Object Information in Device Documentation. Must be 0xFFFFFFFF if the member should not be a part of request |
i_abyRequestTag |
ARRAY OF [0…250] BYTE |
- |
Target extended symbol segment. If not used i_wTagSize must be 0 |
i_wTagSize |
WORD |
- |
The actual size of the i_abyRequestTag |
i_abyRequestData |
ARRAY OF [0…999] BYTE |
- |
Data that should be sent to the target. If not used i_wDataSize must be 0 |
i_wDataSize |
WORD |
- |
The actual size of the i_abyRequestData |
This table describes the output variable:
Output |
Type |
Inherited from |
Comment |
---|---|---|---|
q_xDone |
BOOL |
BASE |
Default value: FALSE. oFALSE: Execution has not been started, or an error has been detected. oTRUE: Execution terminated without an error detected. |
q_xBusy |
BOOL |
BASE |
Default value: FALSE. oFALSE: Function block is not being executed. oTRUE: Function block is being executed. |
q_xAborted |
BOOL |
BASE |
Default value: FALSE. oFALSE: Execution has not been aborted. oTRUE: Execution has been aborted by Abort input. |
q_xError |
BOOL |
BASE |
Default value: FALSE. oFALSE: Execution of the function block is running, no error has been detected. oTRUE: An error has been detected in the execution of the function block. |
q_byCommError |
BASE |
Communication error code |
|
q_dwOperError |
BASE |
Operation error code |
|
q_abyResponseData |
ARRAY OF [0…999] BYTE |
- |
Response Data in case of a success |
q_wDataSize |
WORD |
- |
The size of the response Data in bytes |
q_abyExtStatus |
ARRAY OF [0…499] BYTE |
- |
Extended Status Data in case of an error response |
q_wExtStatusSize |
WORD |
- |
The size of the Extended Status Data in 16-bit words |
q_wExtStatus |
WORD |
- |
Extended status word |
This is an example of a call of this function:
MyEipDataExch(
i_xExecute:= Execute,
i_xAbort:= Abort,
q_xDone=> Done,
q_xBusy=> Busy,
q_xAborted=> Aborted,
q_xError=> Err,
q_byCommError=> CommError,
q_dwOperError=> OperError,
i_adTargetIp:= IpAddr,
i_xMsgType:= MsgType,
i_byService:= Service,
i_dwClass:= Class,
i_dwInstance:= Instance,
i_dwAttribute:= Attribute,
i_dwMember:= Member,
i_abyRequestTag:= RequestTag,
i_wTagSize:= TagSize,
i_abyRequestData:= RequestData,
i_wDataSize:= ReqDataSize,
q_abyResponseData=> ResponseData,
q_wDataSize=> ResDataSize,
q_abyExtStatus=> ExtStatusArray,
q_wExtStatusSize=> ExtStatusSize,
q_wExtStatus => ExtStatus);