ReadAxisActualTorque
Reads the actual torque from an axis.
Syntax
KsError ReadAxisActualTorque(
int Index,
short* Value
);
Parameters
Index: the index of an axis. Indexes are zero based. Aliases affect this parameter.
Value: pointer to the value to receive the velocity.
Return value
If the function succeeds, it returns errNoError
, otherwise an error code. For more information about the error code, see the KsError list.
Remarks
Used in the cyclic callback to check the actual torque of an axis.
NOTE: Actual torque is available only if EnableActualTorque, or the torque modes in KsAccessMode are enabled. The torque modes can be set using SetAxisAccessMode.
Usable EtherCAT states
ecatOP
Example
Copy
short actualTorqueRead = 0;
nRet = ReadAxisActualTorque(0, &actualTorqueRead);
Requirements
RT | Win32 | |
---|---|---|
Minimum supported version | 4.0 | 4.0 |
Header | ksapi.h | ksapi.h |
Library | KsApi_Rtss.lib | KsApi.lib |
See also