# ToolData as a parameter

**URL:** <https://tech-community.robotics.abb.com/t/tooldata-as-a-parameter/7922>\
**Category:** RAPID Programming\
**Created:** [October 11, 2017, 12:28pm UTC](https://tech-community.robotics.abb.com/t/tooldata-as-a-parameter/7922 "2017-10-11T12:28:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shawndietrich](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@Shawndietrich](https://tech-community.robotics.abb.com/u/Shawndietrich)\
**Post date:** [October 11, 2017, 12:28pm UTC](https://tech-community.robotics.abb.com/t/tooldata-as-a-parameter/7922/1 "2017-10-11T12:28:02Z")

</div>

I’m trying to pass a tool into a parameter for example: PROC TestProgram(PERS tooldata TempTool) and the call would be “TestProgram (tTool);” I don’t get any syntax errors but I do get a compile error saying that tTool is not a PERS but it is.

Argument error(123): Argument for ‘PERS’ parameter tTool is not a persistent reference or is read only.

Is it possible to pass tooldata into a PROC as a parameter?

---

<div class="post-metadata">

**Author:** ![ko414du4](https://avatars.discourse-cdn.com/v4/letter/k/e19b73/32.png) [@ko414du4](https://tech-community.robotics.abb.com/u/ko414du4)\
**Post date:** [October 13, 2017, 8:27am UTC](https://tech-community.robotics.abb.com/t/tooldata-as-a-parameter/7922/2 "2017-10-13T08:27:07Z")

</div>

Hi Shawndietrich,

Yes it’s possible. I had a success with this one below. The error was because the syntax of calling the routine is incorrect (use of brackets: brackets are for calling functions), such as **_passingToolDataTrial(myTool)_** instead of **_passingToolDataTrial myTool._**

Result is shown below as well.

 ![image.png](https://europe1.discourse-cdn.com/flex005/uploads/robotics1/original/2X/1/155455064d4def862364b40a64013f6475dfad23.png)
