Call Inspection procedure after each robotic move.
SolutionSample Code Only
#
# FANUC RJ Post Processor - User Customization File
#
# This file can be used to:
# - define addition user Post Configurator options (see Post Configurator doc)
# - override the default motion instructions
#
# Version $Id: FANUC_RJ_user_custom.tcl,v 1.6 2019/10/18 15:56:28 mchoucroun Exp $
#
#----------------------------------------------------------------------
proc FANUC_do_motion_template {sDefaultTemplate} {
# This routine can be used to override the default motion instruction.
# 'sDefaultTemplate': default block template to generate the motion line
#----------------------------------------------------------------------
# default behaviour: run the target default block template
return [MOM_do_template $sDefaultTemplate CREATE]
}
#----------------------------------------------------------------------
# CUSTOM ENTRY POINT PROCEDURES
#----------------------------------------------------------------------
#----------------------------------------------------------------------
proc FANUC_start_of_program {position} {
# Triggered during MOM_start_of_program_LIB
# position: start, end
#----------------------------------------------------------------------
}
#----------------------------------------------------------------------
proc FANUC_end_of_program {position} {
# Trigerred during MOM_end_of_program
# position: start, end
#----------------------------------------------------------------------
}
#----------------------------------------------------------------------
proc FANUC_start_of_path {position} {
# Triggered during MOM_start_of_path
# position: start, end
#----------------------------------------------------------------------
}
#----------------------------------------------------------------------
proc FANUC_end_of_path {position} {
# Triggered during MOM_end_of_path
# position: start, end
#----------------------------------------------------------------------
}
#----------------------------------------------------------------------
proc FANUC_rapid_move {position} {
# Triggered during MOM_rapid_move
# position: start, end
#----------------------------------------------------------------------
if { $position == "end" } { CALL_INSP }
}
#----------------------------------------------------------------------
proc FANUC_linear_move {position} {
# Triggered during MOM_linear_move
# position: start, end
#----------------------------------------------------------------------
if { $position == "end" } { CALL_INSP }
}
#----------------------------------------------------------------------
proc FANUC_circular_move {position} {
# Triggered during MOM_circular_move
# position: start, end
#----------------------------------------------------------------------
}
#----------------------------------------------------------------------
proc FANUC_robot_pose_move {position} {
# Triggered during MOM_robot_pose_move
# position: start, end
#----------------------------------------------------------------------
if { $position == "end" } { CALL_INSP }
}
#----------------------------------------------------------------------
proc FANUC_write_uframe {} {
# This routine can be used to override the default writing of UFRAME_NUM.
#----------------------------------------------------------------------
global fanuc_UFrameNumber
return "UFRAME_NUM = $fanuc_UFrameNumber;"
}
#----------------------------------------------------------------------
proc FANUC_write_utool {} {
# This routine can be used to override the default writing of UTOOL_NUM.
#----------------------------------------------------------------------
global fanuc_UToolNumber
return "UTOOL_NUM = $fanuc_UToolNumber;"
}
proc CALL_INSP { } {
global insp_num
global fanuc_sLineNumber
set fanuc_sLineNumber [FANUC_format_line_number]
global fanuc_lMotionLines
#These lines are used to set the line number
#set iLineNb [FANUC_format_line_number]
if { [info exists insp_num] == 1 } {
incr insp_num
} else { set ::insp_num 1 }
lappend fanuc_lMotionLines "$::fanuc_sLineNumber CALL INSPECT($insp_num);"
}
Notes