Log position from SearchL
robis
✭
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.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 800 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings