I'm trying to build in some logic testing using an IF test in the WHILE/ENDW
loop.
However, the IF keeps bombing.
If I test tl_len=32000 by itself it works and
if I test sideang=32000 by itself it works.
When I test the IF using an ,AND for both tl_len and sideang equal to 32000
is doesn't work!
Hmmm,,,


// Production_Milling 11.5 Windows 10/16/98 16:52:40 Macro File
// w:\mcl\jsf.mcl
// CREATED: 01/03/01
//  
//  
VAR_REMOVE_ALL[]
// set counter for 1st step in list
#Counter=1
//
// loop through step list
WHILE(#Counter<=OPNLIST(0))

        // extract step number from step in list
        #Step=OPNLIST(#Counter)

        // open step
        JOS_CONTEXT_OPEN[BASEITEM=1, USERNAME=#Step]

        // check for invalid tool length AND invalid side angle for a face
mill
  IF(jos(tl_len)=32000 ,AND jos(sideang)=32000)              
                // assign tool length of 1 inch
                JOS_FIELD_EDIT[FLDNAME="tl_len", EXPR="1"]

                // assign side angle of face mill to 0
                JOS_FIELD_EDIT[FLDNAME="sideang", EXPR="0"]

                // assign cutter raduis to 0
                      JOS_FIELD_EDIT[FLDNAME="cradius", EXPR="0"]

                // apply changes made to step
                JOS_CHANGES_PROMOTE[]

  ENDIF

        // close step
        JOS_CONTEXT_CLOSE[]

        // advance counter to next step in list
        #Counter=#Counter+1

ENDW

Regards,

Michael Senack, X354
Your local friendly neighborhood CNC Programmer


======================================================================
To find out more about this mailing list including how to unsubscribe,
send the message "info mfg-smartcam" to [EMAIL PROTECTED]
======================================================================

Reply via email to