Chapter 4 ni-dnet programming techniques, Configuring i/o connections, Expected packet rate – National Instruments NI-DNET User Manual

Page 32: Configuring i/o connections -1, Expected packet rate -1, Ni-dnet programming techniques

Advertising
background image

© National Instruments Corporation

4-1

NI-DNET User Manual

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,

NI-DNET Software Overview

.

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.

Advertising