PM Robot for Kuka Extra External Declaration

PM Robot for Kuka Extra External Declaration

Anonymous
Not applicable
3,637 Views
13 Replies
Message 1 of 14

PM Robot for Kuka Extra External Declaration

Anonymous
Not applicable

When I add a User Command in the NC program panel in the Vertical Plugin window for the robot plugin, the post processor correctly adds the command to the main .src file, but incorrectly adds an external declaration for that command to the main .data file.

 

See images below.PMPROBLEM1.jpgPMPROBLEM2.jpgPMPROBLEM3.jpg

 

Can someone help me correct this?

 

I've attached a zipped project archive for this PM project.

0 Likes
Accepted solutions (1)
3,638 Views
13 Replies
Replies (13)
Message 2 of 14

RAL6000
Advocate
Advocate

This can be corrected in the Post Processor.

Please Upload your Robotic Cell, then i will have a look where you need to change it.


- - - - - - - - - - - - - - - - - - - - - - - - - -
kind regards Stefan,
Milling robot integrator | Germany
0 Likes
Message 3 of 14

Anonymous
Not applicable

I'm not sure how to upload the cell. Is it not in the project archive? 

0 Likes
Message 4 of 14

RAL6000
Advocate
Advocate

No, the simulation cell and the postprocessor are not part of an PowerMill project.

To find out where it is saved, go into your Robot Plugin, Robot Database (where you activate the robot), in the upper area - click the button open robot database (1) and choose user defined (2) in the text document you will see all your user defined robots, their name and path on your hard drive. 

 

Zip That archive and upload. 

 

1.png2.png3.png

 


- - - - - - - - - - - - - - - - - - - - - - - - - -
kind regards Stefan,
Milling robot integrator | Germany
0 Likes
Message 5 of 14

Anonymous
Not applicable

Alright, I've attached a zipped cell with the model, the mtd and robconfig files, and the posts that I use. Let me know if you need anything else from me.

 

Thank you for your help with this.

0 Likes
Message 6 of 14

RAL6000
Advocate
Advocate

Your robot is not the one which is linked at the PM project.

The linked robot is called "\Kuka KR60_BW\KR60 + RotaryTable + HotwireLarge.mtd". You have send an Kuka Kr210... with a spindle. So i´m unable to make function tests. 

 

Anyway, i expect the PriPost might be the same.

 

The used variable "!Programs.NoDuplicates[" + $Count + "].FileName!" in PriPost Line 368 is empty during your "COMMAND" postprocessing in NC program. When the variable is empty you will get the "EX ()" result in .dat File. 

 

So what i would do is: 

  1. Try finding an Alternative Variable (Page 20 in PM Post documentation)
    1. Documentation Source: C:\Program Files\Autodesk\Autodesk PowerMill Robot Plugin 2020\Help\PowerMill Robot - PostProcessors.pdf
  2. implement an If Case into the while loop which is avoiding creating the "EX ()" when the variable is empty
    1.   IF NOT !Programs.NoDuplicates[" + $Count + "].FileName! == "" {
      	  // Print the line
      	  PRINT $Line
        } 
  3. Contact Autodesk Support / create a ticket, the PriPost template Kuka.KRL.PriPost in PM2020 is the same at that point and i expect it will have the same problem

 

Command Causes empty EX.pngempty EX in dat.png

 

Position in PriPost.png

 

 

 

 

 

 

 

 

 


- - - - - - - - - - - - - - - - - - - - - - - - - -
kind regards Stefan,
Milling robot integrator | Germany
0 Likes
Message 7 of 14

Anonymous
Not applicable

Stefan, thank you for that.

 

I've added your code to the post:

 

WHILE Count < !Programs.NoDuplicates.Count! {
  // Check to see if !Programs.NoDuplicates.FileName! is empty
  If NOT !Programs.NoDuplicates[" + $Count + "].FileName! == "" {
	// Build the line to print
	STRING Line = "  EXT !Programs.NoDuplicates[" + $Count + "].FileName!()"
	// Print the line
	PRINT $Line
  }
  // Increment the 'Count'
  $Count = Count + 1
}

However, I get the following error when it tries to evaluate the expression:

 

PMPROBLEM3.jpg

 

Would you please advise how to fix this code?

 

I've tried writing this If statement in several different ways and I keep getting the same error. 

 

Thank you.

 

 

 

0 Likes
Message 8 of 14

RAL6000
Advocate
Advocate

well, you are right. That does not work.

Try following, where i use a temporary variable which will be filled with the "!Programs.NoDuplicates[" + $Count + "].FileName!" value. 

 

 

WHILE Count < !Programs.NoDuplicates.Count! {
  // Check to see if !Programs.NoDuplicates.FileName! is empty
  STRING temp_name = ""
 $temp_name = "!Programs.NoDuplicates[" + $Count + "].FileName!"
  If $temp_name != "" {
	// Build the line to print
	STRING Line = "  EXT !Programs.NoDuplicates[" + $Count + "].FileName!()"
	// Print the line
	PRINT $Line
  }
  Increment the 'Count'
  $Count = Count + 1
}

- - - - - - - - - - - - - - - - - - - - - - - - - -
kind regards Stefan,
Milling robot integrator | Germany
0 Likes
Message 9 of 14

Anonymous
Not applicable

That code change now evaluates correctly, but still does not yet execute correctly - it still produces the incorrect EXT () declaration in the main .dat file.

 

I've uploaded the correct robot cell files so that you can load the project I uploaded. I've also sent a request to customer support for help in this as you requested.

 

Thanks.

0 Likes
Message 10 of 14

RAL6000
Advocate
Advocate
Accepted solution

I changed your PriPost a little. Now it does not give an "EX ()".

In General i also did not found a solution to get the IF-CASE situation in a correct way.

No matter if i analyse the length of the string or its exact content. It everytime goes into the IF.

 

So what it have done is to use other functions to create the Main .dat file as you want.

 

Please make a full comparision and check your program files between new and old postprocessed files.

I got different TOOL_DATA results by postprocessing your .RobSim. Make sure you got the right ones.

 

Code snippets:

        <ProgramStart Enabled="True" >		
          <![CDATA[&ACCESS RVO
DEFDAT !MainProgram.Name!
;FOLD EXTERNAL DECLARATIONS;%{PE}%MKUKATPBASIS,%CEXT,%VCOMMON,%P
  ;FOLD BASISTECH EXT;%{PE}%MKUKATPBASIS,%CEXT,%VEXT,%P
    EXT  BAS (BAS_COMMAND  :IN,REAL  :IN )
  ;ENDFOLD (BASISTECH EXT)]]>
        </ProgramStart>
        <NCEntityCall Enabled="True">
          <![CDATA[  EXT !Program.Name!()]]>
        </NCEntityCall>
        <ProgramEnd Enabled="True">
          <![CDATA[;ENDFOLD (EXTERNAL DECLERATIONS)		  
ENDDAT]]>

 


- - - - - - - - - - - - - - - - - - - - - - - - - -
kind regards Stefan,
Milling robot integrator | Germany
0 Likes
Message 11 of 14

Anonymous
Not applicable

Stefan, that works!

 

Thank you very much for your help.

0 Likes
Message 12 of 14

Anonymous
Not applicable

Stefan, I'm still having problems with this post. Are you still available to help with this, or should I post a new help request?

0 Likes
Message 13 of 14

RAL6000
Advocate
Advocate

what kind of issues do you have?


- - - - - - - - - - - - - - - - - - - - - - - - - -
kind regards Stefan,
Milling robot integrator | Germany
0 Likes
Message 14 of 14

Anonymous
Not applicable

Good afternoon, please help me find a postprocessor for the robot KUKA 210.  format  postprocessor  pmoptz

0 Likes