Automatic Touch-Off after tool change

More
24 Jul 2015 04:03 #60868 by cahlfors
Yes, and a remap.pyc - in the python folder.

Thanks for trying to help iron this out!

/Christoffer

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

More
24 Jul 2015 06:12 #60872 by andypugh
The pyc is a sign that the py was called at least once, but I would be tempted to add a "print" to the file to see if it being called every time.
You could do the same with the other files, to make sure that they are being correctly imported.
It is possible that the problem is with the python path defined in the INI. I confess I am no expert in that area.
(maybe remap is finding the wrong files with the right names?)

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

More
26 Jul 2015 02:30 #60929 by cahlfors
By using your suggested method, I have concluded that all the Python code indeed executes and that the execution stops in the manual_change.ngc on either of the following lines:
; move to toolchange position: z, then xy
g53 g0 Z #<_ini[change_position]z>
g53 g0 X #<_ini[change_position]x> Y #<_ini[change_position]y>
The first line executes if there is no movement to do, but the second line always seizes since there is always at least a Y movement to do.
If I comment these lines out, the manual_change.ngc code continues until the next movement should take place and seizes there instead.
The really weird thing is that if I copy one of these lines and paste into the GUI in the MDI tab, the mill moves to the coordinates as defined in the *.ini file, just as expected. But not from the program. :huh:

Maybe even more puzzled now,
/Christoffer

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

More
27 Jul 2015 20:36 #60958 by andypugh

The first line executes if there is no movement to do, but the second line always seizes since there is always at least a Y movement to do.


This sounds like it might be related to motion.feed-hold, motion.adaptive-feed or motions.spindle.at-speed

ie, some HAL pin that prevents motion is active, and the machine is waiting to be allowed to move.

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

More
28 Jul 2015 13:41 #60978 by newbynobi
You are using manual_toolchange.hal, I do asume you have not connected the related toolchange pin.

For gmoccapy it would be somethink like:
# The next two lines are only needed if the pins had been connected before
 unlinkp iocontrol.0.tool-change
 unlinkp iocontrol.0.tool-changed

 # link to gmoccapy toolchange, so you get the advantage of tool description on change dialog
 net tool-change            gmoccapy.toolchange-change    <=   iocontrol.0.tool-change 
 net tool-changed           gmoccapy.toolchange-changed   <=   iocontrol.0.tool-changed
 net tool-prep-number       gmoccapy.toolchange-number    <=   iocontrol.0.tool-prep-number
 net tool-prep-loop         iocontrol.0.tool-prepare      <=   iocontrol.0.tool-prepared

Norbert

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

More
30 Jul 2015 19:34 #61038 by cahlfors
@andypugh:
The values of the suggested HAL pins are:
motion.feed-hold = false
motion.adaptive-feed = 1
motion.spindle-at-speed = true
I believe this is correct?
To follow through on the idea, I checked all the other motion HAL pins and any other pins that looked relevant. All seem okay.
But I did notice another thing. In the MDI tab in Axis, there is a window where you can see which G-codes that are active:
G80 G17 G40 G21 G90 G94 G54 G49 G99 G64
G97 G91.1 G8 M5 M9 M48 M53 M0 F0 S0
I understand that F0 means feed=0 and that could be the culprit. With zero feed, a move would take forever - just as is the case! So I tried to issue an F50 first and even inserting it into the manual_change.ngc, but the behavior is the same regardless.
The beginning of manual_change.ngc is setting some parameters which I do not understand (I always thought # is for comment?):
#<metric> = #<_metric>
 #<absolute> = #<_absolute>
 #<feed> = #<_feed> 
Clearly, feed is one of them. I tried to comment these lines away (with a semicolon;), but then I get a missing parameter error.
Do you think feed is the issue here? If so, what would be the next logical step to try?

@newbynobi:
I am using manualtoolchange.hal (spelled this way). Could there be a confusion?
Also, I am using Axis. Similar code to what you are referring to is executed (is that a correct way to call it, or is it more of parameter setting?) in manualtoolchange.hal:
# in case they were linked already
 unlinkp iocontrol.0.tool-change
 unlinkp iocontrol.0.tool-changed
 
 net tool-change-loop  iocontrol.0.tool-change  iocontrol.0.tool-changed
 
# rest is in gladevcp.hal

and in gladevcp.hal:
net tool-change  motion.digital-out-00 =>  gladevcp.change-led 
 net tool-changed gladevcp.changed     <=   motion.digital-in-00
 net toolno       motion.analog-out-00  =>  gladevcp.number
 
 
 net probing        motion.digital-out-01 => gladevcp.probing-led
 net enable         motion.digital-out-02 => gladevcp.enable
 net probe-contact  gladevcp.probe-contact <= motion.probe-input 
 net reftool        gladevcp.reftool   <=    motion.digital-in-01
 
 net reflen         motion.analog-out-01 =>  gladevcp.reflen
 net currlen        motion.analog-out-02 =>  gladevcp.currlen

Thanks to you both for reaching out to help!
A noob in need is a noob indeed! :)

/Chris

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

More
30 Jul 2015 19:53 #61039 by andypugh

The beginning of manual_change.ngc is setting some parameters which I do not understand (I always thought # is for comment?):


In G-code # means a paramter. In traditional G-code they were numbers #1. #2 etc.

LinuxCNC extended that to use text labels, #<myparameter> for example.
Then some system-wide named parameters were introduced, such as #<_feed>
www.linuxcnc.org/docs/html/gcode/overvie...d_named_parameters_a
However, these were not present until LinuxCNC version 2.6, in the 2.5 documentation you find
www.linuxcnc.org/docs/2.5/html/gcode/ove...ub:system-parameters

Rather than just commenting-out the #<feed> = #<_feed> line you could try adding an explicit #<feed> = 50 but as G0 moves are not affected by feed rate, it probably isn't this.

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

More
30 Jul 2015 21:35 #61040 by cahlfors
Yep, tried #<feed> = 50 and it made no difference.
I also checked all the set G-codes and tried changing them where it seemed likely to make a difference. No change.
So it is back to the HAL pins again, then. Is there a way to manipulate them in Axis?

Thanks,
/Christoffer

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

More
30 Jul 2015 21:45 #61042 by andypugh

So it is back to the HAL pins again, then. Is there a way to manipulate them in Axis?


I very much doubt that any of those HAL pins is actually the problem, but I will answer the question anyway.

In Machine -> Show Hal Config you can look at HAL pin values.
But in the lower part of the first tab you can also type HAL commands such as "setp motion.feed-hold 0"

I prefer to do this from a terminal window though, as then you get tab-completion and history.
open a terminal and type "halcmd -kf" then you can type commands like "show pin" and "setp motion.feed-hold 1" etc.

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

More
31 Jul 2015 00:00 #61047 by cahlfors
Thanks!
There is not much life in the HAL pins and toggling them makes no difference, confirming that this does not seem to be the issue, indeed.
I will have to think of something else.

/Chris

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

Time to create page: 0.086 seconds
Powered by Kunena Forum