The quality of your suggestions is always humbling. There's certainly enough interest to pursue this a little further. Thank you.
@michaelalcocer6778
3 жыл бұрын
I have DMM servos as axis motors but am seeing a delay in encoder response back to linuxcnc of 5ms. This creates issues with servo tuning, over current faulting and synchronized motion with multiple axis. This is in speed mode with analog control. Could you do a halscope of your spindle comparing the velocity command and encoder feedback. I am curious if this delay is consistent throughout their product line.
@kentvandervelden
3 жыл бұрын
@@michaelalcocer6778 Check out the following links and let me know if I can be of any more help. My dyn4 is connected to a Mesa 7i76e and configured for AB-phase in position mode. Looks like there is a delay before starting from a standstill. The delay in responding to a change in speed, including going to a stop, looks like the control loop ramping up. kvvcreates.com/shared/dmm_dyn4_starting.png kvvcreates.com/shared/dmm_dyn4_increasing.png kvvcreates.com/shared/dmm_dyn4_stopping.png
@michaelalcocer6778
3 жыл бұрын
Awesome. Thank you for the help. I am having similar response but for an axis movement that delay is not acceptable. It is causing tuning and sync issues. Picture the start of a 2d move with one axis already moving, second axis 5ms behind planned. DMM states it should only be 50us behind so there is a significant difference between the advertised value and what's actually happening.
@kentvandervelden
3 жыл бұрын
@@michaelalcocer6778 Any chance the enable line to the drive is not left enabled? I would guess the slow response in the _starting.png is from the enable line going high. I would hope you would seem something more like the _increasing.png image and could tighten up the response with control tuning on the drive. I get what you are saying and it can cause trouble on a spindle. The BLDC drive on my lathe takes ~5 secs to respond to an enable, during which time the LinuxCNC PID is raking up integral error. I need to find a way to delay the PID or reset the Ierror, maybe a timedelay on the enable of the pid component. If you have a suggestion, let me know. Best of luck fixing your drives. There must be a solution because others are using these drives for axes motors.
@michaelalcocer6778
3 жыл бұрын
@@kentvandervelden yes the drives are enabled. All of the examples of people using these drives on axis successfully is in position mode. When in analog mode with linuxcnc closing the position loop this delay creates issues. Basically linuxcnc keeps asking the drives to accelerate since the encoder says they aren't. At high speeds they over accelerate and fault out. I was working with DMM but they stopped responding with suggestions and there are no settings that change the behavior. In position mode it's a non issue.
@Ryan-dz3jo
3 жыл бұрын
Fantastic video and concepts, thanks for sharing your progress and tests
@kentvandervelden
3 жыл бұрын
Thank you Ryan. There are a lot of interesting ideas from the olden days that just didn't make it into our CNC controllers. I've been clearing out a backlog of projects, but plan to get back to videos soon.
@westweld
3 жыл бұрын
Very cool Kent idiot proof feeds and speeds would make my life much easier.....Im working on my first cnc machine just a plasma table but baby steps I've had a 3d printer for about a month now so im pretty much a professional ha......nice work Kent always blows my mind what you can do
@kentvandervelden
3 жыл бұрын
Thank you Aaron, I have respect for what you do, running a business. I'm only trying to apply what I know to what I enjoy learning about. I tinkered a while with a CNC router, I'll get back to it, so will be watching what you do with your CNC plasma. Peace
@daviddenning4002
3 жыл бұрын
Absolutely great work! I use LinuxCNC for my Bridgeport conversion and a small lathe conversion. I would be very interested in seeing more.
@kentvandervelden
3 жыл бұрын
Thank you David. What motor drives and controller boards do you use? I'm thinking about how one would adapt this for other drives. Would be nice to make that simple as possible.
@daviddenning4002
3 жыл бұрын
@@kentvandervelden Kent, I am using 220VAC 3 phase motors and VFD for both of my machines' spindle. The lathe is using a TECO 1HP VFD and the mill is using a 2HP Mitsubishi D700. I don't know how I would get the Realtime torque from the VFD into LinuxCNC for monitoring? I see that you are using DMM AC servo for you setup. I assume you have a RS485 port that you are using to read the load?
@kentvandervelden
3 жыл бұрын
@@daviddenning4002 That's right, I use the the RS485 interface but if buying again, I would order the faster CAN bus option (though the cost of the Linux CAN bus interface would cause some hesitation.) Do your drives have analog outputs? The basic Fuling VFD I use for the high speed spindle, has an analog output that can be use to feedback current, load, etc. Would need to test how responsive it is... With this one could feed that signal into a Mesa card analog input, if the ADC resolution is good, and right into a PID control. That's probably what Samcoinc is doing in his videos. Search for his name and adaptive feedrate and he has a couple more examples.
@lordmiqu7252
3 жыл бұрын
Awesome!! That is extremely useful. It's important to make hobby cnc more accessible to everyone
@kentvandervelden
3 жыл бұрын
Thank you, could be a meaningful and fulfilling goal to pursue.
@ZURAD
2 жыл бұрын
Dude, awesome. This is exactly what I needed to know. I'm going to be trying some of this with ECM stuff
@kentvandervelden
2 жыл бұрын
Your work is pretty fantastic! More people should check it out. Thank you
@ZURAD
2 жыл бұрын
@@kentvandervelden Thanks, Kent. Hopefully it ends up making things easier for people.
@TangentAudioVideo
3 жыл бұрын
Kent, it's great to see that you're working on an innovative area of R&D for hobby CNC machining. Cool stuff!
@kentvandervelden
3 жыл бұрын
It's really nice to hear that from you! I remember being floored by your FPGA CNC controller video. I want to keep experimenting with controller and machine analytics. That may be an area I can contribute something. I just purchased a roughness probe to help with the research. Thank you for commenting and have a wonderful week!
@MrKurdishFreak
3 жыл бұрын
Thats awesome. I would love to see other people, especially beginners, use this with their cnc mill. I am interested in their experience using this system.
@kentvandervelden
3 жыл бұрын
Thank you Aleksander. Today, it's too hacky to be used by others unless they have a similar setup, or want to do a good deal of experimenting and coding. What's needed, beyond the drive interface code, is automatic tuning to eliminate the experimenting. I've only tested this with aluminum and other materials might have different stall predication signatures. It would be nice to get similar safety features into an easy to use controller. I really need to see what other UI options exist for LinuxCNC.
@MrKurdishFreak
3 жыл бұрын
@@kentvandervelden If you would be serously interested to release this for others with the same setup, I could help you woth the UI. I have thought of making an UI overhaul of lInuxCNC, especially because I have seen that it now supports PyQt, which I already have worked with on multiple projects. This was a project I proposed to my last employer, so I have prepared some analysis on the UX Design of CNC controls for mills.
@kentvandervelden
3 жыл бұрын
@@MrKurdishFreak It's already on GitHub, though incorporating the suggestions received, I could do better starting from scratch :) I would be able to hook into just about anything, C or Python. If you want to design a better UI, just leave a little space for me. I'd be glad to add something in to or help test a UI.
@BecomingOffgrid
3 жыл бұрын
Love your videos Kent!
@kentvandervelden
3 жыл бұрын
Thank you for your support Donny! I just sent you an email. I hope you received it. Best wishes
@BecomingOffgrid
3 жыл бұрын
@@kentvandervelden I surely did!. Keep up the great work with LinuxCNC!
@simonconvey9645
3 жыл бұрын
Wow.... I'd never thought of that. Shame that timing introduces poor response. How about a upon stall detection, you not only slow / stop the feed, but upon resume, back the feed off a few percent, a second level of backoff if you will. But the idea that struck me as absolutely brilliant is a preferred feed speed per tool. So much you could do with that. Is the current depth of cut available to the module ? Some maths with feed rate / DOC and the energy required may prove fruitful ? A full PID loop controlling feed rate with calculated parameters from energy required for the cut ? This is such a good idea....
@kentvandervelden
3 жыл бұрын
Hi Simon, for a first attempt it does seem promising. What I didn't show was the long pause before pressing the Go button to purposely create a crash :) The gummed up endmill came from several quick full-speed bursts with relatively long pauses with the tool rubbing and heating up the metal. Restarting slowly sounds like a great idea! Thank you for the suggestion.
@BreakingTaps
3 жыл бұрын
Very cool work, great job! ++ to continued development, would be interesting to see it smoothly vary the feedrate (and/or spindle speed) rather than just on/off control. Might also be interesting to see how it fares on small tools, since they are so much easier to break... but maybe more difficult for the servo to notice in time though? Great stuff as always! :)
@kentvandervelden
3 жыл бұрын
Great to hear from you Zach, and I hope the new year is off to a great start for you! My guess is that small tools, let's say less than 1/4", will be lost in the measurement noise. My little mill can't break a 1/2" end mill so started there :) The binary appearance could be improved by decreasing the P value in the control loop: P=0.2 starts the adaptive feed 5% short of target, P=0.1 would be 10% and so on, but that will start slowing feed down earlier than needed. The torque sampling rate can't increased with the current hardware. I believe the required sampling rate, to improve response, can be estimated, given a feed rate and spindle speed and material.
@diekiedurand7429
3 жыл бұрын
Very good! I will follow this 👌 💯
@kentvandervelden
3 жыл бұрын
Thank you for your interest! I hope to have something cool to share in a couple of weeks :)
@billstrahan4791
3 жыл бұрын
Fantastic work! This could potentially make sharing mill resources much safer. Think MakerSpace and other co-ops. If it was always set to simply stop at some % of spindle load the likelihood of doing a TON of damage to the VMC decreases substantially. Tons of other uses as well, just great stuff overall!
@kentvandervelden
3 жыл бұрын
Thank you Bill, that is a great application! And I never would have thought of it. Of course schools too. The chief operator or teacher could load up the limits based on the experience level of the operator. I only have experience with small CNC machines, LinuxCNC, and Mach. I saw the Haas has AutoFeed, which has a lot of options. Maybe all the big controllers have adaptive feed?
@billstrahan4791
3 жыл бұрын
@@kentvandervelden The little bit of experience I have tells me that this is very uncommon. LinuxCNC is fantastic in lending itself to this type of thing. Will you be looking to incorporate this into the future versions of LinuxCNC or are you going to release your code?
@kentvandervelden
3 жыл бұрын
The code is on my Github, but it's pretty specific to my setup or at least to DMM DYN4. It's written to demonstrate the ideas, not to be a simple install, but anyone could experiment with it. A couple external Python modules and some HAL code. It would need to be made much more automatic or easy to tune to be in LinuxCNC, but maybe in the future. Thank you
@billstrahan4791
3 жыл бұрын
@@kentvandervelden Awesome! If you think you'll leave it available for the foreseeable future I'll bookmark it and make sure my son knows about it. He's digging into LinuxCNC for the first time.
@kentvandervelden
3 жыл бұрын
@@billstrahan4791 The code will stay to support the video, especially if someone wants to dig into it. Most of the time, viewers have better ideas then me. Github is pretty nice, and I can easily share updates that others add in. Thank you
@Lordssodier
3 жыл бұрын
Great project!! Subscribed!!
@kentvandervelden
3 жыл бұрын
Thank you for the support :)
@justinwhite9535
3 жыл бұрын
Great idea Kent! I'd be inclined to try to achieve the same result by using a PID with it's output connected to the adaptive-feed pin. The Spindle speed would control the PID loop and the PID control the adaptive feed. A servo running a spindle is running in "velocity mode". A speed deviation in a velocity mode drive is the cause, the effect is the increase in torque which is measured by current. The DMM drive is handling the velocity control by manipulating current output but the current change is a reaction to the velocity deviation so controlling anything based on current will lag somewhat. Tracking spindle encoder speed directly with LinuxCNC and feeding it into the PID will allow it to react with adaptive feed overrides faster than measuring anything else with any other means of communication. The PID would have to be setup to react to very small deviations in current-speed vs requested-speed. PID tuning would be a bit tough but I expect it would work very well. I've never thought about using adaptive feed but I might have to give this a try when I get a chance.
@kentvandervelden
3 жыл бұрын
Thank you Justin, this is a great idea! I understand what you are saying about the DMM control loop. I would want to experiment with target loads on small endmills. I currently use a control loop to drive adaptive-feed, though AF is limited to the range [-1, 1]. Maybe with some scaling and shifting one could get to values greater than 1? At least my plan for increasing the feed rate to get closer to the target load was to instead manipulate the feed override. The remaining advantage of AF is the potential to back off slightly with a negative AF. An external module was easier for me to incorporate information from other sensors, like the axes motors, though perhaps at the cost of responsiveness?
@justinwhite9535
3 жыл бұрын
@@kentvandervelden "motion.adaptive−feed IN FLOAT When adaptive feed is enabled with M52 P1, the commanded velocity is multiplied by this value. This effect is multiplicative with the NML-level feed override value and motion.feed−hold." It's a float pin so if the Axis were commanded 15ips and the adaptive-feed pin were driven to 0.5 then you would halve the commanded axis speed. I haven't tried using it at all so grain of salt but 1 should be treated as 100% and the full scale rach should be available being that it's a float. Not sure there is any use for the negative value, I think it's a limitation because unsigned float doesn't exist as a pin data type, I would assume a negative AF would be treated as 0 since I don't really see how a negative AF would work. AF should be meant to reduce the axis speed only, it's exposed with an Mcode so it needs to conform to what they intended for the Mcode. As you said halui.feed-override is more scalable so maybe you just want to use that? AF and FO are part of the same calculation just exposed in different ways so you should be able to just leave AF alone and work on FO. Otherwise being a programmer I'm sure you can just modify the source of the motion component to allow higher than 1 for AF. I modify hal components all the time and recompile if I need a different pin data type or a I need a parameter to be a pin and I barely know what I'm doing lol. How are you reading the spindle current to the controller? Are you doing this over serial? Poking at the drive over serial is gonna be super slow. Everything involved in this has to be real-time. If you aren't already I'd use the drive's analog current output pin to one of the Mesa cards higher resolution analog inputs if you really want to use current to control the loop. If you want to keep your loop logic over using a PID you can even just write a RT hal component being selective with your control functions and interact with a slimmed down version of your userspace module with hal pins. Ive worked with a friend several times to write custom hal RT components and I swear by them for speed and convenience.
@kentvandervelden
3 жыл бұрын
Negative adaptive-feed is for backing off. Seemed liked the original use for it in LinuxCNC might have been for plasma cutters to avoid tappered cuts. Using AF was easier for this demo to be fed by a PID control loop, than FO which has a UI component, but FO is what I had in mind for testing > 1 feedrate multipliers. Thank you
@knires9210
3 жыл бұрын
Similar, but this is why I love G95 on a lathe. No RPM on the encoder, no feed. I always wondered why programming in feed per revolution wasn't more popular on mills.
@kentvandervelden
3 жыл бұрын
That's very interesting. What I do is relatively convoluted: use a program to convert desired chip load into a feedrate, or the reverse way. I have an intuition of chipload but not IPM. I might be a G95 convert. Thank you for the suggestion.
@Auguste88
3 жыл бұрын
Very cool feature!
@kentvandervelden
3 жыл бұрын
Thank you for your support :)
@MakersEase
3 жыл бұрын
Awesome! For the little time I played with it - I also found the loop to be a bit excited...
@kentvandervelden
3 жыл бұрын
The worst thing about the Internet, is whenever one has a "brilliant idea" Google and KZitem always humble one by showing that someone else has already done their idea, generally better, at least a year earlier :) I hope I pronounced your name right. You do amazing work that more people need to see. Thank you for commenting :)
@MakersEase
3 жыл бұрын
@@kentvandervelden you are too kind. I bounce from one idea to the next without really finishing. People like you can actually focus and see things to a finish. Thank you!
@RUNCNC
3 жыл бұрын
what a great idea!
@kentvandervelden
3 жыл бұрын
Thank you :)
@stefanhertweck
3 жыл бұрын
Hello Kent. This is a great and very useful project. A schematic picture showing the design/component setup and the integration into the linux system might be of interest and helpful. Thx. Stefan.
@kentvandervelden
3 жыл бұрын
Thank you Stefan, you're right, a diagram would help a lot. It's such a simple thing to do, but I overlooked it.
@routercnc9517
3 жыл бұрын
Nice work Kent. To be honest from the thumbnail I was expecting this to be about adaptive (trocoidal) machining of the type which worked out by the CAM software. But this was much more interesting and needs to be seen by other hobby CNC machinists. Maybe a better thumbnail ? Nice work anyway!
@kentvandervelden
3 жыл бұрын
Ah, adaptive clearing! This video I especially struggled to pick a thumbnail. Then used an old academic term confused with adaptive clearing, so twice bad. What would you have put? And thank you :)
@routercnc9517
3 жыл бұрын
@@kentvandervelden maybe “Adjust feedrate on the fly” Thumbnail could be several stationary end mill images with blurred versions of them in between? Don’t know just a thought. I had a less sophisticated idea a while back taking a spindle speed measurement directly off a spindle tacho sensor and running it through an arduino linked to feed hold or estop. It would monitor spindle speed and trip if speed dropped quickly (prevent end mills breaking in aluminium). But I never built it.
@kentvandervelden
3 жыл бұрын
@@routercnc9517 That's a pretty cool idea, you should build that. Maybe for the router or especially for the drill press. An irritation I have with drill presses, even with a fancy Albrecht chuck, having the drills slip and get torn up. Maybe the spindle speed drops before the drill starts slipping? Have a great weekend!
@DanielWood
3 жыл бұрын
Amazing work! Such a great idea.
@kentvandervelden
3 жыл бұрын
Thank you Daniel :)
@petergamache5368
3 жыл бұрын
I've used LinuxCNC with everything from a little Sherline mill to a 5HP 5' x 10' wood router. This would be useful on both and everything in between! Perhaps one answer to the bang-bang oscillations might be to come back "on" at 80% of the previous feedrate, then slowly ramp back to 100%. If another impending stall were detected during the ramp-up, that 80% would be lower than the first time, since you'd target 80% of the *running* feedrate - not the commanded feedrate. (and maybe PID is a better way to solve this - I don't have experience with the PID module...)
@kentvandervelden
3 жыл бұрын
Thank you Peter. I use a PID control loop now and maybe with more tuning results would improve. What you are suggesting may be superior, I think, a piecewise linear function. For variable, infrequent, must not overshoot, and must be easy to setup arrangements, you probably have the best idea. This may be what Haas AutoFeed uses, which has controller parameters for the step-up or step-down amounts. Thank you for the suggestion!
@katemoon7476
3 жыл бұрын
Another reason for this is because Fusion360 now slows down your code so you don't have rapids. You could just set a high feedrate and then let the PID loop deal with the correct speed and then it would rapid when you need rapid and feed-rate when you need feed-rate. Cool!
@kentvandervelden
3 жыл бұрын
CAM should be improved to help get feed rates close since it knows pretty well the metal removal rate, material, and tool information. CAM could estimate tool load to avoid breaking and try to maintain MRR near the spindle capacity. These are then optimized with adaptive control The sensing-response latency might be too slow in general. One wouldn't want to rely on this for transitioning from high to reasonable feed rate. And might not be so useful for small tools, where the measurements are below noise floor. A company that decided to do these improvements would have something pretty useful.
@user-fy8lg9eh5o
3 жыл бұрын
Great work!
@kentvandervelden
3 жыл бұрын
Many thanks :)
@NuttyforNissan
3 жыл бұрын
The answer maybe in the spindle speed controller can you monitor phase angle instead of current I believe electronic overloads look at this because it's more accurate and reacts earlier, if you could slow the feed just a little earlier you would be onto a winner.
@kentvandervelden
3 жыл бұрын
This is a very interesting suggestion! The servo drive does not support phase monitoring, but I have considered external monitoring. I've done the basic one current probe one voltage probe, but was unsure of the need of monitoring all three legs vs. one and assuming near balance. But you're not suggesting imbalance, but just phase difference, and I can probably test that now. Thank you for the recommendation!
@westweld
3 жыл бұрын
Hey Kent haven't seen a video for awhile hope you are doing well.
@kentvandervelden
3 жыл бұрын
Thank you for asking Aaron. Dad died earlier this year. He was far more capable than me and it's taking time to figure out the new routine. We might need to get through an entire year to understand all Dad was doing.
@westweld
3 жыл бұрын
@@kentvandervelden im sorry to hear that Kent hang in there man I'm sure you'll get it figured out.
3 жыл бұрын
*your channel video is very good, welcome to your channel fans*
@janbeck8269
3 жыл бұрын
Awesome!
@kentvandervelden
3 жыл бұрын
Thank you Jan :)
@janbeck8269
3 жыл бұрын
@@kentvandervelden I occurs to me that you could probably make a simple PI loop, or perhaps just a P loop around the system. You are sort of doing that, but the response has an essentially infinite P parameter resulting in a 0/100% response. Kind of like using a linear scale in an outer loop to correct for ball screw deviation. Except don't use velocity or position, but spindle power. At least for the restart. Then, after one sudden stop, the thing would continue at max power at least as long as the cutting load does not change. Again, awesome work. Thanks for sharing!
@kentvandervelden
3 жыл бұрын
I believe that I'm following, and sounds like it would help stop and restart. The inputs to the current control loop are scaled so that P=0.2, gives a change from 1 to 0 (the positive side of LinuxCNC adaptive feed) over 0.95xSetpoint to Setpoint of peak spindle torque (P=0.1 for 10% range, and so on.) The torque measurement is pretty noise, shown in the graphs as the blue dots. I'm using the median of most recent 20ms of data, if I remember right. The other line is the absolute torque over the same time. In the graphs, one curve stays near zero when the spindle is freerunning and the two curves converge as the spindle starts doing work. The response could be slowed down or start slowing down earlier and follow a logarithmic curve to more gently slow the feed rate? How many times will I get to tinker before breaking the tool... I try to play recorded data back to estimate parameters, but behaviors quickly differ.
@chrisgough5523
3 жыл бұрын
As a novice machinist, it's really cool to think about adaptive control from the perspective of usability (crash-protection) rather than industrial optimisation. My practical question is: But my spindle is not driven by a servo, could this be done from a VFD? My less practical one is: Imagine you had a vision system capable of evaluating surface finish (surely just a small matter of software, right? ;-), plus maybe an accelerometer or microphone in the system, do you think reinforcement learning could be used to build models that optimise feeds for a given surface finish? I should probably be satisfied with crash avoidance but what can I say, your experiment is inspiring.
@kentvandervelden
3 жыл бұрын
Hi Chris, thank you, there's a lot to your comment. This could be done with VFD just as well. Many drives (including VFDs) have a signal reporting load as 0-10v. This could be fed directly into LinuxCNC's adaptive control, although simpler than what I showed, joining of other signals and feature recognition is lost and I suspect tuning will be harder. I've dreamt of doing the machine vision experiments you suggest but have not had means to compare to a standard, but this week I bought the equipment to measure roughness (and hoping to get an approximation of waviness.) Realistically, probably months away from demonstrating anything though. I don't know about reinforcement learning. I've sell a product to plant researchers that uses DL for image segmentation and recognition. In fact, the next project for a video uses a u-net. But if you recommend RL, I'll check it out. Yeah, I do think there's a lot of low hanging fruit available applying machine learning to machining, metrology, control systems, and so on. The thing that's crazy is that so much research into rapid development of technology for CNC in the 50-70s, but the really cool stuff didn't make it to DIY CNC. I'd like to help with that, at least on the software and sensors side. Having people like you interested is great motivation to keep publishing.
@chrisgough5523
3 жыл бұрын
There are so many permutations of tool, material and machine that supervised techniques (like you use to train u-net) seem a bit infeasible. So expensive to gather enough data to train them. But now you have a machine that know how not to crash, you should be able to run a Markov decision process (cut-measure-learn, cut-measure-learn, ...) that only consumes modest amounts of material when machine-time and scraps are available. When each data sample is expensive (costs material, machine time, tool wear, etc), much better that every sample is an educated guess based on all prior samples, rather than part of a broad survey of the parameter space. More like how you learn when awake and concentrating (reinforcement learning) rather than asleep and refreshing (supervised learning). Crash-avoidance is a relatively coarse task compared to poor-finish-avoidance, so if learning i's constrained by your current algorithm, crash-avoidance knowledge could transfer into a more sensitive model (that evaluates load and vibration). Maybe some kind of recurrent network that is sensitive to time-series rather than bouncing off a numeric guard rail. I have only played with this stuff (e.g. in OpenAI Gym), never a real application - am very far from being an expert. I might be suggesting something silly.
@kentvandervelden
3 жыл бұрын
The last U-net-like net I made required 2x7x12hrs of data prepping. I never want to do that again, but the results were amazing. Thank you, you given lots of paths to try than I could in a year :) One to try soon is predicting Ra with frequency analysis of vibration and cutting parameters.
@PiotrFoxWysocki
3 жыл бұрын
really cool! out of curiosity what is causing such a long lag?
@kentvandervelden
3 жыл бұрын
Happy New Year Fox! The fastest I can get current measurements is 200Hz and that's using some tricks are needed because of the latency in or near the USB FTDI driver. Buying new hardware, at least from DMM, I would order the CAN bus option. The signal is pretty noisy, so I filter using two methods over a 20ms overlapping sliding window. The two graphs show the filter results and you might have seen they converge when the drive is under load. The resolution of the graph depends on how much can be drawn in 20ms, so in realtime few points are drawn and during playback everything is shown but at ~1/4 the speed. There will be some latency between my code and LinuxCNC. And it all adds up. The binary appearing response, can probably be improved. I'm probably near the limit of what's practical with what I have at 40IPM, and unable to reach higher feedrates. There more to experiment with, but I wanted to post something before I broke something... I edited out the long pauses before pressing Go knowing a crash was going to happen :)
@PiotrFoxWysocki
3 жыл бұрын
@@kentvanderveldenHAPPY NEW YEAR !! :) yeah i was wondering about this binary response. I havent seen your code but i looks like it needs a range 85% load start slowing down and 100% cut out. one way or the other I'm sure it is doable and you will figure it out!
@kentvandervelden
3 жыл бұрын
@@PiotrFoxWysocki By adjusting the P of the PID the cut-in is changed. P=0.2 is 5%, P=0.1 is 10% and so on. 85% might be enough. I can run recorded data through simulation, but the longer it runs with different settings, the more deviation there is from a new recording, so simulation only so useful compared to broken tools. And thank you :)
@berendlucasvanderweide
3 жыл бұрын
Nice work Kent! Indeed, thin chips in aluminum tend to gum up pretty quick.You need to maintain a minimal chip thickness if you want to avoid this gumming.. A combination of decreasing the feedrate and RPM's would be the best in this particular situation combined with the 'full power mode' on your coolant setup.. :) Perhaps trigger a reset of this adjusted feedrate/RPM's if a G1 change in Z height is sensed. With the HAAS controllers you can set the limit per tool, this helps to prevent the machine from some programming errors and avoid tool breakage. Convenient for rigid tapping in my experience. Best way is to become familiar with the machines capabilities, take a look at the manufacturers recommendation for the tool, take a closer look at the needed spindle power/ torque (just discovered millalyzer.lophostrix.com/, seen on the NYCNC channel). Anyway.. Very nice project Kent.
@kentvandervelden
3 жыл бұрын
Hi Rene, it's great to hear from you! You have a great suggestion to also decrease RPM. Power would decrease proportionally, but so is the material removal rate. Should help a lot. I'll check out the program. Looks interesting and seems inexpensive if that's a one time fee. Thank you. And let's catch up soon
@davidwillmore
3 жыл бұрын
@@kentvandervelden I would worry that you will get positive feedback from that control system.
@kentvandervelden
3 жыл бұрын
@@davidwillmore That's really interesting, you're saying this would become unstable? Can a PID control loop have op-amp-like positive or negative feedback, if the setpoint and feedback are not added in phase? Large P values make a PID loop unstable, but is it positive feedback? It's amazing that such simple equations create entire fields of study. You'll appreciate this: I was tinkering with creating a process model so I could use a Kalman filter. The other thing is, it's hard to get a sense of intuition because of the small number of tests, how quick everything happens. Pretty cool though
@user-ld3re3sl9e
3 жыл бұрын
Hello this is very useful How can i make it work in my router?
@kentvandervelden
3 жыл бұрын
The code is available on Github, but it's specific to my setup. This video was a demonstration of an idea. I may try to make this more generic in the future with means to automatically extract crash features from recordings. Alternatively, if you are a coder you could look at the 1968 Bendix report or more recent adaptive control or adaptive feedrate papers. Some additional links may be found in my notes. Those links are in the description. If you do make something new, send me a link. Thank you.
@user-ld3re3sl9e
3 жыл бұрын
@@kentvandervelden thanks
@makosharkcnc7730
3 жыл бұрын
i don't know much about LinuxCNC i been using mach 3
@kentvandervelden
3 жыл бұрын
Before this mill, I had an Industrial Hobbies mill that used Mach 3. I switched to LinuxCNC for this smaller mill so I could tinker with the controller. For me, it was not easy to pick up LinuxCNC. But, there are manuals and experienced people on the forums who have written best-practices. When I stopped struggling against and adopted their methods, LinuxCNC became straightforward. But you the best guidance ever: If it ain't broke, don't fix it :)
Пікірлер: 99