From f5eec0c446ebe7952667143dc98f3be94c2a6186 Mon Sep 17 00:00:00 2001 From: Tero Kontkanen Date: Sun, 29 Jan 2017 17:00:51 +0200 Subject: New commutation sensor parameters --- simplemotion_defs.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/simplemotion_defs.h b/simplemotion_defs.h index ec3e2f7..026e538 100644 --- a/simplemotion_defs.h +++ b/simplemotion_defs.h @@ -352,6 +352,8 @@ #define SMP_SYSTEM_CONTROL_GET_SPECIAL_DATA 1024 //stores encoder index position in SMP_DEBUGPARAM_1. while busy (index not found) SMP_DEBUGPARAM_2 will be 100, after found it is 200. #define SMP_SYSTEM_CONTROL_CAPTURE_INDEX_POSITION 2048 + //start a procedure to automatically configure hall sensors direction & offset, or other absolute sensor capable of commutation + #define SMP_SYSTEM_CONTROL_START_COMMUTATION_SENSOR_AUTOSETUP 4096 //write SM bus SM_CRCINIT constant modifier. special purposes only, don't use if unsure because //it is one time programmable variable (permanently irreversible operation, can't be ever reset to default by provided methods) #define SMP_SYSTEM_CONTROL_MODIFY_CRCINIT 262144 @@ -429,7 +431,7 @@ #define FLAG_ALLOW_VOLTAGE_CLIPPING BV(10) #define FLAG_USE_INPUT_LP_FILTER BV(11) #define FLAG_USE_PID_CONTROLLER BV(12)//PIV is the default if bit is 0/*obsolete*/ - #define FLAG_INVERTED_HALLS BV(13) + #define FLAG_INVERT_COMMUTATION_SENSOR_DIRECTION BV(13) /*inverts direction of commutation sensor instead, used together with SMP_COMMUTATION_SENSOR_OFFSET*//*originally was: invert hall sensors digital states*/ #define FLAG_USE_HALLS BV(14) #define FLAG_MECH_BRAKE_DURING_PHASING BV(15) #define FLAG_LIMIT_SWITCHES_NORMALLY_OPEN_TYPE BV(16) @@ -539,7 +541,9 @@ #define SMP_PHASESEARCH_VOLTAGE_SLOPE 480 //by default this is calculated from other motor params: #define SMP_PHASESEARCH_CURRENT 481 -//selector value 0-9 = 100 - 3300Hz (see Granity): +//commutation angle calibration, i.e. for hall sensors or absolute encoder. can be set with SMP_SYSTEM_CONTROL_START_COMMUTATION_SENSOR_AUTOSET +#define SMP_COMMUTATION_SENSOR_OFFSET 482 +//low pass filter selector, value 0=100Hz, 9=3300Hz, 10=4700Hz, 11=unlimited (see Granity for all options): #define SMP_TORQUE_LPF_BANDWIDTH 490 //motor rev to rotary/linear unit scale. like 5mm/rev or 0.1rev/rev. 30bit parameter & scale 100000=1.0 -- cgit v1.2.3