DeviceNet NI-DNET User Manual
Contents
NI-DNET User Manual vi ni.com
Programming Model for NI-DNET Applications ......................................................... 3-6
Step 1. Open Objects....................................................................................... 3-8
Step 2. Start Communication .......................................................................... 3-8
Step 3. Run Your DeviceNet Application....................................................... 3-8
Addition of Slave Connections after Communication Start ............. 3-9
Step 4. Stop Communication .......................................................................... 3-10
Step 5. Close Objects ...................................................................................... 3-10
Multiple Applications on the Same Interface................................................................ 3-10
Checking Status in LabVIEW ....................................................................................... 3-11
Checking Status in C, C++, and Visual Basic ............................................................... 3-11
Chapter 4
NI-DNET Programming Techniques
Configuring I/O Connections ........................................................................................ 4-1
Expected Packet Rate...................................................................................... 4-1
Strobed I/O ....................................................................................... 4-2
Polled I/O.......................................................................................... 4-3
Cyclic I/O ......................................................................................... 4-6
Change-of-State (COS) I/O .............................................................. 4-7
Automatic EPR Feature .................................................................................. 4-7
Using I/O Data in Your Application ............................................................................. 4-8
Accessing I/O Members in LabVIEW ............................................................ 4-10
Accessing I/O Members in C .......................................................................... 4-11
Using Explicit Messaging Services............................................................................... 4-12
Get and Set Attributes in a Remote DeviceNet Device .................................. 4-12
Other Explicit Messaging Services ................................................................. 4-13
Handling Multiple Devices............................................................................................ 4-14
Configuration .................................................................................................. 4-14
Object Handles................................................................................................ 4-15
Main Loop....................................................................................................... 4-16
Appendix A
DeviceNet Overview
History of DeviceNet..................................................................................................... A-1
Physical Characteristics of DeviceNet .......................................................................... A-2
General Object Modeling Concepts .............................................................................. A-2
Object Modeling in the DeviceNet Specification.......................................................... A-3
Explicit Messaging Connections ................................................................................... A-5
I/O Connections............................................................................................................. A-7
Assembly Objects.......................................................................................................... A-11