Receive robtarget from String

SteveMob
✭
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
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
Tagged:
0
Categories
- All Categories
- 5.6K RobotStudio
- 398 UpFeed
- 20 Tutorials
- 14 RobotApps
- 300 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 336 IRC5
- 67 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 828 RAPID Programming
- 12 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 107 Collaborative Robots
- 5 Job listings