flex_read_breakpoint_status |
Read Breakpoint Status
Usage
status = flex_read_breakpoint_status(u8 boardID, u8 axisOrEncoder, u16 breakpointType, u8 returnVector);
Purpose
Reads the breakpoint status for all axes or encoders.
Note You cannot use this function to read the status of buffered breakpoints. Use Check Buffer to get the status of the buffer. |
Parameters
Name | Type | Description |
---|---|---|
boardID | u8 | assigned by Measurement & Automation Explorer (MAX) |
axisOrEncoder | u8 | axis control or encoder control selector |
breakpointType | u16 | reserved (must be 0) |
returnVector | u8 | destination for the return data |
Parameter Discussion
axisOrEncoder is the axis control or encoder control selector. For multi-axis status, use NIMC_AXIS_CTRL. For multi-encoder status, use NIMC_ENCODER_CTRL. Refer to Axes and Encoders for axis and encoder resource IDs.
breakpointType is a reserved input that must be set to NIMC_POSITION_BREAKPOINT (0).
returnVector indicates the destination for the return data generated by this function. Available return vectors include return data to the host (0xFF), to a variable (0x01 through 0x78), to an indirect variable (0x81 through 0xF8), and return no data (0). Refer to Input and Return Vectors for more detailed information.
Using This Function
This function allows you to see if a breakpoint has occurred or is pending. When you enable a breakpoint, the corresponding status bit is reset to indicate that the breakpoint is pending. For single breakpoints, this status is set when a breakpoint occurs. Periodic breakpoints only set the breakpoint status after the first breakpoint has occurred, and the status remains asserted across the subsequent breakpoints. When the breakpoint position is reached, its status bit is set to True (1).
Note Read Breakpoints Status returns the breakpoint status for either all axes or all encoders, based on which value is passed into axisOrEncoder. |
Example
Executing the Read Breakpoint Status function with axisOrEncoder = NIMC_ENCODER_CTRL and breakpointType = 0 returns breakpointStatus = 0x0012, which corresponds to the following bitmap:
D15 | ... | D10 | D9 | D8 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
XXX | ... | XXX | XXX | Enc 8 | Enc 7 | Enc 6 | Enc 5 | Enc 4 | Enc 3 | Enc 2 | Enc 1 | XXX |
0 | ... | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 0 |
On encoders 1 and 4, breakpoints have occurred, but on encoders 2 and 3, breakpoints are pending or were never enabled.