Справочник Пользователя для National Instruments NI-DNET

Скачать
Страница из 86
Chapter 4
NI-DNET Programming Techniques
4-2
ni.com
When you select an 
ExpPacketRate
 for an I/O connection, you must 
consider all I/O connections in your system. For example, although you 
might be able to configure an 
ExpPacketRate
 of 3 ms for a single 
I/O connection, you cannot configure a 3 ms 
ExpPacketRate
 for 40 I/O 
connections because DeviceNet’s bandwidth capabilities cannot support 
40 messages in a 3 ms time frame.
The following sections describe how to evaluate system considerations so 
that you can configure valid values for 
ExpPacketRate
.
Strobed I/O
For strobed I/O connections, the master broadcasts a single strobe 
command message to all strobed slaves. Since all strobed I/O connections 
transfer data at the rate of this single strobe command message, the 
ExpPacketRate
 of each strobed I/O connection must be set to the 
same value.
The common 
ExpPacketRate
 for all strobed I/O connections should 
provide enough time for the strobe command and each strobed slave’s 
response. You must also allow time for other I/O messages and explicit 
messages to occur in the 
ExpPacketRate
 time frame. If you do not know 
the time needed, let NI-DNET calculate a safe value for you (refer to the 
section 
 later in this chapter).
Figure 4-1 shows a timing example for four strobed devices at MAC ID 9, 
11, 12, and 13. Notice that since MAC ID 11 is slow to respond, the 
ExpPacketRate
 is set to 20 ms to provide additional safety margin for 
other messages.
Figure 4-1.  Strobed I/O Timing Example
Strobe Command
Strobe Command
Strobe Response 9
StrobeResponse 13
Strobe Response 12
Strobe Response 11
0 ms
5 ms
10 ms
20 ms
15 ms