cancel
Showing results for 
Search instead for 
Did you mean: 

[.NET C#] Access to Tooldata and Basedata/WorkobjectData

Genius
Genius

Hi,

to simplify the documentation of Robot-Tool- and Basedatas (for Kuka) or Tool- and Wobj-Datas (for ABB), I want to write those datas to a textfile.

Unfortunately I have no Idea how to access those datas. I have looked in the Tecnomatix.NET help many times, but i cannot find any Information there.

Can anyone provide a code snippet or can give me some advice?

 

Thank you very much!

8 REPLIES

Re: [.NET C#] Access to Tooldata and Basedata/WorkobjectData

Siemens Phenom Siemens Phenom
Siemens Phenom

For KUKA, you need to go over the TxRobot.GetAllSystemFrames() and identify the bases and tools by naming conventions (t<num>, b<num>) and compute their coordinates relative to either system frame <robot>.w or to TxRobot.BaseFrame.

 

For ABB, you need to get string robotic parameter OLP_LOCAL_DATA_DEFINITIONS which contains all local definitions in ABB syntax, and parse the ones that are tooldata or wobjdata.

TxRoboticStringParam stringParam = TxRobot.GetInstanceParameter("OLP_LOCAL_DATA_DEFINITIONS") as TxRoboticStringParam;

Re: [.NET C#] Access to Tooldata and Basedata/WorkobjectData

Genius
Genius

Hi, here is a little update.

ABB works fine! that was really easy to program!

On the other hand, I have big troubles with the Kuka.

I found out, that I can get Load Dara, Base- and Toolnames with TxRobot.GetAllInstanceParameters(). But why are accessing Tool- and Basedata implemented differently?

Aren't there Tool- and Basedata Strings stored anywhere in the System? If I have to compute it, how can I be sure to have the same orientation values as defined in the Robot Setup? For example A=0, B=0, C=180 is the same as A=0, B=0, C=-180).

Can the TxEuKukaKrcLib.dll be used?

 

Because I am a novice in C# programming it will take a couple of weeks for the next update.

Re: [.NET C#] Access to Tooldata and Basedata/WorkobjectData

Siemens Phenom Siemens Phenom
Siemens Phenom

ToolData and BaseData string are not stored anywhere in the system for Kuka. The frames hold all necessary information. In ABB, it was not possible because of the load data and other wobj data parameters (UfProg, UfMech).

 

You can probably use TxEuKukaKrcLib, but it is not documented and we will not provide any support or backward compatibilty in it. It is better to use the official Tecnomatix .Net API.

 

In KUKA, A, B, C are Tecnomatix RPY RZ, RY, RX (A=RZ, B=RY, C=RX).

Re: [.NET C#] Access to Tooldata and Basedata/WorkobjectData

Genius
Genius

Now everything is working fine for Kuka, Fanuc and Abb.

Only some problems with rounding from RAD to DEG left. But this is a common programming issue.

 

Thank you for your support, Gilles!

Re: [.NET C#] Access to Tooldata and Basedata/WorkobjectData

Legend
Legend
To get the angles in degree:
Value*180/Pi

Re: [.NET C#] Access to Tooldata and Basedata/WorkobjectData

Genius
Genius

Hello Patrick,

 

that is correct.

But I meant for instance, that I get a value of 179.998 instead of 180.000.

 

Re: [.NET C#] Access to Tooldata and Basedata/WorkobjectData

Legend
Legend

Hi Markus,

 

try this:

 

double value = 179.998;
double result = Math.Round(value, 2, MidpointRounding.ToEven);

 

the result is now 180.0

Re: [.NET C#] Access to Tooldata and Basedata/WorkobjectData

Genius
Genius

Hi,

 

thank you for the reply.

You also have to use the constant (180 / 3.142) instead of (180 / Math.PI)