kernelv_ch_get_total_cs_def()
Prototype
[ret, vector, ret_length] | ch_get_total_cs_def(vnck: ctypes.CDLL, chan_index: int); |
Description
Returns the shift and rotation angle of the coordinate system resulting from concatenating all active coordinate systems.
A vector with six elements is returned. The first three elements contain the shift of the coordinate system origin to the origin of the basic coordinate system. The three following vector elements contain the rotation angle in degrees required to generate the coordinate system from the basic coordinate system. Similar to the documentation of the #CS documentation, the sequence to execute the rotations is ϕ3, . ϕ2, ϕ1 in this order.
#CS DEF [CS1] [ <v1>,<v2>,<v3>,<ϕ1>,<ϕ2>,<ϕ3> ]
Index | Meaning in the #CS command |
0 | <v1> |
1 | <v2> |
2 | <v3> |
3 | <ϕ1> |
4 | <ϕ2> |
5 | <ϕ3> |
If no coordinate system is active, a zero vector is returned.
Parameter
Name | Type | Meaning |
vnck | ctypes.CDLL | Instance of the loaded KernelV DLL. |
chan_index | int (unsigned) | Channel index of the channel. |
Return values
Name | Type | Meaning |
ret | KERNELV_RETURN (int) | Return value of the native integrated C function. |
vector | numpy.ndarray [tuple[int, …]] | Returns the shift and rotation angle of the coordinate system resulting from concatenating all active coordinate systems. |
ret_length | int (unsigned) | Length of the vector in bytes. |
KERNELV_RETURN
Symbol | Value | Meaning |
RET_FINISHED | 0 | The function was executed without error. |
ERR_INVALID_CHAN | -1 | The transferred channel index is higher than the number of configured channels -1. |
ERR_CNC_NOT_INIT | -3 | The simulation CNC kernel was not yet initialised. |
ERR_CNC_RET_MEMORY | -4 | The return value(s) does/do not fit into the memory provided. In this case, the minimum size required for the return is returned in returnLength. |