Hello Guest it is May 09, 2021, 03:59:45 PM

Author Topic: Encoder motor control  (Read 5114 times)

0 Members and 1 Guest are viewing this topic.

Offline Jd

*
  •  10 10
    • View Profile
Encoder motor control
« on: May 04, 2010, 01:11:42 PM »
Hello this is my first CnC, I just finished converting my Millrite Mill to CnC, works sweet, cutting wood and metal. I built a A axis to do lithophanes and when I set up with PhotoVcarve and Wrapper and start cutting, I will start losing steps gradually and have come to the conclusion that moving a 18 lb Quill up/down with the short moves is to much for the Z stepper, I added a counter balance to the quill which helped and made sure quill is very free. As I said I canl machine metal parts and wood plaques with no probelms once I get proper feedrates set. Now to the meat, this is my busy season so time is short, I have built a rotary encoder and attached to puter, it reads fine on the Settings encoder screen ( will need fine tuned later) but what I need it to do is control my Z axis stepper so that lost steps do not affect the work, I can not find any way to do this in Mach3, and was hoping some one might know how or if it can be done in Mach3       John

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Encoder motor control
« Reply #1 on: May 04, 2010, 02:35:13 PM »
Only thing you can do is monitor the encoder and compare to the position and if out by a user set amount to throw a fault. To do that you would need to write a macropump or possibly a Brain.
Hood

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Encoder motor control
« Reply #2 on: May 04, 2010, 03:32:17 PM »
omid_king
afraid I am not clever enough to write a macropump for something like that, well, I could probably do it but my VB skills are so poor it would take me a long time to do it.
If you are determined there is a manual written by Himykabibble which  gives VB examples which may give you a start, you will find it here http://www.machsupport.com/forum/index.php/topic,12740.0.html

Hood
Re: Encoder motor control
« Reply #3 on: May 04, 2010, 11:36:36 PM »
Adding an encoder cannot magically "fix" and under-designed drive.  Your problem is your motor is too small for the load you're moving, and/or you're trying to accelerate too quickly, rapid too quickly, or "push" more than the motor is capable of.  The only fix for that is either backing off on what you're expecting the motor to do, or putting in a motor better sized to the load.

Regards,
Ray L.
Regards,
Ray L.

Offline Jd

*
  •  10 10
    • View Profile
Re: Encoder motor control
« Reply #4 on: May 05, 2010, 11:20:23 AM »
Hello Ray, thank you for the post as I stated in my original post my conclusion was that the problem was the stepper motor vs the mass vs the velocity I was telling it to move. The machine was well designed to do what I intended it to do and it does it well, not until I decided to try something that I had not planned on doing, during the design, did I exceed it's limits. I fully intend to upgrade all the motors and drivers but do not have the resources at the moment to rebuild the mounts, buy motors and drivers, build a new power supply and re tune motors. I was hoping that I could put a band aid on the problem until I could fix it. I also stated in my post to Hood that I am going to build a linear slide, Z axis to attach to my quill, the slide will have my Z stepper on it and the quill will only be used for a mounting point so that I may continue to use my X and A axis's as is designed right it would take me 5 min or less to revert back to milling with the quill. The slide will significantly reduce the mass allowing me to increase the velocity. I also intend to build a dedicated machine just for my litho's and can later use the slide on it, I also need to put the new machine in a separate area as the router head makes more noise than my EX. From a previous post I understand you wrote a manual on Macro pump / VB editing when time allows I will take a look at it as I want to do some other things that require VB editing. Do you Know of a screen for Mach3 that has the encoder DRO's and stepper DRO's on the same page?      JD     

Offline BR549

*
  •  6,952 6,952
    • View Profile
Re: Encoder motor control
« Reply #5 on: May 07, 2010, 03:00:42 PM »
As Ray said,

It would far simpler to just slow down the Accel and vel of your Z to stop the lost steps. Obviously you do not need the current setting for your normal work(steel,Alum) as you are not getting lost steps. I would try cutting the settings in half(50%) of your current settings and give it a whirl.

Mach will then slow down the process to the slower settings and hopefull avoid the lost steps.

The basic problem doing it with software is the Input update rate in mach is only 10hz the output rate of the steps can be very high. So it would be hard to keep the readings of the DRO and the encoders in proper sync reading wise. The rest is a piece of cake look at DRO and Encoder IF they are within a bandwidth ok IF NOT stop.



Hope that helps

« Last Edit: May 07, 2010, 03:04:52 PM by BR549 »

Offline Jd

*
  •  10 10
    • View Profile
Re: Encoder motor control
« Reply #6 on: May 08, 2010, 07:11:07 PM »
Sir Thank you  for the response, I have said I believe my problem is motor vs mass vs velocity, I counterbalanced mass which helped, I played  with accel and vel settings and it helped however my 20 min job went to 40 min, not acceptable. I accept that  motor control with encoder is not a option and have moved on to plan B of building a new Z axis that can be removed quickly allowing me to use mill in as designed and the new Z can be attached to a dedicated machine I designed just for these projects. I have asked about encoder control only as a possible band aid to the real problem. Since I have had a crash course about steppers, drivers, Gcode, Mach 3 and retroing my machine in the last 5 months, all responses have reaffirmed my confidence in my basic skills. I still would like to see a screen with stepper Dro and encoder Dro on same page as I am a visual person and am always going to play and push the limits  I would like to see a problem when a  job might be salvageable, this brings me to a point, at 55 I know that I do not understand everything I know, so I have a question for you. You state watch my bandwidth, now I am lost. Sir if you would please expand on  where  I would watch my bandwidth in Mach3 ?     JD       

Offline BR549

*
  •  6,952 6,952
    • View Profile
Re: Encoder motor control
« Reply #7 on: May 08, 2010, 09:16:46 PM »
Actually, looking back into some OLD notes  you can have an encoder monitor setup in "brains" to watch the error between the program position and the Encoder position. Then on error STOP.  

Setup a brain to monitor  OEMDRO127,127,129  AND IF the amount of error exceeds a set amount then FEEDHOLD. You could also add a brain to tell you which axis errored out as well.

NOTE: the dros #127,128,129 show the difference in position comparing the Program DRO verses the Encoder DRO. IF all is well then they would read the same as the machine moved

OR you could have it start a program that would stop mach, reset the machine to the encoder position then restart the program from where it left off.

BUT that is NOT going to help you in this case AS you will contantly be resetting the program due to erroring out.

Bandwidth in this case was the amount of error you allow to occur Before the program errored out and stopped mach.

« Last Edit: May 08, 2010, 09:31:44 PM by BR549 »

Offline Jd

*
  •  10 10
    • View Profile
Re: Encoder motor control
« Reply #8 on: May 09, 2010, 10:19:21 PM »
Hello Thank you your reply, it  will go into my notes, to check out later have a section for thios,  I have not done anything with Mach3 brains or VB editing but need to learn as I want to get this machine talking to me also. I have given up on getting this machine to do Litho's as  it is.  I am about 90% done with my new Z axis for this project, I like the idea of comparing readings and stopping when need to, I strongly agree that for this type of project it would be a pain and not save much time, my new Z should be the cure for now. I do see a use for writing a brain as you describe so that my future limit pushing can be monitored by the machine thus freeing me up which was one of my goals of refitting my mill to a CnC machine. I can see that by doing a brain as you suggest I could do a lot of things when certain conditions are met and I like the flexability of these options. Hood also suggested a script. I Thank all polite replies and until the next off the wall question , Here's my best to you and yours.     JD           

Offline simpson36

*
  •  1,369 1,369
    • View Profile
Re: Encoder motor control
« Reply #9 on: May 10, 2010, 04:49:22 PM »
There is a saying in engineering circles that states 'you can't polish a turd', yet is sounds like that is what is being attempted here.
 
You cannot make a stepper do the job of a servo motor, not even with a steel belted BandAid.

So stop polishing and just install a servo motor and be done with it.