Labview code, C/c++ code, Labview code -5 c/c++ code -5 – National Instruments NI-Motion User Manual
Page 155

Chapter 12
Synchronization
© National Instruments Corporation
12-5
LabVIEW Code
Figure 12-2. Buffered Position Breakpoint in LabVIEW
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)
{
// Resource variables
u8boardID = 1;// Board identification number
u8axis = NIMC_AXIS1;// Axis number
u8 buffer = 1;// Buffer number
// Modal error handling variables
u16
commandID;// The commandID of the function
u16
resourceID;// The resource ID
i32
errorCode;// Error code
u16
csr = 0;// Communication status
1
Configure Buffer
2
Write Buffer
3
Configure Breakpoint
4
Enable Breakpoint Output
5
Check Buffer
6
Clear Buffer
7
Motion Error Handler
7
6
3
5
4
2
1