Figure 7-6. contoured move true case in labview, C/c++ code, C/c++ code -6 – National Instruments NI-Motion User Manual
Page 102

Chapter 7
Contoured Moves
7-6
ni.com
Figure 7-6. Contoured Move True Case 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)
{
u8
boardID;// Board identification number
u8
vectorSpace;// Vector space number
u16
csr = 0;// Communication status register
u16
axisStatus;// Axis status
u16
status;// Temporary copy of status
u16
moveComplete;// Move complete status
i32
i;
i32
points[1994] =NIMC_SPIRAL_ARRAY;// Array of 2D
points to move
u32
numPoints = 1994;//Total number of points to
contour through
i32
bufferSize = 1000;// The size of the buffer to
allocate on the //motion controller
f64
actualInterval;// The interval at which the
motion controller can // really contour
1
Check Buffer
2
Write Buffer
2
1