National Instruments 321372C-01 User Manual

CAN
Getting Started with Your CAN
Hardware and the NI-CAN Software for Windows NT
Getting Started with CAN for Windows NT
January 1998 Edition
Part Number 321372C-01
E-mail: support@natinst.com FTP Site: ftp.natinst.com Web Address: http://www.natinst.com

Bulletin Board Support

BBS United States: 51 2 794 5422 BBS United Kingd om: 01635 551422 BBS France: 01 48 65 15 59

Fax-on-Demand Support

512 418 1111

Telephone Support (USA)

Tel: 512 795 8248 Fax: 512 794 5678

International Offices

Australia 03 9879 5166, Austria 0662 45 79 90 0, Belgium 02 7 57 00 20, Brazil 011 288 3336, Canada (Ontario) 905 785 0085, Canada (Québec) 514 694 8521, Denmark 45 76 26 00, Finland 09 725 725 11, France 01 48 14 24 24, Germany 089 741 31 30, Hong Kong 2645 3186, Israel 03 6120092, Italy 02 413091, Japan 03 5472 2970, Kore a 02 596 7456, Mexico 5 520 2635, Netherlands 0348 433466, Norway 32 84 84 00, Singapore 2265886, Spain 91 640 0085, Sweden 08 730 49 70, Switzerland 056 200 51 51, Taiwan 02 377 1200, United Kingdom 01635 523545

National Instruments Corporate Headquarters

6504 Bridge Point Parkway Austin, Texas 78730 -5039 USA Tel: 512 794 0100
© Copyright 1997, 1998 National Instruments Corporation. All rights reserved.

Important Information

Warranty

The CAN hardware is warrant ed against defects in material s and workmanship for a per io d 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 to be defective dur ing the war ranty period . This war ranty in cludes pa rts and labor .
The media on which you receive National Instruments software are warranted not to fail to execute programming instructions, due to defects in materials and workmanship, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation. National Instruments will, at its option, repair or replace software media that do not execute programming instructions if National Instruments receives notice of such defects during the warranty period. National Instruments does not warrant that the operation of the software shall be uninterrupted or error free.
A Return Material Authorization (RMA) number must be obtained from the factory and clearly marked on the outside of the package before any equipment will be accept ed for warranty work. National Instru ments will pay the shippi ng costs of returning to the owner parts which are covered by warranty.
National Instruments believes that the informatio n in this manual is accurate. The docume nt has been ca refully review ed for technical accurac y. In th e even t that te ch nical o r typograp hic al errors exis t, Nation al Inst ruments rese rves th e right to make changes to subsequent editions of this document without prior notice to holders of this edition. The reader should consult National Instruments if errors are suspected. In no event shall National Instruments be liable for any damages arising out of or related to this document or the information contained in it.
XCEPT AS SPECIFIED HEREIN
E
ANY WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE BY FAULT OR NEGLIGENCE ON THE PART OF NATIONAL INSTRUMENTS SHALL BE LIMITED TO THE AMOUNT THERETOFORE PAID BY THE CUSTOME R OR INCIDENTAL OR CONSEQUENTIAL DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY THEREOF
National Instruments will apply regardless of the form of action, whether in contract or tort, including negligence. Any action against National Instruments must be brought within one year after the cause of action accrues. National Instruments shall not be liable for any delay in performance due to causes beyond its reasonable control. The warranty provided herein does not cover damages, defects, malfunctions, or service failures caused by owner’s failure to follow the National Instruments installation, operation, or maintenance instructions; owner’s modification of the product; owner’s abuse, misuse, or negligent acts; and power failure or surges, fire, flood, accident, actions of third parties, or other events outside reasonable control.
ATIONAL INSTRUMENTS WILL NOT BE LIABLE FOR DAMAGES RESULTING FROM LOSS OF DATA, PROFITS, USE OF PRODUCTS
. N
ATIONAL INSTRUMENTS MAKES NO WARRANTIES, EXPRESS OR IMPLIED, AND SPECIFICALLY DISCLAIMS
, N

Copyright

Under the copyright laws, this publication may not be reproduced or transmitted in any form, electronic or mechanical, including photocopyi ng, recordi ng, st oring in an info rmation ret riev al syste m, or translating , in whole or in part, wit hout the prior written consent of National Instruments Corporation.
USTOMER’S RIGHT TO RECOVER DAMAGES CAUSED
. C
. This limitation of the liability of
,

Trademarks

CVI™, LabVIEW™, natinst.com™, and NI-CAN™ are trademarks of Nati onal Instr um ents Corpo r at ion. Product and company names listed are trademarks or trade names of their respective companies.
WARNING REGARDING MEDICAL AND CLINICAL USE OF NATIONAL INSTRUMENTS PRODUCTS
National Instruments products are not designed with components and testing intended to ensure a level of reliability suitable for use in treatment and diagnosis of humans. Applications of National Instruments products involving medical or clinical treatment can create a potential for accidental injury caused by product failure, or by errors on the part of the user or application des igner. Any us e or ap plica tion of Na tiona l Instrum ents pr oducts for or inv olving m edi cal or clin ica l treatment must be performed by properly trai ned and qualifi ed medic al pe rsonne l, and al l tra ditiona l medic al safegu ards, equipment, and procedu res that are appropriate in the particula r situation to prevent serious injury or dea th should al ways continue to be used when Natio nal Instrume nts products are being use d. National In struments prod ucts are N OT intended to be a substitute for any form of establis hed process, procedure, or e quipment us ed to monit or or safeguard human heal th and safety in medical or clinical treatment.

FCC/DOC Radio Frequency Interference Class A Compliance

This equipment generates and uses radio frequency energy and, if not installed and used in strict accordance with the instructions in this manual, may cause interference to radio and television reception. Classification requirements are the same for the Federal Communications Commission (FCC) and the Canadian Department of Communi cations (DOC). This equipment has been tested and found to comply with the following two regulatory agencies :

Federal Communications Commission

This equipment has bee n tested and found to compl y wi th t h e l im i ts for a Cla s s A digital device, pursua nt to part 15 of the FCC Rules. These limits are de signed to provide reasonable protection agai nst ha rm ful interference when the equipment is operate d in a commercial environment. This equipm ent generates, uses, and can radiate radio frequency energy and, if not installed and used in accordance with the instruction manual, may cause harmful interference to radio communicati ons. Operation of this equi pment in a residential area is likely to cause harmful interference in which case the use r w il l be required to correct the interference at his own expense.
Notices to User: Changes or modifications not expressly approved by National Instruments could void
If necessary, consult Nation al Instruments or an experien ced radio/television tech nician for additional suggestions. The following bookl et prepared by the FCC may also be hel pful: Interference to H o me Electronic Entertainment Equipment Handb ook. This booklet is available from the U.S. Government Printing Office, Washington , DC 20402.
the user’s authority to operate the equipment under the FCC Rules. This device complies with the FCC rules only if used with shielded in te rfac e cables
of suitable quality and construction. National Instruments used such cables to test this device and provides them for sale to the user. The use of inferior or nonshielded interface cabl es co ul d void the user’s authority to operate the equ ip men t under the FCC rules.

Canadian Department of Communications

This Class A digital appar at us meets all requirements of th e Canadian Interference -Causing Equipment Regulations.
Cet appareil numérique de la classe A respecte toutes les exigences du Règlement sur le matériel brouilleur du Canada.

Contents

About This Manual
How to Use the Manual Set.............................................................................................ix
Organization of This Manual................................................ ...... .....................................x
Conventions Used in This Manual...................................................................................xi
Related Documentation....................................................................................................xii
Customer Communication...............................................................................................xii
Chapter 1 Introduction
How to Use This Manual.................... ...... ...... ....................................... ..........................1-1
What You Need to Get Started........................................................................................1-2
CAN Hardware Overview .............................. .................................................................1-2
NI-CAN Software Overview...........................................................................................1-3
Optional Programming Tools ..........................................................................................1-4
Chapter 2 Installation and Configuration
Install the NI-CAN Software...........................................................................................2-1
Installing for Windows NT 3.51........................................................................2-1
Installing for Windows NT 4.0..........................................................................2-1
Install the CAN Hardware ...............................................................................................2-3
Install Your PCI-CAN or PCI-CAN/2 ..............................................................2-3
Install Your PCMCIA-CAN or PCMCIA-CAN/2............................................2-5
Connect the Cables............................................................................................2-6
Configure the NI-CAN Software.....................................................................................2-6
Chapter 3 Verify the Installation
Chapter 4 Begin to Use the NI-CAN Software
Using the NI-CAN Software............................................................................................4-1
General Programming Considerations.............................................................................4-2
©
National Instruments Corporation v Getting Started with CAN for Windows NT
Contents
Appendix A Uninstall the Hardware and Software
Uninstalling the CAN Hardware from Windows NT......................................................A-1
Uninstalling the NI-CAN Software from Windows NT..................................................A-1
Appendix B Cabling Requirements
Connector Pinouts ...........................................................................................................B-1
Power Supply Information for the CAN Ports................................................................B-3
Bus Power Supply Requirements....................................................................................B-4
Cable Specifications........................................................................................................B-5
Cable Lengths..................................................................................................................B-5
Maximum Number of Devices........................................................................................ B-6
Cable Termination...........................................................................................................B-6
Cabling Example.............................................................................................................B-7
Appendix C Troubleshooting and Common Questions
Missing CAN Interface in the NI-CAN Configuration Utility........................................ C-1
Troubleshooting Diagnostic Utility Failures...................................................................C-1
Resource Errors.......................................................... ...... .................................C-1
NI-CAN Software Problem Encountered .........................................................C-2
Missing CAN Interface.....................................................................................C-2
CAN Hardware Problem Encountered..............................................................C-2
Common Questions.........................................................................................................C-2
Appendix D Specifications
Appendix E Customer Communication
Glossary

Figures

Figure 2-1. Add/Remove Programs Properties Dialog Box......................................2-2
Figure 2-2. NI-CAN Software Setup Screen.............................................................2-3
Figure 2-3. Installing the PCI-CAN........................................................................... 2-4
Getting Started with CAN for Windows NT vi
©
National Instruments Corporation

Tables

Contents
Figure 2-4. Inserting the PCMCIA-CAN...................................................................2-5
Figure 2-5. CAN Interface That Is Working Properly...............................................2-7
Figure 2-6. Resources Dialog Box for the PCMCIA-CAN.......................................2-7
Figure 2-7. NI-CAN Settings for the PCI-CAN/2 .....................................................2-8
Figure 3-1. NI-CAN Diagnostic Utility after Testing................................................3-2
Figure A-1. Add/Remove Programs Properties Dialog Box.......................................A-2
Figure A-2. NI-CAN Uninstallation Results...............................................................A-3
Figure B-1. Pinout for 9-Pin D-Sub Connector..........................................................B-1
Figure B-2. Pinout for 5-Pin Combicon-Style Pluggable Screw Terminal................B-2
Figure B-3. PCMCIA-CAN Cable..............................................................................B-2
Figure B-4. PCI-CAN/2 Power Source Jumpers ........................................................B-3
Figure B-5. Power Source Jumpers ....................................... ..... ................................B-4
Figure B-6. Termination Resistor Placement .............................................................B-6
Figure B-7. Cabling Example.....................................................................................B-7
Table B-1. Power Requirements for the CAN Physical Layer for
Bus-Powered Versions ............................................................................B-4
Table B-2. ISO 11898 Specifications for Characteristics of a CAN_H and
CAN_L Pair of Wires..............................................................................B-5
Table B-3. DeviceNet Cable Length Specifications..................................................B-5
Table D-1. PCI-CAN and PCI-CAN/2 Hardware Characteristics.............................D-1
Table D-2. PCMCIA-CAN and PCMCIA-CAN/2 Hardware Characteristics ..........D-2
Table D-3. CAN Port Characteristics for Bus-Powered Ports...................................D-2
©
National Instruments Corporation vii Getting Started with CAN for Windows NT

About This Manual

This manual contains instructions to help you install and configure the National Instruments CAN hardware and the NI-CAN software for Windows NT. The National Instruments CAN hardware supported under Windows NT includes the PCI-CAN, PCI-CAN/2, PCMCIA-CAN, and PCMCIA-CAN/2.
This manual assumes that you are already familiar with Windows NT.

How to Use the Manual Set

Getting Started
Manual
Novice
Users
NI-CAN
User Manual
for Windows 95
and Windows NT
Application
Development
and Examples
Installation and
Configuration
Experienced
Users
NI-CAN Programmer
Reference Manual
for Win32
Function
and Object
Descriptions
Use this getting started manual to install and configure your CAN hardware and the NI-CAN software for Windo ws NT.
Use the NI-CAN User Manual for Windows 95 and Windows NT to learn the basics of CAN and how to develop an application program. The user manual also contains debugging information and detailed examples.
©
National Instruments Corporation ix Getting Started with CAN for Windows NT
About This Manual
Use the NI-CAN Programmer Reference Manual for Win32 for specific information about each NI-CAN function and object, such as format, parameters, and possible errors.

Organization of This Manual

This manual is organized as follows:
Chapter 1, Introd uction, explains how to use this manual, lists what you need to get started and optional equipment you can order, and briefly describes the CAN hardware and the NI-CAN software for Windows NT.
Chapter 2, Installation and Configuration, describes how to install and configure the CAN hardware and the NI-CAN software for Windows NT.
Chapter 3, Verify the Installation, describes how to verif y the hardware and software installation.
Chapter 4, Begin to Use the NI-CAN Software, helps you get started with the NI -CAN software for Windows NT.
•AppendixA, Uninstall the Hardware and Softwar e, describes how to uninstall the CAN hardware and the NI-CAN software from Windows NT.
•AppendixB, Cabling Requirements, describes the cabling requirements for CAN interfaces.
•AppendixC, Troubl eshooting and CommonQuestions, describes ho w to troubleshoot problems and answers some common questions.
•AppendixD, Specifications, describes the physical characteristics of the CAN hardware, along with the recomm ended operating conditi ons.
Appendix E, Customer Communication, contains forms you can use to request help from Nati onal Instruments o r to comment on our products and manuals.
•The Glossary contains an alphabetical list and a description of terms used in this manual, including abbreviations, acronyms, metric prefixes, mnemonics, and symbols.
Getting Started with CAN for Windows NT x
©
National Instruments Corporation
About This Manual

Conventions Used in This Manual

The following conventions are used in this manual:
» The » symbol leads you throu gh nested men u items and dialog box op tions
to a final action. The sequence File»Page Setup»Options»Substitute Fonts directs you to pull down the File men u, select the Page Setup item, select Options, and f inally select the Substitute Fonts option from the last dialog box.
This icon to the left of bold italicized text denotes a note, which alerts you to important information.
!
bold
bold italic Bold italic text denotes a note or caution. CAN hardware CAN hardware refers to the PCI-CAN, PCI-CAN/2, PCMCIA-CAN, and
italic
monospace Text in this font denotes text or characters that you should literally enter
monospace italic
This icon to the left of bold italicized text denotes a caution, which advises you of precautions to take to avoid injury, data loss, or a system crash.
Bold text denotes the names of menus, menu items, parameters, d ialo g boxes, dialog box buttons or options, icons, windows, Windows NT tabs, or LEDs.
PCMCIA-CAN/2 in cases where the material applies to all the interfaces. Italic text denotes emphasis, a cross reference, or an introduction to a key
concept. This font also denotes text for which you supply the appropriate word or value, such as in Windows 3.x.
from the keyboard, sections of code, programming examples, and syntax examples. This font is also used for the proper n ames of disk d ri ves, p aths, directories, progr ams, su bprog rams, s ubrouti nes, d e vice n ames, functio ns, operations, variables, filenames, and extensions, and for statements and comments taken from program code.
Italic text in this font denotes that you must su pply the appropriate words or values in the place of these items.
paths Paths in this manual are denoted using backslashes (\) to separate drive
names, director i es, fol ders, and files.
©
National Instruments Corporation xi Getting Started with CAN for Windows NT
About This Manual

Related Documentation

The following document s contain informat ion that you may f ind helpful as you read this manual:
ANSI/ISO Standard 11898-1993, Road Vehicles—Interchange of
Digital Information—Controller Area Network (CAN) for High-Speed Communication
CAN Specification Version 2.0, 1991, Robert Bosch Gmbh., Postfach 500, D-7000 Stuttgart 1
CiA Draft Standard 102, Ve rs io n 2.0, CAN Physical Layer for
Industrial Applications
DeviceNet Specification, Volume 1, Version 2.0, Open DeviceNet Vendor Association
Microsoft Windows NT User’s Guide, Microsoft Corporation

Customer Communication

National Instruments wants to receive your comments on our products and manuals. We are interested in the applications you develop with our products, and we want to help if you have problems with them. To make it easy for you to contact us, this manual contains comment and configuration forms for you to complete. These forms are in Appendix E, Customer
Communication, at the end of this manual.
Getting Started with CAN for Windows NT xii
©
National Instruments Corporation
Introduction
This chapter explains how to use this manual, lists what you need to get started and optional equipment you can order, and briefly describes the CAN hardware and the NI-CAN software for Windows NT.

How to Use This Manual

1
Chapter 1
Chapter 2
Chapter 3
Chapter 4
User Manual and
Programmer Reference
Manual
Gather What You Need
to Get Started
Install the Software
Install the Hardware
Configure the Software
Verify the Installation
Passes?
Yes
Review Programming
Considerations
Write Application Program
No
Troubleshooting
Appendix
©
National Instruments Corporation 1-1 Getting Started with CAN for Windows NT
Chapter 1 Introduction

What You Need to Get Started

Make sure you have all of the following items before you attempt to install the hardware and software:
Windows NT 3.51 or later installed on your computerOne of the following CAN interfaces, which is included in your kit:
PCI-CAN PCI-CAN/2 PCMCIA-CAN PCMCIA-CAN/2
The following 3.5 in., high-density (1.44 MB) disks, which are
included in your kit:
NI-CAN Software for Windows 95 and Windows NT (Disk 1) NI-CAN Software for Windows 95 and Windows NT (Disk 2)
PCMCIA-CAN cable, which is included in your kit, if you have a
PCMCIA-CAN or PCMCIA-CAN/2
CAN interface cables that meet the requirements in Appendix B,
Cabling Requirements

CAN Hardware Overview

The National Instruments CAN hardware supported under Windows NT includes the PCI-CAN, PCI-CAN/2, PCMCIA-CAN, and PCMCIA-CAN/2
The PCI-CAN and PCI-CAN/2 are completely software configurable and compliant with the PCI Local Bus Specification. With a PCI-CAN or PCI-CAN/2 boa rd, you can make yo ur PC-compatible computer with PCI Local Bus slots communicate with and control CAN devices.
The PCMCIA-CAN and PCMCIA-CAN/2 are Type II PC Cards that are completely software configurable and compliant with the PCMCIA standards for 16-bit PC Cards. With a PCMCIA-CAN card or PCMCIA-CAN/2 card, you can make your PC-compatible notebook with PCMCIA sockets communicate with and control CAN devices.
The PCI-CAN and PCMCIA-CAN interfaces each have one CAN port. T he PCI-CAN/2 and PCMCIA-CAN/2 interfaces each have two CAN ports.
Getting Started with CAN for Windows NT 1-2
©
National Instruments Corporation
CAN interfacing is accomplished using the Intel 82527 CAN controller chip. The PCI-CAN physical layer fully conforms to the ISO 11898 physical layer specification for CAN and is optically isolated to 500 V. PCI-CAN boards are available with two physical connector types: DB-9 D-Sub and Combicon-style pluggable screw terminals. PCMCIA-CAN cables include both a DB-9 D-Sub and a Combicon-style pluggable screw terminal. The CAN physical layer on PCI-CAN cards can be powered either internally (from the card) or externally (from the bus cable power). The power source for the CAN physical layer for each port is configured with a jumper. T here are two cables available for the PCMCIA-C AN cards. In one cable the CAN physical layer is powered internally (from the card). In the other cable the CAN physical layer is powered externally (from the bus cable power). The CAN hardware supports a wide variety of transfer rates up to 1 Mb/s.
All of the CAN hardware uses the Intel 386EX embedded processor to implement time-critical features provided by the NI-CAN software. The CAN hardware communicates with the NI-CAN driver through on-board shared memory and an interrupt.

NI-CAN Software Overview

Chapter 1 Introduction
The NI-CAN software includes a native, 32-bit multitasking Windows NT kernel driver.
The NI-CAN software for Windows NT supports the concurrent use of multiple types of CAN hardware. For e xample, you can commun icate with CAN devices through both a PCI-CAN and PCI-CAN/2 in the same system at the same time. The NI-CAN software is fully integrated into the Windows NT operating system. It is configurable through the W indows NT Control Panel and uni nstalla ble through the Add/ Remov e Progr ams applet of the Control Panel.
The NI-CAN software, along with the CAN hardware, transforms your computer into a CAN interface with complete communications and bus management capability. The NI-CAN software includes the following components:
Firmware (runs on embedded Intel 386EX)
Device driv er
Diagnostic test utility
Configuration utility
©
National Instruments Corporation 1-3 Getting Started with CAN for Windows NT
Chapter 1 Introduction
Language interface libraries for Microsoft Visual C/C++ 2.0 or later, LabWindows/CVI 4.0 or later, and LabVIEW 4.0 or later
Example programs that use NI-CAN functions

Optional Programming Tools

Your kit includes the NI-CAN software for Windows NT. In addition, you can order the LabWindows/CVI or LabVIEW software from Nat ional Instruments.
LabWindows/CVI is an interactive ANSI C development environment for building test and measurement and instrument control systems. It includes interactive code-gener ation tools and a graphical editor for building custom user interfaces. It also includes built-in libraries for IEEE 488.2, VXI, RS-232 control, and plug-in da ta acquisition. When you order LabWindows/CVI, you also get hundreds of complete instrument drivers, which are modular, source-code programs that handle the communication with your instrument so that you do not have to learn the programming details.
LabVIEW is a complete programming environment that departs from the sequential nature of traditional programming languages and features a graphical programming environment. It includes all the tools needed for instrument control, data acquisition, analysis, and presentation. LabVIEW also includes an extensive instrument driver library.
For more information about LabWindows/CVI and LabVIEW, contact National Instruments.
Getting Started with CAN for Windows NT 1-4
©
National Instruments Corporation
Loading...
+ 35 hidden pages