SimpleFOClibrary 2.4.0
Loading...
Searching...
No Matches
commands.h
Go to the documentation of this file.
1#ifndef COMMANDS_h
2#define COMMANDS_h
3
4// see docs.simplefoc.com for in depth explanation of the commands
5
6// list of commands
7#define CMD_C_D_PID 'D' //!< current d PID & LPF
8#define CMD_C_Q_PID 'Q' //!< current q PID & LPF
9#define CMD_V_PID 'V' //!< velocity PID & LPF
10#define CMD_A_PID 'A' //!< angle PID & LPF
11#define CMD_STATUS 'E' //!< motor status enable/disable
12#define CMD_LIMITS 'L' //!< limits current/voltage/velocity
13#define CMD_MOTION_TYPE 'C' //!< motion control type
14#define CMD_TORQUE_TYPE 'T' //!< torque control type
15#define CMD_SENSOR 'S' //!< sensor offsets
16#define CMD_MONITOR 'M' //!< monitoring
17#define CMD_RESIST 'R' //!< motor phase resistance
18#define CMD_INDUCTANCE 'I' //!< motor phase inductance
19#define CMD_KV_RATING 'K' //!< motor kv rating
20#define CMD_PWMMOD 'W' //!< pwm modulation
21#define CMD_FOC_PARAMS 'F' //!< time parameters
22
23// commander configuration
24#define CMD_SCAN '?' //!< command scaning the network - only for commander
25#define CMD_VERBOSE '@' //!< command setting output mode - only for commander
26#define CMD_DECIMAL '#' //!< command setting decimal places - only for commander
27
28// subcomands
29//pid - lpf
30#define SCMD_PID_P 'P' //!< PID gain P
31#define SCMD_PID_I 'I' //!< PID gain I
32#define SCMD_PID_D 'D' //!< PID gain D
33#define SCMD_PID_RAMP 'R' //!< PID ramp
34#define SCMD_PID_LIM 'L' //!< PID limit
35#define SCMD_LPF_TF 'F' //!< LPF time constant
36// limits
37#define SCMD_LIM_CURR 'C' //!< Limit current
38#define SCMD_LIM_VOLT 'U' //!< Limit voltage
39#define SCMD_LIM_VEL 'V' //!< Limit velocity
40//sensor
41#define SCMD_SENS_MECH_OFFSET 'M' //!< Sensor offset
42#define SCMD_SENS_ELEC_OFFSET 'E' //!< Sensor electrical zero offset
43// monitoring
44#define SCMD_DOWNSAMPLE 'D' //!< Monitoring downsample value
45#define SCMD_CLEAR 'C' //!< Clear all monitored variables
46#define SCMD_GET 'G' //!< Get variable only one value
47#define SCMD_SET 'S' //!< Set variables to be monitored
48#define SCMD_TIME 'T' //!< Time between executions (filtered)
49
50// pwm modulation
51#define SCMD_PWMMOD_TYPE 'T' //!<< Pwm modulation type
52#define SCMD_PWMMOD_CENTER 'C' //!<< Pwm modulation center flag
53
54// foc control parameters
55#define SCMD_REINIT_FOC 'R' //!< reinitialize FOC
56#define SCMD_TUNE_CURR 'C' //!< tune current controller
57#define SCMD_MEAS_PARAMS 'P' //!< measure motor parameters (resistance and inductance)
58
59// subcommands for motor parameters measurement
60#define SCMD_INDUCT_D 'D' //!< inductance d axis
61#define SCMD_INDUCT_Q 'Q' //!< inductance q axis
62
63#endif