Using Inputs and Return Vectors with Onboard Variables
The following table provides additional information about how to use input and return vectors in conjunction with onboard variables. The table contains functions with more than one data parameter that require multiple variables when using vectors. The Maximum Variable Number column lists the highest variable number that a vector can point to and still have room for all the data without exceeding the total variable space. This table also contains notes that highlight a few special cases where the number of parameters does not equal the number of variables.
Function Name |
Vector Type |
Number of Parameters |
Number of Variables Required |
Maximum Variable Number |
Comments |
RPM and RPSPS are double precision floating point values (f64). They are internally represented in IEEE floating point format in two 32-bit variables. The first variable is the least significant bit, and the second variable is the most significant bit. This format is also used in the communications packet between the host computer and the NI motion controller.
While the three Arc functions take double precision floating point values (f64) for their angle parameters, these values are converted to 32 bit values (i32 and u32) before being sent to the controller. Therefore, unlike other NI-Motion functions that take floating-point values, the internal representation for each angle parameter requires only one variable.
The Circular Arc and Spherical Arc functions are implemented identically on the NI motion controller. The function simply substitutes zeros for plane pitch and yaw when you call the Circular Arc function. When using variables and vectors, use the Spherical Arc function exclusively.
The Read Limit Status and Read DAC Limit Status functions return the forward and reverse status bytes (u8) packed together as one 16-bit word (u16). Only one variable is required.
The Read Trajectory Data function returns two values (position and velocity) per axis. The total number of variables required is therefore two times the number of axes selected with the Acquire Trajectory Data function.
The Wait on Condition function can return two values, condition code and bitmapped status, to the variables specified with the return vector.