You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/simplefoc_library/code/monitoring.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,13 +68,13 @@ motor.monitor()
68
68
```
69
69
70
70
Monitoring function can output 7 different motor specific variables:
71
-
-`target` - current target value, specific to the motion control used (either current, voltage, velocity or position)
72
-
-`voltage.q` - set voltage in q direction
73
-
-`voltage.d` - set voltage in d direction
74
-
-`current.q` - measured current in q direction ( if current sense available )
75
-
-`current.d` - measured current in d direction ( if current sense available )
76
-
-`shaft_velocity` - motor velocity
77
-
-`shaft_angle` - motor position
71
+
-`target` - current target value, specific to the motion control used (either current[A], voltage[V], velocity [rad/s], or position[rad])
72
+
-`voltage.q` - [V] - set voltage in q direction
73
+
-`voltage.d` - [V] - set voltage in d direction
74
+
-`current.q` - [mA] - measured current in q direction ( if current sense available )
75
+
-`current.d` - [mA] - measured current in d direction ( if current sense available )
76
+
-`shaft_velocity` - [rad/s] - motor velocity
77
+
-`shaft_angle` - [rad] - motor position
78
78
79
79
To set the preferred values to be monitored you can just change the `motor.monitoring_variables` parameter in the `setup()` function.:
80
80
```cpp
@@ -158,7 +158,7 @@ voltage,target,velocity
158
158
<blockquoteclass="warning"><pclass="heading"> Execution time impairment</p>
159
159
The intention of this method is to be called in main loop function along the <codeclass="highlighter-rouge">loopFOC()</code> and <codeclass="highlighter-rouge">move()</code> function. Therefore, <codeclass="highlighter-rouge">motor.monitor()</code> is going to impact the execution performance and reduce the sampling frequency of the FOC algorithm so therefore take it in consideration when running the code. </blockquote>
160
160
161
-
## Custom serial terminal monitoring
161
+
## Custom serial terminal monitoring
162
162
163
163
If you wish to implement you own monitoring functions or just output the motor variables to the `Serial` terminal here are the public variables of the `BLDCMotor` and `StepperMotor` class that you can access at any time.
0 commit comments