Labview Code; C/C++ Code - National Instruments NI-Motion User Manual

Motion control
Table of Contents

Advertisement

LabVIEW Code

1 Configure Buffer
2 Configure High-Speed Capture
3 Enable High-Speed Capture

C/C++ Code

© National Instruments Corporation
1
2
3
4 Check Buffer
5 Read Buffer
Figure 12-17. Buffered High-Speed Capture in LabVIEW
The following example code is not necessarily complete, and may
not compile if copied exactly. Refer to 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 number
u16 csr = 0;// Communication status register
i32 bufferSize = 100;// The size of the buffer to
allocate on the //motion controller
u32 totalPoints = 100;// The number of high speed
capture to //acquire
i32 capturedPositions[100];// Array to store the
captured //positions
f64 actualInterval;// The interval at which the
motion controller can //really contour
u32 backlog;// Indicates the available space for
captured positions
12-29
Chapter 12
4
5
6 Clear Buffer
7 Motion Error Handler
examples
Synchronization
6
7
folder on the
NI-Motion User Manual

Advertisement

Table of Contents
loading

Table of Contents