Showing results for 
Search instead for 
Do you mean 
Reply

OLP Commands execution before Location

Hello Forum,

 

how can I execute a custom OLP Command before the Location it is called?

 

Example:

I have a path which only consists of a single location (e.g. Pick-Location) and I have written custom XMLs for moving relative to the actual location (e.g. Offset).

 

Now I want to execute some commands before the movement to the location and some commands after the location.

        OffsetCommandBefore --> Pick-Location --> OffsetCommandAfter

Reference "Loc-1 Name" doesn't work because there is no Location before in this path.

 

Using <Placed="Before"> wasn't successful, yet. Can I use this function for Commands?

 

The Commands work fine, but only after the Robot has reached the Location in Path Editor.

 

I have this Problem with ABB, KUKA and Fanuc.

 

Thanks in advance for your help!

 

 

5 REPLIES

Re: OLP Commands execution before Location

I guess you need to XML customize your location with a simulation layer such as:

    # MoveRelTool <apporachOffset>

    # Move

    # MoveRelTool <retractOffset>

instead of adding XML customized OLP commands.

Re: OLP Commands execution before Location

I also want the commands in the download layer, not only in Simulation layer.

Is this also possible?

Re: OLP Commands execution before Location

Yes of course. You can have multiple lines in your customized location download layer.

Re: OLP Commands execution before Location

I know that I can use multiple lines in download layer, but when I use custom Process Types for Offset I have several issues:

 

Let's say I have a Releaseposition "P30" and want to create an offset position to this P30.

Then I create a Location after "P30" (e.g. "via1") and switch the Process Type  to RelMotion.

 

For correct download I need the difference between the X, Y, Z, RX, RY, RZ values of P30 and the following via1 Location. How can I access these values? Can I calculate them ('X' - 'X-1' = 'Xoffset') ?

 

I know that I can use the name of the Location before, so I get the correct Location Name in Download Layer (<Loc-1 Name>). Nevertheless I have the Location "via1" mentioned in my Robtarget definition, which I don't need and don't want.

Instead of having the "via1" in my Robtarget definition I want the value difference of the offset displayed in comments before the offset function and inside the Line

MoveOffsetL P30,v2000,fine,0,0,0,tGripper\wobjUsed:=;

 

<DownloadLayer>
	
<Line>
	<Item Type="const"><![CDATA[    !X-Offset:=]]>
</Item>
	<![CDATA[('X'-'X-1')]]> 
	<Item Type="const"><![CDATA[;]]></Item>
</Line>
<Line>
	<Item Type="const"><![CDATA[    !Y-Offset:=]]></Item>
	<Item Type="parameter">Y-Offset</Item>
	<Item Type="const"><![CDATA[;]]></Item>
</Line>
<Line>
       <Item Type="const"><![CDATA[    !Z-Offset:=]]></Item>
	<Item Type="parameter">Z-Offset</Item>
	<Item Type="const"><![CDATA[;]]></Item>
</Line>
<Line>
	<Item Type="const"><![CDATA[    !RX-Offset:=]]></Item>
	<Item Type="parameter">RX-Offset</Item>
	<Item Type="const"><![CDATA[;]]></Item>
</Line>
<Line>
	<Item Type="const"><![CDATA[    !RY-Offset:=]]></Item>
	<Item Type="parameter">RY-Offset</Item>
	<Item Type="const"><![CDATA[;]]></Item>
</Line>
<Line>
	<Item Type="const"><![CDATA[    !RZ-Offset:=]]></Item>
	<Item Type="parameter">RZ-Offset</Item>
	<Item Type="const"><![CDATA[;]]></Item>
</Line>
				
							
<Line>
	<Item Type="const"><![CDATA[MoveOffsetL ]]></Item>
	<Item Type="dynamicParameter">Loc-1 Name</Item>
	<Item Type="const"><![CDATA[,]]></Item>
	<Item Type="dynamicParameter">Speed Data</Item>
	<Item Type="const"><![CDATA[,]]></Item>
	<Item Type="dynamicParameter">Zone Data</Item>
	<Item Type="const"><![CDATA[,]]></Item>
	<Item Type="parameter">X-Offset</Item>
	<Item Type="const"><![CDATA[,]]></Item>
	<Item Type="parameter">Y-Offset</Item>
	<Item Type="const"><![CDATA[,]]></Item>
	<Item Type="parameter">Z-Offset</Item>
	<Item Type="const"><![CDATA[,]]></Item>
	<Item Type="dynamicParameter">Tool Data</Item>
	<Item Type="const"><![CDATA[\wobjUsed:=]]></Item>
	<Item Type="dynamicParameter">Wobj Data</Item>
	<Item Type="const"><![CDATA[;]]></Item>
</Line>

</DownloadLayer>

 

  !**********************************************************
  !*                Robtarget-Definitions                   *
  !**********************************************************
  PERS robtarget P30:=[[240.05,2096.23,1874.67],[0.707107,0,0,0.707107],[0,0,0,0],[9e+09,9e+09,9e+09,9e+09,9e+09,9e+09]];
  PERS robtarget via1:=[[40.05,2246.23,1774.67],[0.704416,0.061628,0.061628,0.704416],[0,1,-1,0],[9e+09,9e+09,9e+09,9e+09,9e+09,9e+09]];
  
...
...
...

  PROC MoveRelTest()
     MoveJ P30,v2000,fine,tGripper;
         !X-Offset:=;
         !Y-Offset:=0;
         !Z-Offset:=0;
         !RX-Offset:=0;
         !RY-Offset:=0;
         !RZ-Offset:=0;
     MoveOffsetL P30,v2000,fine,0,0,0,tGripper\wobjUsed:=;
  ENDPROC

 

This is how it should look like:

  PROC MoveRelTest()
     MoveJ P30,v2000,fine,tGripper;
         !X-Offset:=150;
         !Y-Offset:=200;
         !Z-Offset:=-100;
         !RX-Offset:=10;
         !RY-Offset:=0;
         !RZ-Offset:=0;
     MoveOffsetL P30,v2000,fine,150,200,-100,10,0,0,tGripper\wobjUsed:=;
  ENDPROC

I need this for ABB, KUKA and Fanuc.

 

I think this is a known process and someone has programmed it before.

 

Could someone give me a tip, please?

 

Thanks!

Re: OLP Commands execution before Location

I would do it with a single customized P30 location with the X, Y, Z, RX, RY, RZ custom parameters on it.

 

Its download layer would be the entire:

MoveJ P30,v2000,fine,tGripper;
         !X-Offset:=150;
         !Y-Offset:=200;
         !Z-Offset:=-100;
         !RX-Offset:=10;
         !RY-Offset:=0;
         !RZ-Offset:=0;
     MoveOffsetL P30,v2000,fine,150,200,-100,10,0,0,tGripper\wobjUsed:=;

 

Its simulation layer would be:

 

# Move
# MoveRel X Y Z

Another option is to have a regular P30 location (not customized) and a customized OLP command with:

1) custom parameters X, Y, Z, RX, RY, RZ

2) download layer:

         !X-Offset:=150;
         !Y-Offset:=200;
         !Z-Offset:=-100;
         !RX-Offset:=10;
         !RY-Offset:=0;
         !RZ-Offset:=0;
     MoveOffsetL P30,v2000,fine,150,200,-100,10,0,0,tGripper\wobjUsed:=;

3) simulation layer:

# Move
# MoveRel X Y Z  

 

 I do not see any solution with 2 physical locations P30 and via1...