. .

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Things like this would be nice to copy out to a tutorial section for future reference as stickies
    ..Clive
    The more you know, The better you know, How little you know

  2. #2
    Not sure if this a good advert for Kflop or not.? Certainly not for the beginner.! But well written.
    Last edited by JAZZCNC; 12-02-2017 at 11:27 AM.

  3. #3
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 16 Hours Ago Forum Superstar, has done so much to help others, they deserve a medal. Has a total post count of 2,990. Received thanks 374 times, giving thanks to others 9 times.
    Quote Originally Posted by JAZZCNC View Post
    Not sure if this a good advert for Kflop or not.? Certainly not for the beginner.! But well written.
    It's certainly not a simple bit of kit, however I have seen a few complete beginners manage to get some quite complex systems up and running, with not that much help. It's one of those things, that if you want to learn how to get it working, you will, and you could say the same about most controllers if you've got no experience.

    Saying that, this is one part of setting up that would really benefit from a video showing the actual process, as once you know the process, it's not that hard.
    There are a few Dynomotion videos showing specific parts, or for specific boards. The KStep Introduction video, from 3:55 onwards shows the software process - https://www.youtube.com/watch?v=pW-9fDLAn2s
    Avoiding the rubbish customer service from AluminiumWarehouse since July '13.

  4. #4
    Well, I use Kflop and I was a complete beginner, my only coding experience was with Arduino which operates on a kind of simplified version of C.

    I first found it daunting. But I will say this, you don't really need to know the C language to make it work, you just need to apply a bit of common sense and spend time reading forum posts and reading the instructions. I requires real determination and patience and I fear that a lot of people will give up, which is a shame because it's a fantastic controller card.It's by no means a plug and play card.

    My breakthrough was when a friend sent me a basic set up file for the three motors. Very basic, but enough to get the motors going. In fact, Kmotion already includes a simple configuration file that can be used. But it is a convoluted program, you have to go from one window to the other and then back again. For instance, if the axes are disabled due to an e-stop, you can't switch them back on from within the CNC program, you have to open another program to enable the axes back again. They should amalgamate the two main programs (KMotion and KMotionCNC) into one.

    But, like a lot of applications, suddenly it all starts to click and make sense, and it is not difficult to add some lines of code to the basic init file as you build up the system.

    There are quirks, for example, you don't upload to the drive, you download. To reverse motor direction you set up your Gain to -1....then most of the program settings are calculated in inches, although you can work in metric when it matters.

    It is a very powerful and very stable controller, but it could do with some simplification for the novice, without losing the ability of tweaking and adding once you gain the experience. I think most Kflop users have needed some help at the beginning either from the very helpful owner or from other kind users.

    As for Dean's comment, he is spot on, you need to put yourself on the side of the novice to understand that even the very detailed information in M_C's post is just too daunting and a lot of people will say, the hell with it, I want a controller that works first time without all that coding palaver!

    Edward

  5. #5
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 16 Hours Ago Forum Superstar, has done so much to help others, they deserve a medal. Has a total post count of 2,990. Received thanks 374 times, giving thanks to others 9 times.
    Quote Originally Posted by Edward View Post
    Well, I use Kflop and I was a complete beginner, my only coding experience was with Arduino which operates on a kind of simplified version of C.
    Arduino uses C++ (C plus plus), which is a higher level version of C. The other major version of C is C# (C sharp), which is a higher level yet.
    However they all use fairly similar coding techniques/layouts, so experience of any is a benefit.

    My breakthrough was when a friend sent me a basic set up file for the three motors. Very basic, but enough to get the motors going. In fact, Kmotion already includes a simple configuration file that can be used. But it is a convoluted program, you have to go from one window to the other and then back again. For instance, if the axes are disabled due to an e-stop, you can't switch them back on from within the CNC program, you have to open another program to enable the axes back again. They should amalgamate the two main programs (KMotion and KMotionCNC) into one.
    KMotion is solely for configuration. KFlops are not solely designed for CNC use, and KMotion contains the functionality to configure and program KFlops to run standalone, or via software.
    KMotionCNC is just a PC program to use the KFlop as a more conventional CNC controller. The full source code is provided, so if you really want, you can edit the source and recompile it.

    Dynomotion provide a pretty comprehensive library for creating your own software, along with example programs for all the possible software interfacing methods (A quick scan of the directory shows Virtual Basic, C, C#, LabView and Python). The only things that are not publically provided, are the base programming for the KFlop, and the source code for the firmware and the various DLLs/dotNet framework which provide the software interface.

    The key to setup, is to get a basic init.c file created as quickly as possible, then add to it as you get things configured. Taking your example about re-enabling things after an EStop, you could create a very simple init.c that simply turns outputs back on. I didn't have that problem on this machine, as during setup the EM806 drives default to enabled, but it would be a simple case to add a SetBit(xx) command to your init.c to activate the output for your drive enable.
    I'll expand more on the general C program framework I use for my machines when I get time, as all I've posted so far is the bare minimum to get machine movement. Things have expanded quite a bit since that basic file, as E Stop monitoring code and tool changer code has been added. I'll also discuss how I use the multiple program threads.

    There are quirks, for example, you don't upload to the drive, you download. To reverse motor direction you set up your Gain to -1....then most of the program settings are calculated in inches, although you can work in metric when it matters.
    The whole download/upload thing is actually quite common in the programming world, but there is no hard and fast way to know. My day job is dealing with vehicle diagnostics, and it can be a nightmare. Ford programming software you download software updates, and upload configuration data to ECUs. GM/Vauxhall you upload software to ECUs and store configuration data. Mercedes you download updates to ECUs, and then set parameters.
    The best way to think of it is the KFlop is the server, so you're uploading to it, and downloading from it when dealing with motor parameters. Off course, then you download C programs when you want to run them..

    The whole imperial thing is my biggest gripe with KMotionCNC. It's natively written around inches, so if you are going to be changing between metric and imperial, you have to allow for the fact that the tool table is unitless.
    Avoiding the rubbish customer service from AluminiumWarehouse since July '13.

  6. #6
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 16 Hours Ago Forum Superstar, has done so much to help others, they deserve a medal. Has a total post count of 2,990. Received thanks 374 times, giving thanks to others 9 times.
    So getting back to the mechanics, the spindle was stripped, and rebuilt with new bearings and fresh grease. I only took one photo of it, which is this one, showing the spindle removed, but the lower bearing, and lower bearing retainer still on the spindle.



    The process goes something along the lines of-
    Remove drawbar cylinder.
    Unbolt top support bearing and housing, and extract using bolts into the threaded holes provided for the purpose.
    Remove spindle motor and drive belt (you have to unbolt the motor to get the belt of)
    Remove notched adjustment nut, along with locking tab ring.
    Unbolt the lower spindle bearing retaining/seal plate.
    Knock/press the spindle down out of the head assembly.
    Pull the lower bearing of the spindle.
    And reassemble in reverse.

    After reassembly, you need to preload the bearings. The method used by Denford was to adjust by feel.
    Now as I deal with things like this occasionally, I've got a reasonable idea of how a preloaded bearing should feel, but I'll give some tips for those who've never done it before.
    Once you have the spindle assembled, with the adjustment nut on, nip the nut up. Then using a hammer and punch on the top face of the nut, give it a tap at various points around the nut. Nip the nut up again.
    Now using a block of wood on the face of the spindle, give it a couple taps upward, before seeing if you can get anymore movement on the nut.
    Repeat a couple times until you're happy things are settled, with no more movement on the nut.
    What this does, is help ensure everything is seated correctly. Given the interference fit of parts, it's very possible that you could preload the bearings, but without something seated correctly. What that would mean, is that you rebuild everything, and then after a period of time (it could be after a few minutes, or even a few months), the whatever it is will settle in, your preload disappears and you end up with a load of spindle run out, where it's flapping around in the bearings.
    At this point I gave the spindle a good few spins to help work the fresh grease out from the bearing tracks.

    Now taking a DTI mounted on the head (so any movement in slides doesn't affect the reading) and set against the side of the spindle, using a best guess effort as too how much pressure the spindle is likely to see, I grab the top of the spindle and pull/push it in the direction of the DTI needle.
    I then adjust up the lock nut until I'm getting minimal movement. I spin the spindle a few times, give things another tap with the hammer/punch/block of wood, and recheck. Once no more adjustment is needed, I spin the spindle by hand. I then adjust up the nut until I feel a very slight bit of springiness just as the spindle starts to move. Once again, I give everything a tap, and recheck. Once I'm happy, I bend a locking tab into a notch.

    The real proof in whether you've got it right, is in the running.
    Once you get the motor back on, you should run the spindle at a lowish speed (I opted for about 500rpm) for 10-15 minutes to let the grease work it's way out from the bearing tracks, while also monitoring the spindle temperature.
    If you run the bearings too fast too soon, they can slide on the grease, which results in premature wear and even causing flat spots on the bearings, which will lead to vibrations and poor cutter finishes.
    If everything sounds OK, gradually ramp the speed up, allowing maybe 5 minutes at every step (I went up in 500rpm steps), while monitoring the temperature. If you've got the preload within acceptable limits, after an hours running the spindle/housing should of warmed up, but you should still be able to keep your hand on it. If at any point you can't keep your hand on it, you've got too much preload, so stop it and slacken the adjustment nut of a notch. If on the hand it barely warms up, you've not got enough preload, which means you're most likely going to get a rubbish finish on parts as the spindle/cutter deflects while cutting.
    Avoiding the rubbish customer service from AluminiumWarehouse since July '13.

  7. The Following 2 Users Say Thank You to m_c For This Useful Post:


  8. #7
    m_c's Avatar
    Lives in East Lothian, United Kingdom. Last Activity: 16 Hours Ago Forum Superstar, has done so much to help others, they deserve a medal. Has a total post count of 2,990. Received thanks 374 times, giving thanks to others 9 times.
    Now basic machine movement was possible, the next step was the tool changer.

    First thing was to wire up the various sensors and relays, which brings me onto the subject of the possible methods for wiring up such things.
    Do you switch the positive, or negative side of relays/solenoids?

    As I'm using a Konnect board which has individual opto-isolated outputs cable of switching a fairly substantial load for an interface board (250mA @ 30V max), it gives a good amount of flexibility.
    However, some controllers will have output banks grouped, and sharing positive supplies (likely to be described as PNP outputs), or sharing a negative supply (NPN style outputs).

    Either will work, but switching the positive feed does usually provided an extra layer of safety. Should a wire short out to ground i.e. chaffs through on the chassis anywhere, then the output should just stop working. It may damage the output chip/transistor/FET on the board due to overloading the output, but at least whatever that output controls should stop working.
    The flip side is if you were to switch the negative side, and the wire was to short out, whatever that output controlled would remain active.

    And as we're on outputs, I'll cover inductive loads. An inductive load is pretty much anything that involves some form of electromagnet, which covers solenoids, relays, and motors.
    These all provide a couple problems for controlling them. First, they will usually cause a surge of current on activation, usually followed by a voltage spike on deactivation.
    A typical 250mA output will usually quite safely handle a standard icecube sized relay (IIRC they have a constant coil consumption of around 70mA at 24VDC). The switch on spike will be multiple times that, but for CNC use, this is the size of relay expected to be used for interfacing purposes.

    However the bigger problem is during disconnection. When you disconnect a relay coil, the magnetic field not only quickly collapses, but as the solenoid moves back (remember a relay is essentially a solenoid operating a spring loaded switch), it also affects the magnetic field. Uncontrolled, this sudden change in magnetic field will cause a voltage peak of several times the rated relay coil voltage, with a reverse polarity of the voltage that was previously applied.
    This surge can very quickly kill electronic outputs, but not only that, it will produce a spike of electrical noise.
    The solution is simple. You add a reverse fly back protection diode to the relay coil terminals. This doesn't have to be anything fancy (I use 1N4007 - 1A 1000V rating as that's what I usually have in stock), and you connect it so that the cathode (end marked with a ring) is on the positive side of the coil. It should also be mounted as closely to the relay as possible, which is why they are rarely incorporated into the interface board.
    During normal power, the diode does nothing, but when power is removed, and the reverse voltage spike starts to build up, the diode causes the energy spike to recirculate through the relay coil, where it will safely dissipate.
    Avoiding the rubbish customer service from AluminiumWarehouse since July '13.

  9. The Following User Says Thank You to m_c For This Useful Post:


Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Denford Triac - Help
    By mikeadams1985 in forum Denford Mills
    Replies: 1
    Last Post: 12-01-2017, 10:06 AM
  2. FOR SALE: Denford Triac CNC PC
    By ricey3 in forum Items For Sale
    Replies: 6
    Last Post: 10-01-2017, 01:39 PM
  3. Denford Triac VMC
    By fidia in forum Milling Machines, Builds & Conversions
    Replies: 6
    Last Post: 19-08-2016, 08:18 AM
  4. Help Denford triac p.c.
    By mikeulike in forum Denford Mills
    Replies: 3
    Last Post: 02-06-2015, 03:59 PM
  5. WANTED: Denford Triac
    By edwardsjc in forum Items Wanted
    Replies: 13
    Last Post: 20-08-2012, 08:17 AM

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
  •