Labview code, Figure 11-3. acquire data using labview, C/c++ code – National Instruments NI-Motion User Manual
Page 148: Labview code -4 c/c++ code -4

Chapter 11
Acquiring Time-Sampled Position and Velocity Data
11-4
ni.com
LabVIEW Code
Figure 11-3 acquires data for two axes, 200 samples, and three
milliseconds apart.
Figure 11-3. Acquire Data Using 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
u16
csr = 0;// Communication status register
i32
i;
u16
axisMap;// Bitmap of axes for which data is
requested
1
Acquire Trajectory Data
2
Read Trajectory Data
3
Motion Error Handler
1
2
3