# Receive robtarget from String

**URL:** <https://tech-community.robotics.abb.com/t/receive-robtarget-from-string/7125>\
**Category:** RobotStudio\
**Tags:** string, rapid-code, robtarget, string-to-robtarget\
**Created:** [April 29, 2016, 5:18pm UTC](https://tech-community.robotics.abb.com/t/receive-robtarget-from-string/7125 "2016-04-29T17:18:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![SteveMob](https://dub1.discourse-cdn.com/flex005/user_avatar/tech-community.robotics.abb.com/stevemob/32/1600_2.png) [@SteveMob](https://tech-community.robotics.abb.com/u/SteveMob)\
**Post date:** [April 29, 2016, 5:18pm UTC](https://tech-community.robotics.abb.com/t/receive-robtarget-from-string/7125/1 "2016-04-29T17:18:31Z")

</div>

Hello,

I am doing some Robot/LabVIEW communication. I want LV to send a string for a robtarget. This string will essentially say:

“CONST robtarget p10:=[[461.29,144.16,221.59],[0.29728,-0.143906,0.942789,0.0454265],[0,0,-1,0],[9E+09,9E+09,9E+09,9E+09,9E+09,9E+09]];” Defining CONST robtarget, giving it a name, position in space with tool and axes configuration data.

I need RAPID to take that string and convert it into a robtarget. Is this possible? I have this code:  
" _MoveJ RelTool(Home,read\_positionX,read\_positionY,read\_positionZ,\Rx:=orientationRX,\Ry:=orientationRY,\Rz:=orientationRZ),v200,z0,tool0,\WObj:=wobj0;"_

But this will only take positions in space, and tool orientation. Is there a way to accept an entire string as above, and convert it to a target declaration?  
I tried doing: " _VAR robtarget vartarget:=[[positionx,positiony,positionz],[orientq1,orientq2,orientq3,orientq4],[cf1,cf4,cf6,cfx],[9E9,9E9,9E9,9E9,9E9,9E9]];"_ and declared all those as number variables, and those variables take numbers sent from LV, but that didn’t really work either…  
I also looked into byte to string but couldn’t figure much out…

Thanks for any help!  
SM
