cancel
Showing results for 
Search instead for 
Did you mean: 

How To Detect If Current Operation has a Clearance Plane Defined

Pioneer
Pioneer

Need help in detecting whether an operation has a clearance plane defined(active) or not (inactive).Currently unable to find a variable which could help to output the availibility of clearance plane.

 

Need this variable for identifying drill and hole making operations with clearance plane and without clearance plane.

 

Also need clarification ,in drill move, without a clearance plane,the post will go to the cycle plane change after drill move ,while if clearance plane is active it will go to cycle plane change before drill move.

 

Thanks

3 REPLIES

Re: How To Detect If Current Operation has a Clearance Plane Defined

Creator
Creator

Hi Shanky1703!

 

Some time ago I solved this problem this way:

 

1. Create PB_CMD_before_motion (if this Proc doesn't exist)

2. Put there this code:

 

#Checking if Operation has Clearance plane
global mom_operation_name mom_warning_info
global mom_pos mom_cycle_retract_to_pos
global first_move_flag

 

if { [info exist mom_cycle_retract_to_pos(2)] && ($first_move_flag == 0) } {
set mom_warning_info "\n "
append mom_warning_info "\n In operation \"$mom_operation_name\" doesn't exist Clearance Plane."
append mom_warning_info "\n "
append mom_warning_info "\n It is strongly recommended to use Clearance Plane for axial cycles!!!!!!"
append mom_warning_info "\n "
append mom_warning_info "\n "
MOM_output_to_listing_device $mom_warning_info
global ptp_file_name
MOM_close_output_file $ptp_file_name
MOM_remove_file $ptp_file_name
MOM_abort "----------> MESSAGE FOR USER: Please define a Clearance Plane!!!!!!"
}

set first_move_flag 1
#End of Checking if Operation has Clearance plane

 

3. Now you need to define the variable $first_move_flag and assign the value 0 to it.

################

global first_move_flag

set first_move_flag 0

################

I do it at special Proc named PB_CMD_flags_at_start_of_path, which is attached, as you can imagine, to the event MOM_Start_of_path.

 

The work is done.

Hope, this info will be useful for you.

 

P.S. One can find the variable $mom_cycle_clearance_plane, but it has value of Rapto point in cycle. It isn't what one expects from it.

"Imagination is more important than knowledge" - Albert Einstein

Re: How To Detect If Current Operation has a Clearance Plane Defined

Creator
Creator

Post Review Tool images without and with Clearance Plane defined.

Without Clearance PlaneWithout Clearance Plane

  

With Clearance PlaneWith Clearance Plane

 

 

 

"Imagination is more important than knowledge" - Albert Einstein

Re: How To Detect If Current Operation has a Clearance Plane Defined

Pioneer
Pioneer

Thanks for your prompt  reply.I will apply as you suggested.

Learn online





Solution Information