Conditional block - Probing routine
- Jeff in Wa
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 1
09 Nov 2024 20:55 #314141
by Jeff in Wa
Conditional block - Probing routine was created by Jeff in Wa
; New stand-off position for the probe (T99)
#<_ProbeStandOffX> = 1135.0 ; X coordinate for probe stand-off
#<_ProbeStandOffY> = 516.0 ; Y coordinate for probe stand-off
O120 IF [ #<_current_tool> EQ 99 ]
G53 G1 F[#<_TravelFeed>] Z[#<_TravelZ>] ; Move Z0 for traveling
G53 G0 X[#<_ProbeStandOffX>] Y[#<_ProbeStandOffY>] ; Move to probe stand-off position
ELSE
G53 G1 F[#<_TravelFeed>] Z[#<_TravelZ>]
G53 G1 F[#<_TravelFeed>] X[#<_ToolChangeX>] Y[#<_ToolChangeY>] ( Moves to tool setter for manual tool change )
O120 ENDIF
The top section never gets qualified, even though variable #5400 has 99 stored in it.
I'm not sure this will work anyway. I want to put in the typical M6 T99, and perform the tool setter routine. But in my case,
I want T99 to send the probe to a fixed location instead. All other tools, ie; M6 T2 would go to the tool setter.
#<_ProbeStandOffX> = 1135.0 ; X coordinate for probe stand-off
#<_ProbeStandOffY> = 516.0 ; Y coordinate for probe stand-off
O120 IF [ #<_current_tool> EQ 99 ]
G53 G1 F[#<_TravelFeed>] Z[#<_TravelZ>] ; Move Z0 for traveling
G53 G0 X[#<_ProbeStandOffX>] Y[#<_ProbeStandOffY>] ; Move to probe stand-off position
ELSE
G53 G1 F[#<_TravelFeed>] Z[#<_TravelZ>]
G53 G1 F[#<_TravelFeed>] X[#<_ToolChangeX>] Y[#<_ToolChangeY>] ( Moves to tool setter for manual tool change )
O120 ENDIF
The top section never gets qualified, even though variable #5400 has 99 stored in it.
I'm not sure this will work anyway. I want to put in the typical M6 T99, and perform the tool setter routine. But in my case,
I want T99 to send the probe to a fixed location instead. All other tools, ie; M6 T2 would go to the tool setter.
Please Log in or Create an account to join the conversation.
09 Nov 2024 21:27 #314142
by MaHa
Replied by MaHa on topic Conditional block - Probing routine
You can try #<tool_in_spindle> instead of #<_current_tool>
Please Log in or Create an account to join the conversation.
- Jeff in Wa
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 1
09 Nov 2024 21:54 #314145
by Jeff in Wa
Replied by Jeff in Wa on topic Conditional block - Probing routine
Thanks for the suggestion. Changing the code as you suggested, upon restarting, I get a "Named parameter #<tool_in_spindle> not defined.
Please Log in or Create an account to join the conversation.
09 Nov 2024 22:02 #314146
by MaHa
Replied by MaHa on topic Conditional block - Probing routine
This is only available with remap M6. Just use #5400 ?
Please Log in or Create an account to join the conversation.
- Jeff in Wa
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 1
09 Nov 2024 22:19 #314147
by Jeff in Wa
Replied by Jeff in Wa on topic Conditional block - Probing routine
Ya, I tried #5400 direct, but that section of code still gets bypassed.
Here is the last version:
O120 IF [ #5400 EQ 99 ]
G53 G1 F[#<_TravelFeed>] Z[#<_TravelZ>] ; Move Z0 for traveling
G53 G0 X[#<_ProbeStandOffX>] Y[#<_ProbeStandOffY>] ; Move to probe stand-off position
ELSE
G53 G1 F[#<_TravelFeed>] Z[#<_TravelZ>]
G53 G1 F[#<_TravelFeed>] X[#<_ToolChangeX>] Y[#<_ToolChangeY>] ( Moves to tool setter for manual tool change )
O120 ENDIF
I tried adding some msg lines to see what the passed value of #5400 is, but it doesn't seem to work. Thoughts?
Here is the last version:
O120 IF [ #5400 EQ 99 ]
G53 G1 F[#<_TravelFeed>] Z[#<_TravelZ>] ; Move Z0 for traveling
G53 G0 X[#<_ProbeStandOffX>] Y[#<_ProbeStandOffY>] ; Move to probe stand-off position
ELSE
G53 G1 F[#<_TravelFeed>] Z[#<_TravelZ>]
G53 G1 F[#<_TravelFeed>] X[#<_ToolChangeX>] Y[#<_ToolChangeY>] ( Moves to tool setter for manual tool change )
O120 ENDIF
I tried adding some msg lines to see what the passed value of #5400 is, but it doesn't seem to work. Thoughts?
Please Log in or Create an account to join the conversation.
- Jeff in Wa
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 1
09 Nov 2024 22:24 #314149
by Jeff in Wa
Replied by Jeff in Wa on topic Conditional block - Probing routine
Actually, I just tried adding this and it worked:
(debug,Probing result: #5061, #5062, #5063, #5400)
Now I know why the top section isn't working:
Proving result: -1.28423, 1.042565, -54.0855234, 0.0000000
So, #5400 isn't passing what is in linuxcnc.var file #5400
Great...
(debug,Probing result: #5061, #5062, #5063, #5400)
Now I know why the top section isn't working:
Proving result: -1.28423, 1.042565, -54.0855234, 0.0000000
So, #5400 isn't passing what is in linuxcnc.var file #5400
Great...
Please Log in or Create an account to join the conversation.
- Jeff in Wa
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 1
09 Nov 2024 22:33 #314151
by Jeff in Wa
Replied by Jeff in Wa on topic Conditional block - Probing routine
I just added this:
(debug,Probing result: #<_current_tool>)
O120 IF [ #5400 EQ 99 ]
G53 G1 F[#<_TravelFeed>] Z[#<_TravelZ>] ; Move Z0 for traveling
G53 G0 X[#<_ProbeStandOffX>] Y[#<_ProbeStandOffY>] ; Move to probe stand-off position
ELSE
G53 G1 F[#<_TravelFeed>] Z[#<_TravelZ>]
G53 G1 F[#<_TravelFeed>] X[#<_ToolChangeX>] Y[#<_ToolChangeY>] ( Moves to tool setter for manual tool change )
O120 ENDIF
The message result was Probing result: 0.000000
I'm beginning to think, either I don't have access to the tool when entering M6 T(tool number), or there is a different way to do this.
(debug,Probing result: #<_current_tool>)
O120 IF [ #5400 EQ 99 ]
G53 G1 F[#<_TravelFeed>] Z[#<_TravelZ>] ; Move Z0 for traveling
G53 G0 X[#<_ProbeStandOffX>] Y[#<_ProbeStandOffY>] ; Move to probe stand-off position
ELSE
G53 G1 F[#<_TravelFeed>] Z[#<_TravelZ>]
G53 G1 F[#<_TravelFeed>] X[#<_ToolChangeX>] Y[#<_ToolChangeY>] ( Moves to tool setter for manual tool change )
O120 ENDIF
The message result was Probing result: 0.000000
I'm beginning to think, either I don't have access to the tool when entering M6 T(tool number), or there is a different way to do this.
Please Log in or Create an account to join the conversation.
Time to create page: 0.077 seconds