I/o connections – National Instruments NI-DNET User Manual

Page 54

Advertising
background image

Appendix A

DeviceNet Overview

© National Instruments Corporation

A-7

NI-DNET User Manual

The Get Attribute Single service obtains the value of a specific attribute
within a device’s object, and the Set Attribute Single service sets the value
of an attribute. These Get and Set services are the most commonly used
explicit messaging services. Since these two services are used often,
NI-DNET provides functions for these services:

ncGetDnetAttribute

and

ncSetDnetAttribute

.

Other services defined by DeviceNet are used less often. For these services,
NI-DNET provides general purpose functions to send an explicit message
request (

ncWriteDnetExplMsg

) and receive an explicit message

response (

ncReadDnetExplMsg

). These NI-DNET functions use

parameters which are similar to the explicit message request/response
listed above. For more information on DeviceNet common services other
than Get/Set Attribute Single, refer to the DeviceNet Specification.

I/O Connections

In addition to explicit messaging connections, DeviceNet devices provide
another type of Connection Object called an I/O connection.
I/O connections provide a communication path for the exchange of
physical input/output (sensor/actuator) data as well as other
control-oriented data. I/O connections are useful for transferring data at
regular intervals.

Since many DeviceNet devices do not begin their normal operation until an
I/O connection is established, explicit messaging is often used for
configuration and initialization. For example, for a device with an analog
input, the I/O connection is normally used to read the analog input
measurement, and explicit messages are used for configuration such as
setting the measurement range and units (such as –10 to +10 V versus
4 to 20 mA).

The DeviceNet Specification defines two types of I/O connections:
master/slave and peer-to-peer. In master/slave I/O connections, a master
device uses an I/O connection to communicate with one or more slave
devices, and those slave devices can only communicate with the master and
not one another. In peer-to-peer I/O connections, each device on the
network can communicate as a peer, and communication paths between
peer devices are established as needed. The NI-DNET software currently
supports only master/slave I/O connections because the procedure used to
establish these I/O connections is more well defined. For this reason,
almost all existing DeviceNet devices only implement master/slave
I/O connections.

Advertising