Page 3 - Important Information; Warranty; Patents; WARNING REGARDING USE OF NATIONAL INSTRUMENTS PRODUCTS
Important Information Warranty The CAN/DeviceNet hardware is warranted against defects in materials and workmanship for a period of one year from the date of shipment, as evidenced by receipts or other documentation. National Instruments will, at its option, repair or replace equipment that proves t...
Page 4 - Contents; About This Manual
© National Instruments Corporation v NI-DNET User Manual Contents About This Manual How to Use the Manual Set ........................................................................................... ixConventions .......................................................................................
Page 6 - Glossary
Contents © National Instruments Corporation vii NI-DNET User Manual Appendix BCabling Requirements Connector Pinouts .......................................................................................................... B-1Power Supply Information for the DeviceNet Ports ...........................
Page 7 - How to Use the Manual Set
© National Instruments Corporation ix NI-DNET User Manual About This Manual This manual describes the basics of DeviceNet and explains how to develop an application program, including reference to examples. The user manual also contains hardware information. How to Use the Manual Set Use the install...
Page 8 - Conventions; File»Page Setup»Options; Related Documentation
About This Manual NI-DNET User Manual x ni.com Conventions The following conventions appear in this manual: » The » symbol leads you through nested menu items and dialog box options to a final action. The sequence File»Page Setup»Options directs you to open the File menu, select the Page Setup item,...
Page 10 - NI-DNET Software Overview; Installation and Configuration; Verify Installation of Your DeviceNet Hardware
© National Instruments Corporation 1-1 NI-DNET User Manual 1 NI-DNET Software Overview The DeviceNet software provided with National Instruments DeviceNet hardware is called NI-DNET. This section provides an overview of the NI-DNET software. Installation and Configuration Measurement & Automatio...
Page 11 - Test Status
Chapter 1 NI-DNET Software Overview NI-DNET User Manual 1-2 ni.com Figure 1-1. NI-DNET Cards Listed in MAX Note Each card’s name uses the word CAN, because the Controller Area Network is the communication protocol upon which DeviceNet is built. If your NI DeviceNet hardware is not listed here, MAX i...
Page 12 - Configure DeviceNet Port
Chapter 1 NI-DNET Software Overview © National Instruments Corporation 1-3 NI-DNET User Manual Configure DeviceNet Port The physical port of each DeviceNet card is listed under the card’s name. To configure software properties, right-click the port and select Properties . In the Properties dialog, y...
Page 13 - SimpleWho
Chapter 1 NI-DNET Software Overview NI-DNET User Manual 1-4 ni.com NI-Spy This tool monitors function calls to the NI-DNET APIs. This tool helps in debugging programming problems in your application. To launch this tool, open the Software branch of the MAX Configuration tree, right-click NI Spy , an...
Page 14 - Interface Object
Chapter 1 NI-DNET Software Overview © National Instruments Corporation 1-5 NI-DNET User Manual Much like any other object-oriented system, NI-DNET device driver objects use the concepts of class, instance, attribute, and service to describe their features. The NI-DNET device driver software provides...
Page 15 - Example
Chapter 1 NI-DNET Software Overview NI-DNET User Manual 1-6 ni.com • Execute the DeviceNet Set Attribute Single service on the remote device ( ncSetDnetAttribute ) • Send any other explicit message request to the remote device and receive the associated explicit message response ( ncWriteDnetExplMsg...
Page 16 - Protocol; DeviceNet
Chapter 1 NI-DNET Software Overview © National Instruments Corporation 1-7 NI-DNET User Manual Figure 1-2. NI-DNET Objects for a Network of Three Devices Using NI-CAN with NI-DNET Controller Area Network (CAN) is the low-level protocol used for DeviceNet communications. In addition to the NI-DNET fu...
Page 18 - Types of Hardware
© National Instruments Corporation 2-1 NI-DNET User Manual 2 NI-DNET Hardware Overview Types of Hardware The National Instruments DeviceNet hardware includes the PCI-CAN, PXI-8461, and PCMCIA-CAN. The PCI-CAN is software configurable and compliant with the PCI Local Bus Specification. It features th...
Page 19 - Differences Between CAN Kits and DeviceNet Kits
Chapter 2 NI-DNET Hardware Overview NI-DNET User Manual 2-2 ni.com For more information on the DeviceNet physical layer and cables used to connect to your DeviceNet devices, refer to Appendix B, Cabling Requirements . For connection to the network, the PCI-CAN, PXI-8461, and PCMCIA-CAN for DeviceNet...
Page 20 - Developing Your Application; LabVIEW; NI Measurements; Help»Find
© National Instruments Corporation 3-1 NI-DNET User Manual 3 Developing Your Application This chapter explains how to develop an application using the NI-DNET functions. Accessing NI-DNET from your Programming Environment Applications can access the NI-DNET driver software by using either LabVIEW, L...
Page 21 - Microsoft Visual Basic; Start»All
Chapter 3 Developing Your Application NI-DNET User Manual 3-2 ni.com LabWindows/CVI Within LabWindows/CVI, the NI-DNET function panel is located in Library»NI-DNET . Like other LabWindows/CVI function panels, the NI-DNET function panel provides help for each function and the ability to generate code...
Page 22 - Borland C
Chapter 3 Developing Your Application © National Instruments Corporation 3-3 NI-DNET User Manual Microsoft C/C++ The NI-DNET software supports Microsoft Visual C/C++ version 6. The header file and library for Visual C/C++ 6 are in the MS Visual C folder of the NI-DNET folder. The typical path to thi...
Page 23 - Other Programming Languages
Chapter 3 Developing Your Application NI-DNET User Manual 3-4 ni.com For C applications (files with .c extension), include the header file by adding a #include to the beginning of your code, like this: #include "nidnet.h" For C++ applications (files with .cpp extension), define _cplusplus be...
Page 25 - Programming Model for NI-DNET Applications
Chapter 3 Developing Your Application NI-DNET User Manual 3-6 ni.com 3. Configure your application to de-reference the pointer to call an NI-DNET function, as illustrated by the following code. NCTYPE_STATUS status; NCTYPE_OBJH MyObjh; status = (*PncOpenDnetIO) ("DNET0", &MyObjh); if (st...
Page 27 - Step 2. Start Communication
Chapter 3 Developing Your Application NI-DNET User Manual 3-8 ni.com Step 1. Open Objects Before you use an NI-DNET object in your application, you must configure and open it using either ncOpenDnetIntf , ncOpenDnetExplMsg , or ncOpenDnetIO . These open functions return a handle for use in all subse...
Page 29 - Step 4. Stop Communication; Multiple Applications on the Same Interface
Chapter 3 Developing Your Application NI-DNET User Manual 3-10 ni.com Step 4. Stop Communication Before you exit your application, stop communication to shut down DeviceNet connections to remote devices. Use the Interface Object to call the ncOperateDnetIntf function with the Opcode parameter set to...
Page 30 - Checking Status in LabVIEW; Explain Error
Chapter 3 Developing Your Application © National Instruments Corporation 3-11 NI-DNET User Manual If you use two different applications on the same interface and open I/O connections to different devices, you must set PollMode to either Scanned or Individual . You cannot use PollMode of Automatic , ...
Page 32 - Configuring I/O Connections; Expected Packet Rate
© 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, an...
Page 34 - Scanned Polling
Chapter 4 NI-DNET Programming Techniques © National Instruments Corporation 4-3 NI-DNET User Manual Polled I/O Polled I/O connections use a separate poll command and response message for each device. The overall scheme that NI-DNET uses to time polled I/O connections is determined by the PollMode pa...
Page 35 - Background Polling
Chapter 4 NI-DNET Programming Techniques NI-DNET User Manual 4-4 ni.com • If you set the PollMode parameter of ncOpenDnetIntf to Scanned , to configure scanned I/O you must specify the exact same ExpPacketRate when you open each of your strobed/polled I/O connections. Using this scheme, you must det...
Page 36 - Individual Polling
Chapter 4 NI-DNET Programming Techniques © National Instruments Corporation 4-5 NI-DNET User Manual background polling maintains overall network consistency because NI-DNET evenly disperses all background poll commands among multiple foreground cycles. In other words, all background poll commands ar...
Page 39 - Using I/O Data in Your Application
Chapter 4 NI-DNET Programming Techniques NI-DNET User Manual 4-8 ni.com For strobed and polled I/O connections, determination of a valid ExpPacketRate can be somewhat complex. If you have trouble estimating an ExpPacketRate value for strobed/polled I/O, set the PollMode parameter of your initial cal...
Page 41 - Accessing I/O Members in LabVIEW
Chapter 4 NI-DNET Programming Techniques NI-DNET User Manual 4-10 ni.com By consulting the specifications for the Control Supervisor object and the AC/DC Drive object, you can determine that the DeviceNet data type for Run Fwd and Fault Reset is BOOL (boolean), and the DeviceNet data type for Speed ...
Page 42 - Accessing I/O Members in C
Chapter 4 NI-DNET Programming Techniques © National Instruments Corporation 4-11 NI-DNET User Manual 4. Right-click on the ByteOffset terminal and select Create Constant , then enter 0 as the byte offset. 5. Right-click on the 8[TF] in terminal and select Create Control . In the front panel control ...
Page 43 - Using Explicit Messaging Services; Get and Set Attributes in a Remote DeviceNet Device
Chapter 4 NI-DNET Programming Techniques NI-DNET User Manual 4-12 ni.com 2. Initialize the array to all zero. for (I = 0; I < 4; I++) OutputAsm [I] = 0; 3. Assume you have two boolean variables, RunFwd and ResetFault , of type NCTYPE_BOOL . For LabWindows/CVI, these variables could be accessed fr...
Page 44 - Other Explicit Messaging Services
Chapter 4 NI-DNET Programming Techniques © National Instruments Corporation 4-13 NI-DNET User Manual easiest way to execute the Set Attribute Single service on a remote device is to use the NI-DNET ncSetDnetAttribute function. For a given attribute of a DeviceNet device, you need the following infor...
Page 45 - Handling Multiple Devices; Configuration
Chapter 4 NI-DNET Programming Techniques NI-DNET User Manual 4-14 ni.com Specification defines the overall format of these services, in most cases their meaning and service data are object-specific or vendor-specific. Unless your device requires such services and documents them in detail, you probab...
Page 46 - Object Handles; Create Indicator
Chapter 4 NI-DNET Programming Techniques © National Instruments Corporation 4-15 NI-DNET User Manual For the C programming language, you can declare a structure typedef to store the parameters of ncOpenDnetIO , similar to the following: typedef struct { NCTYPE_UINT32DeviceMacId; NCTYPE_CONN_TYPEConn...
Page 47 - Main Loop
Chapter 4 NI-DNET Programming Techniques NI-DNET User Manual 4-16 ni.com Main Loop If your application essentially accesses all DeviceNet input/output data as a single image, you would normally wait for read data to become available on one of the input connections (such as a strobed I/O connection),...
Page 48 - History of DeviceNet
© National Instruments Corporation A-1 NI-DNET User Manual A DeviceNet Overview This appendix gives an overview of DeviceNet. History of DeviceNet The Controller Area Network (CAN) was developed in the early 1980s by Bosch, a leading automotive equipment supplier. CAN was developed to overcome the l...
Page 49 - Physical Characteristics of DeviceNet; General Object Modeling Concepts
Appendix A DeviceNet Overview NI-DNET User Manual A-2 ni.com Physical Characteristics of DeviceNet The following list summarizes the physical characteristics of DeviceNet. • Trunkline-dropline cabling—main trunk cable with a drop cable for each device • Selectable baud rates of 125 K, 250 K, and 500...
Page 50 - Object Modeling in the DeviceNet Specification
Appendix A DeviceNet Overview © National Instruments Corporation A-3 NI-DNET User Manual Figure A-1. Classes of Geometric Shapes All squares belong to the same class because they all have similar qualities, such as four equal sides. The term instance refers to a specific instance of a given class. F...
Page 52 - Explicit Messaging Connections
Appendix A DeviceNet Overview © National Instruments Corporation A-5 NI-DNET User Manual In Figure A-2, the term Application Object(s) refers to objects within the device which are used to perform its fundamental behavior. For example, within a photoelectric sensor, an instance of the Presence Sensi...
Page 53 - Field
Appendix A DeviceNet Overview NI-DNET User Manual A-6 ni.com The following tables describe the general format of DeviceNet explicit message requests and responses as they appear on the DeviceNet network. The DeviceNet Specification defines a set of services supported in a common way by different dev...
Page 58 - Assembly Objects
Appendix A DeviceNet Overview © National Instruments Corporation A-11 NI-DNET User Manual Figure A-5 shows an example of four COS/cyclic I/O connections. Figure A-5. COS/Cyclic I/O Example Assembly Objects One of the more important objects in the DeviceNet Specification is the Assembly Object. There...
Page 60 - Device Profiles; Open DeviceNet Vendors Association (ODVA)
Appendix A DeviceNet Overview © National Instruments Corporation A-13 NI-DNET User Manual As you can see, to use the data bytes contained in I/O messages, it is important to know the format of a device’s internal input and output assemblies. Device Profiles To provide interoperability for devices of...
Page 61 - Cabling Requirements; Connector Pinouts
© National Instruments Corporation B-1 NI-DNET User Manual B Cabling Requirements This appendix describes the cabling requirements for the hardware. Cables should be constructed to meet these requirements as well as the requirements of DeviceNet. DeviceNet cabling requirements can be found in the De...
Page 63 - Characteristic
Appendix B Cabling Requirements © National Instruments Corporation B-3 NI-DNET User Manual Power Supply Information for the DeviceNet Ports The bus must supply power to each DeviceNet port. The bus power supply should be a DC power supply with an output of 10 V to 30 V. The DeviceNet physical layer ...
Page 66 - Cable Specifications; Cable Lengths; Maximum Number of Devices
Appendix B Cabling Requirements NI-DNET User Manual B-6 ni.com Cable Specifications Cables should meet the requirements of the DeviceNet cable specification. DeviceNet cabling requirements can be found in the DeviceNet Specification . Belden cable (3084A) meets all of those requirements and should b...
Page 67 - Cable Termination
Appendix B Cabling Requirements © National Instruments Corporation B-7 NI-DNET User Manual Cable Termination The pair of signal wires (CAN_H and CAN_L) constitutes a transmission line. If the transmission line is not terminated, each signal change on the line causes reflections that may cause commun...
Page 69 - Missing CAN Card
© National Instruments Corporation C-1 NI-DNET User Manual C Troubleshooting and Common Questions This appendix describes how to troubleshoot problems with the NI-DNET software and answers some common questions. Troubleshooting with the Measurement & Automation Explorer (MAX) MAX contains config...
Page 70 - Troubleshooting Self Test Failures; Application In Use; Interrupt Resource Conflict; NI-CAN Software Problem Encountered
Appendix C Troubleshooting and Common Questions NI-DNET User Manual C-2 ni.com Troubleshooting Self Test Failures The following topics explain common error messages generated by the Self Test in MAX. Application In Use This error occurs if you are running an application that is using the CAN card. T...
Page 71 - NI-CAN Hardware Problem Encountered; Common Questions; Software; Are interrupts required for the NI-CAN cards?
Appendix C Troubleshooting and Common Questions © National Instruments Corporation C-3 NI-DNET User Manual If the error continues after restart, uninstall NI-CAN (and NI-DNET) and then reinstall. NI-CAN Hardware Problem Encountered This error occurs if the Self Test detects a defect in the CAN hardw...
Page 72 - Can I use multiple PCMCIA cards in one computer?; Properties
Appendix C Troubleshooting and Common Questions NI-DNET User Manual C-4 ni.com Can I use multiple PCMCIA cards in one computer? Yes, but make sure there are enough free resources available. Unlike PCI or PXI CAN cards, PCMCIA CAN cards cannot share resources, such as IRQs, with other devices. I have...
Page 73 - Hardware Specifications
© National Instruments Corporation D-1 NI-DNET User Manual D Hardware Specifications This appendix describes the physical characteristics of the DeviceNet hardware, along with the recommended operating conditions. PCI-CAN Series Dimensions............................................. 10.67 by 17.46 ...
Page 75 - Port Characteristics; Electromagnetic Compatibility
Appendix D Hardware Specifications © National Instruments Corporation D-3 NI-DNET User Manual Port Characteristics Bus power .............................................. 0 to 30 V, 40 mA typical, 100 mA maximum CAN-H, CAN-L ..................................... –8 to +18 V, DC or peak, CATI Safety...
Page 76 - CE Compliance
Appendix D Hardware Specifications NI-DNET User Manual D-4 ni.com CE Compliance This product meets the essential requirements of applicable European Directives, as amended for CE marking, as follows: Low-Voltage Directive (safety) ..............73/23/EEC Electromagnetic CompatibilityDirective (EMC) ...
Page 78 - Symbol
© National Instruments Corporation G-1 NI-DNET User Manual Glossary Symbol Prefix Value m milli 10 – 3 k kilo 10 3 A A amperes AC alternating current actuator A device that uses electrical, mechanical, or other signals to change the value of an external, real-world variable. In the context of device...
Page 85 - Index
© National Instruments Corporation I-1 NI-DNET User Manual Index C CE compliance, D-4change protocol, 1-3common questions, C-3 and troubleshooting, C-1components left after NI-CAN software uninstall, C-4 determining NI-CAN software version, C-3how many CAN interfaces can be configured, C-3 interrupt...