diff options
Diffstat (limited to 'simplemotion_defs.h')
| -rw-r--r-- | simplemotion_defs.h | 43 |
1 files changed, 37 insertions, 6 deletions
diff --git a/simplemotion_defs.h b/simplemotion_defs.h index 0a4e779..20d2c88 100644 --- a/simplemotion_defs.h +++ b/simplemotion_defs.h @@ -354,6 +354,8 @@ #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
+ //load settings that are saved in device flash memory. useful when changing parameters on the fly and want to restore originals, or when app is started and drive may have unknown parameter modifications active.
+ #define SMP_SYSTEM_CONTROL_RESTORE_SAVED_CONFIG 8192
//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
@@ -448,11 +450,20 @@ #define EL_MODE_SIMUCUBE 2
#define EL_MODE_IONIZER 3
-/*for BiSS encoder
- * bits defined as:
- * lowest 8 bits: single turn bits, value range 4-24
- * next 8 bits: multi turn bits, value range 0-16
+/*for BiSS/SSI encoder
+ * bits defined as (from LSB):
+ * bits 0-7: single turn bits, accepted value range 4-32
+ * bits 8-15: multi turn bits, accepted value range 0-16
+ * ^^ sum of MT and ST must be max 32
+ * bits 16-19: serial encoder mode (see below)
* rest: reserved for future use (always 0)
+ *
+ * Serial encoder read modes (bits 16-19):
+ * 0 BiSS C
+ * 1 BiSS B
+ * 2 SSI
+ * 3 SSI gray
+ * 4 AMS SSI
*/
#define SMP_SERIAL_ENC_BITS 574
@@ -719,11 +730,15 @@ #define TRIG_FAULT 2
#define TRIG_TARGETCHANGE 3
#define TRIG_TARGETCHANGE_POS 4
- #define TRIG_SERIALCMD 5
+ #define TRIG_EXTERNAL_INPUT 5
#define SMP_CAPTURE_SAMPLERATE 5012
//rdonly
#define SMP_CAPTURE_BUF_LENGHT 5013
+//SMP_CAPTURE_BEFORE_TRIGGER_PERCENTS sets how much samples will be preserved before trigger event. Value 0 is traditional, +n starts capture n percents before trigger (relative to whole capture length), -n after trigger. Value range -1000000%..+100%.
+#define SMP_CAPTURE_BEFORE_TRIGGER_PERCENTS 5014
+//SMP_CAPTURE_STATE, states: 0=idle (capture complete or not started), 1=waiting for trigger, 2=capturing. to start capture, write value 1 here starting from IONI FW V1110
+#define SMP_CAPTURE_STATE 5015
//this is looped 0-n to make samples 0-n readable from SMP_CAPTURE_BUFFER_GET_VALUE
#define SMP_CAPTURE_BUFFER_GET_ADDR 5333
#define SMP_CAPTURE_BUFFER_GET_VALUE 5334
@@ -731,7 +746,23 @@ //#define RUNTIME_FEATURES1 6000
#define SMP_SERIAL_NR 6002
#define SMP_UID_NR 6003
-#define SMP_DRIVE_CAPABILITIES 6006
+
+//read only bit field that is can be used to identify device capabilities
+//the list below is subject to extend
+#define SMP_DEVICE_CAPABILITIES 6006
+ #define DEVICE_CAPABILITY_HOMING BV(0)
+ #define DEVICE_CAPABILITY_SERIAL_FBD BV(1)
+ #define DEVICE_CAPABILITY_RESTORE_SAVED_CONFIG BV(2)
+ #define DEVICE_CAPABILITY_MEASURE_RL BV(3)
+ #define DEVICE_CAPABILITY_TORQUE_RIPPLE_COMPENSATION BV(4)
+ #define DEVICE_CAPABILITY_NOTCH_FILTER BV(5)
+ #define DEVICE_CAPABILITY_TORQUE_EFFECTS BV(6)
+ #define DEVICE_CAPABILITY_AUTOSETUP_COMMUTATION_SENSOR BV(7)
+ #define DEVICE_CAPABILITY_SENSORLESS_COMMUTATION BV(8)
+ #define DEVICE_CAPABILITY_ANALOG_OUTPUT BV(9)
+ #define DEVICE_CAPABILITY_SCOPE_TRIGGER_DELAY BV(10) /*also means that params SMP_CAPTURE_BEFORE_TRIGGER_PERCENTS and SMP_CAPTURE_STATE exist */
+ #define DEVICE_CAPABILITY_SCOPE_EXTERNAL_TRIGGER BV(11)
+
#define SMP_FIRMWARE_VERSION 6010
#define SMP_FIRMWARE_BACKWARDS_COMP_VERSION 6011
#define SMP_GC_FIRMWARE_VERSION 6014
|
