Showing results for 
Search instead for 
Do you mean 
Reply
Solved! Go to solution

Tool length correction in ISV with angle heads

Hello everyone. 
I've been developing a project of a Milling machine with 2 angle heads. I was facing some problems in some definitions. 

i searched in the OOTB sample file, and in the sample files of the nx instalation.
My question is about tool length correction in the ISV simulation. When i create a single 3 axis ISV, the tool change works ok. But, with angle heads, i was facing some problems. When i select a angle head and a tool, the ISV dont recognize the tool lenght. Follow the code i wrote

 

##LANGUAGE AC
  INT nToolID;
  INT ZINE;
  INT SPIN;
  FLOAT ANG;
  STRING sHeadName;
  sHeadName = getVariable("$P_HEADNAME");
  ZINE = getVariable("$P_CLOW_ZINE");
  SPIN = getVariable("$P_CLOW_SPIN");
  ANG = getVariable("$P_CLOW_ANG");
  STRING sToolName;
  STRING sToolNamezine;
  STRING sCarrier;
  nToolID   = getVariable("$P_TOOLP");
  sCarrier  = getVariable("SIM_TOOL_CARRIER");
  
  sToolName = getArrayElement("$TC_TP2",nToolID);

  IF (nToolID == 0); 
     sToolName = "";
  ENDIF;
  
  IF (sToolName != "");
     generateTool (sToolName, sCarrier);
	 //Coloca a feta na garra do magazine
    IF (exist(getNextTool(sCarrier)));
	    grasp      (     getNextTool(sCarrier), getJunction("TOOL_CHANGER_CLOW_Y", "TOOL_CHANGER_CLOW_JCT_"+ZINE));
		position   (     getNextTool(sCarrier), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
		visibility (     getNextTool(sCarrier), ON,  TRUE);
   ENDIF;
  ELSE;
     IF (nToolID > 0);
       // generateTool (getToolNameByNumber(nToolID), sCarrier);
     ELSE;
        // ERROR no Tool preselected - ?? Send error message ??
	  ENDIF;
  ENDIF;
  

  //move the clow
   move (AXIS, "TCX1",0.0, 12.3);
   move (AXIS, "TCY1",-90.0, 12.3);
   move (AXIS, "TCX1",-1792.62, 12.3);
  //fix spindle tool in the clow
  IF (exist(getCurrentTool(sCarrier)));
    sToolNamezine = getCurrentTool(sCarrier);
	grasp      (     sToolNamezine, getJunction("TOOL_CHANGER_CLOW_Y", "TOOL_CHANGER_CLOW_JCT_"+SPIN));
  ENDIF;
   move (AXIS, "TZ1",190.0, 12.3);
   //rotate the clow

   
   
   move (AXIS, "TZ2",ANG, 12.3);
   move (AXIS, "TZ1",0.0, 12.3);
  
   //fix the tool of spindle in the magazine
   IF (sToolName != "");
		release (sToolName);
		grasp      (     getNextTool(sCarrier), getJunction(sCarrier, "S"));
		position   (     getNextTool(sCarrier), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
		visibility (     getNextTool(sCarrier), ON,  TRUE);
		activateNextTool (sCarrier);
   ENDIF;
   
   move (AXIS, "TCX1",0.0, 12.3);
   move (AXIS, "TCY1", 0.0, 12.3);
   move (AXIS, "TCX1",1249.80, 12.3);
   
   
    IF (exist(sToolNamezine));
		visibility (     sToolNamezine, OFF,  TRUE);
		release (sToolNamezine);
	ENDIF;
	IF (exist(getNextTool(sCarrier)));
	    grasp      (     getNextTool(sCarrier), getJunction("TOOL_CHANGER_CLOW_Y", "TOOL_CHANGER_CLOW_JCT_"+ZINE));
		position   (     getNextTool(sCarrier), 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
		visibility (     getNextTool(sCarrier), ON,  TRUE);
   ENDIF;
   
##LANGUAGE NATIVE

;I/O magazine
IF ($P_CLOW_SPIN==1)
  $P_CLOW_SPIN=2
  $P_CLOW_ZINE=1
ELSE
  $P_CLOW_SPIN=1
  $P_CLOW_ZINE=2
ENDIF
$P_CLOW_ANG=$P_CLOW_ANG-180.0

GOTOF END

 

Someone can help me?  Some advice? 

 

With Best Regards

 

Marco Antonio Rodrigues Silva

SIEMENS

PG SU AM BRA MF PR&M

Industrial Applications - Steam Turbines

Av. Eng. João F. G. Molina, 1745, CEP 13213 080

Distrito Industrial - Bairro Engordadouro, Jundiaí - SP

(Phone : +55 (11)   4585 - 1275

(Mobile : +55 (11) 99745 - 0738

3 REPLIES
Solution
Solution
Accepted by topic author marcoarsilva
‎02-01-2017 08:37 AM

Re: Tool length correction in ISV with angle heads

Hi Marco,

 

to reuse the existing OOTB samples was a good starting point! Good so see that the samples can be reused for customer projects.

 

Before giving some hints, tipps and tricks I would like to clarify some points.

 

- In which NX version have you started your project. I ask because we did a lot of enhancements, simplifications regarding the head offset calculation between NX10 and NX11.

 

- In NX10 there is only one head change sample --> SIM16. Interesting Points are the D Metacode and the method GMe_ActivateHeadCorrection. The description for that can be found in chapter 13 in ...\MACH\samples\nc_simulation_samples\Working_with_OOTB_MACH_Simulation_Examples.pdf

 

- In NX11 the sim09 also uses a changable head. All available controllers for sim09 using this head change example. There is also a description available in the pdf document. In NX1101 we moved this doc directly to the machines folder.

 

- Independet from NX version is the question, how the NC code look like? Which command activates the head compensation and which one the tool length compensation?

 

For Sinumerik in NX10 both are activated with the D metacode and using $TOOL transformation to store the offsets. This has been changed in NX11. The D metacode activates the tool length compensation only (stored in $TOOL) and the Cycle800 takes care about the head offset (stored in PARTFRAME).

 

Thomas

Re: Tool length correction in ISV with angle heads

Hi Thomas.

thanks for your faster answer, and sorry for my delay.
Well, i use NX 8.5 . i solved the problem using the sample provided with nx8.5. I tried to modify names of the heads, but i discovered that the MCF files was using the number of heads to activate the tool lenght compensation.

I will update this (or next) week to NX 11, and then, i'll validate my ISV again, but, now, everything are ok. i'll configure the cycle800 when the machine vendor give me the PLC information (like the CYCLE800 parameters and the INI files of the heads).

Thanks for your valuable information.

Re: Tool length correction in ISV with angle heads

Hi Marco,

 

thanks for your repsonse and feedback!

 

Let us know if you need further information. For the "head"-topic, unfortunately, there is no general approach due to the complexity and different handling from the OEM´s. So for us its hard to provide a general sample which can be easily reused. 

 

Thomas

Learn online





Solution Information