Hello Guest it is April 25, 2024, 07:09:39 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Piper2010

Pages: 1
1
G-Code, CAD, and CAM discussions / Re: Subroutine calls not working
« on: July 07, 2012, 06:35:16 AM »
I think I understand what you are trying to do now.  My knowledge is limited to programming directly in G code and I think that your suggestion to take the Vectric output might give you a starting point with a G code program which you could then alter to do what you want i.e. put in halts with M01 and document the tool changes in the program code might work but I think you would have to alter the tool offsets and it would get awfully complicated. I am assuming your machine does not run to automatic tool changing.   I am on a learning curve with Mach3 and only program directly in G code although I have a copy of BobCAD which will take a drawing and produce the G code and will implement tool changes but I have not had time to learn how to use it yet.

I think you perhaps need to angle your enquiry in a slightly different forum which is read by Vectric experts because Mach3 is not your problem it is persuading Vectric to do what you want without resorting to programming directly in G code.  The subroutine is merely a programming feature in G code, for more information look at the documentation on the Artsoft website.

If anyone disagrees with this suggestion please contribute to this thread.  Otherwise I should have a look at CNCzone for a Vectric forum.

Piper relates to my musical rather than my aeronautical activities.  I play the Great Highland Bagpipes.

Best Wishes,
Andrew

 

2
G-Code, CAD, and CAM discussions / Re: Subroutine calls not working
« on: July 06, 2012, 04:00:04 AM »
Well done for getting the hardware to work!  Not sure what the problem is with your programming can you explain what you are trying to do?  I needed to use the subroutine feature of Mach3 to put a bit of code that was going to be repeated many times in a subroutine which was then called by the main part of the program, I didn't use the Mach3 macros in this case. My problem which was answered in this thread was incorrect syntax, simple!

Regards,

Andrew

3
Sorry!  Didn't think of others struggling like me!  Thanks for the nudge.  I have added more comments to clarify what the program is doing.  It runs on Mach3 on my desktop but I have no reason to suspect it won't run on the mill cutting metal.

Hope someone finds it useful, the same principle could be applied to any sort of repetitive machining.  Use G52 to shift the origin around and then do the repeats with parameter variables.  I could eliminate more code by using calculated parameters but this way the method is more visible.

Thanks for the help which got me to this point.

Regards,

Andrew

4
Thanks very much!  As usual it is the obvious thing that is staring you in the face all the time, the subroutine labels were all numerics in a couple of cases.  Corrected them and it ran straight away!  The lowercase tip for sub routine names is a useful one. 

The program now works well.  Each square has two passes at 90° to each other to form the chequer plate and then that square is repeated across the width with one subroutine and done the length with the higher level one.

I also had a look but Russ's link and intend to go back and study that further.  I must also look at the VAR monitor as that will be useful in future.

Once again the forum has come up trumps,

Thanks Guys,

Andrew

5
Having got on top of subroutine syntax ( for the moment anyway ! ) I am still trying to produce a chequer plate pattern using nested subroutines to repeat a small block many times to produce the size of chequer plate that I need.

# parameters look like an answer to a maiden ( programmer's prayer ) but Mach3 just skips through the main program without doing anything.

Can anyone spot what I am doing wrong?  My first efforts are attached, I have taken line numberhe parameter setting lines in case that was causing problems.  The subroutines cutting the chequer plate square O4321 and O1234 work OK if I get rid of all the offset shifting sub routines O444 and O555 and hard code a few moves.

Regards,

Andrew

6
G-Code, CAD, and CAM discussions / Re: Subroutine calls not working
« on: May 10, 2012, 05:21:58 PM »
Ahhhhh!!   So simple and easy when you know how.

Program now works, thank you very much for your help.  The speed of your reply was amazing.

Very useful forum, hope this one helps others.

Regards,

Andrew

7
G-Code, CAD, and CAM discussions / Subroutine calls not working
« on: May 10, 2012, 04:57:56 PM »
I am still at an early stage with G Code programming.  I am trying to use a subroutine to machine a chequerplate pattern and using G52 to shift the origin for repeating the pattern.

I have looked at several posts with similar problems but I can't see why my program just runs through the main code part without calling the subroutine.  What does the percent sign do?  Someone seemed to solve a problem by putting one at the end after the M99 but it doesn't make any difference to my program.

My syntax seems the same as the Mach3 manual.  What am I doing wrong?

File is attached.

Andrew

8
FAQs / Work offsetting difficulties using Offset screen and edge finder
« on: November 16, 2011, 05:41:45 PM »
I have a Sieg mill and Mach 3 running Ok but when I go to the Offset screen the documentation talks about the touch buttons and doesn't mention the select buttons.  If I try and set G54 with an edge finder and enter the diameter of the edge finder, save the settings, then jog the axes away from the current positions then press goto zero on the program run screen the tool zeros to my required work offset origin but it has not allowed for the edge finder diameter.  What am I doing wrong? :(   

Pages: 1