On ABB robots, one have access to a syntax in RAPID programming language called TPRead. TPRead allows the programmer to read live values from the user (operator) while your code is being run.
TPReadNum reg1,"Text";
PROC readJNumFromPendant() TPErase; TPReadNum reg1,"Enter Input Number?"; readValue := reg1; TPWrite "Read Value is: " + ValToStr(testRead);
ENDPROC
MoveL point_1, v1000, z10, tool1; TPWrite “Jog the robot to the position for pallet corner 1”; Stop \NoRegain; p1_read := CRobT(); MoveL point_2, v500, z50, tool1;
Program execution stops with the robot at point_1. The operator jogs the robot to p1_read. For the next program start, the robot does not regain to point_1, so the position p1_read can be stored in the program
TPWrite "The value is now "+ValToStr(pTemp.extax.eax_c);
This command would print out the data on FlexPendant. In robotStduio this would not be written in the output window(!), but you can follow this in Virtual FlexPendant.