Home > 

National Instruments NI-CAN Software for Windows 95 and Windows NT
Version 1.2 (README UPDATE)
Copyright 1997 National Instruments Corporation
All Rights Reserved


Thank you for purchasing this CAN interface and the
NI-CAN Software for Windows 95 and Windows NT.

The NI-CAN Software for Windows 95 supports the following hardware:
- AT-CAN/2

The NI-CAN Software for Windows NT supports the following hardware:

The AT-CAN and AT-CAN/2 are not supported under Windows NT.

The NI-CAN installation directory contains the following:

README.TXT - This readme file
CANDIAG.EXE - NI-CAN Diagnostic (also accessible through the
NI-CAN program folder in Start->Programs)
\LANGINT - Subdirectory containing language interface
files for using NI-CAN within your application
\EXAMPLES - Subdirectory containing NI-CAN application examples

Since National Instruments CAN products are relatively new, we are very
interested in hearing about the applications you develop, including
suggestions for improvement of our CAN products. To provide suggestions
for NI-CAN or the CAN hardware interfaces, send e-mail to
with the subject
CAN Suggestions
You can also use the forms in the appendix of your Getting Started
manual for communication with National Instruments.

Uninstalling NI-CAN

For Windows 95 and Windows NT 4.0, you can uninstall the NI-CAN software
using the "Add/Remove Programs" selection in the "Control Panel".

For Windows NT 3.51, you can uninstall the NI-CAN software using the
"unInstall NI-CAN" selection in the "NI-CAN Software for Windows NT"
program group.

Version History

Version 1.0
- Initial release for Windows 95

Version 1.1
- Added support for Windows NT (otherwise no change)

Version 1.2
- Added support for PCMCIA-CAN cards (both Win95 and WinNT)
- Performance improvements:
* ncRead and ncWrite more than ten times faster
* CAN firmware can receive back to back frames
- LabVIEW NI-CAN palettes
- New LabVIEW example: Interactive CAN Example (Interact.vi)
- New LabVIEW configuration VIs
- New NI-CAN Create (LabVIEW) Occurrence VI: ncCreateOccur.vi
- Simplified CAN Object configuration attributes
- New CAN Object: Transmit Periodic Waveform
- Functions to access objects by name instead of with handle
- Borland C 5.x language interface library (nicanbor.lib)
- Other minor additions and fixes...

Description of New Version 1.2 Features

LabVIEW NI-CAN Palettes
Version 1.2 adds NI-CAN Function and Control palettes for
use within LabVIEW and BridgeVIEW. To add these palettes
within LabVIEW, select:
Edit>>Select Palette Set>>nican_view
The Function palettes provide easy access to NI-CAN functions
without the need to use "Select A VI...".
The Control palettes contain the new configuration clusters
described below. These clusters can be used when you wish
to place NI-CAN configuration information on your front panel.

New LabVIEW Example
Interact.vi is a new example for Version 1.2 and above. It
provides front panel features which allow you to access the
CAN bus interactively. All frames received are displayed in
a scrolling array of frames. If you want to transmit a specific
frame, you can enter the needed information and select WRITE.
The front panel also supports configuration and use of a Periodic
Transmit CAN Object. For more information on how to use the front
panel of Interact.vi, scroll up to the help text located above
"Interactive CAN Example" on the front panel.

New LabVIEW Configuration VIs
The method of configuring objects within LabVIEW has been made easier.
The new ncConfigCANNet.vi (NI-CAN Configure CAN Network Interface
Object) and ncConfigCANObj.vi (NI-CAN Configure CAN Object)
functions accept easy to use clusters in order to specify all
configuration attributes. Controls for these clusters can be
found in the NI-CAN Controls palette. These new configuration VIs
are preferable to the old configuration VIs (still supported) which
relied on front panel configuration. For more information, select
"Show Help" from the "Help" menu, then go to the NI-CAN Functions
palette to see help for the configuration VIs, then go to the NI-CAN
Controls palette to see help for the configuration clusters
(ncNetAttr.ctl and ncObjAttr.ctl). Also, refer to "Simplified
CAN Object Configuration Attributes" below.

New NI-CAN Create Occurrence VI
The new ncCreateOccur.vi (NI-CAN Create / Cancel Occurrence)
allows the usage of the LabVIEW Wait On Occurrence VI to
detect new CAN states. The advantage of using the occurrence
scheme instead of ncWait.vi (NI-CAN Wait For State) is that
although it provides slightly worse performance, LabVIEW Wait
On Occurrence does not suspend other LabVIEW execution like
ncWait.vi. If your diagram contains multiple disconnected
sequences of execution, ncCreateOccur may be preferable. For
more information, see the Show Help window for ncCreateOccur.vi.

Simplified CAN Object Configuration Attributes
Since the previous CAN Object configuration attributes were
somewhat confusing, new attributes have been added to help
consolidate the old attributes (still supported). The following
table lists the new attributes with their old equivalent.
In the C language NICAN.H header file, these names all begin
with "NC_ATTR". In LabVIEW, the new attributes are represented
in the new configuration VIs, and the old attributes remain
in the old configuration VIs:

New Old Explanation
PERIOD BKD_PERIOD Removed "background"
RX_CHANGES_ONLY BKD_CHANGES_ONLY Applies to receive data only
CAN_TX_RESPONSE BKD_CAN_RESPONSE Applies to transmit data only
BKD_WRITE_SIZE Only one CAN data length
BKD_WHEN_USED Consolidated (see below)

The COMM_TYPE (Communication Type) is a single attribute
which indicates the fundamental CAN Object behavior. It
is equivalent to the old attributes as indicated below:

RX_UNSOL PEER / UNSOL Receive (rx) data frames
TX_BY_CALL PEER / UNSOL Tx data when ncWrite called
RX_PERIODIC REQUEST / PER Tx remote every period (rx data)
TX_PERIODIC PEER / PER Tx data every period
RX_BY_CALL REQUEST / UNSOL Tx remote on ncWrite DataSize 0
TX_RESP_ONLY RESPONSE / UNSOL Tx data only when rx remote
TX_WAVEFORM New (see below)

New CAN Object: Transmit Periodic Waveform
This new CAN Object configuration is used to transmit a given
sequence of data frames over and over, one frame every period.
It is normally used as follows:
- Configure CAN Network Interface with Start On Open false, then
open the object.
- Configure CAN Object as TX_WAVEFORM and nonzero write queue
length, then open the object.
- Call ncWrite for CAN Object, once for every entry specified
for the write queue.
- Use ncAction of NC_OP_START (0x80000001) to start the
CAN Network Interface (not the CAN Object).
- CAN Object transmits first entry in write queue, then waits
the specified period, then transmits the second entry,
and so on. After the last entry is transmitted, the
CAN Object waits the specified period, then transmits
the first entry again.

Accessing Objects By Name
This version of NI-CAN adds functions to access objects by name
instead of using a handle. In order to access an object by name,
you must still open and close it, but you do not need to retain
a handle to reference it. Although access by name can often be
more convenient, the parsing of names in functions like
ncReadByName may result in slightly slower performance as
compared to the usual access by handle (such as ncRead).

Information for Advanced Users

Handling Bus Off Errors and Warnings
As discussed in the NI-CAN User Manual, the CAN specification
requires all CAN chip implementations to maintain transmit
and receive error counters. As these error counters increase,
NI-CAN reports a bus off warning and then an error. The most
common cause of the bus off warning is an attempt to transmit
a frame when no other CAN device is ready to receive that frame
(such as when no cable is connected to the CAN card). When a
bus off warning or error occurs, you may notice that the
warning still exists even after you restart your application.
This is due to the fact that the CAN chip's error counters
maintain the state of the connected CAN network, and not the
state of your application. If you wish to completely reset
the CAN chip's error counters, call ncAction with the reset
operation (NC_OP_RESET) then the start operation (NC_OP_START).
The CAN Network Interface Object must be used with ncAction.

Performance Considerations
When possible, NI-CAN allocates memory for read and write
queues in the CAN card's shared memory window. This allows
the host device driver to access data directly without
querying the embedded 80386 processor, thus making ncRead
and ncWrite complete quickly (usually within 100us). If
NI-CAN cannot find sufficient shared memory for a queue,
it is allocated within onboard memory, and the host device
driver must query the embedded processor for ncRead and ncWrite,
which takes substaially longer than shared memory access.
Since approximately 6000 bytes are available for shared memory
queues, this means that ironically, large queue lengths can
often reduce performance. For example, for the read queue of
the CAN Network Interface Object (whose frames each take 22 bytes),
a length of 100 fits in shared memory, but a length of 1000
does not.

Using CAN Objects with Small Periods
Version 1.2 of NI-CAN will sometimes report an error when
many CAN Objects are configured with relatively small periods.
For example, if you configure four periodic transmit CAN Objects
with periods of 10ms, you'll see error status 0x80050001. This
timeout error indicates that the configured CAN Object periods
could not be met due to NI-CAN firmware overhead. In general,
it is safe to assume that each CAN Object requires 3ms of
overhead time, and 3ms is required for other firmware processing.
This limitation will be substantially improved in future NI-CAN
versions, but for now you may need to reduce usage of CAN Objects.
For example, you can often use the CAN Network Interface Object
to receive data frames instead of multiple CAN Objects. If after
reducing CAN Object usage to the minimum required for your
application, you continue to see the scheduling timeout, contact
National Instruments for information on upcoming NI-CAN updates.

Special Baud Rates
If you need to use a special baud rate (one not listed in
the documentation), NI-CAN supports direct programming of
the CAN chip's timing registers. For information on
programming the timing registers, refer to the description
of the baud rate attribute (NC_ATTR_BAUD_RATE) in LANGINT\NICAN.H.

Search more related documents:
Download Document:

Set Home | Add to Favorites

All Rights Reserved Powered by Free Document Search and Download

Copyright © 2011
This site does not host pdf,doc,ppt,xls,rtf,txt files all document are the property of their respective owners. complaint#downhi.com