Re: Clearpath MCVC Spindle Motor Control - Help Requested
Posted: Tue Sep 14, 2021 4:13 pm
gMike,
I was able to run some tests today. Acorn's PWM mode seems to work almost as expected with my ClearPath MCPV servo.
Parts:
Acorn V4, with relay board not connected (to avoid modifying cable)
PS that shipped with the Acorn board
DB25 male breakout board for easy connections to the servo.
MCPV-3421P-RLN servo
Teknic 10-foot power and data servo cables
IPC-5 power supply
Oscilloscope
Digital Tachometer
DIN Terminal Block
Acorn / ClearPath Connections
DB25 Pin 14 connected to ClearPath Input B+ (Black wire)
DB25 Pin 21 (GND) connected to DIN Terminal Blocks (all terminal blocks are GND)
DIN Terminal Block connected to ClearPath Input B- (Yellow wire)
DIN Terminal Block connected to ClearPath Enable- (Orange wire)
Din Terminal Block connected to ClearPath Input A- (Brown wire)
Din Terminal Block connected to ClearPath Input A+ (White wire)
(NOTE: Input A is used to inhibit the motor. Normally I would have used a relay output to control the inhibit signal.)
ClearPath HLFB+ (Green wire) and HLFB- (Red wire) were not used. Those wires were individually taped off. Use those wires to detect a servo fault.
MSP Configuration:
Follow Digital Velocity Command / Bipolar PWM command w/inhibit
Deadband = 2%
Max Speed (RPM) = 3,000 (which is maximum for my motor)
NOTE: Use Max Speed (RPM) to set maximum spindle speed. See explanation below.
Wizard Configuration:
PWM Setup
PWM Enable = Yes
Base Frequency (Hz) = 22,000
PWM S command range = 0-100
Spindle
Spindle MAX speed in high range = 200
NOTE: The explanation for this setting is in the MDI section below.
MDI
G1
S100 /* PWM at ~50%. This is the dead-band region. */
M3 /* Start spindle. Spindle will not turn until speed is set outside the dead-band region. */
S50 /* PWM at ~25% duty cycle. 50% of max speed in one direction */
S2 /* PWM at ~Minimum duty cycle. Max speed in one direction */
S150 /* PWM at ~75% duty cycle. 50% of max speed in the other direction */
S198 /* PWM at ~100% duty cycle. Max speed in the other direction */
M5 /* Stop spindle */
NOTE: With Spindle MAX speed in high range set to 200, S2 - S99 allows 100% of all speeds in one direction and S101 - S198 allows 100% of all speeds in the other direction.
Manual Mode using the control panel
Set Spindle Auto / Manual to manual
Push Green ON icon
Increase speed in one direction by incrementing the "+" button
Increase speed in the other direction by decrementing the "-" button.
The speed will slow as the PWM nears 50% and will speed up as the PWM duty cycle nears 100% (for one direction) or 0% (for the other direction).
From this very limited testing, it seems to me that using a Teknic ClearPath MCPV (or MCVC motor which I assume will work, but I don't have one for testing) works very nicely with the Acorn PWM command. The "gotcha" moment came when I expected to be able to simply set the speed desired using the "S" command. Instead, I found that setting the Spindle Max speed in Wizard to 200 allows me to enter a number from 2 to 100 to inversely set the speed in one direction (2 is fastest, 100 is stopped) and to enter a number from 100 to 198 to go the other direction where 100 is stopped and 198 is maximum speed in the other direction.
The oscilloscope verified that the PWM duty cycle changed with the S command (or by using the +/- buttons in manual mode).
The digital tachometer showed a maximum speed of 2,977 RPM in one direction with S2 and 2,977 RPM in the other direction with S198. Setting S less than 2 or greater than 198 stalled the motor. The duty cycle was too close to 100%. Those speeds were obtained when the max speed was set to 3,000 in Teknic's MSP software. When I set max speed to 1,000 RPM, I obtained ~1,000 RPM at S2 and at S198, showing that MSP is controlling the max speed and the Acorn is controlling the duty cycle.
I was able to run some tests today. Acorn's PWM mode seems to work almost as expected with my ClearPath MCPV servo.
Parts:
Acorn V4, with relay board not connected (to avoid modifying cable)
PS that shipped with the Acorn board
DB25 male breakout board for easy connections to the servo.
MCPV-3421P-RLN servo
Teknic 10-foot power and data servo cables
IPC-5 power supply
Oscilloscope
Digital Tachometer
DIN Terminal Block
Acorn / ClearPath Connections
DB25 Pin 14 connected to ClearPath Input B+ (Black wire)
DB25 Pin 21 (GND) connected to DIN Terminal Blocks (all terminal blocks are GND)
DIN Terminal Block connected to ClearPath Input B- (Yellow wire)
DIN Terminal Block connected to ClearPath Enable- (Orange wire)
Din Terminal Block connected to ClearPath Input A- (Brown wire)
Din Terminal Block connected to ClearPath Input A+ (White wire)
(NOTE: Input A is used to inhibit the motor. Normally I would have used a relay output to control the inhibit signal.)
ClearPath HLFB+ (Green wire) and HLFB- (Red wire) were not used. Those wires were individually taped off. Use those wires to detect a servo fault.
MSP Configuration:
Follow Digital Velocity Command / Bipolar PWM command w/inhibit
Deadband = 2%
Max Speed (RPM) = 3,000 (which is maximum for my motor)
NOTE: Use Max Speed (RPM) to set maximum spindle speed. See explanation below.
Wizard Configuration:
PWM Setup
PWM Enable = Yes
Base Frequency (Hz) = 22,000
PWM S command range = 0-100
Spindle
Spindle MAX speed in high range = 200
NOTE: The explanation for this setting is in the MDI section below.
MDI
G1
S100 /* PWM at ~50%. This is the dead-band region. */
M3 /* Start spindle. Spindle will not turn until speed is set outside the dead-band region. */
S50 /* PWM at ~25% duty cycle. 50% of max speed in one direction */
S2 /* PWM at ~Minimum duty cycle. Max speed in one direction */
S150 /* PWM at ~75% duty cycle. 50% of max speed in the other direction */
S198 /* PWM at ~100% duty cycle. Max speed in the other direction */
M5 /* Stop spindle */
NOTE: With Spindle MAX speed in high range set to 200, S2 - S99 allows 100% of all speeds in one direction and S101 - S198 allows 100% of all speeds in the other direction.
Manual Mode using the control panel
Set Spindle Auto / Manual to manual
Push Green ON icon
Increase speed in one direction by incrementing the "+" button
Increase speed in the other direction by decrementing the "-" button.
The speed will slow as the PWM nears 50% and will speed up as the PWM duty cycle nears 100% (for one direction) or 0% (for the other direction).
From this very limited testing, it seems to me that using a Teknic ClearPath MCPV (or MCVC motor which I assume will work, but I don't have one for testing) works very nicely with the Acorn PWM command. The "gotcha" moment came when I expected to be able to simply set the speed desired using the "S" command. Instead, I found that setting the Spindle Max speed in Wizard to 200 allows me to enter a number from 2 to 100 to inversely set the speed in one direction (2 is fastest, 100 is stopped) and to enter a number from 100 to 198 to go the other direction where 100 is stopped and 198 is maximum speed in the other direction.
The oscilloscope verified that the PWM duty cycle changed with the S command (or by using the +/- buttons in manual mode).
The digital tachometer showed a maximum speed of 2,977 RPM in one direction with S2 and 2,977 RPM in the other direction with S198. Setting S less than 2 or greater than 198 stalled the motor. The duty cycle was too close to 100%. Those speeds were obtained when the max speed was set to 3,000 in Teknic's MSP software. When I set max speed to 1,000 RPM, I obtained ~1,000 RPM at S2 and at S198, showing that MSP is controlling the max speed and the Acorn is controlling the duty cycle.