Application Examples - National Instruments NI-CAN User Manual

Table of Contents

Advertisement

Application Examples

© National Instruments Corporation
This chapter describes the sample applications provided with your NI-CAN
software.
The examples in this chapter are designed to illustrate basic NI-CAN
programming, as well as specific concepts and techniques that can help you
write your own applications. The description of each example includes the
programmer's task, a program flowchart, and numbered steps that
correspond to the numbered blocks on the flowchart.
The following example programs are included with your NI-CAN
software:
is the C source code file for Example 1.
obj2obj.c
he LabVIEW source code file for Example 1. In this example, one
t
CAN Object is used to periodically transmit data to another CAN
Object.
is the C source file for Example 2. This example
simpanlz.c
illustrates a simple CAN bus analyzer using the CAN Network
Interface Object. It also demonstrates usage of the
ncCreateNotification
is the LabVIEW source code file for Example 3. In this
interact.vi
example, one CAN Network Interface Object and one CAN Object are
used to transmit and receive CAN frames interactively.
is the C source file for the
ReadMult.c
example shows how to use the function to retrieve CAN frames from
the read queue. The example can be used as the basis for building
analyzer-style applications to retrieve high-speed incoming data for
future analysis. When used with the Network Interface Object, this
function allows more data processing time because it retrieves multiple
frames in one call, as opposed to the
one frame per call.
ReadMultNet.vi
LabVIEW/BridgeVIEW examples for using the
and
ncReadObjMult.vi
is the data cluster used to output the received data. The
ncReadNetMult.vi
function.
ncRead
and
ReadMultObj.vi
. The primary difference between the two vis
use the
NCTYPE_CAN_FRAME_TIMED
4-1
4
obj2obj.vi is
function. This
ncReadMult
function that retrieves
are
ncReadNetMult.vi
cluster
NI-CAN User Manual

Advertisement

Table of Contents
loading

Table of Contents