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

Скачать
Страница из 86
© National Instruments Corporation
4-1
4
NI-DNET Programming 
Techniques
This chapter describes various techniques to help you program your 
NI-DNET application. The techniques include configuration of 
I/O connection timing, using I/O data (assemblies), using explicit 
messaging, and handling multiple devices.
Configuring I/O Connections
This section provides information on how I/O connections relate to one 
another and how your configuration of I/O connection timing can affect the 
overall performance of your DeviceNet system. The various types of 
I/O connections provided by DeviceNet are described in Chapter 1, 
In a master/slave DeviceNet I/O system, the master determines the timing 
of all I/O communication. Within your NI-DNET application, the 
ncOpenDnetIO
 function configures the timing for I/O connections in 
which your application communicates as master. As you read this section, 
you might want to refer to the description of the 
ncOpenDnetIO
 function 
in the NI-DNET Programmer Reference Manual.
Expected Packet Rate
Each DeviceNet I/O connection contains an attribute called the expected 
packet rate, which specifies the expected rate (in milliseconds) of messages 
(
packets
) for the I/O connection. For NI-DNET, you use the 
ExpPacketRate
 parameter of the 
ncOpenDnetIO
 function to configure 
the expected packet rate.
After you start communication, the embedded microprocessor on your 
National Instruments DeviceNet interface transmits messages at the 
ExpPacketRate
. This means that after the I/O connection is configured, 
your NI-DNET application does not need to be concerned with the timing 
of messages on the DeviceNet network.