Log position from SearchL
Options
Hi
I would like to log the robotarget in a text file.
Here is the code I use but it saves it in binary. I would like to have it in ASCII.
I have also tested to convert it to string but roborttarget is to long.
Could sombody help me, please.
PROC main()
Open "HOME:LOGNING",logningBin;
MoveL p10,v100,z50,prob_ikp;
MoveL p90,v100,z5,prob_ikp;
SearchLStop,probe,pp80,RelTool(p90,0,0,50),v10,prob_ikp;
pos01:=CPos(Tool:=prob_ikpWObj:=wobj0);
p91:=CRobT(Tool:=prob_ikpWObj:=wobj0);
WriteStrBin logning,"P1_A";
WriteAnyBin logning,p91;
! Write logning,"Pos1"Pos:=pos01;
!!str:=ValToStr(p91);
!!WriteStrBin logning,str;
MoveL p90,v50,z50,prob_ikp;
//Robert
master thesis at LiU
I would like to log the robotarget in a text file.
Here is the code I use but it saves it in binary. I would like to have it in ASCII.
I have also tested to convert it to string but roborttarget is to long.
Could sombody help me, please.
PROC main()
Open "HOME:LOGNING",logningBin;
MoveL p10,v100,z50,prob_ikp;
MoveL p90,v100,z5,prob_ikp;
SearchLStop,probe,pp80,RelTool(p90,0,0,50),v10,prob_ikp;
pos01:=CPos(Tool:=prob_ikpWObj:=wobj0);
p91:=CRobT(Tool:=prob_ikpWObj:=wobj0);
WriteStrBin logning,"P1_A";
WriteAnyBin logning,p91;
! Write logning,"Pos1"Pos:=pos01;
!!str:=ValToStr(p91);
!!WriteStrBin logning,str;
MoveL p90,v50,z50,prob_ikp;
//Robert
master thesis at LiU
0
Comments
-
Yes a robtarget is probably more than 80 chars in length, but you can write out only the parts of the robtarget that you care about as follows (be sure to change your write/open instructions to not use binary access):
VAR string strTemp;
strTemp:=ValToStr(p91.trans)+ValToStr(p91.rot);
Write logning, strTemp;Russell Drown0
Categories
- All Categories
- 5.4K RobotStudio
- 384 UpFeed
- 14 Tutorials
- 12 RobotApps
- 291 PowerPacs
- 406 RobotStudio S4
- 1.8K Developer Tools
- 247 ScreenMaker
- 2.7K Robot Controller
- 279 IRC5
- 46 OmniCore
- 6 RCS (Realistic Controller Simulation)
- 3 RobotStudio AR Viewer
- 736 RAPID Programming
- 15 Wizard Easy Programming
- 105 Collaborative Robots
- 3 Job listings