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: libraries/ClearPathModeExamples/ClearPath-MC Series/FollowDigitalVelocityWithVariableTorque/FollowDigitalVelocityWithVariableTorque.ino
+9-12Lines changed: 9 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -23,18 +23,14 @@
23
23
* for Follow Digital Velocity Command, Bipolar PWM Command with Variable
24
24
* Torque mode (In MSP select Mode>>Velocity>>Follow Digital Velocity
25
25
* Command, then with "Bipolar PWM Command w/ Variable Torque")
26
-
* 3. The ClearPath motor must be set to use the HLFB mode "ASG-Velocity"
27
-
* through the MSP software (select Advanced>>High Level Feedback [Mode]...
28
-
* then choose "All Systems Go (ASG) - Velocity" from the dropdown and hit
29
-
* the OK button).
30
-
* 4. The ClearPath must have a defined Max Speed configured through the MSP
26
+
* 3. The ClearPath must have a defined Max Speed configured through the MSP
31
27
* software (On the main MSP window fill in the "Max Speed (RPM)" box with
32
28
* your desired maximum speed). Ensure the value of maxSpeed below matches
33
29
* this Max Speed.
34
-
* 5. Set the PWM Deadband in MSP to 2.
35
-
* 6. In MSP, ensure the two checkboxes for "Invert Torque PWM Input" and
30
+
* 4. Set the PWM Deadband in MSP to 2.
31
+
* 5. In MSP, ensure the two checkboxes for "Invert Torque PWM Input" and
36
32
* "Invert Speed PWM Input" are unchecked.
37
-
* 7. A primary Torque Limit and Alternate Torque Limit must be defined using
33
+
* 6. A primary Torque Limit and Alternate Torque Limit must be defined using
38
34
* the Torque Limit setup window through the MSP software (To configure,
39
35
* click the "Setup..." button found under the "Torque Limit" label. Then
40
36
* fill in the textbox labeled "Alt Torque Limit (% of max)" and hit the
@@ -101,9 +97,10 @@ void setup() {
101
97
motor.EnableRequest(true);
102
98
Serial.println("Motor Enabled");
103
99
104
-
// Waits for HLFB to assert (waits for homing to complete if applicable)
105
-
Serial.println("Waiting for HLFB...");
106
-
while (motor.HlfbState() != MotorDriver::HLFB_ASSERTED) {
100
+
// Waits for 5 seconds for motor to come up to speed
101
+
Serial.println("Waiting for motor to come up to speed...");
0 commit comments