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

Motion control
Table of Contents

Advertisement

LabVIEW Code

1
1 Configure Vector Space
2 Load Velocity
3 Load Acceleration/Deceleration
4 Load Acceleration/Deceleration

C/C++ Code

© National Instruments Corporation
5
2
3
4
5 Load Helical Arc
6 Start Motion
7 Check Move Complete Status
8 Read per Axis Status
Figure 6-12. Helical Arc Move 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 vectorSpace;// Vector space number
u16 csr = 0;// Communication status register
u16 axisStatus;// Axis status
u16 status;
u16 moveComplete;
//Variables for modal error handling
u16 commandID;// The commandID of the function
u16 resourceID;// The resource ID
i32 errorCode;// Error code
///////////////////////////////
6
7
8
9
6-15
Chapter 6
10
9 Read per Axis Status
10 Read per Axis Status
11 Motion Error Handler
folder on the
examples
NI-Motion User Manual
Arc Moves
11

Advertisement

Table of Contents
loading

Table of Contents