This is a possible 2 part question based on an available solution to the first.
Q1) is there a standard function to calculate a robtarget displacement from one workobject to another? Eg. I have a robtarget created in workobject1 and I want to reference the same position in workobject2 without moving the robot or declaring new constant robtargets.
This seems like a simple function to provide but i couldnt find anything that does exactly this, so I created one:
FUNC robtarget TargetDisp(robtarget pSource, PERS tooldata tToolUse, PERS wobjdata wSource, PERS wobjdata wDestination)
VAR robtarget pDestination;
VAR jointtarget jTemp;
jTemp:=CalcJointT(pSource,tToolUse\WObj:=wSource);
pDestination:=CalcRobT(jTemp,tToolUse\WObj:=wDestination);
RETURN pDestination;
ENDFUNC
Works great.
Q2) if there is no such standard function provided then i can use the one I created but I would like to add a comment to the declaration that shows up in the tooltip when you mouseover the function in robotstudio. I can't seem to find anywhere explaining the syntax to adding the comment although there is a placeholder for a comment in the help for function declaration.