tool change

More
03 Sep 2021 11:40 #219511 by Clements
tool change was created by Clements
Hi 
After a couple of years of not working wih my cnc i rebuid the machine and installed a new version of linuxcnc. (2.8)
Since then I have had a lot of problems with getting things to work. 
One of them is getting the toolchange to work in gmocappy.

I followed the online manual and at some point you have to copy some python files from the sim folder to the machine folder. I couldn't find the sim folder anywhere so I downloaded the (latests) files from Github.

The change of a tool and measuring procedure seems to work ok. In Gmocappy screen I press the T? M6 button and select another tool. 
The spindle moves to the change position and after klicking ok it moves down to the sensor position. 
Soon as it touches the machine stops and shows the next error:

"Unknown word where unary operation could be" 

I allready added % signs in the change.ngc file otherwise it would give a operator error.

I had to comment out the tool change lines in Piedras.hal to get stuff to work.

i have attached some of my files. I am completely new to Linux and programming so bear with me.
Can you point me in the right direction?

File Attachment:

File Name: change.ngc
File Size:2 KB

File Attachment:

File Name: custom.hal
File Size:1 KB

File Attachment:

File Name: Piedras.hal
File Size:4 KB

File Attachment:

File Name: custom_postgui.hal
File Size:1 KB

File Attachment:

File Name: Piedras.ini
File Size:3 KB
Attachments:

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

More
03 Sep 2021 14:33 #219528 by andypugh
Replied by andypugh on topic tool change
Does it say on which line the error is found?

i see several instances of
O100 if [#<_task> EQ 0]
        (debug, Task ist Null)
O100     return [999]
O100 endif

And I am fairly sure that needs to be
O100 if [#<_task> EQ 0]
        (debug, Task ist Null)
O<change>    return [999]
O100 endif

ie, return from the <change> subroutine, not return from the Onnn IF.

I think this might be the problem:
G0 Z2
 This is commented out only for sim.
F #<_hal[gmoccapy.probevel]>

"This" will be interpreted as a tool number command....
The following user(s) said Thank You: Clements

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

More
05 Sep 2021 09:33 #219659 by Clements
Replied by Clements on topic tool change
Wel that was easy 
a simple ; does the trick

now into tuning the machine 

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

More
05 Sep 2021 09:39 #219660 by Clements
Replied by Clements on topic tool change
I didn’t need to edit the other blocks by the way

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

More
08 Sep 2021 17:26 #219978 by andypugh
Replied by andypugh on topic tool change

I didn’t need to edit the other blocks by the way

It might work now, but it shouldn't. I wouldn't suggest relying on it working like that indefinitely. 

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

More
11 Sep 2021 10:50 #220207 by Clements
Replied by Clements on topic tool change
with a manual toolchange is works but I am running into some errors when a tool change is called in de g-code
I'll start with your suggestion

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

Moderators: newbynobiHansU
Time to create page: 0.075 seconds
Powered by Kunena Forum