flex_read_var_rtn

NI-Motion Functions

flex_read_var_rtn

Device Compatibility

Device Compatibility
7330
N
7340
Y
7344
Y
7350
Y
7390
N
NI SoftMotion Controller for CANopen—Xenus
N
NI SoftMotion Controller for CANopen—Accelnet
N

Read Variable Return

Usage

status = flex_read_var_rtn(u8 boardID, u8 variable1, i32* value);

Purpose

Reads the value of a variable and returns the result.

Parameters

Name Type Description
boardID u8 assigned by Measurement & Automation Explorer (MAX)
variable1 u8 variable to read
value i32* value of the variable

Parameter Discussion

variable1 is the variable to read. Valid inputs are variables (0x01 through 0x78) and indirect variables (0x81 through 0xF8).

value is the value of the variable.

Using This Function

This function reads the value of the selected variable and returns it to value.

The condition codes are set according to the value read: GREATER THAN, LESS THAN, or EQUAL to zero.