flex_set_breakpoint_output_momo

NI-Motion Functions

flex_set_breakpoint_output_momo

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

Set Breakpoint Output MOMO

Usage

status = flex_set_breakpoint_output_momo(u8 boardID, u8 axisOrEncoder, u16 mustOn, u16 mustOff, u8 inputVector);

Purpose

Sets the breakpoint outputs using the mustOn/mustOff protocol.

Parameters

Name Type Description
boardID u8 assigned by Measurement & Automation Explorer (MAX)
axisOrEncoder u8 axis or encoder selector
mustOn u16 bitmap of breakpoint outputs to force On
mustOff u16 bitmap of breakpoint outputs to force Off
inputVector u8 source of the data for this function

Parameter Discussion

axisOrEncoder is the axis or encoder selector. To set breakpoint outputs on multiple axes, use NIMC_AXIS_CTRL. To set breakpoint outputs on multiple encoder resources, use NIMC_ENCODER_CTRL. Refer to Axes and Encoders for axis and encoder resource IDs.

mustOn is the bitmap of breakpoint outputs to force On.

D15 ... D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
XXX ...  XXX XXX mustOn 8 mustOn 7 mustOn 6 mustOn 5 mustOn 4 mustOn 3 mustOn 2 mustOn 1 0

For D1 through D15:
   1 = Breakpoint output forced On
   0 = Breakpoint output unchanged (default)

mustOff is the bitmap of breakpoint outputs to force Off.

D15 ... D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
XXX ...  XXX XXX mustOff 8 mustOff 7 mustOff 6 mustOff 5 mustOff 4 mustOff 3 mustOff 2 mustOff 1 0

For D1 through D15:
   1 = Breakpoint output forced Off
   0 = Breakpoint output unchanged (default)

inputVector indicates the source of the data for this function. 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.

Using This Function

This function directly controls the breakpoint outputs and sets them high or low. You can use this function to set breakpoint outputs to a known state or to control them as general-purpose outputs in non-breakpoint applications. You can only control the output using this function if the breakpoint is disabled.

Note  The Set Breakpoint MOMO function only affects the output state of the breakpoint. It does not change the breakpoint status.

Breakpoint functionality is performed by the encoder resources themselves. When this function is sent to axes, the NI-Motion firmware consults the mapping of axes to encoders and actually sends the command to the mapped encoder resources. Breakpoints are only available on encoder resources NIMC_ENCODER1 through NIMC_ENCODER30.

Using the mustOn/mustOff protocol allows you to set or reset individual breakpoint outputs without affecting the other breakpoint outputs. This gives you tri-state control over each output: On, Off, or Unchanged. A one (1) in a bit location of the mustOn bitmap sets the breakpoint high, while a one (1) in the corresponding location of the mustOff bitmap resets the breakpoint low. A zero (0) in either bitmap has no effect, so leaving both the mustOn and mustOff bits at zero is effectively a hold, and the state of the breakpoint output is unchanged. If you set both the mustOn and mustOff bits to one (1), it is interpreted as a mustOn condition and the breakpoint is set high.

Note  If the breakpoint is enabled using the Enable Breakpoint function, you cannot change the output value using Set Breakpoint Output MOMO. The command is ignored by the motion controller.
Note  The first input vector source indicates the value for the mustOn input and the second vector source indicates the value for the mustOff input. It is not a bitmap of the breakpoint output.

If you are doing onboard programming and are using inputVector to get the data this VI needs, remember that this VI reads the variables starting at the memory address pointed to by inputVector in the following order: mustOn, mustOff.