Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: norbigazda98 on April 03, 2018, 06:19:56 AM

Title: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 03, 2018, 06:19:56 AM
Hello,
I'm new here., but I've been using Mach3 for some time now.

I have a problem.
I had a G-code, a 3D finishing, that worked great on Thursday, it was a 66k line long code.
Then I had another project, that run great yesterday, but that was only a roughing code.
And then today I wanted to run the finishing code, but the Z level kept going upwards. After 10 mins, I was 2 centimeters (almost an inch) over Z0, while Mach thought that I'm at Z-4.
I've had some problems like this, but those were solved, when I set the pulse lenghts to 4-4. That problem was that whole movements were missed. Now it's just steps, that are missing.
They are missing at even half acc, half vel and even at max pulse lenghts, and only on the Z axis.

I've been watching it, and every time is moves downwards and then up again at the same position, the axis of the stepper motor doesn't stop at the same place, but somewhere else with some degrees or steps.
I didn't have these problems with grbl, that was just unstable af.


Here is the program. : https://drive.google.com/open?id=1EponAlFKEk5OM6yDW5QlYinTkRcUPz0h
Nagyolás is roughing
Simítás is finishing
Tetejesikba is just a "pocket"
Could you run the "simítás" file on your router without any workpiece inserted to check it?

I use a 3 axis router with tb6600 drivers and a mach3 breakout board with an lpt connector, and the drivers get 36Volts.
The steppers are nema23 sized "56mm" type ones, as eBay regards to them, with 200 steps/rev. And I use no microstepping.

Could you hep me with my problem?
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: rcaffin on April 07, 2018, 06:03:48 AM
Have you checked the grub screws on all couplings between motor and leadscrew? Mark with feltnib pen.

Cheers
Roger
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 07, 2018, 06:33:16 AM
Yes, I checked it, it is not mechanical problem.
I tried writing a code that makes the axes, on by one, go from (x, y, z) 0to 50 and back about a hundred times, and there was no mistake or off millimeters at all, like 0.002-3 mm accurate after the program, measured with clock type device, I don't know what it's name is, it looks like a clock and has a pin pointing out one end.

Tried making smaller motions than the machine can (4mm pitch, 200steps/360 degree), and it was accurate if I did it a lot of times and then went back to zero.

I now tried micro stepping the z axis and now the finishing program runs in the air. It is to test whether the micro stepping solved the problem. I don't understand why could that help. It I hope that it will.


Also, with Sherline option enabled, the mistakes were far smaller, than without it. I tried that before the microstepping, that's why I know it.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: ger21 on April 07, 2018, 06:46:59 AM
Reduce your Z axis acceleration by 50%.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 07, 2018, 07:34:35 AM
Why do you think that'll help?
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: ger21 on April 07, 2018, 07:36:24 AM
Because you're likely losing steps from trying to move faster than the motor is capable of.
And it's helped many others in the past.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 07, 2018, 08:12:58 AM
I don't know. I used 300(mm/s/s) acc before on grbl, now I use 200, but I set it back to 150 for now. But I think the micro stepping solved it.
What I wanted to say was the fact that it could handle 300 on grbl before.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 07, 2018, 08:14:08 AM
Anyways, thanks for your help :)

If the problem isn't solved after these, I'll write here again.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: ger21 on April 07, 2018, 08:48:54 AM
grbl likely puts out a better pulse stream than the parallel port, which could allow higher velocity and acceleration.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 07, 2018, 09:18:42 AM
That's possible. Shame it was so unstable that after 5-10 minutes it froze up ally the time. It was very easy to use for a beginner.
Luckily it was very cheap to switch to mach3 from grbl. It only cost me about $10.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 08, 2018, 08:14:30 AM
Well, it still goes off of the original tool path, and in all axes. The acc is now 120 and it still happens. The average feed rate I use is 1000mm/min, if the spindle doesn't tolerate that much, i use even smaller feed rate.

What can be the problem? The drivers and the motors are most likely okay, because I don't believe that all three went wrong at the same time.

Psu?
Or another idea: aspire generates so accurate toolpaths, that mach3 just goes mad about those small coordinates. As is said, my machine can go 0.02 mm on x and y, and 0.01 mm on z. Still goes off all the axes.
In aspire, I set the tolerance to 0,02 from 0.01 and it still happens.
What can be the problem?

One thing is sure. All the axes, when they move off of their path, move in their positive direction more, than in the negative.

I had some unregular carving code today, that went great for 20 minutes and in the last 2 minutes it has gone upwards 5 millimeters.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: ger21 on April 08, 2018, 08:22:07 AM
Have you run Drivertest.exe in the Mach3 folder?
You may be getting poor quality step pulses.
Or you may be seeing resonance from your drives, causing lost steps.
There are probably 100 different issues that could cause lost position.

The G-code isn't one of them.
Mach3 will follow the g-code exactly, regardless of the size or location of the moves.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 08, 2018, 08:24:04 AM
And can any of those be a reason for the false position to be in the positive direction all the time and never in the negative?

I'll try that exe, although I don't really know what it does yet. Google is my friend, hopefully.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: ger21 on April 08, 2018, 08:26:19 AM
If you are talking about the Z axis only, I still think it's losing steps due to being underpowered. This is a very common occurence, and has happened to many people.

If you see this with all axes, then I'd look at the voltage of the direction signal. Many people have issues where the machine tends to move in only one direction, which is an issue with the voltage on the direction pin.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 08, 2018, 08:30:35 AM
Might the problem be that the pc isn't a simple winxp one core "standard pc"?
It is an intel pentium e6600 with 1 gigabyte of ram running win 7 starter 32bit, acpi.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 08, 2018, 08:35:01 AM
I saw this only on the z axis before, but on today's code I noticed it on all the axes.

What should those dir voltages be?
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: ger21 on April 08, 2018, 08:38:44 AM
0V in one direction, and 5V in the other direction.

As I said, run Drivertest.exe in the Mach3 folder, and check the results.
I have a laptop that is unusable with Mach3 when setup as ACPI, but works perfect when configured as Standard PC.

When using the parallel port, Mach3 seems to work best on much older PC's.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 08, 2018, 09:30:57 AM
So I measured and ran the test.
It said system excellent the whole time, never going too fast or slow, although there were some smaller spikes but the results were constant.

I measured the pc psu voltages: 11.86, 5.1 (in the USB outlets too) and 6.67 volts.
I measured the dir and other voltages, too. Although the machine was stationary.
If the estop is on, I measure 4.168-4.170 volts and if it isn't on, I measure 4.258-4.267 volts. On the breakout board between the pcgnd and pc5v pins I measure 4.480 volt
From your latest post, I assume that it is important to measure while the machine is jogging. If the drivers get their power, I measure 4.155 volts on the dir pins.
While jogging z I measure 4.110 volts on Z, 4.159 on X while jogging x and 4.157 on y while jogging. In the other I measure 0 .
The pul pins go down from 4.1-4.2 to 3.885 while moving.
I measure 3.4v one the ena while disabled and 0 while enabled.

The psu for the machine gives 35.7 volts and doesn't go under 35.55 volts even when all the axes are moving.

On windows 7 I only have options for acpi
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: ger21 on April 08, 2018, 09:53:02 AM
Quote
It said system excellent the whole time
Disregard the messages. Watch the pulse rate, and make sure it is fairly sable the whole time.

It could be that the voltage on the dir lines is on the low side??
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 08, 2018, 09:55:36 AM
Okay. I'll try it again.


Edit: it is between 23544. and 23563 hz
Shortest and longest times are 41 and 53 uS.

What do you mean by the voltage being on the low side?
That it should be more than 4.1? I guess it should be more than 4.5, too. But it isn't. It might it be the breakout board that is not good or the pc cannot supply enough current on the usb?
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: ger21 on April 08, 2018, 10:28:34 AM
It depends on the voltage your drives require.

23500 is not ideal, as it should be close to 25,000. But it it's stable, it's probably not the problem.

Other than buying a motion controller like the UC100 to bypass the parallel port, I don't really have any other ideas.
If it still does it with a motion controller, then that tells you that you didn't need the motion controller in the first place.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 08, 2018, 11:48:55 AM
So what you say is I shall buy a motion control board and if it doesn't work then I didn't need to buy it?
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: ger21 on April 08, 2018, 11:57:44 AM
Yes. Not terribly helpful, is it.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 08, 2018, 12:12:34 PM
I've been watching the stops and I think that they are too sharp. I mean, the machine stops too fast at the end of motions. It almost clicks when it stops when pulling back up from a drill or a carve path to safe z.

Maybe changing that will help. How can I change the deceleration?

I set acceleration back to 80, but I hope there is an option that sets the sector ration lower while acceleration stays the same.

Does Backlash has something to do with my problem? What is that in the first place?
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: ger21 on April 08, 2018, 07:11:01 PM
Deceleration and acceleration are the same, controlled by the acceleration setting.

Backlash is looseness in the drive system. It's not cumulative, so it won't cause a loss of position.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 09, 2018, 02:11:59 AM
Well, I tried setting Z backlash to 0.02, which is a full step, and running the program in the air, and it didn't lose position.
Before that I tried 0.01, because that is the size of a step while microstepping, but the position losing still occured, although it was quite smaller.

So it seems like the backlash setting solved it, but I didn't have time for running the program long, so I might be wrong.

Do you say that backlash has nothing to do with it and these are false results? If so, then I'll have to buy another motion control board to eliminate that failure possibility.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: ger21 on April 09, 2018, 07:11:16 AM
Have you had backlash compensation enabled the whole time?

Backlash itself won't cause a loss of position, but if you have backlash compensation enabled, and the settings are incorrect, then the backlash compensation can cause issues. More specifically, it can try to accelerate too fast and cause stalling. The shuttle accel setting has a large effect on this I think.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 09, 2018, 08:36:22 AM
No, backlash wasn't enabled until yesterday's evening (in out country). I set z backlash to0.02 and left ever tithing else at 0 and then enabled the backlash and restarted the program.
Today I'll run several programs in the air to test if it really worked.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 09, 2018, 05:02:45 PM
Yes, you had it right. Backlash has nothing to do with it.

Basically it steps on almost every line of the code a step more in the positive direction than on the negative on a moving axis, regardless of which axis we are talking about.

But then sometimes it works great for 2-3 whole codes and then it is wrong again.

Do you have any other ideas before I buy a new controller board?
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: ger21 on April 09, 2018, 07:56:16 PM
Try changing the active low settings on the step pins.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 10, 2018, 04:53:54 AM
Okay, I will. I'll have time on Wednesday afternoon (gmt+1)
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: RICH on April 10, 2018, 05:59:15 AM
I usualy don't even reply to any problems when someone is using a TB*********x controller as they
are know to be problematic. I am making an exception here.

 Your problem is accleration and understand  that it s directly related to your complete system
and how they are all interelated. Also understand that the demands for doing 3d work as compared to
doing 2D work is is greater. Based on what you have posted here is what you need to do.

1. Create a new xml file, maybe call it TESTING
2. Set the drives for 1/8 microstepping. So find the new value for the steps per unit for each axis.
    You can use the axis calibration of Mach to find the steps per unit instead of calculating them.
    The resolution for an axis is 1/ steps per unit     in theory but prsacticaly may be less.
     Your drives have automatic idle current reduction and if there is an option to not use it don't use it.
     Don't know a recomended value for pulse width for that drive, consult you manual.
     - turn off  backlash comp
      
3. Tune EACH axis this way:
    - start with low velocity setting say 10 and double the velocity until the motor skips.  Then reduce the
       max velocity found when it skipped to a value 30%  to 40% less. Suggest setting start accleration
      value of 1 for a max velocity value of 10 to 100, and increase the accel as you test ie; accel 2 for max value  of
      of 100 - 500, 3 for value of 500 to 1000. ( 1000mm/min = 39.4 inches per min )
 
      After you find where the motor skipped  and have the max velocity set, do similar for the accel
      but the increase value, may be small increases ie; like 0.5 . Do this until the axis skips.
      
      Note the following:
      -You want a the highest velocity and acceleration for your system which is accurate and reliable.
        You need head room on the settings to allow for machining forces, axis change in forces to move
         the axis, etc. Reliability is more important than speed and high acceleration is desirable.

       - a motor spec would help as that gives basic ball park info for motor tuning and just how much power
         motor can deliver, but, yo would still do the above tuning

        - Mach3 is not your problem.
        
         - The problem in 3D is the motor must have the ability to accel and decell the axis for small moves.
            You can have no problems doing 2D work, but the motors may be inadequate  for 3D work.
             Minimize the torque to just move the axis ( refinement of the machines axis components),
             and provide appropriate gcode for YOUR machine.

          - steppers can skip and you would not know it but will see the affects when doing 3Dwork.
             The loss of position can be repeatable or random, usualy random so you get into a guessing
             game of what is wrong.

          - Backlash when applied properly works quite well but has no place adn can be problematic.
            
          - as Gerry replied that the driver test may be adequate, franlky, i would comment that the
            HZ value is probably  floating more or dropping even lower when your actualy running a
            program.
            
4. After you have configuration correct for YOUR machine. Test for skipping. Use a short length
    gcode file form CAM. Make sure the code generated  is appropriate for your machines capabilites.

Please don't reply back (to me) and give another "guess" or even question other parts of the system until you have
done the above.

RICH
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 11, 2018, 10:43:09 AM
Well, I did what you told me to, but I don't understand what you say about the xml file or what should I do with  it.
So I did everything you told me to do and what I could, but the problem still persist.


My settings are on all axes: 2400mm/min velocity and 50mm/sec/sec acceleration, although it didn't skip on 150 and even on 200.
I use 4mm pitch  leadscrew and here are the motors details:
Step Angle (1,8°)   Motor Length (56mm)
Rate Current (2.8A)   Phase Resistance (0.9Ω)   Phase Inductance (2.5mH)   Holding Torque (1.26N.m)   Lead Wire (NO.: 4)
Rotor Inertia (280 g.cm)
Motor Weight (0.68 KG)
I use a 36V5A PSU inverter for the motors. I measured the voltage it produces and it's more than 35.5V all the time. I measured the current that the motors draw and it is never more than 2.9-3A even when all the axes are jogging at full speed.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: RICH on April 11, 2018, 08:02:33 PM
You can copy a current xml file and rename it to say test.xml if you wish.
You use the test.xml file to play with settings and still have the original xml file with current settings should you wish to go back to where you started.

So you went through all the testing and found that 2400mm/min velocity is a reliable max velocity to use?
Then did you test for max acceleration at that setting? If you did then why are you setting it at a value of 50?
Then did you try running some code to see if it skips?


RICH
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 11, 2018, 11:49:08 PM
Yes, 2400 is very reliable velocity.
I set lower acceleration because I didn't trust the higher settings to be fully okay.
When I ran a code it still went off position.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: RICH on April 12, 2018, 06:29:15 AM
At what velocity did each axis start skipping for each axis?
At what accel did each axis     "                     "    ?


RICH
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 12, 2018, 06:40:40 AM
They do it all the time, except maybe when it's so slow that I cannot comprehend.

Or do you mean in the motor tuning?
The x managed 3500-4000, the y and z managed 5000-6000 velocity, and they all worked up to 350-400 acceleration.
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: RICH on April 12, 2018, 07:44:31 AM
Post your the xml file you are using. The file name should be unique, so change the file name to something like  da98.xml
before posting it.

RICH
Title: Re: Z zero (plane) moves upwards with every Z dir movement
Post by: norbigazda98 on April 12, 2018, 09:42:44 AM
Okay, I will, thanks :)