Universal Robots Forum

How to capture current TCP configuration in URCAP

From my InstallationNode I would like to get the current selected TCP configuration.
I know I can set and retrieve TCPS using the TCPContributionModel, but…

Is there any way of doing it?

Hi,

currently there is none. I would suggest making this a feature request. I’ve been asking this in the beta community too :wink:

You can iterate over the list and compare it to the active TCP. If two or more TCP is equal you will not have the opportunity to distinguish. And there is also a risk of having no match since the TCP can be set directly in script.

Hi Ebbe,

but how could the active TCP been read? using

    //TEST
    TCPSelection testSelection = moveNode.getTCPSelectionFactory().createActiveTCPSelection();
    System.out.println(testSelection.toString());

only gives an object reference adress :wink: if the toString() Method of the TCPSelection would be overridden with its actual name it would be a solution

Hi,

There are a couple ways to retrieve the active TCP. However, they aren’t as simple as using the Java API.

  • Primary/secondary interface data stream: Cartesian info sub-package (see attached file for more detail)
  • URScript: get_tcp_offset()

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.