587,656 active members*
6,119 visitors online*
Register for free
Login
IndustryArena Forum > CNC Electronics > Servo Motors / Drives > DC servos running on a PC system - HOW DP I DO IT?
Results 1 to 18 of 18
  1. #1
    Join Date
    Aug 2013
    Posts
    24

    DC servos running on a PC system - HOW DP I DO IT?

    I have three Siemens DC servomotors with internal tachometers and external shaft encoders that I can run with three Glentek servo amplifiers that I also have. I would like to use a PC system with software to generate the required position and speed information to generate the table moves and to close the speed and position feedback loops. I would prefer that the PC operating system was Linux.

    I understand that there will have to be some external hardware to generate the analog signal to drive the servo amps from the digital output signals from the PC and that there will also have to be external circuitry to digitize the servo tachometer signals and provide digital speed inputs to the PC. The PC software can then generate the digital speed and direction signal that will be converted to an analog signal for the drive inputs and the PC software can close the velocity feed back loop. The PC can also read the position encoders and close the position feed back loop. The PC software would also generate the table and spindle positions required as a function of time for each axis driving the system to follow the required tool path.

    So, is there a hardware interface and software available that will do this - what is it - where do I get it?

    Is there another better alternative for running a DC servo system off a PC?

    I do not want a commercial DC servo CNC system and proprietary software and hardware because of acquisition costs and maintenance costs given that they are not open systems with enough documentation available to enable my maintaining it myself. I want to go with open and documented software and hardware and I want to be able to understand exactly how my system works in detail.

    So, how do I do it?


    Lee

  2. #2
    Join Date
    Oct 2012
    Posts
    342

    Re: DC servos running on a PC system - HOW DP I DO IT?

    The only options that come to mind are Dynomotion KFLOP + KANALOG card, they are an excellent piece of hardware and work very well. It is what I am using and I really like it. Or you could look at LinuCNC and some of the MESA hardware boards. I know they have an analog option but I am not sure which pieces you would need.

    Dynomotion Motion Control Boards for CNC Manufacturing and Robotics Applications


    -Dan

  3. #3
    Join Date
    Apr 2005
    Posts
    72

    Re: DC servos running on a PC system - HOW DP I DO IT?

    If Linux is your preference, LinuxCNC (formerly EMC) probably makes the most sense. For the hardware interface, there are a few options, but the Mesa boards seem like they are the most popular. For analog servo drives the 7I77 combined with either a 5I25 (PCI) or 6I25 (PCIE) should be the ticket. They sell a kit containing both boards as well a cable to connect them (currently $280 - $300 depending upon PCI/PCIE). This works with the encoders and I don't think the tachometers are utilized. These boards also support an analog spindle drive with encoder feedback if you plan on using a VFD and/or want to do rigid tapping. This is what I am planning to use for my Bridgeport BOSS retrofit with analog input AMC servo drives when I finally get around to it.

    Note that I do not believe the Mesa boards are open hardware though if that is a strict requirement. I don't know of any open hardware solutions that close the feedback loop back to the PC. There was at least one open step/dir to analog 10V designs posted to this site (YAPSC) but it kept the encoder feedback internal to the board similar to a Gecko G320X. If using something like that, LinuxCNC would be setup like a standard step/dir stepper system and you could probably run directly from the parallel port depending upon the step rate required.

  4. #4
    Join Date
    Oct 2006
    Posts
    323

    Re: DC servos running on a PC system - HOW DP I DO IT?

    I would second the Mesa hardware, great stuff at a great price and yes great service. You'l also get great closed loop response in LinuxCNC.

    The Glentek amps won't be open source either, but if you must have the complete open source route then you might want to search for the Atmega based servo drive thread on this board.

    If you would like to retain the Glentek amps, the tach signal should feedback to the drive, and all you need is to work out the 10 Vdc analog out to the drive and the digital 5 Vdc (typical) encoder back to the PC. In the adventure of spinning your own, you may want to look at FTDI drivers and Arduino or Atmega chips to handle the analog and digital go between. But talk about a long hard and lonely road.

    The Mesa gear and LinuxCNC will get you up and going the quickest with at least a close to full open source solution.

  5. #5
    Join Date
    Oct 2006
    Posts
    323

    Re: DC servos running on a PC system - HOW DP I DO IT?

    Or if you want to be even more adventuresome, look for 109JB's Arduino Interface post. He is running the open source GRBL and trying to implement updates to make it more compliant with the full range of G&M codes found in LinuxCNC and the like. The downside or obstacle will be dealing with the interfacing of higher power level devices, I believe everything he has been dealing with is at the power levels directly capable with his Arduino Nano hardware.

    If you choose any of these roads less traveled, please post and share. I'm sure there will be more than one curious bystander.

  6. #6
    Join Date
    Oct 2012
    Posts
    342

    Re: DC servos running on a PC system - HOW DP I DO IT?

    As for the OPEN side of things I think the Dynomotion products are as close as you are going to get, all source code for the software is available along with several programming examples to make your own applications. The hardware is not 100% open but there is not much Tom will not tell you about it.

    I don't have time to read up on LinuxCNC and the MESA cards for an analog drive setup, so I don't have any definitive knowledge on it. But when I was looking into it a couple weeks ago what I read was that the analog output card was really just taking the pulses from the computer card and converting it into an analog signal. I did not read up on what it is doing with the encoder signals, i would hope they are getting fed back to the computer. I could be wrong, and I am sure someone will point it out, but this does not seem like an ideal way to do a closed loop analog setup. It seems there is an extra step involved in the creation of the analog signal.

    -Dan

  7. #7
    Join Date
    Oct 2006
    Posts
    323

    Re: DC servos running on a PC system - HOW DP I DO IT?

    "I don't have time to read up on LinuxCNC and the MESA cards for an analog drive setup, so I don't have any definitive knowledge on it. But when I was looking into it a couple weeks ago what I read was that the analog output card was really just taking the pulses from the computer card and converting it into an analog signal. I did not read up on what it is doing with the encoder signals, i would hope they are getting fed back to the computer. I could be wrong, and I am sure someone will point it out, but this does not seem like an ideal way to do a closed loop analog setup. It seems there is an extra step involved in the creation of the analog signal." -Dan

    It is not clear to me what you mean by "just taking the pulses from the computer card and converting it into an analog signal." How does Dynomotion do it? In either case the software and PC digital realm has to at some point in the chain be converted from a digital value to an analog signal. Is your concern that this has to happen or where it is in the chain that it happens?

    I don't see a difference in where it happens in the chain. In simple terms, LinuxCNC sends a commanded value (likely digital) to the hardware layer which then sends an analog signal to the drive. The encoder sends a digital signal back to the hardware layer back to LinuxCNC to determine position, velocity, acceleration and errors. The commanded position and actual position are compared and corrections made within the controller, LinuxCNC.

    " It seems there is an extra step involved in the creation of the analog signal, " is a little confusing to me as well. As stated, using a PC or digital controller anywhere in the loop means somewhere in the loop an analog to digital conversion must take place. Or another way to look at it, typically quadrature encoders are used for feedback or error signal, most being digital signals, so at some point the analog command signal must be compared to the digital feedback. Some conversion or interpretation has to be done at some point.

  8. #8
    Join Date
    Dec 2003
    Posts
    24220

    Re: DC servos running on a PC system - HOW DP I DO IT?

    In the case of Motion cards and Kanalog etc, the trajectory controller uses the encoder as part of the PID loop and outputs an analogue signal direct to the drive, which can be any non-intelligent torque mode amplifier/drive.
    In the case of Glentek drives, these also require an 'inner loop' in the form of DC tach feedback, the tach can be discarded in the case of modern torque mode amplifiers such as A-M-C, Copley and Aerotech etc.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  9. #9
    Join Date
    Aug 2013
    Posts
    24

    Re: DC servos running on a PC system - HOW DP I DO IT?

    OK guys - lots of good input here and some places to start researching. Right now I need to know how the NC trajectory generator works and how the control outputs are generated to get myself on track.

    I do have concerns about hardware generating the DC servo system analog speed signal directly form the step pulse frequency of a step motor system.

    So far as what I might attempt - I am a physicist and engineer with experience designing computers and peripherals (including printers and plotters) at Hewlett Packard and industrial sensors and controls at major OEMs. I have hand compiled binary programs, written the microcode to switch internal busses and execute processor instructions sets, and programmed major physical system simulations, so software is well within my capabilities. I am however old and retired and pretty obsolete so far as toda'ys computer stuff goes. I have some retooling to do. I still have a fair amount of electronic test equipment too.

    I have also had an all manual shop for nearly 50 years now and I have recently finished modifying a Wells Index 520 CEN for dual use as both a manual and a CNC mill. It is in near new condition. The mill was bare Iron when purchased - no CNC at all. It now has calibrated dials and hand wheels and table locks and a VFD spindle motor and step motors driven by an old Bandit stepper system. Only two axes are currently working as I have a blown step motor driver board. This will allow me to get my feet wet with CNC and G & M code. I want to end up with a full 4 and possibly 5 axis DC servo system (I have a Yuasa tilting rotary table to automate) complete with helical milling and rigid tapping etc. I will get this done - question is exactly how to do it.

    PS: Glentek has a fairly good tutorial on servo systems in general and has complete component level schematics of the servo amps I have on their web site. I consider that pretty "open".

  10. #10
    Join Date
    Oct 2012
    Posts
    342

    Re: DC servos running on a PC system - HOW DP I DO IT?

    Quote Originally Posted by 123CNC View Post
    "I don't have time to read up on LinuxCNC and the MESA cards for an analog drive setup, so I don't have any definitive knowledge on it. But when I was looking into it a couple weeks ago what I read was that the analog output card was really just taking the pulses from the computer card and converting it into an analog signal. I did not read up on what it is doing with the encoder signals, i would hope they are getting fed back to the computer. I could be wrong, and I am sure someone will point it out, but this does not seem like an ideal way to do a closed loop analog setup. It seems there is an extra step involved in the creation of the analog signal." -Dan

    It is not clear to me what you mean by "just taking the pulses from the computer card and converting it into an analog signal." How does Dynomotion do it? In either case the software and PC digital realm has to at some point in the chain be converted from a digital value to an analog signal. Is your concern that this has to happen or where it is in the chain that it happens?

    I don't see a difference in where it happens in the chain. In simple terms, LinuxCNC sends a commanded value (likely digital) to the hardware layer which then sends an analog signal to the drive. The encoder sends a digital signal back to the hardware layer back to LinuxCNC to determine position, velocity, acceleration and errors. The commanded position and actual position are compared and corrections made within the controller, LinuxCNC.

    " It seems there is an extra step involved in the creation of the analog signal, " is a little confusing to me as well. As stated, using a PC or digital controller anywhere in the loop means somewhere in the loop an analog to digital conversion must take place. Or another way to look at it, typically quadrature encoders are used for feedback or error signal, most being digital signals, so at some point the analog command signal must be compared to the digital feedback. Some conversion or interpretation has to be done at some point.

    Ok so I had to go do some more reading up on this so I had a better understanding. To the best of my knowledge this is how each of the systems works

    Linux CNC/MESA flow chart

    CPU---->(digital value is output)010101010101---->FPGA---->(PWM&Direction is output)____|-------|____|-----|_____ ---->RC Circuit---->-10V to +10V signal ---->Servo Drive----------->ADC---->(digital value is output)010101010101---->Micro Controller



    Dynomotion KFLOP+KANALOG Flow chart

    CPU---->(digital value is output)010101010101---->DAC---->-10V to +10V signal ---->Servo Drive----------->ADC---->(digital value is output)010101010101---->Micro Controller


    So I am not saying the way the LinuxCNC/MESA system operates is bad or does not work. I don't have any background in designing systems like this, I just see that there is an extra step in the process with the MESA cards and was wondering what impact that could have.

    I know that on the current offering Mazak and Fanuc CNC's, control of the servos are all done over fiber optic cables. The drives are daisy chained together with fiber optic cable, I believe this should basically result in a raw digital signal being able to be sent right to the drives CPU/Micro controller. So no signal conversions, just transmission media conversions.

    CPU---->010101010101---->Servo Drive---->Micro Controller

    -Dan

  11. #11
    Join Date
    Feb 2008
    Posts
    644

    Re: DC servos running on a PC system - HOW DP I DO IT?

    Quote Originally Posted by engnerdan View Post
    Ok so I had to go do some more reading up on this so I had a better understanding. To the best of my knowledge this is how each of the systems works

    Linux CNC/MESA flow chart

    CPU---->(digital value is output)010101010101---->FPGA---->(PWM&Direction is output)____|-------|____|-----|_____ ---->RC Circuit---->-10V to +10V signal ---->Servo Drive----------->ADC---->(digital value is output)010101010101---->Micro Controller


    A PWM --> filter --> ANALOG signal _is_ an A-D converter, the type of A-D converter does not affect the system performance
    unless its speed or resolution compromise the results. This is not the case for LinuxCNCs update rates with velocity mode drives.
    We do have 16 bit DAC/encoder daughtercards as well but they are major overkill for velocity mode servos


    Dynomotion KFLOP+KANALOG Flow chart

    CPU---->(digital value is output)010101010101---->DAC---->-10V to +10V signal ---->Servo Drive----------->ADC---->(digital value is output)010101010101---->Micro Controller


    So I am not saying the way the LinuxCNC/MESA system operates is bad or does not work. I don't have any background in designing systems like this, I just see that there is an extra step in the process with the MESA cards and was wondering what impact that could have.

    I know that on the current offering Mazak and Fanuc CNC's, control of the servos are all done over fiber optic cables. The drives are daisy chained together with fiber optic cable, I believe this should basically result in a raw digital signal being able to be sent right to the drives CPU/Micro controller. So no signal conversions, just transmission media conversions.

    CPU---->010101010101---->Servo Drive---->Micro Controller

    -Dan
    A PWM --> filter --> ANALOG signal _is_ an A-D converter, the type of A-D converter does not affect the system performance
    unless its speed or resolution compromise the results. This is not the case for LinuxCNCs update rates with velocity mode drives.
    We do have 16 bit DAC/encoder daughtercards as well but they are major overkill for velocity mode servos

  12. #12
    Join Date
    Oct 2012
    Posts
    342

    Re: DC servos running on a PC system - HOW DP I DO IT?

    Quote Originally Posted by PCW_MESA View Post
    A PWM --> filter --> ANALOG signal _is_ an A-D converter, the type of A-D converter does not affect the system performance
    unless its speed or resolution compromise the results. This is not the case for LinuxCNCs update rates with velocity mode drives.
    We do have 16 bit DAC/encoder daughtercards as well but they are major overkill for velocity mode servos
    Thank you for the explanation, now I know.

    -Dan

  13. #13
    Join Date
    Aug 2013
    Posts
    24

    Re: DC servos running on a PC system - HOW DP I DO IT?

    A little update - and a few questions.

    I have discovered that the Glentek servo amps I have do have an input for the servo tachometer and will close the velocity loop in the servo amp itself - so that problem is now solved. I will connect the tach to the amps and let them close the loop.

    The position sensors are digital quadrature type - 1000 pulses / rev - and can input directly to a computer port as a digital byte. That should be no real problem either.

    Now all I really need is software that can calculate the target trajectory to achieve the desired tool path or commanded move, calculate the required velocity to achieve the target trajectory, output a target velocity command in digital form, accept a digital input of a position signal from the encoder and keep track of the current actual position based on that signal, and then calculate the position error and close a position loop by updating the velocity signal.

    So, what software does that?
    What hardware works with it to do the D/A conversion of the axes target velocity outputs and also handles the data byte inputs from the position sensors?

    Is there any significant difference in how a step motor based system calculates the trajectory and the required axes velocities as opposed to how one designed for servo motors does it? Same question regarding closing the position loop.

    Is usable axis velocity information usually available as a direct digital output in either step or servo systems? Is digital velocity output available from Linux CNC software? What about Mach3?

  14. #14
    Join Date
    Dec 2003
    Posts
    24220

    Re: DC servos running on a PC system - HOW DP I DO IT?

    What is the nature of the encoders? Most systems will handle incremental encoders, if they are absolute or resolvers you may have a problem.
    Kanalog will output a analogue signal using Mach or its own front end controlleer, MESA motion card uses Linux I believe, there is also Galil Motion using Camsoft software.
    As I already mentioned, tach feedback is not used currently in modern systems, the velocity loop is replaced with Torque mode of control.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  15. #15
    Join Date
    Aug 2013
    Posts
    24

    Re: DC servos running on a PC system - HOW DP I DO IT?

    Encoders are digital output quadrature type with 3 lines out and another 3 inverted lines out, 1000 pulses per revolution, geared 2:1 to the lead screw for 0.0005 / pulse resolution, and as they do not keep track of total revolutions they must be incremental I would think.

    These position sensors are not resolvers.

    If my motor understanding is correct, torque mode means current control - is that correct? If so, these amps will do that too.

    Why has modern software gone to torque control? Why would that be preferable?

    Does LinuxCNC output Position, or Velocity, or Torque control signals or any or all of them at the user's choice? What is actually available to work with control signal wise?

  16. #16
    Join Date
    Dec 2003
    Posts
    24220

    Re: DC servos running on a PC system - HOW DP I DO IT?

    With most modern drives you have the option of velocity or torque mode, with the older method of tach to the drive and encoder to the motion controller the tach/velocity AKA the inner loop had to be tuned first then the outer PID loop.
    Many of the older drives such as Glentek and Westamp there was no choice.
    The torque mode uses a transconductance type amplifier and is much easier to tune and much tighter loop, especially at low rpm.
    Al.
    CNC, Mechatronics Integration and Custom Machine Design

    “Logic will get you from A to B. Imagination will take you everywhere.”
    Albert E.

  17. #17
    Join Date
    Aug 2013
    Posts
    24

    Re: DC servos running on a PC system - HOW DP I DO IT?

    Quote Originally Posted by Al_The_Man View Post
    With most modern drives you have the option of velocity or torque mode, with the older method of tach to the drive and encoder to the motion controller the tach/velocity AKA the inner loop had to be tuned first then the outer PID loop.
    Many of the older drives such as Glentek and Westamp there was no choice.
    The torque mode uses a transconductance type amplifier and is much easier to tune and much tighter loop, especially at low rpm.
    Al.
    My DC servos have tachs and my amps are Glentek SMA 7215 - so I have the choice.
    What is your recommendation for the best method with these and where do the tach and encoder signals go for Linux CNC?

    What interface board would you recommend as the best to do it with if I go LinuxCNC?

    Does the recommended method and interface board change for Mach3?

  18. #18
    Join Date
    Feb 2007
    Posts
    967

    Re: DC servos running on a PC system - HOW DP I DO IT?

    If you want to close the loop and run from simple Step/direction (mach3 etc) my Step2linear will do the job.

    Step2Linear, ViperServo

    Larry K
    Manufacturer of CNC routers and Viper Servo Drives
    www.LarkenCNC.com and www.Viperservo.com

Similar Threads

  1. Running 200W servos on 100W deives?
    By SwampDonkey in forum Servo Motors / Drives
    Replies: 6
    Last Post: 05-06-2013, 04:12 AM
  2. Anyone running Dugong drives and Keling servos?
    By derek in forum Servo Motors / Drives
    Replies: 10
    Last Post: 01-29-2012, 08:10 PM
  3. Replies: 8
    Last Post: 02-05-2010, 08:37 PM
  4. Anyone in Sweden running step/dir servos?
    By svenakela in forum European Club House
    Replies: 2
    Last Post: 09-28-2009, 08:35 PM
  5. Minimal system to control steppers \ servos ??
    By jahcure in forum CNC Machine Related Electronics
    Replies: 8
    Last Post: 12-05-2006, 04:37 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •