. .
  1. #1
    I'm converting an ORAC lathes electronics and have had the slides under CNC control and the spindle operating at variable speed through a VFD. It's not all integrated and under CNC control but when it is i intend to use Linux CNC but also have Mach3.
    The VFD is a Eurotherm 601 and the BOB is one advertised as a Mach3 board with a 0-10V 0utput and a relay. On the non-working end of the spindle is an encoder disc with, i think, 100 slots with one extending to the outside of the disc.
    The three images below show the VFD, the BOB and the encoder disc.
    I need the lathe for thread cutting and obviously need to sync the z slide and the spindle.
    My understanding is that the Encoder sends a feedback signal to Linux CNC which then controls the slide traverse rate to the spindle speed.
    I don't know whether the BOB I have can fulfill this task and even if it can i don't know how to do it.
    So the questions are:-
    1 Is the BOB adequate and if not can someone recommend a more suitable one.
    2 How do i build the kit that picks the signal up from the encoding disc and
    3 How do i integrate the bits and control it through Linux CNC.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	20170103_163309.jpg 
Views:	435 
Size:	578.8 KB 
ID:	20179   Click image for larger version. 

Name:	20170103_163324.jpg 
Views:	279 
Size:	309.0 KB 
ID:	20180   Click image for larger version. 

Name:	20170103_163336.jpg 
Views:	444 
Size:	384.4 KB 
ID:	20181  

  2. #2
    Clive S's Avatar
    Lives in Marple Stockport, United Kingdom. Last Activity: 19 Hours Ago Forum Superstar, has done so much to help others, they deserve a medal. Has been a member for 9-10 years. Has a total post count of 3,333. Received thanks 618 times, giving thanks to others 78 times. Made a monetary donation to the upkeep of the community. Is a beta tester for Machinists Network features.
    Bob I have done this on a ML S7 with a 100 slot encoder. Do you intend to put homing switches on the lathe. As that bob will only have 5 inputs. you can get away with A and Index pulse (2 inputs) better with A + B and index 3 inputs. personally I would go with a mesa card something like 7i76 or 7i76e for ethernet. if using Lcnc.

    I am happy if you want to come over to see mine Stockport.
    ..Clive
    The more you know, The better you know, How little you know

  3. #3
    Clive
    Thanks for the speedy reply and invitation. The latter i will willingly take up.
    I've just completed a 3-axis router and this has limit switches on all axes and an emergency stop button. The limit switches are primarily used for homing but have the other useful function of minimising the risk of crashes. I'm rebuilding this for a friend who has the machining experience so i don't know whether homing switches are necessary. (The chaps name is Dave Forest and he may already have contacted you.) The ORAC has just one limit switch as original.
    Based on your reply and reading part of the linux manual Pins 10 and 11 on the DB25 are used to provide feedback to the controller. I presume these are two of the input pins on the BOB.
    I also presume that a device similar to this would provide the encoder signals?
    Click image for larger version. 

Name:	0d3f8cf9-8ad1-5873-62cd-82a5d18ea737.jpg 
Views:	253 
Size:	16.5 KB 
ID:	20206
    Would this Friday be convenient to pay a visit?
    Bob

  4. #4
    Clive S's Avatar
    Lives in Marple Stockport, United Kingdom. Last Activity: 19 Hours Ago Forum Superstar, has done so much to help others, they deserve a medal. Has been a member for 9-10 years. Has a total post count of 3,333. Received thanks 618 times, giving thanks to others 78 times. Made a monetary donation to the upkeep of the community. Is a beta tester for Machinists Network features.
    Bob Could you put up a link for this part. I will PM you my address.
    ..Clive
    The more you know, The better you know, How little you know

  5. #5
    Thanks Clive and i've now moved on some but i have encountered another hurdle.
    The HAL file for the set up is shown below.

    # Generated by stepconf 1.1 at Sun Jan 15 15:33:03 2017
    # If you make changes to this file, they will be
    # overwritten when you run stepconf again
    loadrt trivkins
    loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
    loadrt hal_parport cfg="0 out"
    setp parport.0.reset-time 5000
    loadrt stepgen step_type=0,0
    loadrt pwmgen output_type=1

    addf parport.0.read base-thread
    addf stepgen.make-pulses base-thread
    addf pwmgen.make-pulses base-thread
    addf parport.0.write base-thread
    addf parport.0.reset base-thread

    addf stepgen.capture-position servo-thread
    addf motion-command-handler servo-thread
    addf motion-controller servo-thread
    addf stepgen.update-freq servo-thread
    addf pwmgen.update servo-thread

    net spindle-cmd-rpm => pwmgen.0.value
    net spindle-on <= motion.spindle-on => pwmgen.0.enable
    net spindle-pwm <= pwmgen.0.pwm
    setp pwmgen.0.pwm-freq 100.0
    setp pwmgen.0.scale 876.0
    setp pwmgen.0.offset 0.0
    setp pwmgen.0.dither-pwm true
    net spindle-cmd-rpm <= motion.spindle-speed-out
    net spindle-cmd-rpm-abs <= motion.spindle-speed-out-abs
    net spindle-cmd-rps <= motion.spindle-speed-out-rps
    net spindle-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
    net spindle-at-speed => motion.spindle-at-speed

    net spindle-pwm => parport.0.pin-01-out
    setp parport.0.pin-02-out-invert 1
    net xstep => parport.0.pin-02-out
    setp parport.0.pin-02-out-reset 1
    setp parport.0.pin-03-out-invert 1
    net xdir => parport.0.pin-03-out
    setp parport.0.pin-04-out-invert 1
    net zstep => parport.0.pin-04-out
    setp parport.0.pin-04-out-reset 1
    setp parport.0.pin-05-out-invert 1
    net zdir => parport.0.pin-05-out
    net spindle-on => parport.0.pin-17-out

    setp stepgen.0.position-scale [AXIS_0]SCALE
    setp stepgen.0.steplen 1
    setp stepgen.0.stepspace 0
    setp stepgen.0.dirhold 35000
    setp stepgen.0.dirsetup 35000
    setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
    net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
    net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
    net xstep <= stepgen.0.step
    net xdir <= stepgen.0.dir
    net xenable axis.0.amp-enable-out => stepgen.0.enable

    setp stepgen.1.position-scale [AXIS_2]SCALE
    setp stepgen.1.steplen 1
    setp stepgen.1.stepspace 0
    setp stepgen.1.dirhold 35000
    setp stepgen.1.dirsetup 35000
    setp stepgen.1.maxaccel [AXIS_2]STEPGEN_MAXACCEL
    net zpos-cmd axis.2.motor-pos-cmd => stepgen.1.position-cmd
    net zpos-fb stepgen.1.position-fb => axis.2.motor-pos-fb
    net zstep <= stepgen.1.step
    net zdir <= stepgen.1.dir
    net zenable axis.2.amp-enable-out => stepgen.1.enable

    net estop-out <= iocontrol.0.user-enable-out
    net estop-out => iocontrol.0.emc-enable-in

    loadusr -W hal_manualtoolchange
    net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
    net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
    net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
    net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

    If I input M3 S876 then the output from Pin 1 is 4.9V and the spindle runs at approx 876rpm.
    If i input S438 the output drops to a steady 2.45v but the spindle rpm oscillates between 0 and 876rpm. The closer i set the S speed the more the spindle is at max speed.

    If I use a power supply to feed into the VFD at say 2.45V then the spindle runs at the correct speed.

    I deduced there must be some other input that's causing this oscillation and measured the AC voltage on pin1 at 2.7V. I can't determine it's frequency but if this is very low then it might explain the issue?

    Is there a way of filtering out the AC component if in fact it is this that is causing the problem?

  6. #6
    Clive S's Avatar
    Lives in Marple Stockport, United Kingdom. Last Activity: 19 Hours Ago Forum Superstar, has done so much to help others, they deserve a medal. Has been a member for 9-10 years. Has a total post count of 3,333. Received thanks 618 times, giving thanks to others 78 times. Made a monetary donation to the upkeep of the community. Is a beta tester for Machinists Network features.
    Bob I think that this would be better put on the Linuxcnc forum Having said that Have you had a look at this
    http://linuxcnc.org/docs/2.4/html/ex...ndle.html#r1_3 this is for version 2.4 I think.

    Where did you get the scale from in setp pwmgen.0.scale 876.0 I think this should be set to the max speed of the spindle

    Are you using 0-10V

    I hope somebody can chime in to help plese
    Last edited by Clive S; 15-01-2017 at 06:39 PM.
    ..Clive
    The more you know, The better you know, How little you know

  7. #7
    depronman's Avatar
    Lives in St Annes on the Sea, United Kingdom. Last Activity: 23 Minutes Ago Has been a member for 5-6 years. Has a total post count of 159. Received thanks 19 times, giving thanks to others 6 times.
    I know this is an old thread but I have just finish a retro fit of an ORAC with LinuxCNC and have all working including threading using the original orac encode wheel 48 slot and three optical readers so operating in quadrature
    Let me know if you need any help
    Paul

  8. #8
    Paul, When I'm back in the country I'll be wiring up an encoder for my lathe - I might well be in touch!

  9. #9
    depronman's Avatar
    Lives in St Annes on the Sea, United Kingdom. Last Activity: 23 Minutes Ago Has been a member for 5-6 years. Has a total post count of 159. Received thanks 19 times, giving thanks to others 6 times.
    OK understood
    I bought a encoder just in case the home made encoder was not up to the job but it meant making up a lay shaft to run the encoder and a set of timing pulleys to run the lay shaft at spindle speed. All very doable but the original ORAC encoder disc was looking me in the face so a bracket was designed in CAD to mount the 3 optical seasons with each sensor adjustable in radial position. The bracket was in two halves as it was to be 3D printed effectively a plate to hold the three sensors and adjusters and a separate stem that mounts to the lathe headstock
    The two pieces are checked for position and then glued in place using cyno
    Wire up the three sensors to the bob and and give it a try
    The sensors have an led that flashes when the signal to the bob is triggered so rough adjustment of the sensor alignment was done using the LED on each sensor
    One sensor reads the long slot to single pulse per rev
    The other two read each slot and the alignment of these is rather more critical which I did with the spindle running and monitored the spindle speed in linuxcnc
    It was showing on the display as varying by a few hundred rpm which it clearly was not but after redial adjustment of the two inner sensors the speed stabilised to a steady reading. The sensor mount screws were nipped up and threading on a test bar M10x1.5 attempted
    To my amazement it waited the G04 P10 that I programmed in G76 then performed 15 cuts and 2 flex passes with no cut
    The thread was nut deep enough so x touch off adjustment made and run again. To my amazement it picked up the thread perfectly and only made a cut after 13 passes of cutting air
    Retired and nut still not quite going on
    Further adjustment made and run again this time nut ran down the thread perfectly with just a slight amount of slop same feel as the nut on a commercial set screw
    I cut the first thread 30mm long
    Once depth was correct I cut another thread 9 mm long and the nut ran alway down the thread first time the feel of the nut is the same from first turn through the middle to the very end
    Well please with the little ORAC my home brew encoder and linuxcnc

    I never do manage to get mach3 to thread on a Boxford BUD I converted to cnc
    It may be getting linuxcnc in the near future!!!

    all the best. Paul

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Linier slide bearings - can they be adjusted?
    By craigrobbo in forum Rails, Guideways & Bearings
    Replies: 6
    Last Post: 10-08-2012, 02:52 PM
  2. FOR SALE: 25mm Linear Slide bearings
    By D-man in forum Items For Sale
    Replies: 4
    Last Post: 28-11-2010, 05:14 PM
  3. BUILD LOG: Magnetic slide of Z-axis
    By Constantine in forum DIY Router Build Logs
    Replies: 4
    Last Post: 08-11-2009, 08:56 PM

Bookmarks

Posting Permissions

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