Set User Status MOMOControls the user status bits in the MCS register.
| Device Compatibility
|
Must Off
is the bitmap of user status bits to force False:
|
|||||||
Must On
is the bitmap of user status bits to force True:
|
|||||||
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. | |||||||
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:
|
|||||||
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. | |||||||
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.
|
Using This VI
The Set User Status MOMO VI controls the upper three bits in the MCS register using the Must On/Must Off protocol. You can use this VI in programs to report special conditions back to the host computer by setting and resetting one or more of these bits. Refer to the Read Move Complete Status VI for more information about using the MCS register for high-speed polling.
Using the Must On/Must Off protocol allows you to set or reset individual user status bits without affecting the other user status bits. This gives you tri-state control over each bit: True, False, or Unchanged. A True in a bit location of the Must On bitmap sets the user status bit high, while a True in the corresponding location of the Must Off bitmap resets the user status bit low. A False in either bitmap has no affect, so leaving both the Must On and Must Off bits at zero is effectively a hold, and the state of the user status bit is unchanged. If you set both the Must On and Must Off bits to True, it is interpreted as a Must On condition and the user status bit is set high.
Example
After a conditional jump in a program, you want the program to flag the host with a success code. This can be accomplished by storing the Set User Status MOMO with Must On and Must Off as follows.
Must On 13 | Must On 14 | Must On 15 |
True | False | True |
Must Off 13 | Must Off 14 | Must Off 15 |
False | True | False |
This forces user status bits 13 and 15 True and user status bit 14 low. A subsequent poll of the MCS register returns Move Complete Status with the relevant bits set as follows.
Status 13 | Status 14 | Status 15 |
True | False | True |