Erratic Z motion Jogging though Mach 3

Moderators: TomKerekes, dynomotion

bhauser
Posts: 28
Joined: Tue Feb 09, 2021 7:24 pm

Re: Erratic Z motion Jogging though Mach 3

Post by bhauser » Fri Feb 17, 2023 11:01 am

Thanks Tom,

This helped me out a lot. 40 and 41 did not toggle, which lead me to putting the MPG on a scope... turns out I had a broken ground wire. MPG now works and I just a few minor things to clean up in the MPG service routine.

Just a couple of quick questions...

what is the "Factor" variable in the MPG Service routine? Is it encoder counts?
Do I have to worry about turning the dial while running programs in mach? is the job active variable valid when using mach?

Thanks again,

Brian

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Erratic Z motion Jogging though Mach 3

Post by TomKerekes » Fri Feb 17, 2023 5:02 pm

Hi Brian,
what is the "Factor" variable in the MPG Service routine? Is it encoder counts?
Yes. It is Encoder Counts/MPG Counts.
Do I have to worry about turning the dial while running programs in mach? is the job active variable valid when using mach?
The JOB_ACTIVE Flag should be available with the Mach3 Plugin also.
Regards,

Tom Kerekes
Dynomotion, Inc.

bhauser
Posts: 28
Joined: Tue Feb 09, 2021 7:24 pm

Re: Erratic Z motion Jogging though Mach 3

Post by bhauser » Sat Feb 18, 2023 12:06 pm

Hi Tom,

Things are looking pretty good, except for the factor. I set factor to 1 for my X1 increment and the machine moves by 4 encoder counts for every single click of the wheel. I'm not certain why this is happening, but I'd really like it to move by 2 counts. I've attached the program that runs the main loop to this post. The MpgService routine is at the very bottom, it should be functionally unchanged from the sample code.

Thanks,

Brian
Attachments
TreeInitialConfig.c
(15.54 KiB) Downloaded 14 times

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Erratic Z motion Jogging though Mach 3

Post by TomKerekes » Sat Feb 18, 2023 5:39 pm

Try setting the Factor to 0.5
Regards,

Tom Kerekes
Dynomotion, Inc.

bhauser
Posts: 28
Joined: Tue Feb 09, 2021 7:24 pm

Re: Erratic Z motion Jogging though Mach 3

Post by bhauser » Sun Feb 19, 2023 3:17 am

Well now I feel like a moron, for some reason I assumed that factor would be an int. This will be a simple fix.

on a slightly different note, I have a crazy thought. I have an extra position on my pendant for a 4th axis that does not exist on my mill. I'd like to use that as a 25% feed rate switch. Is this possible? It takes a long time for mach 3 to slow the feed rate for motion, so this would be a welcome addition.

Thanks,

Brian

User avatar
TomKerekes
Posts: 2540
Joined: Mon Dec 04, 2017 1:49 am

Re: Erratic Z motion Jogging though Mach 3

Post by TomKerekes » Mon Feb 20, 2023 4:53 pm

Hi Brian,

It's not entirely clear what you mean. But you can set the Hardware Feed Rate Override to 25% with:

SetFRO(0.25);

It might be a bit confusing where Mach3 is setting the Software FRO and you are setting the Hardware FRO. For info on Software/Hardware FRO see here.

When a Job begins the Hardware FRO is set to 1 so when the switch is set you may need to set it to 0.25 periodically. You may also want to reset it to 1 when the switch state exits.

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

bhauser
Posts: 28
Joined: Tue Feb 09, 2021 7:24 pm

Re: Erratic Z motion Jogging though Mach 3

Post by bhauser » Fri Feb 24, 2023 10:27 am

Thanks Tom,

That makes sense. I think I'll skip this to avoid feedrate confusion. BTW, rolling back then rolling forward the windows updates seems to have fixed the keyboard latency issue. All this being said, I'm very happy with the MPG and can't believe that I waited as long as I did to install one.

As a side note, I never did get to the bottom of why windows is in test mode... However, the mill working well now, so I think I'll stop while I'm ahead.

Thanks again,

Brian

Post Reply