cancel
Showing results for 
Search instead for 
Did you mean: 

Post selected point into probing variable.

Pioneer
Pioneer

Hello,

 

I am very new to this and have been tasked with implementing probing in our shop - on 840D HBMs.

The machine tool side was easy as I am from a maintenance background, however the CAM side is more of a challenge!

 

 

 

The frst thing I need to do is "skew" the part on the machine using the 4th axis angle cycle 9817.

 

I have basically stolen some UDE coding and manipulated it to create some options in NX8.5.

 

18-09-2015 09-29-57.jpg

 

When I post this out without the part co-ords the NC program contains the R19=4 for updating G57 and the cycle call L9817. All good!

 

However I now want to pick up the selected part locations to populate into other R variables.

 

 

When I post and run the Debug Lister I can see the values I require and the variable names.

 

 

event_debug.jpg

 

 

So, given that R26 is the Z location I have tried this -

 

R26.jpg

 

 

 

However this wont even post as the alarm says (which obvioulsy points to the new variable I have written in the .cdl file) -

alarm.jpg

 

 

 

Dont laugh, but what am I doing wrong?

 

Any help would be appreciated.

 

Thanks in advance,

Craig.

 

7 REPLIES

Re: Post selected point into probing variable.

Valued Contributor
Valued Contributor

Hello!

 

In expression $mom_probe_stk_pt_1_pos[2] you use square brackets, this can't be correct. Please try round brackets.

 

 

Werner

Re: Post selected point into probing variable.

Pioneer
Pioneer

Thanks Jobe,

 

I used square brackets because that is what shows in the debug lister.

If I try this however I get this alarm -

 

square_brckts.jpg

Re: Post selected point into probing variable.

Valued Contributor
Valued Contributor

Hello!

 

I think you have forgotten to set the variable as global in your procedures.

 

Werner

Re: Post selected point into probing variable.

Pioneer
Pioneer

Okay, thanks.

 

So, how would I do that?

If it already exists as shown in the debug lister how do i set it as Global?

 

 

So, basically, I am the point where I have created custom parameters in the ude.cdl file and using the Debug Lister I can see the actual values I want to capture and post out.

How do I finish this process?

Re: Post selected point into probing variable.

In the debug listing, is the variable defined BEFORE the event where you attempt to use it?

Mark Rief
Retired Siemens

Re: Post selected point into probing variable.

Valued Contributor
Valued Contributor

Hello!

 

As Mark writes, the variable has to be defined BEFORE you want to use it. AND the variable has to be set GLOBAL. Please note: If the variable comes from an UDE

e.g.

 

PARAM length_comp_register
{
TYPE i
DEFVAL "2"
UI_LABEL "Register"
}

 

the system automaticly sets an prefix mom_ so that the variable is named mom_length_comp_register is you want to use it.

In the procedure, where you want to use the variable you have to write

 

global mom_length_comp_register

 

before you can use the variable.

 

Werner

Re: Post selected point into probing variable.

Pioneer
Pioneer

Thans for all your help guys!

 

I had to establish the array before I could utilise any of the information....

 

 

#
#
#
   global mom_probe_skw_pt_1_pos

 if { [array exists mom_probe_skw_pt_1_pos] } {

   }

Learn online





Solution Information