Hello Guest it is April 19, 2024, 01:12:15 AM

Author Topic: About G Code of Mach4 Demo  (Read 1762 times)

0 Members and 1 Guest are viewing this topic.

About G Code of Mach4 Demo
« on: August 30, 2021, 02:13:27 AM »
When it became the line of the red arrow in the Tap file, Mach4 Demo displayed "Featue not support de".
Does this mean it's not supported for Mach4 Demo?

G Code
G98 G84 X12.5 Y8. Z-10.175 R5. F30.
Re: About G Code of Mach4 Demo
« Reply #1 on: August 30, 2021, 08:38:01 AM »
Hi,
the status message says Line0: Feature not supported.

Is the line of Gcode you've pointed at Line0.....I don't think so.

Post the whole Gcode file....we need to find Line0.

Craig
« Last Edit: August 30, 2021, 08:39:50 AM by joeaverage »
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: About G Code of Mach4 Demo
« Reply #2 on: August 30, 2021, 05:23:28 PM »
Craig. Hello.

The full text of G Corde.
I'm sorry, but please see what's wrong.
G Code
(1001)
(T43 D = 5. CR = 0. --ZMIN = -10.175 --RIGHT HAND TAP)
G90 G94 G91.1 G40 G49 G17
G21
G53 G0 Z0.

(6)
M5
T43 M6
S30 M3
G54
M8
G0 X12.5 Y8.
G43 Z15. H43
Z5.
M29 S30
G98 G84 X12.5 Y8. Z-10.175 R5. F30.
G80
Z15.

M9
G53 G0 Z0.
G53 G0 X0. Y0.
M30

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: About G Code of Mach4 Demo
« Reply #3 on: August 30, 2021, 09:35:36 PM »
It could be the M29 command, ridged tapping is only supported in the industrial version I think.

It could also be you need to be in feed per rev G95
Without engineers the world stops
Re: About G Code of Mach4 Demo
« Reply #4 on: August 31, 2021, 12:05:46 AM »
Hello.

I don't think the cause is M29.

I'm not sure, but anyway
When I generate a Tap file for Mach3 and load it into Mach3, Mach3 works without any problem.
 note that,
I am generating a Tap file with FUSION 360.
Re: About G Code of Mach4 Demo
« Reply #5 on: August 31, 2021, 12:21:11 AM »
Hi,
I cannot find m29 in MillGCodeProgramming.pdf and suspect therefore it does not exist.

Mach4 is stricter about such things.

When the Gcode interpreter encounters an 'm' code it will search first in the macros folder of your current profile, and then up the file
tree looking for the source file. If it does not find it it will error out with the status message you've already seen. Mach3 on the other hand
would just ignore an M code it did not recognise.

To my knowledge m29 is not supported in Mach4Hobby, either in Demo mode or fully licensed.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: About G Code of Mach4 Demo
« Reply #6 on: August 31, 2021, 12:27:43 AM »
Craig. Hello.
Now, when I search for "Mill Code Programming" with [m29], it doesn't appear.
  Graham Waterworth and Craig. Thank you.
Re: About G Code of Mach4 Demo
« Reply #7 on: August 31, 2021, 01:37:55 AM »
Hello.
Can I use M29 for mach4 hobby?
Re: About G Code of Mach4 Demo
« Reply #8 on: August 31, 2021, 02:03:55 AM »
Hi,
you could write your own m code.

As I posted earlier Machs Gcode interpreter will on encountering an m code first look in the Macros directory of your current profile.
If it finds such a file it will execute it.

In general I follow the rule that I followed when I used Mach3 with regard to the Numbering of M codes. There are no native m codes in
Mach above 100. Thus you could name your custom macro m105() say, and be assured that it would not corrupt any of Machs native
functionality.

Lets however take an m code, say, m3. This is an m code native to Mach which turns on the spindle with CW rotation. If you write your own
m3(), and install it in the macros folder and Mach encounters m3 in your code it will find and execute your m3 macro in preference
to its native m3. Provided your macro is well coded and provides at least the same functionality as the native m3....all well and good.
If however your m3 is not well coded or has some logic error you can expect Mach to crash.......its following the code you provided, its up to
you to ensure that code is good.

If, as Graham and I opine, that m29 is not native to Mach4Hobby, then you could write your own m29 macro.

If I understand correctly you are anticipating that m29 enables rigid tapping?

Rigid tapping requires that the Z axis be coordinated with the spindle, namely that the Z axis descend the pitch of the thread per revolution of
the spindle. This requires a realtime move, that is to say that the around the loop communication delays imposed by controller/Mach/motion buffer/controller
all but preclude Mach from being able to directly control rigid tapping. If realtime control is sought it MUST be provided by the controller.
I note, but have not used, the rigid tapping feature of the Ethernet SmoothStepper. I would commend you do some research on that feature
of the ESS.

My understanding is that for rigid tapping to work you must have Truly Superb Velocity Control of your spindle. This will require the use of
at least  index feedback, but more likely an encoder, and very good, probably PID speed control. Do you have or can you arrange such control?
Even if Mach4Hobby did support m29, your motion controller and most particularly your spindle must support it also.

I have a spindle that I made that uses a secondhand 1.8kW Allen Bradley AC servo. In normal operating conditions I use it as a PWM voltage controlled
free running motor....but because it is a servo I can, and occasionally do, use it in position controlled mode. At that point its really a C axis, ie an
angularly controlled rotation about the Z axis. When I wish to do rigid tapping I use the fact that I can coordinate an angular axis with a linear axis:

g1 c2700 z-20

for example rotates the C axis 7200 degrees or (7200/360) 20 revolutions while the Z axis descends 20mm, thus describing a helically interpolated
controlled point of 1mm pitch and 20mm deep, an ISO M6 thread. This would be followed with a:

g1 c0 z0 move which would back the tap out of the hole.

I very seldom used it in this mode, but it did work. My own design mini-mill of that time started to flex when the spindle exerted much more than about
3Nm of torque. The flexure was inclined to stress and/or break the tap. In order to limit that flexure required that I limit threads to ISO M6 and smaller.
I am commissioning my new build mill, and have been for the last month or so,  it is much more rigid and so I will be able to push the rigid tapping
feature to its max...I hope.

I have not bothered to set up for rigid tapping with my new mill yet, I still need to finish way-covers, better flood cooling, a new BoB install.....and the list
goes on. I'll get to rigid tapping. eventually. Note that I have been able to exploit that my spindle has position control, which is most surely Truly
Superb Velocity Control
!!

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: About G Code of Mach4 Demo
« Reply #9 on: August 31, 2021, 02:37:32 AM »
Hello.
> and install it in the macros folder and Mach encounters m3 in your code

I can't. There is no such ability. I can understand C language a little.

Recently, I just learned that there are two ways to set the servo amplifier when using the servo motor as the main shaft.
Speed control and position control.

I'm sorry.