flex_config_vect_spc |
Configure Vector Space
Usage
status = flex_config_vect_spc(u8 boardID, u8 vectorSpace, u8 xaxis, u8 yaxis, u8 zaxis);
Purpose
Defines the axes that are associated with a vector space.
Parameters
Name | Type | Description |
---|---|---|
boardID | u8 | assigned by Measurement & Automation Explorer (MAX) |
vectorSpace | u8 | vector space to configure |
xaxis | u8 | physical axis to act as the logical x axis |
yaxis | u8 | physical axis to act as the logical y axis |
zaxis | u8 | physical axis to act as the logical z axis |
Parameter Discussion
vectorSpace is the vector space to configure. On motion controllers that support fewer than thirty axes, configuring non-existent vector spaces returns error 70006 (NIMC_badResourceIDOrAxisError). Refer to Vector Spaces for vector space resource IDs.
Note For NI 7330/40/90 motion controllers, valid values are NIMC_VECTOR_SPACE1 (default), NIMC_VECTOR_SPACE2, and NIMC_VECTOR_SPACE3. |
Note For the NI 7350 motion controllers, valid values are NIMC_VECTOR_SPACE1 (default) through NIMC_VECTOR_SPACE4. |
Note For the NI SoftMotion Controller, valid values are NIMC_VECTOR_SPACE1 (default) through NIMC_VECTOR_SPACE15. |
xaxis is the physical axis (NIMC_AXIS1 through NIMC_AXIS30) to act as the logical x axis. The default is NIMC_NOAXIS (none).
yaxis is the physical axis (NIMC_AXIS1 through NIMC_AXIS30) to act as the logical y axis. The default is NIMC_NOAXIS (none).
zaxis is the physical axis (NIMC_AXIS1 through NIMC_AXIS30) to act as the logical z axis. The default is NIMC_NOAXIS (none).
Using This Function
The Configure Vector Space function is used to group axes into a vector space. A vector space defines an x and y (2D) or x, y, and z (3D) coordinate space. You can map any physical axis to the logical x, y, and z axes to coordinate the motion of multiple axes. The total number of vector spaces NI-Motion supports in your motion control system can be calculated using the following formula:
total vector spaces = .
After it is configured, you can use the Vector Space number in all functions that support vector spaces. Vector spaces are used in 2D and 3D linear interpolation with vector position, vector velocity, vector acceleration and deceleration, and vector operation mode. They are also used in circular, helical and spherical arc moves. You can start, blend, and stop vector spaces just like axes. You can even synchronously start multiple vector spaces for multi-vector space coordination.
Many status and data readback functions also operate on vector spaces. You can read vector position, vector velocity, vector blend status, and so on, or you can read per-axis values and status for the axes within the vector space.
While vector spaces can be comprised of three axes, it is possible to define two-axis or even one-axis vector spaces. These vector spaces function properly for all functions that do not require a greater axis count.
You can use other complex motion control functions with vector spaces, including electronically gearing an independent axis to a master axis contained within a vector space definition.
Note Axes cannot belong to two vector spaces at the same time. To move an axis from one vector space to another, you must de-map the axis from the first vector space and then map it to the second vector space. |
Note Refer to Function Execution Times for benchmark timing information about your controller. |
Example
Vector space 2 (NIMC_VECTOR_SPACE2) is configured with axis 3 as the x axis, axis 1 as the y axis, and axis 2 as the z axis. The resulting 3D vector space is shown in the following figure: