Cancel
Showing results for 
Search instead for 
Did you mean: 

[Post Builder] UDE value output error

Solution Partner Innovator Solution Partner Innovator
Solution Partner Innovator

Hi

 

I am using UDE.
UDE.jpg
 
And I set the post builder to print the value.
Initial move position is output.
 
ex) MOM_output_literal "FEED : $mom_FEED_RATE_VALUE"
 
However, an error is displayed with no value.
What's wrong?
 
 
10 REPLIES 10

Re: [Post Builder] UDE value output error

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

It depends where you execute MOM_output_literal and to which object you add UDE.

If you want output variable before UDE event occurs - there is no chance to output it because variable doesnt exist.

 

---------------------------------------------
#♫ PB, 5ax, itnc, nx, vericut ♫ #

Re: [Post Builder] UDE value output error

Solution Partner Creator Solution Partner Creator
Solution Partner Creator

Hello,

 

Could you please post the entire ude? Like this :

 

EVENT auxfun
{
   UI_LABEL "Auxfun"

   PARAM command_status
   {
      TYPE o
      DEFVAL "Active"
      OPTIONS "Active","Inactive","User Defined"
      UI_LABEL "Status"
   }
   PARAM auxfun
   {
      TYPE   i
      DEFVAL "0"
      UI_LABEL "Auxfun Value"
   }
   PARAM auxfun_text
   {
      TYPE   s
      TOGGLE Off
      UI_LABEL "Text"
   }
}

Normally, you can see the event and the value when postprocessing with the review tool on.

2019-01-09 09_30_29-NX_Post Review Tool - F__NX12_MACH_samples_nc_simulation_samples_avers9_review.o.pngIf this is present with you, the issue lies in the Post. The only thing i immediatly can say is that maybe you forogot to specify the global namespace. You can fix this by using this :

 

global mom_FEED_RATE_VALUE

MOM_output_literal "FEED : $mom_FEED_RATE_VALUE"

Or

MOM_output_literal "FEED : $::mom_FEED_RATE_VALUE"

If you want to only output it if it exists you can use :

 

global mom_FEED_RATE_VALUE
if { [info exists mom_FEED_RATE_VALUE] } {
    MOM_output_literal "FEED : $mom_FEED_RATE_VALUE"
}

Altough this will only prevent the error from showing when the UDE isn't inserted

Re: [Post Builder] UDE value output error

Solution Partner Innovator Solution Partner Innovator
Solution Partner Innovator

Hi

 

The global variable has been added.
 
The error says that it can not find mom_FEED_RATE_VALUE.
UDE.jpg
 
UDE_1.jpg

Re: [Post Builder] UDE value output error

Solution Partner Creator Solution Partner Creator
Solution Partner Creator
Please also note that the variable is only available after the event has fired. So you have to make sure the event is in the first operation you post-process, like Juraj said.

Could you turn on the review tool and verify the event is actually fired with the variable in it? (and maybe post a screenshot, maybe accompanied by the debug file)

Re: [Post Builder] UDE value output error

Solution Partner Innovator Solution Partner Innovator
Solution Partner Innovator

Hi

 

I do not know where UDE events occur.

How do I specify where to fire UDE events?

Re: [Post Builder] UDE value output error

Solution Partner Innovator Solution Partner Innovator
Solution Partner Innovator

Hi

 

As a result of checking, it seems that I can not recognize it using the Mill Control.
Is it unrecognizable here?
 
test1.jpg

Re: [Post Builder] UDE value output error

Valued Contributor
Valued Contributor

Hi,

 

Try to check if the UDE parameters are available on next operations. If yes, it means that the parameters are defined later than expectation. In this case evalute PB_CMD_run_postprocess custom command. Execute this command on program start sequence to review the operations and carry out all parameters to the end of the program. Then call out your parameters when post processing. Remember to comment "return" inside the PB_CMD_run_postprocess to activate it.

 

Kind regards,

Majid

Majid

Re: [Post Builder] UDE value output error

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

@kimies_saida

You cant decide where ude is fired.

There is rules in documentation.

If you put ude on some object (operation, program group, method,workpiece) there is different places where ude is fired.

 

Or just turn on review tool and you will see that ude - event in order. And than you know where you can read ude variables. And after ude event. Not before.

 

Nothing special.

 

---------------------------------------------
#♫ PB, 5ax, itnc, nx, vericut ♫ #

Re: [Post Builder] UDE value output error

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

An easy way to see when UDEs are triggered is to just add a 

MOM_output_text "XXXX UDE is set here"

to the event handler for the UDE.  If you don't reference the UDE variables (or add the "optional" setting to the word(s) that use them in the block where they are used), you can see the relationship between where the UDE event is triggered and where you want to use the variable.

 

Note when a UDE is output *can* be controlled (to a certain extent) in "regular" operations (note milling "Generic motion" & lathe "teach mode" have *very* fine control, once you get INTO the sub-operations).

 

At the bottom of the UDE list are the "marker" UDEs ("Start Marker", "Tool Change Marker", etc.)

These can be used to trigger UDEs at specific times...ASSUMING the proper data is defined in the operation - e.g. a "Start Marker" has *no* effect if there is not an avoidance "Start" point (I think maybe clearance plane works as well).

Similarly the tool change marker has no effect if there is no tool change.

 

This is pretty easy to test...just add "Operator message" UDEs and the "Marker" UDEs in alteration, and add the required avoidance start/return points.

 

NOTE ALSO, the UDE handler proc does NOT need to actually output anything to the posted file - but then you need to add another custom command, or block, that does the actual output (where you want it output).  I use this all the time so you can add a UDE to the "Start" events that is actually output in the "end of path" event.  (This saves having to hunt in both start & end events te see what UDEs are defined in an operation)

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled


Learn online





Solution Information