# Strange error tooldatanot type name

**URL:** <https://tech-community.robotics.abb.com/t/strange-error-tooldatanot-type-name/3864>\
**Category:** RobotStudio\
**Created:** [October 18, 2010, 11:04pm UTC](https://tech-community.robotics.abb.com/t/strange-error-tooldatanot-type-name/3864 "2010-10-18T23:04:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kpizzolatto](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/kpizzolatto/32/3215_2.png) [@kpizzolatto](https://tech-community.robotics.abb.com/u/kpizzolatto)\
**Post date:** [October 18, 2010, 11:04pm UTC](https://tech-community.robotics.abb.com/t/strange-error-tooldatanot-type-name/3864/1 "2010-10-18T23:04:21Z")

</div>

After adding a persistant variable for tooldata in RobotStudio 5.13.10, I get a strange message:

/IRB6400R\_200kg\_2.5m/RAPID/T\_ROB1/VisSearch(9,3): Error 82 : Reference error : tooldatanot type name

Clearly, tooldata IS a type name, but I’m not sure what I’m doing wrong here.  
Has anybody seen this message before?

Here is the line where I added the tooldata:

PERS tooldata toolVisSensor:=[TRUE,[[2.52159,158.11,336.934],[1,0,0,0]],[10,[0,100,300],[1,0,0,0],0,0,0]];

TIA to anyone who can shed some light…

---

<div class="post-metadata">

**Author:** ![Gizmo](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@Gizmo](https://tech-community.robotics.abb.com/u/Gizmo)\
**Post date:** [October 18, 2010, 11:10pm UTC](https://tech-community.robotics.abb.com/t/strange-error-tooldatanot-type-name/3864/2 "2010-10-18T23:10:40Z")

</div>

Try changing the name of the tool to something that hasn’t got the word “tool” in it. I think “tool” may be a keyword. I seem to recall similar issues in the past, but it was a while ago. Worth a try anyway.

---

<div class="post-metadata">

**Author:** ![kpizzolatto](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/kpizzolatto/32/3215_2.png) [@kpizzolatto](https://tech-community.robotics.abb.com/u/kpizzolatto)\
**Post date:** [October 18, 2010, 11:27pm UTC](https://tech-community.robotics.abb.com/t/strange-error-tooldatanot-type-name/3864/3 "2010-10-18T23:27:44Z")

</div>

That seems reasonable, but I noticed a couple of things:

D’oh!

When I looked for things named …tool… I found my error.  
I made a function and transposed the function name and the returned datatype.

This apparently polluted the keyword “tooldata”, so that Robotstudio thinks it’s no longer a datatype name–because ALL the tooldata declarations became bogus (it only tells you about the first one).

so, changing  
FUNC RelToolData tooldata …  
to  
FUNC tooldata RelToolData …

fixes it.

Thanks!!

(although, I must comment that the error message was sort of misleading!)
