Hello Guest it is April 24, 2024, 10:04:41 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 - Flyer Tuck

Pages: 1 2 3 »
1
General Mach Discussion / Re: Including files in G-code file.
« on: May 01, 2015, 04:39:43 PM »
Does Mach4 implement local variables?

My assumptions would be yes, since they implemented Macro Codes G65, G66 and G67 and it would be very poor programming practice to let a G65 call step on a global variable.

Also, if I download Mach4 for trial, can I simulate all operations like I can with this licenced Mach3 or are their limitations imposed?

Rick

2
General Mach Discussion / Re: Including files in G-code file.
« on: May 01, 2015, 02:23:06 PM »
TP,

Bothering for the last time, I hope...

Two things:

1. The Position display for all axis only shows actual values to 3 decimal places, while the display has 4 places. In other words, while the screen could show 0.0000 resolution, the rightmost value is always zero, even if I intentionally set it to something else. If I click "To Go", it shows 0.0000 resolution.

How do I make the primary display show full resolution?

2. It appears Mach3 does not support "Local Variables" like other controllers I use. When I change #1 in a subroutine, it also changes the value for the calling routines.

Is there only one set of Variables #1 to #33?

Thanks for the sharing of your knowledge of the internals...

Rick

3
General Mach Discussion / Re: Including files in G-code file.
« on: April 28, 2015, 02:14:58 PM »
Forgot to answer your questions: Mach3 Version R3.043.066 and no controller right now. Just testing dry runs. Very simple mill uses LPT port.

I am designing a new gantry system and will be buying Mach4 Hobby to support it. (I want Macro G65, G66 and G67.)

Thanks for the heads up on Tool Offsets. Since I almost always do parametric programming, I take care of tool offsets in my code to take full control of it...

Such as:

(Definition of the Cover to be outlined)
#1 = 4 (X Dimension)
#2 = 0.8 (Y Dimension)
#3 = .1 (Corner Radius)
#4 = 0.25 (Ear Radius)
#5 = 0.2 (Ear Height)
#6 = 1.8 (Distance between Ear Centers)
#7 = 0.25 (Tool Diameter)
#113 = 15. (Milling Feedrate)
(Calculation of the parameters for subs in directory)
#140 = [#3 + #7/2] (Corner Radius + Tool Radius)
#141 = [#2 - 2 * #3] (Y - 2 times Corner Radius)
#142 = [#2 - 2 * #3] (Y - 2 times Corner Radius)
#157 = [#4 - #5]
#156 = [COS[ASIN[#157 / #4]]*#4]
#150 = [[#1 - [#6 + 2 * #156]] / 2]
#151 = [#6 - 2 * #156]
#152 = [[#1 - 2 * #156] / 2]
#153 = #150
#154 = #151
#155 = #152
G0G90X0.1Y-0.125
G91
M98 (O2001)
M98 (O2012)
M98 (O2003)
M98 (O2014)
M98 (O2018)
M98 (O2007)
M98 (O2016)
M98 (O2005)
G90
G0X.1Y-1.0
G91
M98 (O2002)
M98 (O2004)
M98 (O2008)
M98 (O2006)
G90
G0X.1Y-6.0
G91
M98 (O2021)
M98 (O2022)
M98 (O2023)
M98 (O2024)
M98 (O2028)
M98 (O2027)
M98 (O2026)
M98 (O2025)
G90
M30
%

#7 is the tool diameter and #140 adjust radius for tool radius. I modify the Z values for each section using a different tool instead of using tool offsets, again, to take firmer control.

Rick

4
General Mach Discussion / Re: Including files in G-code file.
« on: April 28, 2015, 12:13:50 PM »
It is working well, but the code window definitely gets confused with the combination of subroutines and variables.

Sometimes a subroutine is running and the code window shows the first several lines of the main, which is all variable definitions and value settings.

I'll send examples, if you wish...

One stupid question: How do you set the resolution of the position indicators on the Program Run page? The set up always has a zero in the 0.000X location when I am specifically setting ot to another value. Resolution is on to thousandths instead of ten thousandths.

Thanks much for you help.

85 subroutines separated and defined...

Rick


5
General Mach Discussion / Re: Including files in G-code file.
« on: April 27, 2015, 03:19:23 AM »
TP,

The use of subs works, but there are some unusual artifacts that I have had happen.

1. The syntax: M98 (file.txt) is required, not M98 "file.txt"

It is very strange to suddenly have to think of () as something other than comments!

2. I have had 4 times during testing where I would make a valid change and it would not load. It would just stop loading. Sometimes, but not in all cases, it would show a subroutine in the code box instead of the main.

I could not make that file work. However, in all cases, I copied all of the code from the file and pasted it into another file with a different filename and it worked. I do not have a clue...

3. While testing, I detected a logic error in my code and stopped the program. It stopped showing a subroutine. I clicked "Edit G-Code" and Notepad opened with the main code. I made my edits, saved and exited Notepad. The file locked up and would not load. I clicked "Close G-Code" and reloaded it by clicking "Recent File" and opening it. It would not load.

After much searching I found the issue. The code had not been saved into the main programs file. It had overwritten the subroutine file that had been on the screen when I stopped execution of the program. Strange.

4. When executing with subroutines, the asynchronous behavior between executing G-Code and the display in the code window is very disconcerting. The code display may get a few subroutines ahead of what the path is showing on the display.


I've placed a couple dozen subroutines in the directory and have been using it, but it scares me that it sometimes does not run for no apparent reason.

An aside question: Mach4 includes support for Macro G-Codes 65, 66 and 67. Do they also support the subroutine directory? In other words, would "G65 (somefile.txt) A23.3 B14.1" work by calling the file and passing 23.3 and 14.1 to the subroutine as #1 and #2?

Thanks again for the help,

Rick

6
General Mach Discussion / Re: Including files in G-code file.
« on: April 25, 2015, 02:26:36 AM »
Thanks TP. I missed that.

Looking at the impact. I would need to take each routine, make it a separate file with some naming convention and then use M98 "SomeGoodName" instead of M98 P345.

Thanks again. Need to read more closely...

Rick

7
General Mach Discussion / Including files in G-code file.
« on: April 24, 2015, 08:38:32 PM »
Hi all. Back after a long absence...

I am using a system with Mach 3 as its controller.

I have developed a large library of support subroutines that I use extensively in new projects.

I've looked at the documentation and cannot find a way, but hope there is a method within Mach3 that allows you to include the text of a second file into your primary file when loaded.

I know I can cut and paste my support subroutines into any new project. But that would not incorporate improvements I make later.

Something like:

M30

INCLUDE "SUPORTSUBS.TXT"

would load the current version of the file when executed, not a snapshot as it existed when I did the current project.

Rick


8
General Mach Discussion / ATAN in G Code
« on: February 26, 2010, 04:48:30 PM »
NEVER MIND. MY ERROR>


9
General Mach Discussion / Re: Negatating variables in G-code.
« on: January 30, 2010, 11:41:40 PM »
Flyer, I'm assuming you mean that you would like L0 as a subroutine argument to mean that the subroutine does not get executed-

If so, this interpretation was implemented in Mach a year ago or so. Its very useful as it allows conditional execution, which otherwise can't be implemented in Mach as it doesn't support If Then statements.

Paul T.

It does work to cause the canned cycle to not execute when given. However, it modified the Q word. I had 0.1 in the Q word, it applied 0.01. the program took ages when I tried it. Sped back up after setting L1 and giving it a safe X and Y Location to drill.


10
General Mach Discussion / Re: Negatating variables in G-code.
« on: January 30, 2010, 02:18:38 PM »
Wow, there's a G code standard that states that expressiions like #1 = [-#2] aren't legal?

It appears from reading the specifications there are several cases where the committee had it's head buried where the sun doesn't shine.

My pet peeve at this time is not allowing L0 on canned cycles. Other machines I have programmed do allow this, but the spec does not.

It is very useful to separate the definition of the canned cycle and the locations it is to be executed...

Pages: 1 2 3 »