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

Motion control
Table of Contents

Advertisement

Chapter 12
Synchronization
1
1 Select Signal
2 Configure Breakpoint
NI-Motion User Manual
Refer to Figure 12-5 for an example of how to route this breakpoint
using RTSI.
2
3 Load Breakpoint Position
4 Enable Breakpoint Output
Figure 12-5. Single Position Breakpoint With RTSI Using LabVIEW
After the breakpoint is routed through RTSI, the trigger appears on both
the RTSI line and the breakpoint line on the Motion I/O connector.

C/C++ Code

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
u16 axisStatus;// Axis status
i32 breakpointPosition[3] = {10000, 15000, 20000};
i32 i;
//Variables for modal error handling
u16 commandID;// The commandID of the function
u16 resourceID;// The resource ID
i32 errorCode;// Error code
12-10
5
3
4
5 Read per Axis Status
6 Motion Error Handler
examples
6
folder on the
ni.com

Advertisement

Table of Contents
loading

Table of Contents