National Instruments NI-DNET User Manual page 35

National instruments devicenet ni-dnet user manual
Table of Contents

Advertisement

Chapter 4
NI-DNET Programming Techniques
0 ms
NI-DNET User Manual
If you set the
PollMode
to configure scanned I/O you must specify the exact same
ExpPacketRate
I/O connections. Using this scheme, you must determine a valid
ExpPacketRate
Figure 4-2 shows a scanned polling example for four polled devices at
MAC ID 14, 17, 20, and 30. The shaded areas indicate other message
traffic, such as the strobed I/O messages shown in Figure 4-1.
5 ms
10 ms
Figure 4-2. Scanned Polling Timing Example
Background Polling
Scanned polling can be less efficient when used with devices with
significantly different response times or devices with significantly different
rates of physical measurement. In the example above (Figure 4-2), consider
what would happen if device 14 took 52 ms to respond and device 20 took
38 ms to respond. In this case, even though device 17 and device 30
respond well within 20 ms, the common
be at least 52 ms. This situation can often be avoided using a special case
of scanned polling called
To configure background polling, you first set the
to
ncOpenDnetIntf
configure (
ncOpenDnetIO
set
ExpPacketRate
foreground poll rate is the same as the common
all strobed I/O. Devices in this group generally respond quickly to poll
commands or have data that changes relatively quickly. The background
poll rate must be an exact multiple of the foreground poll rate. Devices in
this group generally respond slowly to poll commands or have data that
changes relatively slowly (such as temperature).
Background polling provides many of the same advantages as scanned
polling. The handling of only two groups optimizes performance. Also,
parameter of
ncOpenDnetIntf
when you open each of your strobed/polled
for your DeviceNet system.
15 ms
ExpPacketRate
background
polling.
. Then for each polled I/O connection you
Scanned
with
ConnectionType
to either a foreground rate or a background rate. The
4-4
to
Scanned
20 ms
would need to
parameter of
PollMode
set to
), you must
Poll
used for
ExpPacketRate
ni.com
,

Advertisement

Table of Contents
loading

This manual is also suitable for:

Devicenet ni-dnet

Table of Contents