Hello everyone
I am just starting to work on a project using ABB Yumi robot to do soldering. Since this is an automated system, it is not possible to jog each point, I have created a .txt file on Home and used RAPID to read that file. However, I am having difficulty in reading that file and assigning values from the file to the variables x, y, z. Here is my code:
PROC WeldingMotion(num x, num y, num z)
MoveL offs(Temp, x, y, z+10), v100, fine, Servo\WObj:=wobj0;
WaitTime 0.5;
MoveL offs(Temp, x, y, z), v100, fine, Servo\WObj:=wobj0;
WaitTime 0.5;
PulseDO signal1;
WaitTime 1.5;
MoveL offs(Temp, x, y, z+10), v100, fine, Servo\WObj:=wobj0;
ENDPROC
PROC ReadAndWeld()
Open “HOME:” \File:= “han.txt”, infile\Read;
WHILE i<4 DO
text := ReadStr(infile\Delim:=“,”\RemoveCR);
IF text = “EOF” THEN
EXIT;
ENDIF
x := ReadNum(infile);
text := ReadStr(infile\Delim:=“,”\RemoveCR);
IF text = “EOF” THEN
EXIT;
ENDIF
y := ReadNum(infile);
text := ReadStr(infile\Delim:=“\0d”\RemoveCR);
IF text = “EOF” THEN
EXIT;
ENDIF
z := ReadNum(infile);
WeldingMotion x, y, z;
text := ReadStr(infile);
i := i + 1;
ENDWHILE
ENDPROC
Please let me know if you have a solution
Best Regards