Hello,
I am trying to create a program that is able to smoothly execute a motion path generated by custom software and sent to the robot. I currently have a .sps file running that writes the desired points into an array of E6POS.
SPS:
softWriteIndexInt = softWriteIndex //This is needed due to softWriteIndex being a real and casting into an int variable
ToolpathData[softWriteIndexInt+1].X = plcReqXPos //there is a +1 due to software index beginning to write at 0 whereas KRL array begins at 1
ToolpathData[softWriteIndexInt+1].Y = plcReqYPos
ToolpathData[softWriteIndexInt+1].Z = plcReqZPos
This function is working properly and we are able to populate all of the desired points into the array prior to executing any motion. Once the array is populated, I am wanting to execute a while loop to loop through all of the motion points.
SRC:
$ADVANCE = 3
stepCounter = 1
WHILE stepCounter < toolpathArrSizeInt //Array size is a variable passed from software
ToolpathData[stepCounter].E1 = -3500 //external axis positions and rotation values are temporarily static
ToolpathData[stepCounter].E2 = -90
ToolpathData[stepCounter].E3 = 90
ToolpathData[stepCounter].A = -91.36
ToolpathData[stepCounter].B = -1.65
ToolpathData[stepCounter].C = 1.19
$APO.CDIS = 5
SLIN ToolpathData[stepCounter] C_DIS
toolpathPosIndex = toolpathPosIndex + 1
stepCounter = stepCounter + 1
ENDWHILE
Display More
Running this for loop, I am able to move to all of the desired points, however, the motion is quite jumpy, and smooth motion is desired. I believe what is causing the issue is the advanced program pointer, however, I'm quite stuck on how to edit the program to move smoothly. I was able to find a topic that somewhat addresses my issue, however in the example provided, it appears that the amount of points sent to the robot is a fixed amount, however, in this application the amount of points is variable.
Advance pointer trick with a WHILE LOOP KUKA KRC4 8.x
Please let me know if more information is needed to help provide a solution. I am currently running KSS 8.5.8 on a KUKA KRC4 controller. Thank you.