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 use the function block, you must add a at least one EtherNet/IP device under the protocol manager. Refer to Add a Device.
To see the general representation in IL or ST language, refer to Function and Function Block Representation.
This table describes the input variables:
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. Another rising edge of the Execute input while the function block is executing is ignored.
|
i_xAbort |
BOOL |
BASE |
Default value: FALSE.
|
i_xMsgType |
BOOL |
- |
|
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 variables:
Output |
Type |
Inherited from |
Comment |
---|---|---|---|
q_xDone |
BOOL |
BASE |
Default value: FALSE.
|
q_xBusy |
BOOL |
BASE |
Default value: FALSE.
|
q_xAborted |
BOOL |
BASE |
Default value: FALSE.
|
q_xError |
BOOL |
BASE |
Default value: FALSE.
|
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);