![National Instruments NI-CAN Скачать руководство пользователя страница 51](http://html1.mh-extra.com/html/national-instruments/ni-can/ni-can_user-manual_3506864051.webp)
Chapter 4
Application Examples
4-8
ni.com
7.
If
Configure Periodic Transmit
is checked, the application calls
ncWrite
for the CAN Object to update the data used for periodic
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
ncCloseObject
to close the CAN Network
Interface Object, then calls
ncCloseObject
to close the CAN Object.
Figure 4-3.
Program Flowchart for Example 3
1
2
Open CAN Network
Interface Object
Configure CAN Network
Interface Object
ncConfig
ncOpenObject
Yes
No
No
3
Configure Periodic
Transmit?
Configure CAN Object
ncConfig
Yes
Write
Selected?
ncWrite
4
Open CAN Object
ncOpenObject
5
Write to CAN Network
Interface Object
Read from CAN Network
Interface Object
6
Yes
No
No
No
Read
Successful?
8
Insert Frame into Array
Yes
Configure Periodic
Transmit?
ncWrite
7
Write to CAN Object
Yes
NI-CAN Error
or Stop Button?
ncCloseObject
9
Close Objects
ncRead