Thinking of doing a lathe build and need some basic questions answered.


Results 1 to 4 of 4

Thread: Thinking of doing a lathe build and need some basic questions answered.

  1. #1
    Member Dancy's Avatar
    Join Date
    Aug 2007
    Location
    usa
    Posts
    138
    Downloads
    0
    Uploads
    0

    Default Thinking of doing a lathe build and need some basic questions answered.

    It's a bit confusing trying to figure out what Mach4 will and won't do. My goal is to control the new lathe well enough that it can thread accurately granting any physical stability will play into accuracy but if the control system is accurate then I can work on the physical. My thoughts on threading is that Mach4 would have to know where the spindle is as well as where the X and Z axis are. I have searched the forum and find conflicting information so here I am. The forum seems to indicate Mach4 will perform threading and second Mach4 can use my Yaskawa Sigma V servo drives but for the life of me how? The servo drives can be controlled three ways from what I read. Via Mechatrolink, Analog voltage and pulse train reference, and via USB connection (I have played with this a tad using Yaskawa's SigmaWinPlus). So how do I get Mach4 to perform one of these protocols? Next, one would think an optical encoder would be needed on the spindle. How to get Mach4 to read the encoder?

    I see some products referenced on ArtSoft's website designed to interface with servos such as the Galil products but that seems like an awfully big hammer when my Sigma drives already do all the processing to position the servo.

    I have been reading threads on Artsoft's website and here as well. Responses say Mach4 outputs "step and direction" ...ya, ok, how? The old parallel port idea is pretty well dead so one is left with USB, LAN, wireless or Bluetooth. Mach4 configuration seems to want a "plug-in" of some sort though few are listed.

    So for example I attach a device via USB that can output a signal. I use that signal to send a pulse to my servo controller telling it to "step" one degree CW. Next, my USB device inputs a signal from the servo drive indicating the "step" is complete. That begs the question, how fast can Mach4 send "step" signals?

    A simple interface could be an Arduino via USB to handle the input/output but how to get Mach4 to talk to the Arduino?



  2. #2
    Member
    Join Date
    Mar 2017
    Location
    United States
    Posts
    411
    Downloads
    0
    Uploads
    0

    Default Re: Thinking of doing a lathe build and need some basic questions answered.

    Since you are talking Mach 4 then you could setup your system with a smart controller like an Ethernet Smooth Stepper. The ESS handles all the motion calculations and Mach just sends it commands. The ESS would receive all the signals from the machine, including spindle encoder, and produces the Step/Direction signals to the servo's.

    To do threading you need at least an index signal from the spindle. However an I and an A pulse would be preferred. My spindle encoder sends an index pulse, zero degrees, and 500 position pulses, every 0.72 degrees, for each revolution. These signals are used by the ESS to determine what the exact Z position should be and move to that location.

    Here are some photos of my PM1228 lathe including the spindle encoder.

    https://www.cnczone.com/forums/verti...ml#post2310698



  3. #3
    Member Dancy's Avatar
    Join Date
    Aug 2007
    Location
    usa
    Posts
    138
    Downloads
    0
    Uploads
    0

    Default Re: Thinking of doing a lathe build and need some basic questions answered.

    it's starting to look like the Smooth Step might be the ticket where the work is done for you. I tend to prefer more in depth details so I can better understand capabilities. The Yaskawa Sigma V says it can output encoder pulses up to 1.6 Mpps and spin the servos up to 6000 rpm. That's alot of data for Mach4 to digest. Would be fun to roll your own so to speak. I have been programming in C for decades and most targeted toward imbedded control systems. I see an SDK for Mach3 but nothing for 4. Perhaps the SDK would answer some of my questions of how Mach4 coordinates movement. Just sending something simple like "move x 3210 steps cw then z 100 steps ccw" not going to cut it. No synchronization.



  4. #4
    Member
    Join Date
    Mar 2017
    Location
    United States
    Posts
    411
    Downloads
    0
    Uploads
    0

    Default Re: Thinking of doing a lathe build and need some basic questions answered.

    Mach 4 runs on windows which is not a synchronous OS. Windows can't produce the precise time based pulses needed for smooth motion. This is why you need a separate controller to take the movement commands and produce the hardware signals at the correct time.

    The maximum pulse frequency needed is dependent on how many pulses/revolution times the max rpm that the servo requires to reach maximum speed. With a hobby type machine things don't usually move at very high speed so you may not need a lot in the way of pulse rate.

    In building a machine, most of the difficulties come in interfacing with all the hardware. Steppers, servos, switches, encoders, spindles, MPG these all require different types of control signals all connected to the controller/computer. You have to select a Break Out Board (BOB) that meets your needs. The BOB you select will define how you, then, wire the hardware.

    As for an SDK, you shouldn't have to do much development, if any.



  5. #5
    Member Dancy's Avatar
    Join Date
    Aug 2007
    Location
    usa
    Posts
    138
    Downloads
    0
    Uploads
    0

    Default Re: Thinking of doing a lathe build and need some basic questions answered.

    Thanks MSB. I may have to back peddle a bit on this project. I was thinking my drives would handle pulse/direction but turns out they only understand MECHATROLINK (a form of serial that few servo companies adopted.) I will follow up on the SDK though. With luck it would not be too hard to write a translator.



Posting Permissions

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


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Thinking of doing a lathe build and need some basic questions answered.

Thinking of doing a lathe build and need some basic questions answered.