cancel
Showing results for 
Search instead for 
Did you mean: 

Kuka Robot Motion Virtual commisioning

Valued Contributor
Valued Contributor

Hi

 

I am trying to create a way to have a kuka robot move towards a location and then if a signal from a sensor comes on then make the robot stop in that postion and then move to a calculated position and clamp the part(interrupt search program).

Is there any way to achieve this?

 

Regards

13 REPLIES

Re: Kuka Robot Motion Virtual commisioning

Siemens Legend Siemens Legend
Siemens Legend

Hello,

 

I am afraid we don't have solution for that. It is not possible to cancel a motion before it is completed.

 

A possible workaround for this, assuming you have a search distance parameter would be to implement the search motion as a loop moving the robot by increment until the sensor will detect the part. it should be quite easy to implement this using the customized motion.

 

best regards

Bernard

Re: Kuka Robot Motion Virtual commisioning

Valued Contributor
Valued Contributor

Hi

 

Thank you. Could you please explain some detail as to how you would go about doing it in the custom motion. I am not sure how to go about incremeting the robot motion forward like that.

 

Regards

Re: Kuka Robot Motion Virtual commisioning

Siemens Legend Siemens Legend
Siemens Legend

Hello,

 

this is how the simulation layer should look like:

 

# SetVariable SearchDistance 300
# SetVariable SearchIncrement 20
# SetVariable SearchOffset 0
# While ((SearchOffset < SearchDistance) AND NOT PartDetected) Do
# MoveRelTool 0  SearchIncrement 0
# SetVariable SearchOffset SearchOffset+SearchIncrement
# EndWhile
# If SearchOffset >=SearchDistance Then
# Note Part Not Found
# Endif

 

SearchDistance could be a parameter as well of the SerachL customized motion

 

Best regards

Bernard

 

Re: Kuka Robot Motion Virtual commisioning

Valued Contributor
Valued Contributor

Hi

 

See below what I have

 

<SimulationLayer>
<Line>
<Item Type="const">SetVariable SearchDistance 300</Item>
</Line>
<Line>
<Item Type="const">SetVariable SearchIncrement 1</Item>
</Line>
<Line>
<Item Type="const">SetVariable SearchOffset 0</Item>
</Line>
<Line>
<Item Type="const">WHILE SearchOffset &lt; SearchDistance AND </Item>
<Item Type="parameter">FastSignal</Item>
<Item Type="const">==FALSE</Item>
</Line>
<Line>
<Item Type="const"># MoveRelTool 0 SearchIncrement 0</Item>
</Line>
<Line>
<Item Type="const">SetVariable SearchOffset SearchOffset+SearchIncrement</Item>
</Line>
<Line>
<Item Type="const">ENDWHILE</Item>
</Line>
<Line>
<Item Type="const">If SearchOffset >=SearchDistance Then</Item>
</Line>
<Line>
<Item Type="const">Note Part Not Found</Item>
</Line>
<Line>
<Item Type="const">Endif</Item>
</Line>

 

It does not seem to recognize the SetVariable see below

Index Severity Time Message
142 DBG 1.49 (CellTest) via1: SetVariable SearchDistance 300
143 DBG 1.49 (CellTest) via1: SetVariable SearchIncrement 1
144 DBG 1.49 (CellTest) via1: SetVariable SearchOffset 0
145 DBG 1.49 (CellTest) via1: WHILE SearchOffset < SearchDistance AND $IN[1]==FALSE
146 DBG 1.49 (CellTest) via1: Simulate WHILE SearchOffset < SearchDistance AND $IN[1]==FALSE
147 DBG 1.49 (CellTest) via1: Evaluate signal SearchOffset:
148 Warning 1.49 (CellTest) via1: Signal SearchOffset not found, value 0 is assumed
149 DBG 1.49 (CellTest) via1: Evaluate signal SearchDistance:
150 Warning 1.49 (CellTest) via1: Signal SearchDistance not found, value 0 is assumed
151 DBG 1.49 (CellTest) via1: If SearchOffset >=SearchDistance Then

 

Regards

Re: Kuka Robot Motion Virtual commisioning

Siemens Phenom Siemens Phenom
Siemens Phenom

You need to use "# SetVariable", not "SetVariable".

Re: Kuka Robot Motion Virtual commisioning

Valued Contributor
Valued Contributor

Hi

 

Great thanks I got it working. Just one other thing now is that the robot motion is a little jerky and I have tried the below to improve it

 

# MoveLRelTool 0 0 SearchIncrement [Speed = 0.3] [Zone = nodecel]

 

But still the robot slowing down a speeding up for each increment of the loop. Is there any way to improve this?

 

Regards

Re: Kuka Robot Motion Virtual commisioning

Siemens Legend Siemens Legend
Siemens Legend

Hello,

 

very good.

It is not possible to smooth the motion as there is an expression to be evaluated aafter each motion, this cannot be done on the fly.

 

best regards

Bernard

 

 

Re: Kuka Robot Motion Virtual commisioning

PLM World Member Phenom PLM World Member Phenom
PLM World Member Phenom

Hi,

 

i have modify the code.

these code are working correctly in LineSimulation Study.

You must create a robot signal "FastSignal" and connect to search gripper.

in case of sensor find a part the robot stops the search movement and drive to abort1 path.

 

 

<SimulationLayer>
<Line>
<Item Type="const"># SetVariable SearchDistance 500</Item>
</Line>
<Line>
<Item Type="const"># SetVariable SearchIncrement 5</Item>
</Line>
<Line>
<Item Type="const"># SetVariable SearchOffset 0</Item>
</Line>
<Line>
<Item Type="const"># Waittime 0.1</Item>
</Line>
<Line>
<Item Type="const"># While ((SearchOffset &lt; SearchDistance) AND NOT </Item>
<Item Type="const">FastSignal) Do</Item>
</Line>
<Line>
<Item Type="const"># MoveRelTool </Item>
<Item Type="dynamicParameter">Loc Name</Item>
<Item Type="const"> 0 0 SearchOffset</Item>
</Line>
<Line>
<Item Type="const"># SetVariable SearchOffset SearchOffset+SearchIncrement</Item>
</Line>
<Line>
<Item Type="const"># Waittime 0.1</Item>
</Line>
<Line>
<Item Type="const"># Endwhile</Item>
</Line>
<Line>
<Item Type="const"># Waittime 0.1</Item>
</Line>
<Line>
<Item Type="const"># If SearchOffset &lt; SearchDistance Then</Item>
</Line>
<Line>
<Item Type="const"># CallPath Abort1</Item>
</Line>
<Line>
<Item Type="const"># Endif</Item>
</Line>
<Line>
<Item Type="const"># If SearchOffset > SearchDistance Then</Item>
</Line>
<Line>
<Item Type="const"># Note Part Not Found</Item>
</Line>
<Line>
<Item Type="const"># Endif</Item>
</Line>
</SimulationLayer>

Kind regards,

Benjamin Voelzke

Re: Kuka Robot Motion Virtual commisioning

Pioneer
Pioneer

 Hello BernardHoessler

Can you tell me how to use this case in PS?

1. which type of the file format for motion customize? for example, *.xml or others and where i put the motion customized file?

2. how to select motion customized layer?

 

thanks very much.

 

Paul.