Set User Status MOMO

NI-Motion VI

Set User Status MOMO

Controls the user status bits in the MCS register.

Details

Device Compatibility

DeviceCompatibility
7330
N
7340
Y
7344
Y
7350
Y
7390
N
NI SoftMotion Controller for CANopen—Accelnet
N
NI SoftMotion Controller for CANopen—Xenus
N
Must Off is the bitmap of user status bits to force False:
Motion status register 13—If true, user status bit forced false. If false, user status bit unchanged (default).
Motion status register 14—If true, user status bit forced false. If false, user status bit unchanged (default).
Motion status register 15—If true, user status bit forced false. If false, user status bit unchanged (default).
Must On is the bitmap of user status bits to force True:
Motion status register 13—If true, user status bit forced true. If false, user status bit unchanged (default).
Motion status register 14—If true, user status bit forced true. If false, user status bit unchanged (default).
Motion status register 15—If true, user status bit forced true. If false, user status bit unchanged (default).
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:
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.
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

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