Relative Position Breakpoints

NI-Motion

Relative Position Breakpoints

Relative position breakpoints trigger events based on a change in position relative to the position at which the breakpoint was enabled.

Instead of keeping track of absolute positions and the current position, you can use relative breakpoints to specify the breakpoint relative to the position where the breakpoint is enabled.

For example, if you are creating a motion control system to control the two-dimensional movement of a microscope, you might use relative position breakpoints to move the microscope a specific distance in a direction, and then hit a breakpoint that triggers a camera snap. The relative breakpoint is useful in this example because the current position is not important. The application must move the axis a specific number of counts from wherever it is, and then generate a breakpoint.

Note  All breakpoints can be affected by jitter in the motion control system. For example, if you have a very small breakpoint window, the jitter in the motion control system could cause the position to change enough to reach the breakpoint when a breakpoint is not intended. Increase the size of the breakpoint window to compensate for system jitter.

Relative Position Breakpoints Algorithm

The following figure shows the basic algorithm for relative breakpoints applicable to both C/C++ and LabVIEW code.

Notice that relative breakpoints are not ideal for periodic breakpoints. There is a latency between the time a breakpoint generates and is re-enabled. If the axis is moving at sufficient velocity, the breakpoint re-enables only after the axis has moved slightly. Because a relative breakpoint generates relative to the position the axis was in when the breakpoint was enabled, the latency between generation and re-enabling can cause additional counts between breakpoints.

For example, the actual breakpoints might occur at positions 5,000; 10,003; 15,006; and 20,012. In this example, the axis moves three counts between a breakpoint and the subsequent re-enabling. For exact distances between breakpoints at high speeds, use Buffered Breakpoints (NI 7350 only) or Periodically Occurring Breakpoints.