flex_read_home_input_status

NI-Motion Functions

flex_read_home_input_status

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

Read Home Input Status

Usage

status = flex_read_home_input_status(u8 boardID, u8 returnVector);

Purpose

Reads the instantaneous status of the home inputs.

Parameters

Name Type Description
boardID u8 assigned by Measurement & Automation Explorer (MAX)
returnVector u8 destination for the return data

Parameter Discussion

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.

Note  The suffix _rtn on the function indicates that the data must be returned to the host. When this calling convention is used, no returnVector is required.

Using This Function

This function returns the logical state of the home inputs. You can execute this function at anytime to monitor the home inputs, regardless of if they are enabled. A home input enabled with the Enable Home Inputs function causes a halt stop on an axis when its home input becomes active (True). You also can use a home input as a general-purpose input and read its status with this function. The home input status during a Find Reference move is undefined.

Note  This function returns undefined values for axes that are currently performing find reference moves.

To determine the home found status, use Read Reference Status and set the reference type to NIMC_HOME_FOUND.

Note  This function reads the logical state (On or Off, True or False) of the home inputs. The polarity of the home inputs determines if an On state is active high or active low. Refer to the Set Home Input Polarity function for more information.