PathPilot Lathe with 6 place turret

More
16 Apr 2017 13:10 #91450 by brianTruck
Is there a feedback mechanism to tell my tool change code that G30 has completed ? Similar to ishomed ?

axis.N.homed
(bit, out)
axis.N.homing
(bit, out) TRUE if the joint is currently homing



Brian

Please Log in or Create an account to join the conversation.

More
16 Apr 2017 13:17 #91453 by andypugh

I can't find any info on that "FEATURES=64". I have seen some reference to it meaning 64 bit kernel, But can't confirm that.


It's a bitmask of flags.

linuxcnc.org/docs/2.7/html/remap/remap.h...i_file_configuration

64 (bit 6) is something specific to PathPilot.
The following user(s) said Thank You: brianTruck

Please Log in or Create an account to join the conversation.

More
18 Apr 2017 19:40 - 18 Apr 2017 19:45 #91595 by brianTruck
So I get the:

REMAP=M6 modalgroup=6 prolog=change_prolog ngc=toolchange epilog=change_epilog

in the ini file, but I don't get what to write in the toolchange.ngc file.


o<toolchange> sub

G30 # go to g30
T? # now change tool
o<toolchange> endsub [1]

M2

Brian
Last edit: 18 Apr 2017 19:45 by brianTruck.

Please Log in or Create an account to join the conversation.

More
19 Apr 2017 16:38 #91653 by andypugh
I would use something like

G53 G00 X0
G53 G0 Z1000

to go to the home position.

You don't need to do anything with T in the G-code sub

The prolog code will have populate the parameters #<tool> and #<pocket> for you to use.

An example toolchange.ngc is here, though it is a rather fancy one that allows extra wear offsets:

github.com/LinuxCNC/linuxcnc/blob/master...anucy/toolchange.ngc
The following user(s) said Thank You: brianTruck

Please Log in or Create an account to join the conversation.

More
20 Apr 2017 19:39 #91718 by brianTruck
Thanks' Andy

So in the .ini file I put :

REMAP = T prolog=get_T_number ngc=toolchange

I made a file called toolchange.ngc with this code:

O<toolchange> sub

#<tool> = [#<tool> MOD 100]
G53 G00 X0
G53 G0 Z1000
M6 T#<tool>

O<toolchange> endsub [0]


And in remap.py I added this code and compiled it to remap.pyc :

from stdglue import *

# Extract the T number into a parameter, but don't try anything else clever

def get_T_number(self,**words):
try:
cblock = self.blocks[self.remap_level]
if not cblock.t_flag:
self.set_errormsg("T requires a tool number")
return INTERP_ERROR
self.params["tool"] = cblock.t_number
return INTERP_OK
except Exception, e:
self.set_errormsg("T%d/prepare_prolog: %s" % (int(words), e))
return INTERP_ERROR


Everything fires up ok ,but when i call a tool chnge ,say "M6 T01" I get:

pycall(remap.get_T_number)failed

Thanks'
Brian

Please Log in or Create an account to join the conversation.

More
20 Apr 2017 20:00 #91719 by andypugh
Where is the remap.py file? (there is actually no need to compile the .py file, it will get auto-compiled as needed)

Try making the SUBROUTINE path match the sample file:
github.com/LinuxCNC/linuxcnc/blob/master...lathe-fanucy.ini#L27
And put the remap,py and toplevel,py in the same folder as the INI.

Please Log in or Create an account to join the conversation.

More
20 Apr 2017 21:17 #91724 by brianTruck
Andy,
I believe the files are in the right place ,what does this line do? I don't have it in mine and I see it references the "python-stdglue" like your remap file does.

github.com/LinuxCNC/linuxcnc/blob/master...athe-fanucy.ini#L104

Thanks'
Brian

Please Log in or Create an account to join the conversation.

More
20 Apr 2017 21:38 #91726 by andypugh
Ah yes, add that whole section. I had lost it there at the end.

Please Log in or Create an account to join the conversation.

More
14 May 2017 20:18 #93196 by dnh2000
Hi brianTruck

Could you post your Hal and Ini files?
I am working on converting a Boxford 125 to pathpilot and are struggeling with many of the problems you seem to have solved.

Please Log in or Create an account to join the conversation.

More
15 May 2017 11:22 #93217 by brianTruck
Here are my current files , m6 remap is commented out because it still is not working right. I will be working on getting spindle speed input next.

Brian
Attachments:

Please Log in or Create an account to join the conversation.

Moderators: cncbasher
Time to create page: 0.170 seconds
Powered by Kunena Forum