Labview code, Figure 12-10. periodic breakpoint output, C/c++ code – National Instruments NI-Motion User Manual
Page 168: Labview code -18 c/c++ code -18

Chapter 12
Synchronization
12-18
ni.com
LabVIEW Code
Figure 12-10. Periodic Breakpoint Output
C/C++ Code
The following example code is not necessarily complete, and may
not compile if copied exactly. Refer to the
examples
folder on the
NI-Motion CD for files that are complete and compile as is.
// Main Function
void main(void)
{
u8
boardID; //Board Identification number
u8
axis; // Axis
u16
csr* 0; // Communication Status Register
u8
profileStatus; // Profile Complete Status
u8
bpStatus; // Breakpoint found Status
i32
bpPos; // Breakpoint Position
i32
bpPer; // Breakpoint Period
i32
targetPos; // Target Position
i32
currentPos; // Current Position
u16
axisStatus; // Status of the axis
1
Configure Breakpoint
2
Load Breakpoint Position
3
Load Breakpoint Modulus
4
Enable Breakpoint Output
5
Load Target Position
6
Start Motion
7
Read per Axis Status
8
Motion Error Handler
8
6
5
7
1
2
3
4