flex_read_mcs_rtn |
Read Move Complete Status
Usage
status = flex_read_mcs_rtn(u8 boardID, u16* moveCompleteStatus);
Purpose
Reads the Move Complete Status register.
Tip Refer to the Remarks section for information about how the behavior of this function differs between controllers. |
Parameters
Name | Type | Description |
---|---|---|
boardID | u8 | assigned by Measurement & Automation Explorer (MAX) |
moveCompleteStatus | u16* | bitmap of Move Complete Status for all axes |
Parameter Discussion
moveCompleteStatus is a bitmap of Move Complete Status for axes one through eight. The bitmap also includes the state of the three User Status bits.
D15 | D14 | D13 | D12 | D11 | D10 | D9 | D8 | D7 | D6 | D5 | D4 | D3 | D2 | D1 | D0 |
Sts15 | Sts14 | Sts13 | XXX | XXX | XXX | XXX | MC 8 | MC 7 | MC 6 | MC 5 | MC 4 | MC 3 | MC 2 | MC 1 | XXX |
D1 through D8:
1 = Move is complete
0 = Axis is moving
D13 through D15 User Status (Sts):
1 = True
0 = False
Note Refer to Function Execution Times for benchmark timing information about your controller. |
Remarks
This section includes information about how the behavior of this function differs among the controllers that support it.
NI 73xx Controller Considerations
The following list includes considerations you must make when you are using this function with a 73xx motion controller:
- This function performs a direct read of the Move Complete Status (MCS) register on the 73xx controller. Because a register read is virtually instantaneous and does not affect communication processing or other NI-Motion operations, you can call this function repeatedly to get the most up to date status for the axes.
Move Complete Status is configurable individually for each axis with the Configure Move Complete Criteria function. The criteria for considering motion to be complete include Profile Complete, Run/Stop, In Position, Settling time delay, and so on.
Note Reading the MCS register immediately after calling the Start Motion function might not return the status you expected. The Start Motion can still be buffered in the communications FIFO when the instantaneous read of the MCS occurs. This function also returns the state of the User Status bits. You can set and reset these three bits during onboard program execution as general-purpose flags to the host computer. Refer to the Set User Status MOMO function for more information.
Note When the 73xx motion controller is in the Power-Up state, the MCS register contains a power-up code that describes why the controller is in the Power-Up state. Refer to the Clear Power Up Status function for a list of these power-up codes.
NI SoftMotion Controller Considerations
The following list includes considerations you must make when you are using this function with the NI SoftMotion Controller:
- During the power-up state on the NI SoftMotion Controller, this function returns zero (0). It does not return a power-up code.
- The User Status bits are not supported by the NI SoftMotion Controller.
- To view the Move Complete Status for axes above eight, use the Read per Axis Status Return function.