Probably a silly question but does anybody know if it is possible to fix a worldzone to a specific toolframe. Normally, the program checks the world zone with respect to the current tool frame but I want this to be a fixed frame
World zones fixed to tool
-
Daley Adrichem -
March 22, 2019 at 1:37 PM -
Thread is marked as Resolved.
-
-
The only way I know of is to not change from that tool. Other than that, if you have safemove, I suppose you could find a solution there.
-
Hi Daley,
and welcome to the forum.
I don't understand what exactly you mean by " ... but I want this to be a fixed frame".
The only thing you need for a world zone is a pos. You can use a pos from a robtarget like this:
CodeWZSphDef \Inside, VPospHome, pHome.trans, nRad; WZDOSet \Stat, wzPospHome \Inside, VPospHome, doInPosHome, high;
But also you can use any other pos, e.g. from a toolframe:
CodeWZSphDef \Inside, VSomePosition, tGripper.tframe.trans, nRad; WZDOSet \Stat, wzSomePosition \Inside, VSomePosition, doInPos, high;
You only must be aware that the position of the world zone is fixed. If you'd like to use a position which may changes, e.g. if you use different positions of the gripper, you need a temporary world zone and you have to free it before you can define it with a different position, because you cannot change the position once the world zone is defined. If you try you will get an error message "40664, world zone already in use":
Code
Display MorePROC EnableTempWorldZones(num index) WZSphDef \Inside, VSomePosition, pSomePosition{index}.trans, nRad; WZDOSet \Temp, wzSomePosition \Inside, VSomePosition, doInPos, high; ENDPROC ! ... or ... PROC EnableTempWorldZones() WZSphDef \Inside, VSomePosition, tGripper.tframe.trans, nRad; WZDOSet \Temp, wzSomePosition \Inside, VSomePosition, doInPos, high; ENDPROC PROC DisableTempWorldZones() WZFree wzSomePosition; ENDPROC
Also keep in mind that world zones always are related to wobj0! This took me some hours to realize.
Kind regards
Jörn -
thanks
-
thanksYou may click on thanks (The red heard just below the post) rather than
saywrite "thanks".Kind regards
Joern