-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Motor commutation
Some positioning systems (e.g. direct drive with missing hall sensors) need to calibrate the motor commutation. ACS controllers feature a auto commutate function.
This is supported by SPiiPlus C Library from version 2.5 on with the acsc_CommutExt function.
Description:
The function initiates motor commutation.
Syntax
Int acsc_CommutExt(HANDLE handle, int Axis, float Current, int Settle, int Slope, ACSC_WAITBLOCK *Wait)
Arguments:
Handle – Communication handle
Axis – The axis to perform commutation on. ACSC_AXIS_0 corresponds to axis0, ACSC_AXIS_1 –to axis1, etc.
Slope – Specifies the time it takes for the current to rise to the desired value, ACSC_NONE for default value.
Wait – Pointer to ACSC_WAITBLOCK structure.
If Wait is ACSC_SYNCHRONOUS, the function returns when the controller response is received. If Wait points to a valid ACSC_WAITBLOCK structure,
the function returns immediately. The calling thread must then call the acsc_WaitForAsyncCall function to retrieve the operation result.
If Wait is ACSC_IGNORE, the function returns immediately. In this case, the operation result is ignored by the library and cannot be retrieved to the
calling thread.
C Example use:
if(!acsc_CommutExt(Handle,// Communication handle
ACSC_AXIS_0, // Commuting axis 0
43, // Commutation current
ACS_NONE, // Use default settle
ACS_NONE, // Use default slope
ACSC_SYNCHRONOUS // Waiting call
)){
printf(“commutation error: %d\n”,acsc_GetLastError());
}
Can you add this?