修改问题.md,且新增data_logger.py画图模块
This commit is contained in:
+1
-4
@@ -771,10 +771,7 @@ class MT2AM8Client:
|
||||
# Map the full travel range to the configured analog-output range.
|
||||
# The lower endpoint must include volthege_min; otherwise position 0
|
||||
# produces raw value 0 and is rejected by write_analog_output().
|
||||
raw_value = int(
|
||||
volthege_min
|
||||
+ voltage_distance / x_max * (volthege_max - volthege_min)
|
||||
)
|
||||
raw_value = int( voltage_distance / x_max * volthege_max )
|
||||
# print(f"设置电机行程为 {voltage_distance},模拟量输出值 {raw_value}")
|
||||
return self.write_analog_output(channel, raw_value)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user