RobotStudio event

Robot Configuration from Rapid

edited November 8 in RAPID Programming
Hi, I would like to know if there is the possibility to suggest a preferred configuration from the rapid code, instead of setting each individual configuration.

I have a loop who iterate trough all the point to be reached, and i tried to set the configuration:
POINTS{i}.robconf := [0,0,0,0]<br>MoveL RelTool(POINTS{i},offX,offY,offZ),vmax,z100,TOOL\WObj:=WRKOBJ;<br>ENDFOR<br>FOR i FROM indexFrom TO indexTo STEP indexStep DO<br>

But of course instead of [0,0,0,0] I would like to suggest one of the following configuration:


Where the forth axis is always pointing in the same direction:

An idea could be, if possible, to check the available configurations (like in robotstudio) from each target, and than check if is also present in the list of the suggested configuration?

Post edited by dry_patrick on


  • Hi...
    I believe your problem can be resolved using ConfL\Off. Assigning pre-defined coordinates I don't think is a good idea, since you are using variable positions (offX,offY,offZ).
    I advise you to recalculate the stop position using CalcRobT().
    MoveL CalcRobT(CalcJointT(RelTool(POINTS{i},offX,offY,offZ)),TOOL\WObj:=WRKOBJ),TOOL\WObj:=WRKOBJ),vmax,z100,TOOL\WObj:=WRKOBJ;
    For each position there is an axis configuration that best adapts, however it is possible that the desired configuration cannot be achieved. Using the function, the coordinates are recalculated so that the mechanism can achieve the desired position.

    Try it like this and post the results. I hope it helps.