Do not repeat M# call

Do not repeat M# call

daniel_lyall
Mentor Mentor
654 Views
6 Replies
Message 1 of 7

Do not repeat M# call

daniel_lyall
Mentor
Mentor

How do you stop command from repeating when it is in the first part of the G code and at the end of the Gcode I know for the header you use && !isFirstSection() it is the M11 in red.

At the start 

%
O1005
(POST PROG )
(TOOL MATERIAL )
(GENERATED ON WEDNESDAY, DECEMBER 11, 2019 103538)
(T3 D=6.35 CR=0. - FLAT END MILL)
N1 G90 G94 G17 G49 G00 G40 G80
N2 G21
N3 G53 G90 Z0.

(2D POCKET1)
N4 T3 M06
(BOSCH 14 SINGLE FLUTE)
N5 S20000 M03
N6 G54
N7 M11
 
at the end 
 
N302 G93 B192.351 F1703.8
N303 G00 Z21.771
N304 G94

N305 G53 G90 Z0.
N306 G49
N307 G5.1 Q0
N308 M11
N309 G00 B0.
N310 M10
N311 G53 G90 X0. Y0.
N312 M30
%



Win10 pro | 16 GB ram | 4 GB graphics Quadro K2200 | Intel(R) 8Xeon(R) CPU E5-1620 v3 @ 3.50GHz 3.50 GHz

Daniel Lyall
The Big Boss
Mach3 User
My Websight, Daniels Wheelchair Customisations.
Facebook | Twitter | LinkedIn

0 Likes
655 Views
6 Replies
Replies (6)
Message 2 of 7

engineguy
Mentor
Mentor

@daniel_lyall 

 

Daniel

I would expect looking at the code around the M11 that to be found in the "onClose" area right at the end of the PP.

 

Regards

Rob

0 Likes
Message 3 of 7

daniel_lyall
Mentor
Mentor

No, it is not in there it is in one places only in the Post Processor  

 

 writeBlockmFormat.format (11) && something would go here to stop it repeating maybe());
 
 to stop it going in the first part of the G code you use what is below if it is in the header
if (properties.useSaftyLine && !isFirstSection()) {


Win10 pro | 16 GB ram | 4 GB graphics Quadro K2200 | Intel(R) 8Xeon(R) CPU E5-1620 v3 @ 3.50GHz 3.50 GHz

Daniel Lyall
The Big Boss
Mach3 User
My Websight, Daniels Wheelchair Customisations.
Facebook | Twitter | LinkedIn

0 Likes
Message 4 of 7

engineguy
Mentor
Mentor

@daniel_lyall 

What PP is it? None of the PPs I use have an M11 in them at all, what is it being used for? Usually it is used along with M10 for clamping/unclamping.

Regards

Rob

0 Likes
Message 5 of 7

daniel_lyall
Mentor
Mentor

It is a custom post it started life as a fanuc post, yes it is for clamping and unclamping using M10 and M11


Win10 pro | 16 GB ram | 4 GB graphics Quadro K2200 | Intel(R) 8Xeon(R) CPU E5-1620 v3 @ 3.50GHz 3.50 GHz

Daniel Lyall
The Big Boss
Mach3 User
My Websight, Daniels Wheelchair Customisations.
Facebook | Twitter | LinkedIn

0 Likes
Message 6 of 7

boopathi.sivakumar
Autodesk
Autodesk

@daniel_lyall 

onclose() section comes into play at end of the total process,

move the code onsectionend() instead of onclose() and you can use 

if (!isLastSection()){
}
then it will help you not post at the end of the code.
you can attach the post also i happy to have a look at it.
 

Boopathi Sivakumar
Principal Technology Consultant

0 Likes
Message 7 of 7

daniel_lyall
Mentor
Mentor

@boopathi.sivakumar  Thanks I could not get what you suggested to work, I am more than likely doing it wrong I am not very good at coding, post attached it is not overly important.


Win10 pro | 16 GB ram | 4 GB graphics Quadro K2200 | Intel(R) 8Xeon(R) CPU E5-1620 v3 @ 3.50GHz 3.50 GHz

Daniel Lyall
The Big Boss
Mach3 User
My Websight, Daniels Wheelchair Customisations.
Facebook | Twitter | LinkedIn

0 Likes