Справочник Пользователя для National Instruments NI-DNET

Скачать
Страница из 86
Appendix A
DeviceNet Overview
A-6
ni.com
The following tables describe the general format of DeviceNet explicit 
message requests and responses as they appear on the DeviceNet network.
The DeviceNet Specification defines a set of services supported in a 
common way by different devices. These common services include Reset, 
Save, Restore, Get Attribute Single, and Set Attribute Single.
Table A-2.  Explicit Message Request
Field
Description
Service Code
This number identifies the service requested by the client. 
The DeviceNet Specification defines valid service codes.
Class ID
This number identifies the class to which the service is directed. 
The DeviceNet Specification defines valid class IDs.
Instance ID
This number identifies the instance to which the service is directed. If 
the instance ID is zero, the service is directed to the entire class. If the 
instance ID is one or greater, the service is directed to a specific instance 
within the class.
Service Data
Data bytes specific to the Service Code. The number and format of these 
data bytes is defined by the specification for the service.
Table A-3.  Explicit Message Response
Field
Description
Service Code
This number indicates success or failure for execution of the service. If 
this number is the same as the Service Code of the request, the service 
executed successfully. If this number is 14 hex, the service failed to 
execute due to an error.
Service Data
If the service executed successfully, this field contains data bytes which 
are specific to the Service Code. The number and format of these data 
bytes are defined by the specification for the service. 
If the service failed to execute, the first byte of Service Data contains 
a General Error Code which describes the error, and the second byte 
contains an Additional Error Code which qualifies the error. The 
DeviceNet Specification defines valid values for the General Error Code 
and Additional Error Code.