Pro Series Servo Controller Manual
Pro Series Servo Controller Manual
CNC Controller
Hardware Guide
Midwest Office
444 Lake Cook Road, Suite 22
Deerfield, IL 60015
Phone (847) 940-9305 Fax (847) 940-9315
www.flashcutcnc.com
Revised 11/02/2010
© 1998-2010 WPI, Inc.
Table of Contents
1. GETTING STARTED ....................................................................................................................................... 6
ABOUT THIS MANUAL................................................................................................................................................ 6
TURNING OFF THE CONTROLLER ............................................................................................................................... 6
SAFETY AND USAGE GUIDELINES............................................................................................................................... 7
2. SERVO CNC CONTROLLER ......................................................................................................................... 8
FRONT PANEL............................................................................................................................................................. 8
REAR PANEL .............................................................................................................................................................. 9
3. SYSTEM CONNECTIONS ............................................................................................................................ 14
4. REMOVING THE TOP COVER ................................................................................................................... 15
5. SIGNAL GENERATOR ................................................................................................................................. 16
INPUT ....................................................................................................................................................................... 16
OUTPUT .................................................................................................................................................................... 17
JUMPER SETTINGS .................................................................................................................................................... 19
JP83 – DB to USB Ground ................................................................................................................................ 19
JP84/JP85 – Input Power Select ........................................................................................................................ 19
JP 86 – USB to Chassis Ground ........................................................................................................................ 20
JP 87 – Internal Signal to Chassis Ground ...................................................................................... 21
INTERNAL CONNECTIONS ......................................................................................................................................... 21
JP30 – Auxiliary Inputs ..................................................................................................................................... 22
JP31 – Status LEDs ........................................................................................................................................... 22
JP32 – Bus Expansion ....................................................................................................................................... 23
JP33 – Step & Direction .................................................................................................................................... 23
JP40 – Input Aux Header ................................................................................................................................... 24
JP50 – Output Aux Header ................................................................................................................................ 24
JP80 – Rear Panel Power .................................................................................................................................. 25
JP81 – Rear Panel Fuse .................................................................................................................................... 25
JP82 – Front Panel Switch .......................................................................................................... 25
AXIS PLUG-IN INTERFACES ...................................................................................................................................... 25
6. FLASHCUT SOFTWARE SETTINGS ......................................................................................................... 27
7. RESETTING YOUR SERVO DRIVE ........................................................................................................... 29
8. UPGRADING A SERVO DRIVER ................................................................................................................ 30
9. SERVO GAIN SETTINGS ............................................................................................................................. 33
TO INSTALL DCN:.................................................................................................................................................... 33
TO USE DCN:........................................................................................................................................................... 33
Optimizing your Servo Settings: .................................................................................................... 36
10. MOTOR WIRING: .......................................................................................................................................... 38
11. POWER BOARD ............................................................................................................................................. 39
12. SUPPORT: ....................................................................................................................................................... 42
13. APPENDIX ....................................................................................................................................................... 43
SERVO PARAMETERS ................................................................................................................................................ 43
PID Servo Control ..................................................................................................................... 43
SERVO SCHEMATICS ................................................................................................................................................. 47
Signal Name ............................................................................................................................. 49
SIGNAL GENERATOR WIRING DIAGRAMS................................................................................................................. 53
Typical Output Line Circuit ............................................................................................................................... 53
Typical Input Line Circuit – Internal Power...................................................................................................... 54
Typical Input Line Circuit – External Power ................................................................................... 55
SIGNAL GENERATOR BOARD LAYOUT ..................................................................................................................... 57
CONNECTOR PIN-OUT TABLE ................................................................................................................................... 58
POWER ..................................................................................................................................................................... 60
OUTPUTS .................................................................................................................................................................. 61
INPUTS ..................................................................................................................................................................... 62
CONNECTORS ........................................................................................................................................................... 63
AXIS PLUG-IN INTERFACE ........................................................................................................................................ 64
REVISION HISTORY .................................................................................................................................................... 1
6 FlashCut CNC Section 1 Getting Started
1. Getting Started
The front panel of the CNC controller has the power switch, the fan and 7 LED’s with the
following functions:
Rear Panel
The rear panel has connectors for input and output signals as described below.
POWER INLET – Receptacle for the power supply. The unit is shipped with a standard
grounded power cable for use with a 115VAC wall outlet.
USB – USB connector for communication with the USB port on the host PC. Use a
USB-A to B cable with a maximum length of 3 meters to make the connection. For the
most robust communication, plug the cable directly into PC, as opposed to a USB
repeater or a hub. If the FlashCut software loses communication with the Signal
Generator, electrical noise may be the cause. To reduce electrical noise problems, try
using a shorter USB cable, or attach one or more ferrite chokes to the USB cable.
Toroid-shaped chokes are more effective than snap-on cylindrical chokes. If you need
more than 3m of USB cable length, you can use an active extension cable which comes in
4.5m lengths. Note that when running an active extension cable, the USB will run in Full
Speed mode.
INPUT – The connector for up to 8 input lines. The most common use of the input lines
is for limit or safety switches. These lines are all TTL- and CMOS-compatible optically
isolated inputs. When a switch is open, its input signal is high (+5V). When the switch is
closed, its input signal is grounded low (0V). If you need more than 8 input lines, an I/O
extension board is available.
OUTPUT – The connector for up to 8 output lines. These lines are all compatible with
TTL/CMOS level outputs. The Output ports are not setup to drive a 24V external system
unless it accepts TTL/CMOS levels. They are all driven by HCT family logic. Output
logic high is normally 5V and can go down to 3.9V at full load. Output logic low is
normally 0V and can go up to 0.3V at full load. Each of these signals can provide up to
10 FlashCut CNC Section 2 Servo CNC Controller
20mA of current. If you need more than 8 output lines, an I/O extension board is
available.
FUSE – In this drawer is a 250V/ 10Amp slow blow fuse. If you have chronic fuse
problems, please call FlashCut CNC or your distributor for assistance.
115-230 VAC SELECTION SWITCH– This switch allows you to use an external power
source of 115 or 230 VAC. If your building is wired for 230VAC, then simply flip the
switch with a flat-head screwdriver so that “230V” is clearly visible. If your building is
wired for 115 VAC, then flip the switch until “115V” is clearly visible. Note that severe
damage can occur if you have 115 selected and your building is wired for 230VAC.
FlashCut CNC Section 2 Servo CNC Controller 11
DB-25 CONNECTOR FOR MOTOR SIGNALS – This uses a DB-25 Cable to send step
and direction signals from the FlashCut CNC Signal Generator to an additional external
drive box. The pin assignments are as follows:
1 13
14 25
POWER CONNECTOR TO MOTORS – The motors for axes 1-5 plug into these
connectors. The motor lines 1-5 are correlated to any combination of the X, Y, Z, A
and/or B axes in the Motor Signal Setup menu in the FlashCut CNC software. A axis
cover plate is installed on any unused motor connector for units with less than 5 axes.
Each motor connector is a Neutrik XLR 3 Pin Receptacle (See Section on Motor Cabling
for Mating Connector Information). The pin assignments for the Motor Connector are as
follows (looking from the rear of the unit):
1 R
2 S
3 T
12 FlashCut CNC Section 2 Servo CNC Controller
ENCODER CONNECTOR TO MOTORS – The encoders for axes 1-5 plug into these
connectors. Each encoder connector is a NorComp DB-15 female connector. The pin
assignments for the Encoder Connector are as follows.
DB-15
Wire
Pin
1 HALL S2
2 ENC VCC
3 HALL S3
4 B (-)
5 A (-)
6 N/C
7 LIM (-) (Opt.)
8 GND (Opt.)
9 HALL S1
10 ENC GND
11 Z (+)
12 B (+)
13 A (+)
14 N/C
15 LIM (+) (Opt.)
SERVO TUNING PORT – This port allows the communication of the drive modules
with a PC. The DB-9 female connector plugs into the serial port on your PC. The drive
parameters can then be modified using the DCN software included with your FlashCut
CNC installation. If you do not have a serial port on your PC a serial to USB converter
will work for this application. For more information on tuning see “Servo Grain
Settings” later in this manual.
FlashCut CNC Section 2 Servo CNC Controller 13
3. System Connections
FlashCut CNC Section 4 Removing the Top Cover 15
5. Signal Generator
Input
The default setting for each of the input lines is normally closed (NC). The input line
settings can be individually changed between normally closed (NC) or normally open
(NO) input lines using FlashCut CNC software. Please refer to the FlashCut CNC
User’s Guide under “Input Line Settings” for further information.
In the FlashCut CNC software, the Input Line Status dialog displays "OPEN" for a
high-level input voltage, or open switch, and "CLOSED" for a low-level input voltage
or closed switch.
The input lines are all optically isolated. Jumpers J84 and J85 enable you to choose
between the internal power of the Signal Generator and isolated power from an
external source. Both jumpers must be set on the same pair of pins (either both must
be on pins 1 and 2 or both must be on pins 2 and 3).
Internal Power- This is the most convenient option and works well for most
applications, but negates some of the signal isolation. When JP84 shorts pins 1
and 2, OPT VCC gets its power from the Internal 5V power source. When JP85
shorts pins 1 and 2, OPT GND is directly connected to the Internal GND.
External Isolated Power
For the best noise immunity, connect an external 5V-24V power supply to the
LED side of the optical couplers. When JP84 shorts pins 2 and 3, OPT VCC gets
its optically isolated power from the TB-VCC. When JP85 shorts pins 2 and 3,
OPT GND is directly connected to the TB-GND.
Choose only one of the following methods to supply power:
1. Connect a power source to the TB 40 screw terminal.
2. Connect a power source through pins 23 and 25 of the DB-25 connector.
If you are providing an external voltage through pins 23 and 25 of the DB25
Motor Signal connector or via TB-40, then you must have both JP84 and
JP85 jump pins 2 and 3, OTHERWISE SEVERE DAMAGE COULD
RESULT.
BE VERY CAREFUL WHEN DOING ANY WIRING. IMPROPER
WIRING WILL DAMAGE THE SIGNAL GENERATOR.
Input lines 1, 2, 3 & 4 are also connected through pins 15, 16, 17 & 18 respectively of
the Motor Signal connector, and input lines 5, 6, 7 & 8 are also connected through
pins 5, 6, 7 & 8 respectively of the Motor Signal connector. This makes it convenient
to send any signals from an external motor driver box, such as limit lines or servo
position error signal, back to the Signal Generator through the DB25 cable without
FlashCut CNC Section 5 Signal Generator 17
using a separate input cable. Note that if an input line is being used through the
Motor Signal connector, that line must remain open in the Input connector.
The receptacle that plugs into this connector is a Molex-Waldom Mini-Fit Jr. Series
16 pin receptacle (part number 39-01-2160), with female pins (part number 39-00-
0039 or 39-00-0047 for 22 gauge or thinner wires).
The Molex 63811-1000 for 14-24 AWG universal or Molex 11-01-0197 Crimp Tools
are recommended for installing the pins. Kits containing connectors and pins are
available through FlashCut CNC or an electronics distributor.
The input lines as seen from the back of the box are arranged as follows (all
connections denoted by “OPT-GND” are optically isolated ground.):
16 15 14 13 12 11 10 9
◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦ ◦ ◦ ◦
8 7 6 5 4 3 2 1
Output
This connector is for up to 8 output lines. These lines are all compatible with
TTL/CMOS level outputs. The Output ports are not setup to drive a 24V external
system unless it accepts TTL/CMOS levels. They are all driven by HCT family
logic. Output logic high is normally 5V and can go down to 3.9V at full load.
Output logic low is normally 0V and can go up to 0.3V at full load. Each of these
signals can provide up to 20mA of current.
Two additional pins on this connector are provided for your output lines: ground and
+5V. These are connected to GND and +5V and are not optically isolated. This 5V
circuit can source up to 100 mA. Any larger current demand would require a larger
power source.
18 FlashCut CNC Section 5 Signal Generator
10 9 8 7 6
◦ ◦ ◦ ◦ ◦
◦ ◦ ◦ ◦ ◦
5 4 3 2 1
Jumper Settings
Pin 1 of all jumpers is indicated by a small white dot printed on the PCB.
JP84
+5V VCC
OPT-VCC 1 DB25 PIN22
TB40 TB-VCC 2 DB25 PIN23
1 3
2
TB-GRD 3
2 DB25 PIN25
OPT-GRD 1 DB25 PIN24
JP85
GRD
TB-GRD 3
2 DB25 PIN25
OPT-GRD 1 DB25 PIN24
JP85
GRD
Internal Connections
The diagram below shows the locations of the internal connectors. The top of the
diagram corresponds to the back side of the signal generator (where the external
connectors are located). The small dot next to some of the connectors designates
the number 1 pin position.
The Axis plug-in interfaces are used to add additional functions to the main signal
generator board. For example, a stepper drive plug-in card or cable will enable
you to drive a stepper motor directly from the signal generator box.
1 2
3 4 Each of these plug-in cards is a SKT10X2 connector, with the
5 6 pin configuration on the left. Pin numbers 1-5, 7, 13, 15 and
7 8
9 10
17-20 perform the same function on each jumper.
11 12
13 14 Per the chart below, pins 6, 8-12, 14 and 16 have different
15 16 values of Status, Fault, InputA, Dir, InputB, Step, SCOM and
17 18
19 20 CS respectively for each plug-in card.
Pin
Label Function JP-71 JP-72 JP-73 JP-74 JP-75
No.
1 HV-PWR High Voltage Power HV-PWR HV-PWR HV-PWR HV-PWR HV-PWR
2 HV-PWR High Voltage Power HV-PWR HV-PWR HV-PWR HV-PWR HV-PWR
3 GND Ground GND GND GND GND GND
4 GND Ground GND GND GND GND GND
5 RxD2 Serial Com. Receive RxD2 RxD2 RxD2 RxD2 RxD2
6 STATUS Status STATUS1 STATUS2 STATUS3 STATUS4 STATUS5
7 TxD2 Serial Com. Transmit TxD2 TxD2 TxD2 TxD2 TxD2
8 FAULT Fault Indicator FAULT1 FAULT2 FAULT3 FAULT4 FAULT5
9 INPUTA Input A IN8 IN10 IN12 IN14 IN16
10 DR Direction DR1 DR2 DR3 DR4 DR5
11 INPUTB Input B IN9 IN11 IN13 IN15 IN17
12 ST Step ST1 ST2 ST3 ST4 ST5
13 SM0 SM0 SM0 SM0 SM0 SM0 SM0
14 SCOM SCOM SCOM1 SCOM2 SCOM3 SCOM4 SCOM5
15 SM1 SM1 SM1 SM1 SM1 SM1 SM1
16 CS Chip Select CS1 CS2 CS3 CS4 CS5
17 ENA Enable ENA ENA ENA ENA ENA
18 +5V +5V +5V +5V +5V +5V +5V
19 GND GND GND GND GND GND GND
20 GND Ground GND GND GND GND GND
FlashCut CNC Section 6 FlashCut Software Settings 27
If you overdrive the servomotors, they will get out of position beyond their programmed
tolerance. If this occurs a fault signal will be sent from the servo box to the signal generator
through one of the above input lines.
This signal is automatically routed to the Signal Generator via the internal servo cables. There is
no need to connect wires to lines 9, 11, 13, 15 or 17 of the input line connector on the back of the
Signal Generator.
28 FlashCut CNC Section 6 FlashCut Software Settings
Please note that if you are using input lines, make sure to not occupy inputs 9, 11, 13, 15 or
17as a conflict will occur and the input connected to these lines will malfunction.
FlashCut CNC Section 7 Resetting Your Servo Drive 29
Note that a servo fault might show up by a message that says, “A limit switch has briefly been
tripped and reset…” In this case the error will not show up if you check the input status.
30 FlashCut CNC Section 8 Upgrading a Servo Driver
1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8
FlashCut CNC Section 8 Upgrading a Servo Driver 31
6. For noise immunity, it is good to install a grounding wire from Pin 2 of CN1 to the
chassis of the drive module.
7. Install the new drive module and secure it with the two screws to the bottom of the
chassis.
8. Install all of the connectors of the cabling onto the drive module.
9. There are two RJ-45 connections on the end of each drive module (CN5 and CN6). The
first RJ-45 cable goes from the communications card on the main servo control box to
CN6 of the first drive. The next cable goes from CN5 of the first module to CN6 of the
following module. This continues up to the last drive module which only has CN6
connected from the preceding drive module.
32 FlashCut CNC Section 8 Upgrading a Servo Driver
There are mathematical parameters for the servo system that need to be tuned to
account for the differing mechanical behavior of a given machine tool and a given
motor. We have already pre-tuned these settings in your system given some
assumptions that were made about the dynamics of your machine and motors.
Sometimes these settings need to be adjusted for better performance. The main
parameters that need to be adjusted are the Servo Gain, the Dead Band
Compensation, and the Error Limit.
The Servo Gain is the stiffness of the motors. The higher the servo gain, the
tighter the motor will follow the toolpath, however, the tighter the system, the
more susceptible the motors will be to high frequency vibration when at rest.
The dead band compensation negates the “dead band” zone of the motors, when
they have very little stiffness. The higher the dead band compensation, the
smaller this zone is. However, the larger this number, the more susceptible the
motors will be to high frequency vibration when at rest.
Since a servo system is a feedback system, it moves to a position, compares the
actual position with the desired position, and then physically corrects itself. The
amount that the actual position can differ from the desired position at any time is
the Error Limit. If the Error Limit is exceeded, an error signal is sent to the signal
generator, and the Servo System needs to be reset. The higher the Error Limit, the
less susceptible you will be to getting a servo error.
To change these settings, we have provided a program called Distributed Control
Network Facility (DCN).
To Install DCN:
1. DCN is automatically installed on your hard drive if you have FlashCut CNC version
3.0.6 or later. It is located by default under:
C:\Program Files\FlashCut CNC 3\Servo Software
2. If you do not have DCN installed, you can either find it on the FlashCut CNC Installation
CD or on the Downloads portion of the www.flashcutcnc.com website. Please copy the
entire contents of the Servo Software folder onto your hard drive in the C:\Program
Files\FlashCut CNC 3 directory.
To Use DCN:
1. If you are using a model 501A (USB) signal generator :
Connect the servo control box to an available serial port on your computer. If you do not
have a serial port, it is OK to use an off-the shelf USB-Serial adapter that you can find at
most computer stores. Make sure that FlashCut is connected. This will allow you to
change parameters using DCN and interactively test the new parameters using FlashCut.
34 FlashCut CNC Section 9 Servo Gain Settings
2. Launch the Program (DCN.exe) (for example, from the Start menu choose Run.. then
type “C:\Flashcut Servo Software\DCN.exe”). A screen should appear that looks like
this:
FlashCut CNC Section 9 Servo Gain Settings 35
Then you need to check your Com Port settings and your baud rate (lower left of
screen), check your cabling to make sure you have a good connection between
your Com Port on the PC and the DB-9 Connector on the Servo Box. Once this
all has been verified, choose the Reset Network button.
The upper left corner of the screen shows a list of the drive modules that you
have:
5. To permanently save the servo parameters, make sure the servo params check box is
checked in the EEPROM section of the window and choose the Save button with your
left mouse button. If you right mouse click on the Save button, you can save the
parameters to a file on your computer also. The default extension is .led.
6. You can also load servo parameters from a .led file by clicking Restore with the right
mouse button, and then clicking Set Servo Parameters and the Save Button.
7. Repeat the above for all of the drive modules that you have.
8. Turn the unit off and disconnect the serial cable. It is now ready to be used with the new
settings.
To try the optimizer, each drive must be taken out of STEP mode.
1. To take the servo box out of STEP mode simply click the radio button that says Network
in he DCN software.
2. The unit is not in Step and Direction mode any more. You will only be able to use DCN
to move the motors.
3. Make sure you position the each axis to the middle of their travel, as they will move back
and forth during the tuning process. You can move the motors by typing in a position and
velocity in the respective fields. They are in quadrature encoder counts and quadrature
encoder counts/servo tick. Quadrature encoder counts = Encoder counts x 4.
4. Open the DCN Utility and choose the Optimizer button.
FlashCut CNC Section 9 Servo Gain Settings 37
5. The first column of Servo Parameters is a starting point for the optimizer, the second
column is the low limit for each parameter and the third column is the high limit. Fill in
amounts for each field. Sometimes, it is best to increase the upper ranges by 2 or 3 times
their current values. Make sure that the Auto Mode box is checked. The optimizer will
increment each of the parameters within the given range and find a local optimum value.
If you want to test different parameters manually, make sure that Auto Mode is not
checked.
6. Choose a position, velocity and acceleration that seem appropriate for typical movement
of your machine. The distance chosen should be just large enough for the motors to get
up to speed and have room to decelerate to a stop. (Usually on the order of 0.25 to 2
inches of travel on your machine. (Remember, the distance is based on quadrature
encoder counts and is independent of the encoder divisor).
7. Hit the Start button and let the system run for a few minutes until it stabilizes on a set of
servo parameters. You can view the position error (shown above) as it is doing the test.
The criterion is to minimize the position error. When it has reached a stable value hit the
Stop button.
8. Save the new servo parameters (if you choose) by hitting the Save Gains button. You can
exit the Optimizer by hitting the Hide button. (Make sure you follow the directions on
saving the servo parameters above).
9. Repeat the above process for each axis.
10. Once you have finished you need to set the reset the module or reset the network to place
the unit back into step and direction mode.
11. You will now be able to use the system with FlashCut.
38 FlashCut CNC Section 10 Motor Wiring
The function of the Power Board is to supply DC voltage to the drive modules as well
as to the cooling fan and logic signals to the Signal Generator. The power enters the
board in the form AC voltage from a transformer; the AC voltage is then converted to DC
voltage. The Power Board also contains the indication LED’s:
modules. The three contacts are labeled as follows: R is the reserve, L is the hot, N is the
neutral. The reserve and the hot may be switched to vary the voltage. For example if R is
red and L is purple the resulting DC voltage is approximately 67 VDC, where if R is
purple and L is red the resulting DC voltage is approximately 80 VDC.
SIGNAL GENERATOR DC OUTPUT- This output sends a 9 VDC signal to power the
Signal Generator. When viewing the power board in the configuration above the top
contact of the signal generator DC output is positive and the bottom contact is negative.
FAN DC OUTPUT- This output sends a 24 VDC signal to power the fan for cooling the
box. When viewing the power board in the configuration above the top contact of the fan
DC output is positive and the bottom contact is negative.
BRAKE OUTPUT – This feature allows the use of a brake attached to a servo motor.
When the drive modules have been enabled the brake is disengaged and the motor will be
able to rotate freely. When the drive modules are disable the brake is engaged and the
shaft of the motor will be locked.
SIGNAL GENERATOR ENABLE INPUT. – This feature allows the brake to be turned
on and off given the enable state of the Signal Generator. It also allows for using an
enable signal greater than 5VDC.
MOTOR DC OUTPUT- This output sends a 40-80 VDC, depending on the connection
configuration, DC signal to power the drive modules. Power for up to 5 individually
powered drive modules. The contacts alternate positive and negative starting with
positive on the contact nearest the large capacitor.
LED INPUT- This input receives logic signal from the signal generator in order to
illuminate any of the 7 LED’s indicating axis movement, power or USB connectivity.
The contact connections for the LED input are as follows:
24 VDC ENABLE OUTPUT – This outputs a 24 VDC enable signal for drive modules
requiring a 24 VDC enable signal as opposed to the standard 5 VDC enable signal
provided by the signal generator.
12. Support:
FlashCut CNC Midwest Office
444 Lake-Cook Road Suite 22
Deerfield, IL 60015
(847) 940-9305
(847) 940-9315 Fax
support@flashcutcnc.com - e-mail
FlashCut CNC Section 13 Appendix 43
13. Appendix
Servo Parameters
The Servo Parameters panel allows the user to modify the eight servo control
parameters, or gains. The "Set Servo Parameters" button will apply the gains to
the selected controller. Here is a brief explanation of the servo algorithm and the
associated parameters:
The control filter is a “proportional-integral-derivative”, or PID filter. The output to the motor
amplifier is the sum of three components: one proportional to the position error
providing most of the error correction, one proportional the change in the position error which
provides a stabilizing damping effect, and one proportional to the accumulated position error
which helps to cancel out any long-term error, or “steady state error”.
The PID control filter, operating on the command position and the actual position each servo
tick, produces an output calculated as follows:
The term pos_error is simply the current command position minus the actual position. The
prev_pos_error is the position error from the previous servo tick. Kp, Ki and Kd are the servo
gains which will be programmed to optimize performance for your particular motor.
The integral_error is the running sum of pos_error divided by 256. To keep from growing a
potentially huge integral_error, the running sum is bounded by a user specified integration limit.
(Note that some other controllers will bound the value of the integral_error, but leave the actual
running sum to grow unbounded, causing greater integral error windup.) By temporarily setting
the integration limit to 0, the user can zero out the accumulated running sum.
The actual PWM output value (0-255) and direction bit are given by:
First note that the scaled PWM output is limited by a user defined output_limit. For example, if
you are using a 12v motor powered by 24v, you would want to set the output_limit to 255/2, or
44 FlashCut CNC Section 13 Appendix
127. Also note that the final PWM value is reduced by a current_limit_adjustment. Under normal
operation, current_limit_adustment = 0. If the motor current, as indicated by the A/D value,
exceeds a user specified limit, current_limit_adjustment is incremented by 1 each servo tick, up
to a maximum value
of min( abs(output/256), output_limit). If the motor current is below the specified limit,
current_limit_adjustment is decremented by 1, down to a minimum value of zero. This
incremental adjustment is used rather than a proportional adjustment due to the non-linearity of
many current sensing schemes, and in fact can be used with external amplifiers which provide
only a binary current threshold value.
The PWM signal is a 19.53 KHz square wave of varying duty cycle with a PWM value of 255
corresponding to 100% and a value of 0 corresponding to 0%.
One last control parameter is the user specified position error limit. If abs(pos_error) becomes
larger than this limit, the position servo will be disabled. This is useful for disabling the servo
automatically upon a collision or stall condition. (This condition can also be used for homing the
motor by intentionally running it up against a limit stop.)
Selection of the optimal PID control parameters can be done analytically, but more typically,
they are chosen through experimentation. As a first cut, the following procedure may be used:
1. First set the position gain, Kp, and the integral gain, Ki, to 0. Keep increasing the derivative
gain, Kd, until the motor starts to hum, and then back off a little bit. The motor shaft should feel
more sluggish as the value for Kd is increased.
2. With Kd set at this maximal value, start increasing Kp and commanding test motions until the
motor starts to overshoot the goal, then back off a little. Test motions should be small motions
with very large acceleration and velocity. This will cause the trapezoidal profiling to jump to
goal position in a single tick, giving the true step response of the motor.
3. Depending on the dynamics of your system, the motor may have a steady state error with Kp
and Kd set as above. If this is the case, first set a value for IL of 16000 and then start increasing
the value of Ki until the steady state error is reduced to an acceptable level within an acceptable
time. Increasing Ki will typically introduce some overshoot in the position. The best value for Kp
will be some compromise between overshoot and settling time.
4. Finally, reduce the value of IL to the minimum value which will still cancel out any steady
state error.
The default (and maximum) servo rate is approximately 2 KHz (1.953 KHz, to be more exact).
For systems with a combination of a large inertia, little inherent damping and limited encoder
resolution, it may be difficult to get sufficient damping at low speeds because the digitization
noise with very large values of Kd will cause the servo to hum or vibrate. Fortunately, such
systems typically have a rather slow response and the servo rate can be decreased considerably.
For example, switching from 2 KHz to 200 Hz will allow you to achieve the same level of
damping with a value of Kd/10. The minimum
FlashCut CNC Section 13 Appendix 45
In summary, we have a total of eight control filter parameters: Position Gain (Kp), Derivative
Gain (Kd), Integral Gain (Ki), Integration Limit (IL), Output Limit (OL), Current Limit (CL),
Position Error Limit (EL) and the Servo Rate
Parameter Ranges
KP, KI, KD
KP, KI, and KD are the primary control parameters used by the PID control filter.
They must all be positive values in the range between 0 and 32,767.
Encoder Divisor
The Encoder Divisor divides the effective resolution of the encoder. This is
especially useful if you want to get more speed out of your motor in exchange for
increased encoder resolution. For example, if you have a 1000 line encoder which
has 4000 quadrature counts per revolution, and you have an encoder divisor of 5,
then your effective resolution would be 800 quadrature counts per revolution. The
encoder divisor in DCN must match the encoder divisor in FlashCut CNC.
PWM Limit
The PWM limit sets the maximum PWM output value. If the control algorithm
produces a larger value, the actual value will be clipped to the PWM limit value.
The PWM limit must be between 0 and 255.
Current Limit
A/D value and CCL (continuous current limit parameter of Set Gain command)
may be used for current limit control. A/D value is proportional to the motor
current. CCL is compared each servo tick with A/D value. If the A/D input is
connected to a voltage signal proportional to the motor current, the current limit
can be used to adjust the PWM output to prevent the motor current from
46 FlashCut CNC Section 13 Appendix
exceeding the limit. If a current limit between 1 and 127 is used, the PWM output
will be reduced if the A/D value exceeds the current limit. The Over current flag
will be set whenever an over current condition occurs. A current limit value of 0
effectively disables current limiting.
Servo Rate
The servo rate is a clock divisor, which determines the length of a servo tick. The
servo tick time is equal to 0.512 milliseconds multiplied by the servo rate divisor
value. This value must be between 1 and 255. In general, this value may be left
at the default value of 1, but for systems with a large inertia and/or low encoder
resolution, it may be desirable to increase the tick time to improve the servo's
damping characteristics.
Deadband Compensation
Some amplifier/motor combinations will exhibit a deadband around a zero PWM
output. That is, small PWM values will have no visible effect on driving the
motor. While servoing, the deadband compensation value will be added to the
magnitude of the PWM output, thus boosting the control signal into the active
region outside the deadband. This has the gain settings for Axis 1 in you servo
controller. You can change the gain settings using the following guidelines:
FlashCut CNC Section 13 Appendix 47
Servo Schematics
48 FlashCut CNC Section 13 Appendix
Connectors on Cables are DB15 Male and a Male Audio Connector (Neutrik NC3MX or equivalent).
* You can build an optional Limit Switch Cable connected to your DB15 Cable using pins 7, 8 and 15.
50 FlashCut CNC Section 13 Appendix
Connectors on Cables are DB15 Male and a Male Audio Connector (Neutrik NC3MX or equivalent).
* You can build an optional Limit Switch Cable connected to your DB15 Cable using pins 7, 8 and 15.
FlashCut CNC Section 13 Appendix 51
Wiring for Brushless Servo Motors with Single Ended or Differential Encoder
6 No Connection
7 NC or Lim(-)*
8 NC or Lim GND*
14 No Connection
15 NC or Lim(+)*
Connectors on Cables are DB15 Male and a Male Audio Connector (Neutrik NC3MX or equivalent).
* You can build an optional Limit Switch Cable connected to your DB15 Cable using pins 7, 8 and 15.
52 FlashCut CNC Section 13 Appendix
Wiring for Brush-Type Servo Motors with Single Ended or Differential Encoder
6 No Connection
7 NC or Lim(-)*
8 NC or Lim GND*
14 No Connection
15 NC or Lim(+)*
Connectors on Cables are DB15 Male and a Male Audio Connector (Neutrik NC3MX or equivalent).
* You can build an optional Limit Switch Cable connected to your DB15 Cable using pins 7, 8 and 15.
FlashCut CNC Section 13 Appendix 53
U50A RP 51 Fu s e
16 GPO0
Q1 Output Line 1
15 GPO1 Output Line 2
Q2
14 GPO2 Output Line 3
Q3
13 GPO3 Output Line 4
Q4
12 GPO4 Output Line 5 O PT
Q5
11 GPO5 Output Line 6 +3
Q6 1
10 GPO6 Output Line 7
Q7
3.3K
9 GPO7 Output Line 8
Q8
22 OHM 2
4
So lid Sta te R e la y
74ACT16373DL C o n tin e n ta l In d u s trie s
S5 0 5 -0 SJ 6 1 0 -0 0 0
GND
The above schematic shows a typical connection of one solid state relay controlled by output line 1 of the Signal
Generator. A typical load would be a spindle, a vacuum, a laser, etc. In this example, the solid-state relay used is a
Continental Industries model S505-0SJ610-000. It takes a 3 to 32VDC input and has an output of 24-330VAC.
Each of the output signals has a 22-ohm resistor in series with their outputs. This is to reduce any “ringing” at the
transient switching points. Ground and 5V are provided on this connector for your convenience. The FlashCut Spindle
On/Off Relay Box is wired as shown in the above schematic.
54 FlashCut CNC Section 13 Appendix
S ig n a l G e n e ra to r M o d e l 5 0 1 A
JP 84
VCC
+ 5V
O P T-V C C 1 D B 25 P IN 22
T B 40 T B -V C C 2 D B 25 P IN 23
1 3
2
T B -G R D 3
2 D B 25 P IN 25
O P T-G R D 1 D B 25 P IN 24
JP 85
GRD
OPT GND
RP42 2.7K
VCC
10
1
2
3
4
5
6
7
8
9
NC-NO
U41 IN7
In p u t 8 GPI7
IN6
In p u t 7 GPI6
IN5
In p u t 6 GPI5
IN4
In p u t 5 GPI4
PS2501L-4
U42 IN3
In p u t 4 GPI3 IN2
In p u t 3 GPI2
IN1
In p u t 2 GPI1 IN0
In p u t 1 GPI0
D B 25 P in15 PS2501L-4
10
D B 25 P in8
1
2
3
4
5
6
7
8
9
S ig n a l G e n e ra to r M o d e l 5 0 1 A
JP84
VCC
+ 5V
O P T-V C C 1 D B 2 5 P IN 2 2
TB40 T B -V C C 2 D B 2 5 P IN 2 3
1 3
2
T B -G R D 3
2 D B 2 5 P IN 2 5
O P T-G R D 1 D B 2 5 P IN 2 4
JP85
GRD
OPT GND
RP42 2.7K
VCC
10
1
2
3
4
5
6
7
8
9
NC-NO
U41 IN7
In p u t 8 GPI7
IN6
In p u t 7 GPI6
IN5
In p u t 6 GPI5
IN4
In p u t 5 GPI4
PS2501L-4
U42 IN3
In p u t 4 GPI3 IN2
In p u t 3 GPI2
IN1
In p u t 2 GPI1 IN0
In p u t 1 GPI0
D B 2 5 P in 1 5 PS2501L-4
10
D B 2 5 P in 8
1
2
3
4
5
6
7
8
OPT_VCC 9 OPT GND
D B 2 5 P in 7
D B 2 5 P in 6
RP41 820
D B 2 5 P in 5
D B 2 5 P in 1 8
D B 2 5 P in 1 7
D B 2 5 P in 1 6
56 FlashCut CNC Section 13 Appendix
The above schematic shows a typical connection of 5 normally closed switches. These switches are connected
between input lines 1-5 and ground. Lines 6-8 are connected directly to ground with jumper wires. All external
connections shown are made through the Input connector on the back of the Signal Generator. This resistor pack
(RP41) is socketed so that you can change the value if needed for your application.
The input lines are all optically isolated. In this example, JP84 and JP85 are shorted using the internal power
to source the external side of the optical couplers. However, for the best isolation, JP84 and JP85 should be
open, and power should be provided through pins 23 and 25 of the DB25 Motor Signal connector. Input lines
1-4 and 5- 8 are internally connected to pins 15-18 and 5-8 respectively of the DB25 Motor Signal connector.
Note that the FlashCut CNC limit switch kit has the same wiring as shown in this example.
FlashCut CNC Section 13 Appendix 57
EXTERNAL CONNECTORS (RED) PIN 1 OF ALL HEADERS IS INDICATED JP32 – BUS EXPANSION
BY A SMALL WHITE DOT PRINTED ON 2 X 20 - 2MM SPACING
CON1: STANDARD USB TYPE-A THE PCB. +3.3V 1 2 GND
CS6 3 4 STATUS6
CON3 – DB25F JP30 – AUXILIARY INPUTS TXD2 5 6 FAULT6
GPO1 1 14 ENA 2 X 20 - 2MM SPACING RXD2 7 8 AUX1-STB
GP02 2 15 GPI1 +3.3V 1 2 +3.3V OUT-ENA 9 10 AUX2-STB
STEP5 3 16 GPI2 GPI32 3 4 GPI1 OUT2-STB 11 12 OUT1-STB
DIR5 4 17 GPI3 GPI31 5 6 GPI2 OUT4-STB 13 14 OUT3-STB
GPI5 5 18 GPI4 GPI30 7 8 GPI3 +5V 15 16 +5V
GPI6 6 19 DIR4 GPI29 9 10 GPI4 GND 17 18 GND
GPI7 7 20 DIR3 GPI28 11 12 GPI5 A0 19 20 A1
GPI8 8 21 DIR2 GPI27 13 14 GPI6 DATA1 21 22 DATA2
DIR1 9 22 VCC GPI26 15 16 GPI7 DATA3 23 24 DATA4
STEP4 10 23 OPT-VCC GPI25 17 18 GPI8 DATA8 25 26 DATA7
STEP3 11 24 GND GND 19 20 GND DATA6 27 28 DATA5
STEP2 12 25 OPT-GND GPI24 21 22 GPI9 +7V 29 30 +7V
STEP1 13 SHIELD GPI23 23 24 GPI10 SPHOME 31 32 ENC CLK
GPI22 25 26 GPI11 +3.3V 33 34 ENC DIR
CON4 - INPUTS GPI21 27 28 GPI12 AGND 35 36 AV+
OPT-GND 1 9 GPI1 GPI20 29 30 GPI13 DAC2 37 38 DAC1
OPT-GND 2 10 GPI2 GPI19 31 32 GPI14 ADC1 39 40 AGND
OPT-GND 3 11 GPI3 GPI18 33 34 GPI15
OPT-GND 4 12 GPI4 GPI17 35 36 GPI16 JP33 – STEP & DIRECTION
OPT-GND 5 13 GPI5 +3.3V 37 38 +3.3V 2 X 6 - 2MM SPACING
OPT-GND 6 14 GPI6 GND 39 40 GND STEP5 1 2 ENA
OPT-GND 7 15 GPI7 STEP4 3 4 DIR5
OPT-GND 8 16 GPI8 JP31 – STATUS LEDS STEP3 5 6 DIR4
2 X 8 - 2MM SPACING STEP2 7 8 DIR3
CON5 - OUTPUTS +5V 1 2 N/C STEP1 9 10 DIR2
GPO1 1 6 GPO2 LED-DIR1 3 4 LED-STEP1 GND 11 12 DIR1
GPO3 2 7 GPO4 LED-DIR2 5 6 LED-STEP2
GPO5 3 8 GPO6 LED-DIR3 7 8 LED-STEP3
GPO7 4 9 GPO8 LED-DIR4 9 10 LED-STEP4
VCC 5 10 GND LED-DIR5 11 12 LED-STEP5
LED-AUX 13 14 LED-USB
GND 15 16 LED-PWR
FlashCut CNC Section 13 Appendix 59
Power
SYSTEM GROUNDING OPTIONS
UPPER RIGHT SCREW MOUNT HOLE IS CHASSIS
USBSHIELD
2
1
R87 JP86
1M C87
+5V 0.001 UF
OPT-VCC
1
24-40 V AT UP TO 10 A FOR FUNCTION SLOTS POWER JUMPERS CHASSIS
2 2
3 1
TB80 HV-PWR TB40
HV-PWR TB-VCC JP84 JP87
2 2
HV-GND 10 A! TB-GND VCC
1 1
JP83
MKDSN MKDSN DBSHIELD USBSHIELD
3 1 2
UL CLASS C: 10 A @ 300 V WITH 14 AWG
2 3 4
1 5 6
OPT-GND
JP85 Header 3X2
GND
D80
TVS 26V 400W
1
+7V
2
JP82 FWB80
SWITCH GBPC6005 +5V
HEATSINK HEATSINK
FOR U80 FOR U81
5734 5734
1
2
+ U80 NOTE 1. U81 NOTE 1. +3.3V
JP81 C88 C80 3 2 3 2 +3.3V
VIN +5.0 VIN +3.3
FUSE 0.1 UF 330 UF
FB80 1 4 1 4
GND +5.0 GND +3.3
+ + C82 + C83
434-6H-901 C81 C86
C84 LM1085IS-5.0 22 UF LM1085IS-3.3 C85 22 UF
330 UF 1 UF 1 UF
1 3.3 V 3000 MA 0.1 UF
5.0 V 3000 MA LOW ESR LOW ESR
2 4.8 TO 15 V IN
6.5 TO 25 V IN
JP80
POWER
LOGIC POWER
9 - 24 VDC @ 2 A
FlashCut CNC Section 13 Appendix 61
Outputs
U50A RP51
DATA7 37 12 8 9 GPO7 +5V
D8 Q8
+5V DATA6 38 11 7 10 GPO6
D7 Q7
DATA5 40 9 6 11 GPO5
D6 Q6
DATA4 41 8 5 12 GPO4
D5 Q5
DATA3 43 6 4 13 GPO3 U53
D4 Q4
DATA2 44 5 3 14 GPO2 1 8
D3 Q3 S VCC 1
R57 DATA1 46 3 2 15 GPO1 2
D2 Q2 1A 2
10K DATA0 47 2 1 16 GPO0 7 3 LO-SIDE OUT1 RELAY DRIVE
D1 Q1 2A 1Y 3
6 LO-SIDE OUT0 24V 300MA
2Y 4
OUT1-STB 48 22 OHM 4 5 5-24V RAIL
LE GND CLM 5
OUT-ENA 1
OE 6
SN75477D
74ACT16373DL JP53
VOH = 4.3 V
VOL = 0.44 V
AT 24 MA THRU 22 OHMS:
VOH = 3.8 V
VOL = 0.97 V
STEP LEDS
SEE MAKO-IF SHEET FOR DIR LED DRIVE U52B
+5V
AXIS1 AXIS2 AXIS3 AXIS4 AXIS5 VBUS OK 5V-OK
1
PANEL LED DRIVER CR51 CR52 CR53 CR54 CR55 CR61 CR57 CR58
2 GRN GRN GRN GRN GRN ORG YEL GRN
2
U50B RP54
LED-STEP1 26 23 LED-ST1 16 1
D8 Q8
LED-STEP2 27 22 LED-ST2 15 2
D7 Q7
LED-STEP3 29 20 LED-ST3 14 3
D6 Q6
LED-STEP4 30 19 LED-ST4 13 4
D5 Q5
LED-STEP5 32 17 LED-ST5 12 5
D4 Q4
ENCODER DIR 33 16 LED-AUX 11 6
D3 Q3
FOR DEBUG VBUS-OK 35 14 LED-USB 10 7
D2 Q2
36 13 LED-PWR 9 8
D1 Q1
+5V
25
LE 470
24
OE
74ACT16373DL
62 FlashCut CNC Section 13 Appendix
Inputs
U41 PS 2501L-4
IN 7
GPI7
IN 6
GPI6
O P T-V C C IN 5
+3 .3 V
GPI5 R P4 2
R P4 1
1 IN 4 1 16
2 2 15
3 GPI4 3 14
4 4 13
S OC KE TED
5 5 12
6 U42 PS 2501L-4 6 11
7 IN 3 7 10
8 8 9
9 GPI3
10 IN 2 2.7K
820 GPI2
IN 1
GPI1
IN 0
GPI0
FlashCut CNC Section 13 Appendix 63
Connectors
IN PU T A U X H EAD ER +5 V
S TAT U S LE D S (G E M VISION )
JP4 0 C ON 4 JP31
G PI0 G PI0
1 2 1 9 1 2
G PI1 G PI1 LED -D R 1 LE D -ST 1
3 4 2 10 3 4
G PI2 G PI2 S EE U S B.S CH D OC FOR LED -D R 2 LE D -ST 2
5 6 3 11 5 6
G PI3 G PI3 U S B C ON N E C TOR 1X4 LED -D R 3 LE D -ST 3
7 8 4 12 7 8
G PI4 G PI4 LED -D R 4 LE D -ST 4
9 10 5 13 9 10
G PI5 G PI5 S EE P OW E R.S C H D O C F OR LED -D R 5 LE D -ST 5
11 1 2 6 14 11 12
G PI6 G PI6 PW R & SH IE LD IN G JU M PER S LED -AU X LE D -U SB
13 14 7 15 13 14
G PI7 G PI7 H V & 5 V T E RM IN AL BLOC K S LE D -P W R
15 16 8 16 15 16
D B -25 M
64 FlashCut CNC Section 13 Appendix
S KT 1 0X2
FlashCut CNC Section 13 Appendix 1
Revision History
Revision Date Description of Revision
A 08/19/10 Initial write up
B 11/03/2010 1st Revision