RobotStudio event

Receive robtarget from String

SteveMob
SteveMob
edited April 2016 in RobotStudio
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


Post edited by SteveMob on