Hello Guest it is April 19, 2024, 04:20:22 AM

Author Topic: how do you supress look ahead in macro programming?  (Read 5890 times)

0 Members and 1 Guest are viewing this topic.

how do you supress look ahead in macro programming?
« on: August 14, 2018, 01:48:55 PM »
Hi I have come in to some issues when using Macro B programming.
it seems like lookahead is messing with some variables im trying to get get. Is there any way to turn off lookahead in a macro B program?
I know the haas uses a forward slash. I was hoping we had something similar.
Re: how do you supress look ahead in macro programming?
« Reply #1 on: August 14, 2018, 02:35:49 PM »
I ran into this issue while writing the Code for our OD Grinders that use our in process gauge.  I just set the Look ahead lines to 1.  
However, I am sure most people don't want to run their machines with a look ahead of 1.  It works for us because there is no need for our Grinders to see past 1 line.
I'm curious to see if there is a similar way to limit look ahead like the Haas controller has.  
Chad Byrd
Re: how do you supress look ahead in macro programming?
« Reply #2 on: August 14, 2018, 02:37:43 PM »
thanks for the reply. I wish that could work for me. Part of the program needs to limit lookahead to 1 and rest of the program needs to buffer the rest of the other lines.
Re: how do you supress look ahead in macro programming?
« Reply #3 on: August 14, 2018, 02:39:30 PM »
Yeah, I posted on here so I make sure I keep up with this thread.  Have you seen the Haas tip of the day when they talk about the look ahead?  The "/" is a great solution in my opinion. 
Chad Byrd
Re: how do you supress look ahead in macro programming?
« Reply #4 on: August 14, 2018, 02:42:10 PM »
yes thats exactly what i need that would be amazing.
Re: how do you supress look ahead in macro programming?
« Reply #5 on: August 14, 2018, 03:48:37 PM »
there is a code #3004 that controls exact stop check. wonder what that is and how to use it.
seems like it might be what we need. I will try it tonight. unless youve tried this before?
« Last Edit: August 14, 2018, 03:50:15 PM by a3dcreator »
Re: how do you supress look ahead in macro programming?
« Reply #6 on: August 14, 2018, 04:10:27 PM »
I'm not sure if that is exactly what you're looking for, although it may work.  
It is essentially turning on Exact Stop; which you can do non-modal with G09 or modal with G61.  Check the Mach4 G Code Programming Manual for reference.
G64 puts it back to constant velocity.
It's worth a shot.  
I can't find anything online of much use (just a quick search) and I searched through 3 different sources for #VARS that Mach4 offers with no luck finding anything to do with look ahead.
« Last Edit: August 14, 2018, 04:12:32 PM by Cbyrdtopper »
Chad Byrd
Re: how do you supress look ahead in macro programming?
« Reply #7 on: August 14, 2018, 07:39:41 PM »
Since Mach4 was based off of a Fanuc 21i controller (I think 21i) I looked up fanuc look ahead stuff.
I found this forum post:
https://www.practicalmachinist.com/vb/cnc-machining/5043-look-ahead-288314/

It says to put a line with G53 before the moves that need to be essentially 1 line look ahead.  They called it "buffering" in this forum post.
G53 is machine coordinate move so I was confused reading it, but the post explained G53 on a line by itself apparently prevents this "buffering".
I did load up Mach4 on my laptop at home and made a simple program that I put G53 in between each individual move. It didn't give me an error for reading just G53.
Not sure if it will work, but hey, give it a shot.

Still, I like the way haas does their look ahead inhibit.  G103 or a "/".  Hopefully someone from Artsoft will jump on here and tell us for sure what to do, or implement something similar to the Haas or find how fanuc actually does it to keep with the fanuc type controller.
« Last Edit: August 14, 2018, 07:43:14 PM by Cbyrdtopper »
Chad Byrd
Re: how do you supress look ahead in macro programming?
« Reply #8 on: August 14, 2018, 07:57:03 PM »
So,
I was doing some testing just now to see what the G53 would do.  It didn't cause an exact stop; but, the "/" in front of the line did.
Try this code.  Pretty cool.  Notice in my initial line I have G64 (Constant Velocity) turned on.  
So the lines that don't have the "/" at the front cause the corners to be rounded since G64 is on.
Try the "/" on your macro and see what happens.

(Test G Code File)
G90 G00 G20 G40 G49 G80 G64
(Variables)
#100 = 0
#101 = 1
#104 = 50

/G01 X #100 F #104
/G01 Y #100 F #104
/G01 X #101 F #104
/G01 Y #101 F #104

G01 X #100 F #104
G01 Y #100 F #104
G01 X #101 F #104
G01 Y #101 F #104
(Date and Time #3011)
M30
« Last Edit: August 14, 2018, 07:58:53 PM by Cbyrdtopper »
Chad Byrd
Re: how do you supress look ahead in macro programming?
« Reply #9 on: August 14, 2018, 08:36:42 PM »
wow so forward slashes work huh?
ill let you know how it goes tonight.