Input and Return Vectors

NI-Motion Help

Edition Date: August 2012

Part Number: 372134F-01

»View Product Info
Download Help (Windows Only)

Many VIs that load values and virtually all readback VIs support vectoring. Load VIs, for example Load Target Position, take an input vector that specifies the source of the data, either immediate (using the VI input parameters), from a general-purpose onboard variable, or from an indirect variable. Read VIs, for example Read Position, take a return vector that specifies the destination for the returned data, either the host computer, an onboard variable, or an indirect variable.

The ability to use variables in motion control VIs is one of the powerful features of the NI-Motion onboard programming environment. You can read data from a resource into a variable, scale or perform some other calculation on the value, and then load the new value as a trajectory or other motion parameter. All Data Operations VIs take data from variables and return the result through a return vector, typically to another variable.

Note  Data returned to the host by a return vector of 0xFF is actually left in the Return Data Buffer (RDB). Read data from the RDB using Read Return Data Buffer.

In addition to specifying a variable directly, you can use indirect variables to reference a variable indirectly, much like a pointer in C. Refer to Onboard Variables for more information.

Input and return vectors are very useful when writing onboard programs but have little or no use in programs running on the host computer. For this reason, the default value for input vector is immediate (0xFF).

Note  The return vector must be 0xFF on the NI 7330 and NI PCI-7390 controllers, because they do not support onboard programming.

Refer to Communication between the Host Computer and the NI Motion Controller for information about the RDB.

WAS THIS ARTICLE HELPFUL?

Not Helpful