Your suggested method is sound and should work. You may have to try a little different syntax to compare strings:
#IFSTR(#WKPLN=MAIN)< G140> #IFSTR(#WKPLN=SUB)< G141> Another method would be to use the variable #XFO instead of #XSET. #XFO is the distance in the world coordinate system (XY_PLANE) along the X axis to the local coordinate system origin. The workplanes for the main spindle would always be at the world origin and the workplanes for the sub spindle would not. As long as #XFO=0 the code gen' can assume it's a main spindle: #IF(#XFO=)< G140>#ELSE< G141> ================================================== Fred Lauzus, CAM Programming Coordinator High Steel Structures, Incorporated mailto:[EMAIL PROTECTED] http://www.highsteel.com ================================================== -----Original Message----- From: Nix, Dan [mailto:[EMAIL PROTECTED] Sent: Friday, July 18, 2003 12:52 PM To: '[EMAIL PROTECTED]' Subject: [mfg-smartcam] Can SmartCAM eval a Work plane or Tool plane? Machine: Okuma LR-15 MW Control: OSP 5000LG I want to use Workplanes in my Advanced turning V11.0 to determine whether I'm working on the main spindle or the sub spindle. Right now I'm using the XSET field in the Job Planner to do this, but I wan't to use Workplanes or Toolplanes if possible. If I hardcode #WKPLN I get ZX_PLANE for normal turning, XY_PLANE when mill/dill (rotating tools) on the face of the part, but for mill/drill (rotating tools) perpendicular to the spindle axis I get a weird BUFPLN0, BUFPLN1 etc.. I want to create a work plane name MAIN for main spindle work and a work plane name SUB for sub-spindle work. Then use a #IF check at the tool change that would check: #IF(#WKPLN=MAIN)< G140> #IF(#WKPLN=SUB)< G141> Any suggestions out there in the SmartMAN, I mean SmartCAM world. ====================================================================== To find out more about this mailing list including how to unsubscribe, send the message "info mfg-smartcam" to [EMAIL PROTECTED] ====================================================================== ====================================================================== To find out more about this mailing list including how to unsubscribe, send the message "info mfg-smartcam" to [EMAIL PROTECTED] ======================================================================
