I have a vision system that is communicating to the teach pendant the pose to go to via sockets. I pushed the (x,y,z,w,p,r) into PR[1] and am trying to use the J command to move the robot to it, but it throws an error on that line saying
INTP-311 Uninitialized data is used.
I recorded a position to set PR[1] to some value. That didn't help.
I also tried to assign PR[1] to another PR variable that is a constant. That also didn't help.
How do I initialize this variable?
The details of the variable are
PR[1] UF: F UT: F CONF:FUT 127-1-
X 120.9 mm W 179.8
Y -1133.9 P 31.4
Z 352.9 R -176
Reading another post, I made this modification to my KAREL program:
SET_POS_REG(1, poseToGo, status)
$UFRAME = $MOR_GRP[1].$NILPOS --For world.
$UTOOL = $MNUTOOL[1,1] -- where utool would be the tool the point used.
I am still seeing the same error and the PR variable looks the same.
EDIT 1:
Further digging:
The values of a PR variable that I have recorded and then am able to jog to look like this:
PR[3] UF:F UT:F CONF:NUT 000
When I set this to PR[1] and then run my code it is getting overwritten to FUT 127-1-
This could be the problem. How do I set it to NUT 000?
EDIT 2:
I figured it out:
-- Write this value in PR[1]
poseToGo.config_data.CFG_TURN_NO1 = 0
poseToGo.config_data.CFG_TURN_NO2 = 0
poseToGo.config_data.CFG_TURN_NO3 = 0
poseToGo.config_data.CFG_FLIP = FALSE
poseToGo.config_data.CFG_UP = TRUE
poseToGo.config_data.CFG_FRONT = TRUE
This set the configuration correctly.