Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I got some problem about TCL error. Need Somebody help me.

Status
Not open for further replies.

Paisan_Emdist

Mechanical
Jan 7, 2020
2
0
0
TH
The Error massage



***** A TCL Error Has Occurred *****
Event Handler: C:\Program Files\Siemens\NX 12.0\MACH\resource\postprocessor\FMC_Toshiba-R16_001.tcl
Event: MOM_initial_move
Error Info: can't read "pop_rot_a": no such variable
while executing
"format %.2f "$pop_rot_a""
(procedure "PB_CMD_initial_move_outputs" line 19)
invoked from within
"PB_CMD_initial_move_outputs"
(procedure "MOM_initial_move" line 10)
invoked from within
"MOM_initial_move"
Error Code: NONE




Source Code has error

global mom_out_angle_pos mom_operation_type
global saved_csys_fourth_axis_answer

MOM_force once fourth_axis

if { [info exists saved_csys_fourth_axis_answer] } {
set mom_out_angle_pos(0) $saved_csys_fourth_axis_answer
}


global csys_mode
global pop_rot_a
global pop_rot_b
global pop_rot_c

set pop_rot_a [format %.2f "$pop_rot_a"]
set pop_rot_b [format %.2f "$pop_rot_b"]
set pop_rot_c [format %.2f "$pop_rot_c"]


global mom_oper_geom mom_next_oper_geom lastgeom lastb



if { $lastgeom != $mom_oper_geom } {
MOM_output_literal "G00 B$pop_rot_b"
} else {
MOM_output_literal "G00 B$lastb"
}

if { $mom_oper_geom == $mom_next_oper_geom } {
set lastb $pop_rot_b
}

if { $mom_operation_type != "Mill Machine Control" && $mom_operation_type != "lathe Machine Control" } {
set lastgeom $mom_oper_geom
}
 
 https://files.engineering.com/getfile.aspx?folder=bc3300bf-d854-4784-838d-725dfafce47e&file=Untitled.png
Replies continue below

Recommended for you

Are You sure that pop_rot_A is existing?
Try something like:
global csys_mode
global pop_rot_a
global pop_rot_b
global pop_rot_c

#add these lines
set pop_rot_a 12.34
set pop_rot_b 23.45
set pop_rot_c 34.56
#

set pop_rot_a [format %.2f "$pop_rot_a"]
set pop_rot_b [format %.2f "$pop_rot_b"]
set pop_rot_c [format %.2f "$pop_rot_c"]

If works, then these variables has not defined..

----
kukelyk
 
try
mom_pos

"Defines the machine tool coordinates of the goto point. For Lathes, this is the X and Z positions of the tool tip. For four and five milling machines, mom_pos(3) and mom_pos(4) represent the fourth and fifth axis rotary positions. The rotary positions are between 0 and 360. For three axis mill turns the output is X, Z and C. For WEDM machines, mom_pos(3) and mom_pos(4) are used for 4axis output to represent data based on the kinematics variable mom_kin_wire_tilt_output_type."

----
kukelyk
 
Status
Not open for further replies.
Back
Top