Hello. need help. I want to move the extended axes of the robot. Has anyone encountered this problem before?
shown in code for 6 axes
PROGRAM TEST_KAREL
%ENVIRONMENT TPE
%ENVIRONMENT BYNAM
CONST
MAX_AXS = 9
JNT_POS = 9
XYZ_POS = 2
VAR
to_prog: STRING[27]
open_id: INTEGER
status: INTEGER
position_no: INTEGER
new_xyz: XYZWPREXT
org_xyz: XYZWPREXT
num_axs: INTEGER
BEGIN
to_prog = 'TEST_TP_1'
OPEN_TPE (to_prog, TPE_RWACC, TPE_RDREJ, open_id, status)
position_no = 3
org_xyz = GET_POS_TPE (open_id, position_no, posn_typ, num_axs, status)
FOR indx_axs= 1 TO num_axs DO
jp_new [indx_axs] = jp_org[indx_axs] + jp_off [indx_axs]
new_xyz.x = org_xyz.x +10
new_xyz.y = org_xyz.y + 10
new_xyz.z = org_xyz.z + 10
new_xyz.w = org_xyz.w + 10
new_xyz.p = org_xyz.p + 10
new_xyz.r = org_xyz.r + 10
SET_POS_TPE (open_id, position_no, new_xyz, status)
CLOSE_TPE (open_id, status)
END TEST_KAREL