Post processor needs altering for rigid tapping...

Post processor needs altering for rigid tapping...

mailZWX5Y
Enthusiast Enthusiast
2,011 Views
20 Replies
Message 1 of 21

Post processor needs altering for rigid tapping...

mailZWX5Y
Enthusiast
Enthusiast

After the great help i had before on my post to allow use of a tapping head, I have now modified the mill to allow me to use rigid tapping 🙂

I have attached my post below as I have tweaked it a little since it was last on the forum.

What I want is to be able to use the Tapping process, set a feed-rate and possible bottom dwell but have the code come out designed around this plugin code for my motion controller...

M84 Q-20 P1.5 S300 R400

Where...
M84 = plugin call macro
Q = thread depth
P = thread pitch
S = feed rate
R = retract rate

I did look myself but these post processors are still above my head for this type of change, the positioning, clearance, feed height are all as before.

 

It cant use the canned cycle style so will need a call after each move.

Would be great if someone could have a look for me 🙂

Many thanks

0 Likes
Accepted solutions (1)
2,012 Views
20 Replies
Replies (20)
Message 2 of 21

mailZWX5Y
Enthusiast
Enthusiast

Hacking through this using blind trial and error, i can get the M84 done, I can format the Z as an m using mFormat so that sort of tells me i need a new format declaring for Q, i copy the mFormat line and change to qFormat with a prefix of Q but then the post fails and does nothing.

 

Is there a reason I cannot add a new format?

 

Or a correct way??

0 Likes
Message 3 of 21

mailZWX5Y
Enthusiast
Enthusiast

I've almost got this cracked now, with a little help 🙂

 

Is there a way to output a Z move to clearance height regardless of modality?

 

The Z is being controlled by the macro/controller via the Q word but the post does not see this as a Z move and therefore does not output any Z retract - this could be nasty 🙂

 

Needs to force a Z move regardless???

0 Likes
Message 4 of 21

mailZWX5Y
Enthusiast
Enthusiast

It needed a zOutput.Reset adding  - all working now.:)

0 Likes
Message 5 of 21

daniel_lyall
Mentor
Mentor

Hi dave


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 21

HughesTooling
Consultant
Consultant

You were asking for some reference material in your other post on rigid tapping, if you look in the "Help! My post processor needs to be edited; now what?" post in the stickies at the top of this forum the first post has links to a help file and PDF.

 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


0 Likes
Message 7 of 21

mailZWX5Y
Enthusiast
Enthusiast

Thanks again, will look now.

0 Likes
Message 8 of 21

mailZWX5Y
Enthusiast
Enthusiast

Just educating myself here..

 

Any reason why adding the lines marked //****** would make the post fail??

 

  if (insertToolCall ||
      isFirstSection() ||
      (rpmFormat.areDifferent(tool.spindleRPM, sOutput.getCurrent())) ||
      (tool.clockwise != getPreviousSection().getTool().clockwise)) {
    if (tool.spindleRPM < 1) {
      error(localize("Spindle speed out of range."));
      return;
    }
    if (tool.spindleRPM > 99999) {
      warning(localize("Spindle speed exceeds maximum value."));
    }
    
    if (cycleType != "tapping") {       //**********
      writeBlock(sOutput.format(tool.spindleRPM), mFormat.format(tool.clockwise ? 3 : 4));
    } //**********
  }

When i use the new post edited yesterday (which works nicely thanks), it has the oddity where it starts the spindle for tapping but the macro prefers to be called with the spindle stopped as it has to start it itself in sync mode, so what happens is the spindle starts, it moves to position, the spindle stops, the spindle starts, hole is tapped, spindle stops etc.

 

I thought it would be nice to skip the spindle start on all "tapping" calls and just let the macro do it 🙂

 

Clearly i have not grasped the theory yet 🙂

0 Likes
Message 9 of 21

HughesTooling
Consultant
Consultant

I think cycleType is only available in oncycle, to get it in onSection use.

 

    if (getParameter("operation:cycleType") != "tapping") {       //**********
		writeBlock(sOutput.format(tool.spindleRPM), mFormat.format(tool.clockwise ? 3 : 4));
	} 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Message 10 of 21

mailZWX5Y
Enthusiast
Enthusiast

Brilliant, I still have plenty to learn then 🙂

 

That works perfectly.

 

Thanks once again.

0 Likes
Message 11 of 21

mailZWX5Y
Enthusiast
Enthusiast

Hmm, ok i said it worked perfectly but today a tried the first job on it and the post failed - there was no tapping operation in the job.

 

Seems it only works on certain jobs - clearly not good.

 

Is there a way forwards here ?

 

 

 

 

Also, it says in the failed file "see log for details" - what log would that be and does it help??

0 Likes
Message 12 of 21

daniel_lyall
Mentor
Mentor

Dave Post the post processor stick it in code tags, post the G code what failed plus the .f3d.

 

It will make it easy to get support, they can test the code on the file you used and may well find where it failed.

 

The more info you can give the better the supporting person can help it makes there job easy.

 


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 13 of 21

HughesTooling
Consultant
Consultant

@mailZWX5Y are you using brackets as your editor? If you are try changing to notepad, it starts faster and picks up the error log file more reliably. Another option as an editor is NC Corrector.

 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


0 Likes
Message 14 of 21

mailZWX5Y
Enthusiast
Enthusiast

Thanks i'll post up the file in a short while.

 

I am on a Mac so using TextEdit but its not great i must admit, is there a suitable Mac editor?

0 Likes
Message 15 of 21

mailZWX5Y
Enthusiast
Enthusiast

Here we go, zipped folder with 4 files...

 

Test2 is the file i was trying the edits on before and it still passes ok.

 

Test1 is the real job on the same post and it fails.

 

 

 

 

Thanks for looking

0 Likes
Message 16 of 21

HughesTooling
Consultant
Consultant

You haven't attached your postprocessor, can't help without that.

 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


0 Likes
Message 17 of 21

mailZWX5Y
Enthusiast
Enthusiast

oops, here we go... 😉

0 Likes
Message 18 of 21

HughesTooling
Consultant
Consultant

You need to check for a drill operation before you can test for a cycle. If you have a mill operation there's no cycle so you get an error.

    //only insert M3 if we are NOT tapping
	if (getParameter("operation:tool_isDrill")){
		if (getParameter("operation:cycleType") != "tapping") {     
		writeBlock(sOutput.format(tool.spindleRPM), mFormat.format(tool.clockwise ? 3 : 4));
		}
	}

 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


0 Likes
Message 19 of 21

mailZWX5Y
Enthusiast
Enthusiast

Thanks but i seem to be not helping i think, now it misses the S / M line on the first process...

 

(FACE1)
M5
M9
T12 M6
G54
M7
G0 X81.25 Y7.5
G43 Z65. H12
Z45.
G1 Z42. F900.
G18 G3 X78.75 Z39.5 R2.5
G1 X78.
X-13. F1400.
Z38.5
X78.
Z38.
X-13.
0 Likes
Message 20 of 21

HughesTooling
Consultant
Consultant
Accepted solution

Sorry not paying attention, try this.

    //only insert M3 if we are NOT tapping
	if (getParameter("operation:tool_isDrill")){
		if (getParameter("operation:cycleType") != "tapping") {     
		writeBlock(sOutput.format(tool.spindleRPM), mFormat.format(tool.clockwise ? 3 : 4));
		}
	}else{
		writeBlock(sOutput.format(tool.spindleRPM), mFormat.format(tool.clockwise ? 3 : 4));
		}

 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature