Hello Guest it is March 28, 2024, 12:34:41 PM

Author Topic: Hazardous Motion - Mach4 Software  (Read 3665 times)

0 Members and 1 Guest are viewing this topic.

Re: Hazardous Motion - Mach4 Software
« Reply #20 on: May 13, 2021, 12:48:50 PM »
Hey from Cnckr
Sorry for my bad english."
When you start  mach4 and  after "configure" and after "restart" Mach4. If you want to use Jogging tab, you need to push Incremental jog Step" at least once or you cannot trust the DRO showing jog step size. After this push I think jogging work as you expected it  to.
The motor acceleration may not be too small.
Good luck  Cnckr
Re: Hazardous Motion - Mach4 Software
« Reply #21 on: May 13, 2021, 01:09:12 PM »
Guys, I really do appreciate that you are trying to educate me about how Mach4 and ESS interact.  Despite being a mechanical engineer and having programmed NC mills since 1973, I'm still confused on Mach4's interaction with ESS.  Perhaps a numerical example will help me understand...

Let's deal with just one linear axis - the X axis.
Let's deal with a single screen button press to do a 0.001" jog
The speed slider on the jogging screen is set to 1% of maximum velocity

My X axis lead screw has 5 threads per inch
My X axis motor is accurately tuned at 10,000 pulses per rev
My X axis motor is tuned to a maximum velocity of 180 inches per minute (= 3.0 inches per second)
My X axis motor is set for an acceleration of 5 inches/sec-sec

So, 10,000 pulses to the servo generates 0.200" movement on the axis (1/5 inch)
Thus 0.001" movement requires 10,000 * 0.001/0.200 = 50 pulses  (This becomes a constant in this example.)

1% of the maximum axis velocity is 0.030 inches per sec.
.001" movement thus requires  .001"/.030 ips = .0333 sec (=33.333 milliseconds)

So, ignoring acceleration and deceleration, the 50 pulses will be sent in 33.333 milliseconds.
If the accel/decel happens within the 33.33 ms, then the 50 pulses will be spaced unevenly to accomplish this.
If the accel/decl is outside the uniform time of 33.33 ms, then the 50 pulses will be spaced over a longer than 33.33 ms time slot but again will be spaced unevenly.

If I understand Andrew's description correctly, it seems that Mach4 must be figuring out the accel and decel to predict the axis location at the end of the next time slice.
ESS then determines how many pulses to send and spaces them correctly for the time slice.


The Left Down action for this screen button is "Jog X-" and the Left Up action is "Jog X Off".  It is not explained what "Jog X-" is programmed to do.
If it is a "one shot" trigger, then presumably a command is sent to the core to generate 50 pulses on the X- axis.  If so, then there seems to be no need for the "Jog X Off".
If it is not a one shot, then it appears possible that holding down the jog button could generate more than one command to jog, hence requiring the "Jog X Off" on button release.  I've been repeatedly assured there is no bug in the Mach4 jogging function, so I have to assume there is some way to ensure there is only one set of 50 pulses being commanded and that the "Jog X Off" is merely there as a safety feature.

Andrew has been clear that "there is no such thing as an after run", but there is a (user determined sized) motion buffer which has to empty out.  (My buffer remains at the default size of 0.18 sec.)  But since ESS only creates pulses in accordance with the Mach4 determined position at the end of the next time slice, it would seem any additional (i.e. unwanted) pulses have been required by the Mach4 calculations.  (I hope we all agree on that.)

JoeAverage and Smurph are definite that the unwanted motion is due to some incorrect configuration setting on my machine.  I've turned off soft limits, hoping to ensure that potential cause is eliminated.  I have yet to try JoeAverage's experiment of increasingly small jog increments, but cannot get my head around his comment "when you want to touch off in incremental mode you effectively have to cycle through your programmed jog steps to find a more suitable number."  Would this not just put me back into exactly the same situation of too big a jog increment leading to unwanted motion?

As always, I appreciate the time you are all taking to help me understand.

Brian

 

Re: Hazardous Motion - Mach4 Software
« Reply #22 on: May 13, 2021, 01:14:40 PM »
Thanks Cnckr.  That may be exactly the right solution.  I've noticed that occasionally and not related it to this problem.  It sure would be nice if the fix is as easy as that!  Appreciate your suggestion.

Brian
Re: Hazardous Motion - Mach4 Software
« Reply #23 on: May 13, 2021, 02:14:08 PM »
Hi Brian,

Don't know if the known bug in the this attachment is related to your problem or not, but may be worth bearing in mind.

Nick





« Last Edit: May 13, 2021, 02:16:04 PM by nick952 »
Re: Hazardous Motion - Mach4 Software
« Reply #24 on: May 13, 2021, 04:32:42 PM »
Hi,

Quote
As soon as you let your finger off of the button in a continuous jog at full speed, the next time slice we pull from Mach4 should start showing the deceleration.  It will take the 0.15 seconds (or whatever you have it ESS motion buffer size set to) for that deceleration to work through the ESS's motion buffer.

That is not correct, I can with the jog increment set to 1mm cause the MPG to buffer up moves that carry on motion for several SECONDS after the MPG has
stopped moving. The same can be done with the on-screen jog buttons.

If the movement were restricted to the length of the ESS motion buffer that thread would not exist, there would be no need.....but the motion can persist for SECONDS

Craig


'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Hazardous Motion - Mach4 Software
« Reply #25 on: May 13, 2021, 05:14:07 PM »
Hi,

Quote
As soon as you let your finger off of the button in a continuous jog at full speed, the next time slice we pull from Mach4 should start showing the deceleration.  It will take the 0.15 seconds (or whatever you have it ESS motion buffer size set to) for that deceleration to work through the ESS's motion buffer.

That is not correct, I can with the jog increment set to 1mm cause the MPG to buffer up moves that carry on motion for several SECONDS after the MPG has
stopped moving. The same can be done with the on-screen jog buttons.

If the movement were restricted to the length of the ESS motion buffer that thread would not exist, there would be no need.....but the motion can persist for SECONDS

Craig


I said *continuous* jog mode where it will move at the full jog speed until you let go of the button and then it will decelerate.

You are talking about *incremental* jog mode.  In that version, you are repeatedly increasing the location of the destination, faster than the MPG commanded motion is being output to the motors.  Nothing is being buffered up in Mach4 when you spin the MPG wheel fast, but Mach4 realizes that the endpoint is still, for example, 3 inches away, and Mach4 will fulfill the command to travel that entire distance, even if it takes a few more seconds or minutes. Mach4 will keep telling the ESS how far to move for each time slice, until the commanded position is reached - Mach4 is doing exactly what it was commanded to do.   And again just for clarity, the moves are not buffered up (except for the fraction of a second worth of moves inside the ESS's motion buffer), the final position to go to for Mach's trajectory planner was being changed, and that is what keeps the motion going until that destination is reached.

Andrew
Re: Hazardous Motion - Mach4 Software
« Reply #26 on: May 13, 2021, 05:56:44 PM »
Hi,

Quote
You are talking about *incremental* jog mode.  In that version, you are repeatedly increasing the location of the destination, faster than the MPG commanded motion is being output to the motors.  Nothing is being buffered up in Mach4 when you spin the MPG wheel fast, but Mach4 realizes that the endpoint is still, for example, 3 inches away, and Mach4 will fulfill the command to travel that entire distance, even if it takes a few more seconds or minutes. Mach4 will keep telling the ESS how far to move for each time slice, until the commanded position is reached - Mach4 is doing exactly what it was commanded to do.

My apologies, yes I am indeed talking about incremental movement, and your description is exactly as I observe on my machine.

When in 'continuous' mode the motion ceases very shortly after button release. My ESS is set to default buffering, ie 180ms, and I would guess that is the delay I
observe.

To be honest I don't really use continuous mode very often, but rather incremental mode.

When using Machs on-screen buttons incremental mode causes one jog unit of movement, effectively single stepping. This is not convenient if you wish to traverse a distance
to work zero for instance. With an MPG however spinning the handwheel results in a stream of 'single steps' which is highly convenient for rapid traverse AND also for fine
and slow speed single stepping when touching off.

In my opinion an MPG used in  incremental mode represent the most versatile, usefully safe means of manual control for both rapid  traverse and touch off.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Hazardous Motion - Mach4 Software
« Reply #27 on: May 13, 2021, 06:51:07 PM »
My apologies, yes I am indeed talking about incremental movement, and your description is exactly as I observe on my machine.

In my opinion an MPG used in  incremental mode represent the most versatile, usefully safe means of manual control for both rapid  traverse and touch off.

Craig


No worries!

Yes, a MPG works nicely for user controlled movement.   

I don't believe that there are any bugs present in jogging. This thread just required some clarification and education in how the different modes are operating, and how the ESS works with Mach4.  Fin.
Re: Hazardous Motion - Mach4 Software
« Reply #28 on: May 14, 2021, 11:53:21 AM »
Thanks Nick952.  I think that is exactly what happened and the screen shot confirms my opinion that there is a bug to be fixed.
Re: Hazardous Motion - Mach4 Software
« Reply #29 on: July 05, 2021, 07:48:22 AM »
In my opinion an MPG used in  incremental mode represent the most versatile, usefully safe means of manual control for both rapid  traverse and touch off.

Having just installed one, I agree - but there is also a user education factor here. I discovered as well that if you really spin up the MPG, it can take a bit for Mach to process all those pulses and motion can persist surprisingly long after MPG motion stops.

Mach of course is doing exactly what it was told to do - there is no bug. If you generated 1000 pulses with your MPG, Mach is going to move 1000 x the jog increment.

The "so what" here is twofold:

1. The user must modulate MPG spin rate more carefully, so as to not accumulate excessive movement; and

2. Jog rates on the MPG should be 10x slower than expected.

By which I mean, my jog rate switch has settings for 0.1", 0.01", 0.001" per pulse. Those are entirely reasonable values based on the Mach screen jog buttons, but in reality, the 0.1"/pulse setting is WAY too fast for a bench-class machine - the MPG generates more pulses than you think. More human-scaled movements are 0.01", 0.001", and 0.0001" (maybe 0.0005").

Thank Lob I didn't have a 1"/pulse setting!