National Instruments NI-CAN User Manual page 51

Table of Contents

Advertisement

Chapter 4
Application Examples
Configure CAN Network
1
Open CAN Network
2
Configure Periodic
No
Configure CAN Object
3
Open CAN Object
4
No
Write to CAN Network
5
Read from CAN Network
6
NI-CAN User Manual
7.
If Configure Periodic Transmit is checked, the application calls
for the CAN Object to update the data used for periodic
ncWrite
transmissions.
8.
If no NI-CAN error has occurred and the Stop button has not been
selected, the application loops back to Step 5.
9.
The application calls
Interface Object, then calls
ncConfig
Interface Object
ncOpenObject
Interface Object
Transmit?
Yes
ncConfig
ncOpenObject
Write
Selected?
Yes
ncWrite
Interface Object
ncRead
Interface Object
ncCloseObject
ncCloseObject
Insert Frame into Array
7
8
9
Figure 4-3. Program Flowchart for Example 3
4-8
to close the CAN Network
to close the CAN Object.
Read
Successful?
Yes
Configure Periodic
Transmit?
Yes
ncWrite
Write to CAN Object
NI-CAN Error
or Stop Button?
Yes
ncCloseObject
Close Objects
No
No
No
ni.com

Advertisement

Table of Contents
loading

Table of Contents