Advertisement
Guest User

Untitled

a guest
May 20th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.42 KB | None | 0 0
  1. odrv0.erase_configuration()
  2. odrv0.reboot()
  3.  
  4. odrv0.axis0.motor.config.current_lim = 30
  5. odrv0.config.brake_resistance = 0
  6. odrv0.axis0.motor.config.pole_pairs = 14
  7. odrv0.axis0.motor.config.motor_type = MOTOR_TYPE_HIGH_CURRENT
  8. odrv0.axis0.encoder.config.cpr = 4000
  9. odrv0.axis0.encoder.config.calib_range = 0.05
  10. odrv0.axis0.motor.config.calibration_current = 10.0
  11. odrv0.axis0.motor.config.resistance_calib_max_voltage = 12.0
  12.  
  13. odrv0.axis0.controller.config.vel_limit = 50000
  14. odrv0.axis0.encoder.config.mode = ENCODER_MODE_INCREMENTAL
  15.  
  16. odrv0.save_configuration()
  17. odrv0.reboot()
  18.  
  19. odrv0.axis0.requested_state = AXIS_STATE_FULL_CALIBRATION_SEQUENCE
  20. odrv0.axis0.encoder.config.use_index = True
  21. odrv0.axis0.motor.config.pre_calibrated = True
  22. odrv0.axis0.encoder.config.pre_calibrated = True
  23.  
  24. odrv0.save_configuration()
  25. odrv0.reboot()
  26.  
  27. #### is this the right place for this???
  28. odrv0.axis0.encoder.config.use_index = True
  29. odrv0.axis0.requested_state = AXIS_STATE_ENCODER_INDEX_SEARCH
  30. dump_errors(odrv0)
  31. odrv0.axis0.requested_state = AXIS_STATE_CLOSED_LOOP_CONTROL
  32. ### fails here with axis0 axis: Error(s):
  33.  
  34. Odrivetool: odrv0.axis0
  35. Out[137]:
  36. error = 0x0001 (int)
  37. step_dir_active = False (bool)
  38. current_state = 1 (int)
  39. requested_state = 0 (int)
  40. loop_counter = 644806 (int)
  41. lockin_state = 0 (int)
  42. homing_state = 0 (int)
  43. config:
  44. startup_motor_calibration = False (bool)
  45. startup_encoder_index_search = False (bool)
  46. startup_encoder_offset_calibration = False (bool)
  47. startup_closed_loop_control = False (bool)
  48. startup_sensorless_control = False (bool)
  49. startup_homing = False (bool)
  50. enable_step_dir = False (bool)
  51. counts_per_step = 2.0 (float)
  52. watchdog_timeout = 0.0 (float)
  53. step_gpio_pin = 1 (int)
  54. dir_gpio_pin = 2 (int)
  55. lockin: ...
  56. motor:
  57. error = 0x0000 (int)
  58. armed_state = 0 (int)
  59. is_calibrated = True (bool)
  60. current_meas_phB = -0.5792809724807739 (float)
  61. current_meas_phC = -0.1215367317199707 (float)
  62. DC_calib_phB = -0.22685232758522034 (float)
  63. DC_calib_phC = -0.6440977454185486 (float)
  64. phase_current_rev_gain = 0.02500000037252903 (float)
  65. thermal_current_lim = 126.9140625 (float)
  66. get_inverter_temp()
  67. current_control: ...
  68. gate_driver: ...
  69. timing_log: ...
  70. config: ...
  71. controller:
  72. error = 0x0000 (int)
  73. pos_setpoint = 0.0 (float)
  74. vel_setpoint = 0.0 (float)
  75. vel_integrator_current = 0.0 (float)
  76. current_setpoint = 0.0 (float)
  77. vel_ramp_target = 0.0 (float)
  78. vel_ramp_enable = False (bool)
  79. config: ...
  80. set_pos_setpoint(pos_setpoint: float, vel_feed_forward: float, current_feed_forward: float)
  81. set_vel_setpoint(vel_setpoint: float, current_feed_forward: float)
  82. set_current_setpoint(current_setpoint: float)
  83. move_to_pos(pos_setpoint: float)
  84. move_incremental(displacement: float, from_goal_point: bool)
  85. start_anticogging_calibration()
  86. home_axis()
  87. encoder:
  88. error = 0x0000 (int)
  89. is_ready = False (bool)
  90. index_found = True (bool)
  91. shadow_count = 226 (int)
  92. count_in_cpr = 226 (int)
  93. interpolation = 0.5 (float)
  94. phase = 2.5710134506225586 (float)
  95. pos_estimate = 226.75 (float)
  96. pos_cpr = 226.75 (float)
  97. hall_state = 1 (int)
  98. vel_estimate = 0.0 (float)
  99. calib_scan_response = 0.0 (float)
  100. config: ...
  101. set_linear_count(count: int)
  102. sensorless_estimator:
  103. error = 0x0000 (int)
  104. phase = -1.6619460582733154 (float)
  105. pll_pos = -1.658933401107788 (float)
  106. vel_estimate = -0.7690356373786926 (float)
  107. config: ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement