Load Breakpoint Modulus

NI-Motion VI

Load Breakpoint Modulus

Load the breakpoint modulus for a position breakpoint.

Details

Device Compatibility

DeviceCompatibility
7330
Y
7340
Y
7344
Y
7350
Y
7390
Y
NI SoftMotion Controller for CANopen—Accelnet
N
NI SoftMotion Controller for CANopen—Xenus
N
Breakpoint Modulus (0) is the period, for periodic breakpoints, or the modulus, for modulus breakpoints. The range for period is 1 to 215–1. The range for modulus is 0 to 231–1. A modulus value of 0 makes a modulus breakpoint behave the same as an absolute breakpoint on 7330/40/90 controllers.
Board ID is a unique number assigned by Measurement & Automation Explorer (MAX) used to send and receive commands and data to or from a specific NI motion controller.
Axis or Encoder is the axis or encoder to control. You can load Breakpoint Position on encoders mapped to axes 1 through 6 or directly on encoders 0x21 through 0x24.
Inp Vect indicates the source of the data for this VI. Available input vectors include immediate (0xFF), variable (0x01 through 0x78), or indirect variable (0x81 through 0xF8). Refer to Input and Return Vectors for more detailed information.
error in (no error) describes error conditions that occur before this VI runs. The default input of this cluster is no error. If an error already occurred, this VI returns the value of error in in error out. The VI runs normally only if no incoming error exists. Otherwise, the VI passes the error in value to error out. The error in cluster contains the following parameters:
status is TRUE if an error occurred before this VI was called, or FALSE if not. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code.
code is a number identifying an error or warning. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code. Use the error handler VIs to look up the meaning of this code and display the corresponding error message.
source is a string that indicates the origin of the error, if any. Typically, source is the name of the VI in which the error occurred.
Bd ID Out is provided for flow control. You can string together NI-Motion VIs by wiring the Bd ID Out terminal of one VI to the Board ID terminal of the next VI.
Resource Output is the Axis, Vector Space, ADC, or Encoder you wired into the VI. Use Resource Output to pass the resource to another VI and/or to display information about the device.
error out contains error information. If error in indicates an error, error out contains the same error information. Otherwise, it describes the error status that this VI produces.
status is TRUE if an error occurred, or FALSE if not. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code.
code is a number identifying an error or warning. If status is TRUE, code is a nonzero error code. If status is FALSE, code is zero or a warning code. Use the error handler VIs to look up the meaning of this code and display the corresponding error message.
source is a string that indicates the origin of the error, if any. Typically, source is the name of the VI in which the error occurred.

Using This VI

This VI loads a position modulus/period, depending on the breakpoint mode. This value is double-buffered in the controller and does not take effect until you execute the Enable Breakpoint Output VI.

Modulo breakpoints are used in applications that require repetitive, equally spaced breakpoints. When using a breakpoint modulus, it is no longer necessary to load ever increasing (or decreasing) breakpoint positions. It is still necessary, however, to re-enable the breakpoint after each use.

Note  For closed-loop stepper systems in which the encoder counts-per-revolution differs from the steps-per-revolution, the breakpoint position is loaded in encoder counts.

When you enable a modulo breakpoint, two breakpoint positions, one in front and one behind the present encoder position, are enabled.

Note  If you use modulus breakpoint 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 breakpoint is re-enabled before you have moved from the previous breakpoint position.

To avoid this problem, use MAX or the Set u32 VI 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.

Example

An application requires breakpoints every 2,000 counts offset at -500 counts: ...–4,500, –2,500, –500, 1,500, 3,500, and so on. To accomplish this, you load a breakpoint position of -500 with the Load Breakpoint Position VI and a breakpoint modulus of 2,000. If the instantaneous encoder position is 2,210 counts when you execute the Enable Breakpoint Output VI (in modulo mode), the breakpoints at 1,500 counts and 3,500 counts are both enabled.