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.5K RobotStudio
- 390 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 304 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 772 RAPID Programming
- 17 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings