Chapter 4 NI-DNET Programming Techniques
NI-DNET User Manual 4-6 ni.com
Since the poll commands are not synchronized for individual polling, they
can often be scattered relatively randomly. They can be evenly interspersed
for a while, then suddenly occur in bursts of back-to-back messages.
Because of this inconsistency, you should use smaller MACIDs for smaller
ExpPacketRate values. Since smaller MACIDs in DeviceNet usually
gain access to the network before larger MACIDs, this helps to ensure that
smaller rates can be maintained during bursts of increased traffic.
Figure 4-4 shows an individual polling example: MACID 3 is polled
every10 ms, MAC ID 10 every 35 ms, MAC ID 12 every 100 ms, and
MACID 13 every 700 ms. Only the poll commands are shown (not poll
responses or other messages).
Figure 4-4. Individual Polling Timing Example
Cyclic I/O
Cyclic I/O connections essentially use the same timing scheme as
individually polled I/O connections. Each cyclic I/O connection sends its
data at the configured ExpPacketRate. The main difference is that
cyclicI/O data is transferred from slave to master, rather than from master
to slave.
In the DeviceNet Specification, a poll command message is exactly the
same as a cyclic output message (master to slave data). Since cyclic data
from master to slave can be handled using individual polling, cyclic I/O
connections are more commonly used for input data from slave to master.
For NI-DNET, this means that for cyclic I/O connections, ncOpenDnetIO
is normally called with InputLength nonzero and OutputLength zero.
Just as for individually polled I/O, you should use smaller MAC IDs for
smaller cyclic I/O ExpPacketRate values. Doing so ensures that cyclic
I/O traffic is prioritized properly.
Poll Cmd 3
Poll Cmd 10
Poll Cmd 3
Poll Cmd 3
Poll Cmd 3
Poll Cmd 13
Poll Cmd 3
Poll Cmd 3
Poll Cmd 3
Poll Cmd 10
Poll Cmd 3
Poll Cmd 12
Poll Cmd 3
Poll Cmd 10
0 ms 20 ms 40 ms 80 ms60 ms