next tool - need an integer available to my custom M code
- docslip
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
05 Sep 2017 18:52 #98541
by docslip
next tool - need an integer available to my custom M code was created by docslip
My linuxcnc system works well and I've been a user since 2004. I do have a problem and have , thus far, been unable to solve.
I have written a bash script and called it M102. It fires up great but the argument I pass is not the next tool , from Tn, awaiting the m6.
I want to have the tool next value to index a list of photos which I will display on the monitor. All that is easy stuff but I cannot seem to get the iocontrol.0.tool-number into my axis environment. Global variable needed ?
Can you more experienced fellows help me ?
Bill Phillips
Thank you
I have written a bash script and called it M102. It fires up great but the argument I pass is not the next tool , from Tn, awaiting the m6.
I want to have the tool next value to index a list of photos which I will display on the monitor. All that is easy stuff but I cannot seem to get the iocontrol.0.tool-number into my axis environment. Global variable needed ?
Can you more experienced fellows help me ?
Bill Phillips
Thank you
Please Log in or Create an account to join the conversation.
- bevins
-
- Offline
- Platinum Member
-
Less
More
- Posts: 1944
- Thank you received: 337
05 Sep 2017 19:58 #98543
by bevins
Replied by bevins on topic next tool - need an integer available to my custom M code
selectedtool has the tool number.
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Offline
- Platinum Member
-
Less
More
- Posts: 4998
- Thank you received: 1459
05 Sep 2017 20:25 #98544
by Todd Zuercher
Replied by Todd Zuercher on topic next tool - need an integer available to my custom M code
#<_selected_tool> is the global parameter for the selected tool (tool called before M6 is executed.)
#<_current_tool> is the global parameter for the current tool in the spindle (after M6)
The hal pins iocontrol.0.tool-prep-number and iocontrol.0.tool-number should should give the same values. (Although I think iocontrol.0.tool-prep-number is changed to 0 after an M6 until a Tn code is used.)
#<_current_tool> is the global parameter for the current tool in the spindle (after M6)
The hal pins iocontrol.0.tool-prep-number and iocontrol.0.tool-number should should give the same values. (Although I think iocontrol.0.tool-prep-number is changed to 0 after an M6 until a Tn code is used.)
Please Log in or Create an account to join the conversation.
- docslip
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
05 Sep 2017 20:29 #98546
by docslip
Replied by docslip on topic next tool - need an integer available to my custom M code
Thank you sir, but same result..My MDI command exactly is M102 P#<selectedtool> and every other conceivable way I can embrace the variables name: including M102 P#<_selectedname>. I've been failing at this ,otherwise simple op for 3 days, almost forgetting the goal.
ideas in the syntax required ?
Thanks
ideas in the syntax required ?
Thanks
Please Log in or Create an account to join the conversation.
- docslip
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
05 Sep 2017 20:35 #98547
by docslip
Replied by docslip on topic next tool - need an integer available to my custom M code
It works as expected, thank you. Of all that I have read not once was that global name discovered. Tell me young man, where should I have looked.
Thanks again.
Bill Phillips
Thanks again.
Bill Phillips
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Offline
- Platinum Member
-
Less
More
- Posts: 4998
- Thank you received: 1459
06 Sep 2017 00:58 #98564
by Todd Zuercher
Right here.
linuxcnc.org/docs/html/gcode/overview.ht...ub:system-parameters
Replied by Todd Zuercher on topic next tool - need an integer available to my custom M code
It works as expected, thank you. Of all that I have read not once was that global name discovered. Tell me young man, where should I have looked.
Thanks again.
Bill Phillips
Right here.
linuxcnc.org/docs/html/gcode/overview.ht...ub:system-parameters
The following user(s) said Thank You: docslip
Please Log in or Create an account to join the conversation.
- docslip
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
06 Sep 2017 01:27 #98565
by docslip
Replied by docslip on topic next tool - need an integer available to my custom M code
Oh, I feel like such a stoop. I recall that page from years ago. Getting old is not for sissies.
Thanks again.
Thanks again.
Please Log in or Create an account to join the conversation.
Time to create page: 0.101 seconds