National Instruments NI-DNET User Manual page 36

National instruments devicenet ni-dnet user manual
Table of Contents

Advertisement

Chapter 4
NI-DNET Programming Techniques
background polling maintains overall network consistency because
NI-DNET evenly disperses all background poll commands among multiple
foreground cycles. In other words, all background poll commands are not
sent in quick succession and thus do not generate quick bursts of traffic on
the network.
Figure 4-3 shows a background polling example which resolves the
problem discussed previously. Devices at MAC ID 17 and 30 are
foreground polled every 20 ms (as before). Devices at MAC ID 14 and 20
are background polled every 60 ms (3 times the 20 ms foreground rate).
The shaded areas indicate other message traffic.
0 ms
20 ms
40 ms
60 ms
Figure 4-3. Background Polling Timing Example
Individual Polling
When the underlying response rates of all polled I/O devices do not fit into
two clear groups, background polling can still be inefficient. For example,
assume you have four different polled I/O sensors capable of updating
measured input at 10 ms, 35 ms, 100 ms, and 700 ms respectively. Each
device responds to its poll command within 1 ms but measures data at a
different rate (such as a pushbutton for 10 ms and a temperature sensor for
700 ms). You could group these into a foreground rate of 10 ms and a
background rate of 700 ms, but then much DeviceNet bandwidth would be
wasted polling the 35 ms and 100 ms devices at the foreground rate. For
this situation, the
individual polling
scheme is most appropriate.
To configure individual polling, first set the
parameter of
PollMode
to
. Then for each polled I/O connection
ncOpenDnetIntf
Individual
you configure (
with
set to
), you
ncOpenDnetIO
ConnectionType
Poll
must set
to the rate desired for that device. Unlike the
ExpPacketRate
scanned polling or background polling scheme, each poll command is no
longer associated with the strobe command's rate, but instead is solely
based on its
.
ExpPacketRate
© National Instruments Corporation
4-5
NI-DNET User Manual

Advertisement

Table of Contents
loading

This manual is also suitable for:

Devicenet ni-dnet

Table of Contents