flex_enable_breakpoint

NI-Motion Functions

flex_enable_breakpoint

Device Compatibility

Device Compatibility
7330
Y
7340
Y
7344
Y
7350
Y
7390
Y
NI SoftMotion Controller for CANopen—Xenus
N
NI SoftMotion Controller for CANopen—Accelnet
N

Enable Breakpoint Output

Usage

status = flex_enable_breakpoint(u8 boardID, u8 axisOrEncoder, u8 enable);

Purpose

Enables a position breakpoint on an axis or encoder.

Parameters

Name Type Description
boardID u8 assigned by Measurement & Automation Explorer (MAX)
axisOrEncoder u8 axis or encoder to control
enable u8 enable/disable value

Parameter Discussion

axisOrEncoder is the axis or encoder to control. You can enable breakpoints on encoders mapped to axes NIMC_AXIS1 through NIMC_AXIS30 or directly on encoders NIMC_ENCODER1 through NIMC_ENCODER30. On motion controllers that support fewer than thirty axes, configuring non-existent axes returns error –70006 (NIMC_badResourceIDOrAxisError). Refer to Axes and Encoders for axis and encoder resource IDs.

enable indicates if the function enables or disables the high-speed capture input.
   0 = Breakpoint disable
   1 = Breakpoint enable

Using This Function

This function enables or disables the breakpoint with configuration set by the Configure Breakpoint function. For single breakpoints, you must re-enable if you want another breakpoint. Buffered and periodic breakpoints only need to be enabled once. When an enabled breakpoint is reached, a breakpoint event occurs. You can use the Read Breakpoint Status function to see if a breakpoint has occurred yet or not.

You can enable only one breakpoint per encoder or axis at a time. When an enabled breakpoint is reached, the breakpoint is automatically disabled. You must explicitly re-enable the breakpoint to use it again.

Note  Enabled breakpoints are also automatically disabled when you execute a Reset Position or Reset Encoder Position function on the corresponding axis.

Breakpoints are fully functional on independent encoders that are not mapped to axes. In this case, you enable breakpoints directly on the encoder resource.

Note  If you use modulus breakpoints or enable the same breakpoint repeatedly at low velocity (< 50 counts/sec), you may get a breakpoint output immediately after you re-enable it, because the position may not have changed from the last breakpoint.

To avoid this problem, use MAX or the Set u32 function to change the breakpoint window. The breakpoint window is a buffer around the breakpoint position in which a breakpoint is not enabled while the current position remains inside the buffer.
Note  All breakpoints can be affected by jitter in the motion system. For example, if you have breakpoint positions very close to each other, the jitter in the motion system could cause the position to change enough to reach the breakpoint when a breakpoint is not intended. Increase the value of the breakpoint window using Set u32 to compensate for system jitter.
Note  Enabling a high-speed capture when a breakpoint is enabled may cause the breakpoint to be missed. If you are using a breakpoint on the same axis on which you are performing the high-speed capture, ensure that both the breakpoint and the high-speed capture are configured and enabled before starting the move.