nimcReadCoordinatePosition |
Read Coordinate Position
Usage
status = nimcReadCoordinatePosition(TnimcDeviceHandle deviceHandle, TnimcCoordinateHandle coordinateHandle, f64* position, u32 lengthPosition, u32 *fetched);
Purpose
Reads the position of all axes in a coordinate.
Parameters
Name | Type | Description |
---|---|---|
deviceHandle | TnimcDeviceHandle | assigned by Measurement & Automation Explorer (MAX) |
coordinateHandle | TnimcCoordinateHandle | coordinate to read |
position[] | f64 | array containing position data |
lengthPosition | u32 | number of axes contained in the coordinate |
fetched* | u32 | number of axes retrieved |
Parameter Discussion
coordinateHandle is the coordinate to read with this function. Valid values are coordinates 1 through 15. On motion controllers that support fewer than thirty axes, reading non-existent coordinates returns error 70006 (NIMC_badResourceIDOrAxisError).
position[] is the array containing the coordinate position information.
lengthPosition is the number of axes contained in the coordinate. If you do not know the correct size for lengthPosition, using a value of 0 returns error 70028 (NIMC_insufficientSizeError) but provides the correct size to use in fetched.
fetched contains the number of axes retrieved.
Using This Function
Use this function to read the position of all axes in a coordinate.
Caution If this function uses reflective memory, it should not be used for event checking. In this case, only use the information returned by this function for display purposes. Refer to Reflective Memory Functions for more information. |
For servo axes, this function returns the primary feedback position in quadrature counts. For open-loop stepper axes, it returns the number of steps generated. For closed-loop stepper axes, it converts the primary feedback position from counts to steps and then returns the value in steps. Closed-loop stepper axes require correctly loaded values of steps per revolution and counts per revolution to function correctly.
Note For closed-loop axes, this function always returns the position of the primary feedback resource. |
Note Refer to Function Execution Times for benchmark timing information about your controller. |