# createTCPSelection changing Installation

**URL:** <https://forum.universal-robots.com/t/createtcpselection-changing-installation/5757>\
**Category:** URCaps SDK\
**Created:** [December 5, 2019, 8:26am UTC](https://forum.universal-robots.com/t/createtcpselection-changing-installation/5757 "2019-12-05T08:26:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andreas.enhuber](https://avatars.discourse-cdn.com/v4/letter/a/e68b1a/32.png) [@andreas.enhuber](https://forum.universal-robots.com/u/andreas.enhuber)\
**Post date:** [December 5, 2019, 8:26am UTC](https://forum.universal-robots.com/t/createtcpselection-changing-installation/5757/1 "2019-12-05T08:26:18Z")

</div>

Hi devs,

my URCap should read a tcp by a given name and set this tcp for use in a MoveJ Node. I’ve modified the code from the ellipseswing sample and used this for configuring a MoveJ Node. So far this works pretty fine. However, everytime the TCPSelection **tcpSelection** is used, the robot recognizes a changed installation and marks this by a \* after the installation name.

```
//--- Code ---
	
//--- getURCapTCP
private TCP getURCapTCP(String name) {
    Collection<TCP> TCPcollection = tcpModel.getTCPs();
    int TCP_count = TCPcollection.size();
    if(TCP_count > 0){
	    Iterator<TCP> TCP_itr = TCPcollection.iterator();
	    while(TCP_itr.hasNext()){
            TCP thisTCP = TCP_itr.next();
	        String thisDefaultName = thisTCP.getDisplayName();
		    //System.out.println("Found a TCP named "+ thisDefaultName);
		    if(thisDefaultName.equals(name)){
		    	return thisTCP;
  		    }
        }
    }
    return null;
}

private void configureMoveJNode() {
    ProgramAPI programAPI = apiProvider.getProgramAPI();
    ValueFactoryProvider valueFactoryProvider = programAPI.getValueFactoryProvider();
    SimpleValueFactory valueFactory = valueFactoryProvider.getSimpleValueFactory();

	AngularSpeed speed = valueFactory.createAngularSpeed(80.0, AngularSpeed.Unit.DEG_S);
	AngularAcceleration acceleration = valueFactory.createAngularAcceleration(120.0, AngularAcceleration.Unit.DEG_S2);
	TCP tcp = getURCapTCP("URCap");
	TCPSelection tcpSelection = moveNode.getTCPSelectionFactory().createTCPSelection(tcp);
	TCPSelection tcpSelectionTest = moveNode.getTCPSelectionFactory().createActiveTCPSelection();
	
    MoveJConfigBuilder moveJConfigBuilder = moveNode.getConfigBuilders().createMoveJConfigBuilder()
    		.setJointAcceleration(acceleration, ErrorHandler.AUTO_CORRECT)
    		.setJointSpeed(speed, ErrorHandler.AUTO_CORRECT)
    		.setTCPSelection(tcpSelection);
    
	moveNode.setConfig(moveJConfigBuilder.build());
}

```

Anything i can do against this behaviour?

Regards  
Andreas
