Figure 4-4. individual polling timing example, Cyclic i/o, Cyclic i/o -6 – National Instruments NI-DNET User Manual

Page 37

Advertising
background image

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 MAC IDs for smaller

ExpPacketRate

values. Since smaller MAC IDs in DeviceNet usually

gain access to the network before larger MAC IDs, this helps to ensure that
smaller rates can be maintained during bursts of increased traffic.

Figure 4-4 shows an individual polling example: MAC ID 3 is polled
every 10 ms, MAC ID 10 every 35 ms, MAC ID 12 every 100 ms, and
MAC ID 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

cyclic I/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 ms

60 ms

Advertising