
RL78/G1G Sensorless Speed control of 120-degree conducting controlled permanent magnetic synchronous motor (Implementation)
R01AN3582EJ0100 Rev.1.00
Page 41 of 46
Jan 13, 2017
Table 3-31
List of Macro definitions “mtr_spm_less_120.h” [4/4]
File name
Macro name
Definition value
Remarks
mtr_spm_less
_120.h
MTR_ERROR_NONE
0x00
No error
MTR_ERROR_OVER_CURRENT
0x01
Overcurrent error
MTR_ERROR_OVER_VOLTAGE
0x02
Over voltage error
MTR_ERROR_OVER_SPEED
0x04
Over speed error
MTR_ERROR_HALL_TIMEOUT
0x08
Hall timeout error
MTR_ERROR_BEMF_TIMEOUT
0x10
BEMF timeout error
MTR_ERROR_HALL_PATTERN
0x20
Hall pattern error
MTR_ERROR_BEMF_PATTERN
0x40
BEMF pattern error
MTR_ERROR_UNDER_VOLTAGE
0x80
Under voltage error
MTR_ERROR_UNKNOWN
0xff
Unknown error
MTR_DRAW_IN_NONE
0
initial state (not work)
MTR_DRAW_IN_1ST
1
draw-in the 1st initial position
MTR_DRAW_IN_2ND
2
draw-in the 2nd initial position
MTR_DRAW_IN_FINISH
3
draw-in finished
MTR_V_ZERO_CONST
0
zero voltage constant
MTR_V_UP
1
increase of voltage
MTR_V_CONST
2
voltage constant
MTR_V_OPENLOOP
3
Open-loop voltage setting mode
MTR_V_PI_OUTPUT
4
Speed PI output voltage setting mode
MTR_SPEED_ZERO_CONST
0
Speed zero constant
MTR_SPEED_OPENLOOP_1
1
Open loop MODE1
MTR_SPEED_OPENLOOP_2
2
Open loop MODE2
MTR_SPEED_OPENLOOP_3
3
Open loop MODE3
MTR_SPEED_CHANGE
4
Speed changing
MTR_VOFFSET_STATUS_NONE
0
The measurement of voltage offset
doesn’t work
MTR_VOFFSET_STATUS_MEASURE_OFF 1
Measure voltage offset with PWM off
MTR_VOFFSET_STATUS_MEASURE_ON 2
Measure voltage offset with PWM on
MTR_VOFFSET_STATUS_FINISH
3
Finish the measurement of voltage offset