Assigning Values to Variables

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

  • Assigning Values to Variables

    I am trying to use variables the first time and I can't get it to work as it now. I want to subtract the measured value of scn4 from 0.301. Also I would like to know how to print out the variables to the report? Thanks for the help.



    Code:
                MOVE/CLEARPLANE
    PNT334     =FEAT/CONTACT/VECTOR POINT,CARTESIAN
                THEO/<-13.3373,-18.5344,2.1177>,<-0.9690786,-0.2464649,-0.0119059>
                ACTL/<-13.3432,-18.5357,2.1176>,<-0.9690786,-0.2464649,-0.0119059>
                TARG/<-13.3373,-18.5344,2.1177>,<-0.9690786,-0.2464649,-0.0119059>
                SNAP=NO
                SHOW ADVANCED MEASUREMENT OPTIONS=NO
                SHOW_CONTACT_PARAMETERS=YES
                  AVOIDANCE MOVE=BOTH,DISTANCE=0.23
                  SHOWHITS=NO
                MOVE/CLEARPLANE
    PNT335     =FEAT/CONTACT/VECTOR POINT,CARTESIAN
                THEO/<-12.9135,-20.2161,2.0291>,<-0.969813,-0.2436552,-0.0097456>
                ACTL/<-12.9186,-20.2174,2.029>,<-0.969813,-0.2436552,-0.0097456>
                TARG/<-12.9135,-20.2161,2.0291>,<-0.969813,-0.2436552,-0.0097456>
                SNAP=NO
                SHOW ADVANCED MEASUREMENT OPTIONS=NO
                SHOW_CONTACT_PARAMETERS=YES
                  AVOIDANCE MOVE=BOTH,DISTANCE=0.23
                  SHOWHITS=NO
                MOVE/CLEARPLANE
    PNT345     =FEAT/CONTACT/VECTOR POINT,CARTESIAN
                THEO/<-13.1356,-19.2749,0.8304>,<-0.9701696,-0.2421178,-0.0122459>
                ACTL/<-13.1402,-19.276,0.8303>,<-0.9701696,-0.2421178,-0.0122459>
                TARG/<-13.1356,-19.2749,0.8304>,<-0.9701696,-0.2421178,-0.0122459>
                SNAP=NO
                SHOW ADVANCED MEASUREMENT OPTIONS=NO
                SHOW_CONTACT_PARAMETERS=YES
                  AVOIDANCE MOVE=BOTH,DISTANCE=0.23
                  SHOWHITS=NO
    SCN4       =FEAT/SET,CARTESIAN
                THEO/<-13.1288,-19.3418,1.6591>,<0,0,1>
                ACTL/<-13.134,-19.343,1.659>,<0,0,1>
                CONSTR/SET,BASIC,PNT334,PNT335,PNT345,,
    DIM LOC1= LOCATION OF SET SCN4  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH
    AX    NOMINAL       MEAS       +TOL       -TOL        DEV     OUTTOL
    T      0.0000    -0.0002     0.0100     0.0100    -0.0002     0.0000 ---#----
    END OF DIMENSION LOC1
                ASSIGN/V1 = V1=0.310
                ASSIGN/V2 = V1-LOC1.MEAS
    DIM LOC2= LOCATION OF SET V2  UNITS=IN ,$
    GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH
    AX    NOMINAL       MEAS       +TOL       -TOL        DEV     OUTTOL
    T      0.0000    -0.0002     0.0100     0.0100    -0.0002     0.0000 ---#----
    END OF DIMENSION LOC2
    Pc-Dmis 4.2, Zeiss Eclipse
    sigpic

  • #2
    I guess I'd try:
    Code:
    ASSIGN/V2 = .310-SCN4.T

    Comment


    • #3
      One way to insert the contents of a variable into a report is to use a report comment with its contents being the variable or argument you wish to appear.

      As for the calculation you are trying, what information about the feature set are you trying to subtract from?

      Comment


      • #4
        Originally posted by Goodluck View Post
        I guess I'd try:
        Code:
        ASSIGN/V2 = .310-SCN4.T
        Then
        Code:
                    COMMENT/REPT,V2
        or try

        Code:
                    COMMENT/REPT,.310 - SCN4.T
        <internet bumper sticker goes here>

        Comment


        • #5
          What I always find very handy, is to just hover the cursor over the assignemnt and it will give you the value of the calculation. That is a quick way of checking whether indeed the assignment was successful. No need to run the program first.


          Jan.
          ***************************
          PC-DMIS/NC 2010MR3; 15 December 2010; running on 18 machine tools.
          Romer Infinite; PC-DMIS 2010 MR3; 15 December 2010.

          Comment


          • #6
            ASSIGN/V2 = .310-SCN4.T" does not seems to work its red when I enter it. However "ASSIGN/V1 = .301-LOC1.T.MEAS" seems to working.
            Pc-Dmis 4.2, Zeiss Eclipse
            sigpic

            Comment


            • #7
              Originally posted by Goodluck View Post
              I guess I'd try:
              Code:
              ASSIGN/V2 = .310-SCN4.T
              Ooops, I forgot about the reporting part.

              Craig's method will work.

              Alternately, you can insert the variable into a generic feature and report the generic feature as follows.

              Code:
              ASSIGN/V1 = .310-PLN1.T
              F1         =GENERIC/POINT,DEPENDENT,RECT,$
                          NOM/XYZ,0,0,0.21,$
                          MEAS/XYZ,0,0,V1,$
                          NOM/IJK,0,0,1,$
                          MEAS/IJK,0,0,1
              DIM 1= LOCATION OF POINT F1  UNITS=IN ,$
              GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH
              AX    MEAS      OUTTOL       DEV      NOMINAL     +TOL       -TOL    
              Z      0.3100     0.1000     0.1000     0.2100     0.0000     0.0000
              END OF DIMENSION 1

              Comment


              • #8
                OK, I got it work. It looks like this at the end.
                Code:
                SCN4       =FEAT/SET,CARTESIAN
                            THEO/<-13.0621,-19.6098,1.7058>,<0,0,1>
                            ACTL/<-13.0672,-19.6111,1.7056>,<0,0,1>
                            CONSTR/SET,BASIC,PNT334,PNT335,PNT341,,
                            ASSIGN/V1 = .301-LOC1.T.MEAS
                F1         =GENERIC/POINT,DEPENDENT,CARTESIAN,$
                            NOM/XYZ,<0,0.301,0>,$
                            MEAS/XYZ,<V1,0,0>,$
                            NOM/IJK,<0,0,1>,$
                            MEAS/IJK,<0,0,1>
                DIM LOC2= LOCATION OF POINT F1  UNITS=IN ,$
                GRAPH=OFF  TEXT=OFF  MULT=10.00  OUTPUT=BOTH
                AX    NOMINAL       MEAS       +TOL       -TOL        DEV     OUTTOL
                X      0.3010     0.3011     0.0100     0.0100     0.0001     0.0000 ----#---
                END OF DIMENSION LOC2
                Pc-Dmis 4.2, Zeiss Eclipse
                sigpic

                Comment

                Related Topics

                Collapse

                Working...
                X