beautypg.com

Change-of-state (cos) i/o, Figure 4-5. congestion due to back-to-back cos i/o, Automatic epr feature – National Instruments NI-DNET User Manual

Page 38: Change-of-state (cos) i/o -7, Automatic epr feature -7

background image

Chapter 4

NI-DNET Programming Techniques

© National Instruments Corporation

4-7

NI-DNET User Manual

Change-of-State (COS) I/O

Change-of-State I/O connections use the same timing scheme as cyclic I/O
connections, but in addition to the

ExpPacketRate

, COS I/O sends data

to the master whenever a change is detected.

For COS I/O, the cyclic transmission is used solely to verify that the
I/O connection still exists, so the

ExpPacketRate

is typically set to a large

value, such as 10,000 (10 seconds). Given such a large

ExpPacketRate

,

the main performance concerns for COS I/O are an appropriate MAC ID,
and if needed, a nonzero

InhibitTimer

.

In many cases, a given COS I/O device cannot detect data changes very
quickly. If a COS device is capable of detecting quickly changing data,
there is a chance that it could transmit many COS messages back-to-back,
precluding other I/O messages and thus dramatically impairing overall
DeviceNet performance. This problem is demonstrated in Figure 4-5.

Figure 4-5. Congestion Due to Back-to-Back COS I/O

This problem can be prevented if you increase the MAC ID of the
frequently changing COS I/O device. If the COS device has a higher
MAC ID than other devices, it cannot preclude their I/O messages.

You can also prevent back-to-back COS I/O messages if you set the

InhibitTimer

driver attribute using

ncSetDriverAttr

. After

transmitting COS data, the I/O connection must wait

InhibitTimer

before it can transmit COS data again. A reasonable value for

InhibitTimer

would be the smallest

ExpPacketRate

of an

I/O connection with a larger MAC ID than the COS I/O device.

Automatic EPR Feature

For cyclic I/O connections, a valid

ExpPacketRate

is required for

your call to

ncOpenDnetIO

. For COS I/O connections, a nonzero

ExpPacketRate

is recommended for your call to

ncOpenDnetIO

but

can be set to a large value.

COS I/O

Back to Back

COS I/O Data

Changing Frequently

0 ms

5 ms

10 ms

20 ms

15 ms

Some of the

Other I/O May

Have Timed Out