Chapter 12
Synchronization
1 Configure Breakpoint
2 Load Breakpoint Position
3 Load Breakpoint Modulus
NI-Motion User Manual
LabVIEW Code
1
2
3
4
4 Enable Breakpoint Output
5 Load Target Position
6 Start Motion
Figure 12-10. Periodic Breakpoint Output
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
u16 csr* 0; // Communication Status Register
u8 profileStatus; // Profile Complete Status
u8
bpStatus; // Breakpoint found Status
i32 bpPos; // Breakpoint Position
i32 bpPer; // Breakpoint Period
i32 targetPos; // Target Position
i32 currentPos; // Current Position
u16 axisStatus; // Status of the axis
5
6
7
12-18
8
7 Read per Axis Status
8 Motion Error Handler
folder on the
examples
ni.com
Need help?
Do you have a question about the NI-Motion and is the answer not in the manual?
Questions and answers