![background image](http://html.mh-extra.com/html/omron/devicenet-3g8f7-drm21-e/devicenet-3g8f7-drm21-e_operation-manual_743611100.webp)
83
Explicit Message API Functions
Section 4-6
CLIENT_REQ Structure
This structure defines the format of client request explicit messages. It is used
with the SCAN_SendClientExplicit() function.
Sending a Client Explicit Message: SCAN_SendClientExplicit()
Application Range
Online status
Function
Sends a client request message.
Call Format
BOOL SCAN_SendClientExplicit(DWORD
Handle
, CLIENT_REQ*
Msg
)
Arguments
Return Value
TRUE is returned if the send event registration was completed successfully.
FALSE is returned if an error occurred. Detailed error information can be read
with the GetLastError() function.
Description
The message ID, destination node address, service data size, the data for the
service being sent as a request (service code, class ID, instance ID, and ser-
vice data) needs to be saved in the CLIENT_REQ structure.
Set a value to the message ID in the CLIENT_REQ structure when the mes-
sage needs to be identified by the application. Set 0 if the message doesn’t
need to be identified.
The set message ID is saved in the CLIENT_RES structure’s message ID
after SCAN_ReceiveClientExplicit() has been completed.
Note
Always enable retries when sending explicit messages because explicit mes-
sages may not be received, depending on the type of destination Slave.
CLIENT_RES Structure
This structure defines the format of client response explicit messages. This
structure is used in the SCAN_ReceiveClientExplicit() function.
Type
Name
Contents
DWORD
MessageID
Message ID
Set a value to enable the application to identify the
message. Set 0 if no identification is required.
WORD
MacId
Destination (remote) node address
WORD
ServiceCode
Service code
WORD
ClassID
Class ID
WORD
InstanceID
Instance ID
WORD
DataLength
The amount of service data in bytes
Setting range: 0x0 to 0x228 (0 to 552)
BYTE*
ServiceData
Buffer address where the service data is stored.
The buffer stores the number of bytes of service
data specified under Data Length.
Type
Name
Contents
DWORD
Handle
Device handle obtained by SCAN_Open()
CLIENT_REQ*
Msg
Buffer address where the request message is stored
Type
Name
Contents
DWORD
MessageID
Message ID
The message ID set when the request was sent is
stored when the function is completed.
WORD
MacId
Destination (remote) node address
Specifies the remote node address for the client
response to be obtained before calling the function.
Summary of Contents for DeviceNet 3G8F7-DRM21-E
Page 1: ...OPERATION MANUAL Cat No W381 E1 02 3G8F7 DRM21 E DeviceNet PCI Board ...
Page 2: ...3G8F7 DRM21 E DeviceNet PCI Board Operation Manual Revised July 2005 ...
Page 3: ...iv ...
Page 5: ...vi ...
Page 29: ...12 Preparation for Operation Section 1 8 ...
Page 67: ...50 PC Watchdog Timer Management Function Section 3 11 ...
Page 115: ...98 Maintenance API Functions Section 4 7 ...
Page 131: ...114 Remote I O Communications Characteristics Section 6 1 ...
Page 145: ...Index 128 ...
Page 147: ...130 Revision History ...