Cancel
Showing results for 
Search instead for 
Did you mean: 

Post Configurator BLK FORM

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Hi All,

 

With the OOTB PC post for Heidenhain the values for the BLK FORM are always set as shown below.

Does anyone know where these values come from and if they can be filled correctly?

 

BLK FORM 0.1 Z X-500 Y-500 Z-500
BLK FORM 0.2 X500 Y500 Z500

Sven Voeten
Pre-sales NX CAM / Manufacturing Consultant
cards PLM Solutions
5 REPLIES 5

Re: Post Configurator BLK FORM

Siemens Legend Siemens Legend
Siemens Legend

Hi Sven,

 

first these values are a standard output in default with Post Configurator. At the moment we have no mom-variables which include the values of the blank part, which make sense to have that in future.

 

So first and recommended solution should be to add an UDE for the BLK and an eventhandler. Important to know is that you have to set the mom_blk_point_1/mom_blk_point_2  variables in the handler. 

I have attached also the ude for that, just copy into your layer or create a new one with the cdl editor.

 

proc MOM_blk_form { } {
global mom_blk_point_min_x
global mom_blk_point_min_y
global mom_blk_point_min_z
global mom_blk_point_max_x
global mom_blk_point_max_y
global mom_blk_point_max_z
global mom_blk_point_1
global mom_blk_point_2

 

#Put your UDE Handler Tcl here
set mom_blk_point_1(0) $mom_blk_point_min_x
set mom_blk_point_1(1) $mom_blk_point_min_y
set mom_blk_point_1(2) $mom_blk_point_min_z
set mom_blk_point_2(0) $mom_blk_point_max_x
set mom_blk_point_2(1) $mom_blk_point_max_y
set mom_blk_point_2(2) $mom_blk_point_max_z
}

 

Due the automatic pretreatment functionality these variables are now collected and output the values of the UDE which is attached to the program group.

 

2) Just switch the property off in Post Configurator for the Block Form and implement your own logic in the start of program

BLOCKFORM.jpg

 

Thanks for the hint on that, we will try to find a better solution for future.

 

Best regards

Thomas

 

Re: Post Configurator BLK FORM

Solution Partner Pioneer Solution Partner Pioneer
Solution Partner Pioneer

Thanks for the fast response, I will test this next week.

Sven Voeten
Pre-sales NX CAM / Manufacturing Consultant
cards PLM Solutions

Re: Post Configurator BLK FORM

Legend
Legend
The only thing is to copy the following lines in you .cdl File

EVENT blk_form
{
POST_EVENT "blk_form"
UI_LABEL "Blank definition"
PARAM command_status
{
TYPE o
DEFVAL "Active"
OPTIONS "Active","Inactive","User Defined"
UI_LABEL "Status"
}
PARAM blk_point_1
{
TYPE p
UI_LABEL "Point 1"
}
PARAM blk_point_2
{
TYPE p
UI_LABEL "Point 2"
}
}

The Point 1 is the the corner with the lowest values and point2 with the highest values.

Re: Post Configurator BLK FORM

Experimenter
Experimenter

Hello

I've the very same issue but I've not been able to solve it, I'm doing something wrong for sure.

I've created a new example post process, for itnc 530, with Post Configurator, using just the controller in Layer selection.

 

I did try @schauerm3 solution
I did copy

EVENT blk_form
{
POST_EVENT "blk_form"
UI_LABEL "Blank definition"
PARAM command_status
{
TYPE o
DEFVAL "Active"
OPTIONS "Active","Inactive","User Defined"
UI_LABEL "Status"
}
PARAM blk_point_1
{
TYPE p
UI_LABEL "Point 1"
}
PARAM blk_point_2
{
TYPE p
UI_LABEL "Point 2"
}
}

in my "new_post_custom.cdl", and left the BLK FORM property in Post Configurator On.

Still get

BLK FORM 0.1 Z X-500 Y-500 Z-500
BLK FORM 0.2 X500 Y500 Z500

 

 

I did also try you solution @ThomasJ but I suspect I'm not doing it right.

 

I've copy pasted the code below in "new_post.tcl" and for the UDE (your attachment) I tried both main CDL and with the custom one.

proc MOM_blk_form { } {
global mom_blk_point_min_x
global mom_blk_point_min_y
global mom_blk_point_min_z
global mom_blk_point_max_x
global mom_blk_point_max_y
global mom_blk_point_max_z
global mom_blk_point_1
global mom_blk_point_2

#Put your UDE Handler Tcl here
set mom_blk_point_1(0) $mom_blk_point_min_x
set mom_blk_point_1(1) $mom_blk_point_min_y
set mom_blk_point_1(2) $mom_blk_point_min_z
set mom_blk_point_2(0) $mom_blk_point_max_x
set mom_blk_point_2(1) $mom_blk_point_max_y
set mom_blk_point_2(2) $mom_blk_point_max_z
}

Switched BLK FROM property Off in Post Configurator and still I get

BLK FORM 0.1 Z X-500 Y-500 Z-500
BLK FORM 0.2 X500 Y500 Z500

 

If I understood it right, I should add this PROC to the start of the program MOM, but I don't know how.

I also tried something like this but I was not sure what I was doing.

proc MOM_blk_form { } {
	global mom_blk_point_min_x
	global mom_blk_point_min_y
	global mom_blk_point_min_z
	global mom_blk_point_max_x
	global mom_blk_point_max_y
	global mom_blk_point_max_z
	global mom_blk_point_1
	global mom_blk_point_2

#Put your UDE Handler Tcl here
	set mom_blk_point_1(0) $mom_blk_point_min_x
	set mom_blk_point_1(1) $mom_blk_point_min_y
	set mom_blk_point_1(2) $mom_blk_point_min_z
	set mom_blk_point_2(0) $mom_blk_point_max_x
	set mom_blk_point_2(1) $mom_blk_point_max_y
	set mom_blk_point_2(2) $mom_blk_point_max_z
}


#------------------------------------------------------------
proc MOM_start_of_program_LIB_ENTRY {position} {
#------------------------------------------------------------

    switch -- $position {
        "start"
        {
            MOM_blk_form 
        }
    }
}

Got this error in mom_information.out

***** A TCL Error Has Occurred *****
Event Handler: D:\tmp\new_post\new_post.tcl
Event: MOM_start_of_program
Error Info: can't read "mom_blk_point_min_x": no such variable
    while executing
"set mom_blk_point_1(0) $mom_blk_point_min_x"
    (procedure "MOM_blk_form" line 12)
    invoked from within
"MOM_blk_form "
    (procedure "MOM_start_of_program_LIB_ENTRY" line 7)
    invoked from within
"MOM_start_of_program_LIB_ENTRY start"
    invoked from within
"if {1} [subst $\{[subst ::buffer::${00_proc_name}::${00_section}::code($00_tag)]\}]"
    ("foreach" body line 13)
    invoked from within
"foreach 00_tag [subst $\{[subst ::buffer::${00_proc_name}::${00_section}::current_tag_list]\}] {
			set ::lib_ge_buffer_info(proc_id) "[LIB_GE_get_pro..."
    invoked from within
"if {1} $::lib_ge_command_buffer_output_advanced"
    ("uplevel" body line 1)
    invoked from within
"uplevel 1 {if {1} $::lib_ge_command_buffer_output_advanced}"
    ("eval" body line 1)
    invoked from within
"# Compiled -- no source code available
error "called a copy of a compiled script""
    (procedure "LIB_GE_command_buffer_output" line 1)
    invoked from within
"# Compiled -- no source code available
error "called a copy of a compiled script""
    (procedure "MOM_start_of_program_LIB" line 1)
    invoked from within
"# Compiled -- no source code available
error "called a copy of a compiled script""
    (procedure "MOM_start_of_program" line 1)
    invoked from within
"MOM_start_of_program"
Error Code: TCL READ VARNAME

Could you tell me what I'm doing wrong ? I'd like to understand

Have a nice day

Re: Post Configurator BLK FORM

Legend
Legend

Hello 

 

You need only the UDE as described and the setting of the property to ON

 

No extra code and no  procedure MOM_blk

Learn online





Solution Information