Forum Migration Notice
Update (2026-01-21): The user forums are now in read-only mode pending the data migration.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
Update (2026-01-12): The user forums will be put into read-only mode on the 21st of January, 00:00 CET, to prepare for the data migration.
We're transitioning to a more modern community platform by beginning of next year. Learn about the upcoming changes and what to expect.
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.7K RobotStudio
- 402 UpFeed
- 21 Tutorials
- 16 RobotApps
- 307 PowerPacs
- 407 RobotStudio S4
- 1.8K Developer Tools
- 251 ScreenMaker
- 2.9K Robot Controller
- 368 IRC5
- 92 OmniCore
- 8 RCS (Realistic Controller Simulation)
- 859 RAPID Programming
- 43 AppStudio
- 4 RobotStudio AR Viewer
- 19 Wizard Easy Programming
- 111 Collaborative Robots
- 5 Job listings