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

Motion control
Table of Contents

Advertisement

LabVIEW Code

1
2
1 Configure Camming Master
2 Configure Buffer
3 Write Buffer
4 Enable Camming Single Axis
5 Wait in a Sequence Structure
6 Set Operation Mode
7 Load Move Constraint

C/C++ Code

© National Instruments Corporation
3
4
5
Figure 10-19. Axis to Axis Camming
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)
{
// Locals
u8 boardID = 1;
f64 bufferInterval = 0; // Ignored
// Master axis information
u8 masterAxis = 2;
f64 camCycle = 70000;
the camming process
// Slave axis information
10-19
Chapter 10
6
7
8 Load Target Position
9 Start Motion
10 Wait for Move Complete
11 Enable Camming Single Axis
12 Clear Buffer
13 Motion Error Handler
examples
// Board ID as assigned by MAX
// Master axis ID
// Position cycle to repeat
Electronic Gearing and Camming
8
9
10
11
12
folder on the
NI-Motion User Manual
13

Advertisement

Table of Contents
loading

Table of Contents