-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
40 lines (37 loc) · 1.75 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
odrv0.axis0.motor.config.requested_current_range = 200
odrv0.axis1.motor.config.requested_current_range = 200
odrv0.config.enable_brake_resistor = True
odrv0.axis0.motor.config.current_lim = 200
odrv0.axis0.controller.config.vel_gain = 0.011
odrv0.axis0.controller.config.vel_integrator_gain = 0.05
odrv0.axis0.controller.config.control_mode = 2
# 5.51328895422 / (<pole pairs> * <KV>)
# TORO
# odrv0.axis0.motor.config.pole_pairs = 3
# odrv0.axis0.sensorless_estimator.config.pm_flux_linkage = 5.51328895422 / (3 * 2100)
# TMotor
odrv0.axis0.sensorless_estimator.config.pm_flux_linkage = 5.51328895422 / (11 * 420)
odrv0.axis0.motor.config.pole_pairs = 11
odrv0.axis0.motor.config.requested_current_range = 200
odrv0.axis0.motor.config.current_lim_margin = 30
odrv0.axis0.motor.config.resistance_calib_max_voltage = 3.5
odrv0.axis0.motor.config.calibration_current = 30
odrv0.axis0.controller.config.vel_limit = 800
odrv0.axis0.config.enable_sensorless_mode = True
odrv0.axis1.motor.config.current_lim = 200
odrv0.axis1.controller.config.vel_gain = 0.01
odrv0.axis1.controller.config.vel_integrator_gain = 0.05
odrv0.axis1.controller.config.control_mode = 2
# TORO
# odrv0.axis1.motor.config.pole_pairs = 3
# odrv0.axis1.sensorless_estimator.config.pm_flux_linkage = 5.51328895422 / (3 * 2100)
# TMotor
odrv0.axis1.sensorless_estimator.config.pm_flux_linkage = 5.51328895422 / (11 * 420)
odrv0.axis1.motor.config.pole_pairs = 11
odrv0.axis1.motor.config.requested_current_range = 200
odrv0.axis1.motor.config.current_lim_margin = 30
odrv0.axis1.motor.config.resistance_calib_max_voltage = 3.5
odrv0.axis1.motor.config.calibration_current = 30
odrv0.axis1.controller.config.vel_limit = 800
odrv0.axis1.config.enable_sensorless_mode = True
odrv0.save_configuration() #ここでrebootされる