Subroutines

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Subroutines

    Could some one please give me an exmple
    of a subroutine, both the call and the passing of variables as well as
    the subroutine it self. I have fixture that can hold three different
    sizes of seals. I need to measure the thickness at every 0.400" The thickness is the same on all of the seals the differance is the size

    Thanks in advance

  • #2
    I have been trying to get subroutines working too, but am having
    difficulty in passing data to and from the main program to
    the subroutine. Perhaps if I post here, and bump Randy's
    request back up the order, one of the kind and learned people
    her will reply?

    Dave

    Comment


    • #3
      Why don't you use Marked sets?
      sigpicSummer Time. Gotta Love it!

      Comment


      • #4
        Would something like this work?

        C1 =COMMENT/INPUT,What part do you want to measure?
        ,
        ,A
        ,B
        ,C
        IF_GOTO/C1.INPUT == "A",GOTO = L1
        IF_GOTO/C1.INPUT == "B",GOTO = L1
        IF_GOTO/C1.INPUT == "C",GOTO = L1
        COMMENT/OPER,You have entered an invalid option.
        ,
        ,Please re-type a part.
        GOTO/C1
        L1 =LABEL/
        IF/C1.INPUT == "A"
        ASSIGN/DIAM = 5
        END_IF/
        ELSE_IF/C1.INPUT == "B"
        ASSIGN/DIAM = 6
        END_ELSEIF/
        ELSE/
        ASSIGN/DIAM = 7
        END_ELSE/
        CIR1 =AUTO/CIRCLE, SHOWALLPARAMS=NO, SHOWHITS=NO
        THEO/0,0,0,0.0000635,0.000065,1,DIAM
        ACTL/0,0,0,0.0000635,0.000065,1,5
        TARG/0,0,0,0.0000635,0.000065,1
        DIM LOCD4= LOCATION OF CIRCLE CIR1 UNITS=MM ,$
        GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
        AX NOMINAL MEAS +TOL -TOL OUTTOL
        X 0.000 0.000 0.050 0.050 0.000 ----#----
        Y 0.000 0.000 0.050 0.050 0.000 ----#----
        Z 0.000 0.000 0.050 0.050 0.000 ----#----
        D DIAM 5.000 0.050 0.050 0.000 ----#----
        END OF DIMENSION LOCD4


        OR a polar point

        PNT1 =AUTO/VECTOR POINT, SHOWALLPARAMS=NO
        THEO/DIAM,0,0,0,0,1
        ACTL/7,0,0,0,0,1
        TARG/DIAM,0,0,0,0,1
        DIM LOC1= LOCATION OF POINT PNT1 UNITS=MM ,$
        GRAPH=OFF TEXT=OFF MULT=10.00 OUTPUT=BOTH
        AX NOMINAL MEAS +TOL -TOL OUTTOL
        PR DIAM 7.000 0.050 0.050 0.000 ----#----
        PA 0.000 0.000 0.000 0.000 0.000 ----#----
        Z 0.000 0.000 0.050 0.050 0.000 ----#----
        T 0.000 0.000 0.050 0.050 0.000 ----#----
        END OF DIMENSION LOC1
        "Your mom goes to college."
        Kip

        Comment

        Related Topics

        Collapse

        Working...
        X