Assignment Shortcuts and their meanings?

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

  • Assignment Shortcuts and their meanings?

    Hi guys!
    I've been a CMM Programmer for two years.
    There are many things I don't know.
    What I want to learn most is the Assignment command.
    How do these commands work and what do they mean?
    What do the abbreviated names mean?
    Can you help me?
    Thank you very much in advance.

  • #2
    An assignment in any other programming language is called a variable.

    A variable is a meaningful name for a bit of information which you might need to recall.


    Think of it as a wall of pigeon holes and you can label them as you want in order to store information which you might want to use at a later date.

    i.e.

    ASSIGN/OP_NAME="Bob"

    ASSIGN/MACHINE_NAME="Bridgeport Mill"



    You can then recall the value stored in the variable (pigeon hole) by using it's name instead.

    COMMENT/REPORT
    "Part was produced on :" + MACHINE_NAME

    COMMENT/REPORT
    "Part was inspected by :" + OP_NAME

    Obviously this is a very simple example (but it's a common usage of variables) but you can store and manipulate all kinds of data!
    Automettech - Automated Metrology Technology

    Comment


    • #3
      The Pc-Dmis help menu could be of some help as far as figuring out what abbreviated names to use and which ones to stay away from. For a example, like NinjaBadger stated above, an Assignment of your machine name could look like this... ASSIGN/MACHINE_NAME, ASSIGN/MCHNAME, ASSIGN/I_LIKE_TURTLES, etc. What you want to stay away from is special characters of those used for computational purposes like +, -, *, /, and/or whatever makes your text color RED is not recommended/acceptable like for example ASSIGN/MACHINE-NAME, ASSIGN/I+AM+COOL.

      It's best if you use something descriptive that you or anyone could understand. Some go with shorter names others use up a good amount of the allotted string length but suffer once when typing out such a long string at the expense of being super descriptive.
      Last edited by Kp61dude!; 06-10-2019, 10:32 AM.
      PcDmis 2015.1 SP10 CAD++
      Global 7-10-7 DC800S

      Comment


      • #4
        F1 Help file

        Functions List
        Hit arrays:
        Miscellaneous Functions
        Operator for Expressions
        Pointer Functions
        References of Type Double
        References of Type Point
        String Functions
        Variable Arrays

        This should keep you busy for a little while.

        B&S CHAMELEON/PCDMIS CAD++ V2011

        There are no bugs, only "UNDOCUMENTED ENHANCEMENTS!"

        sigpic

        Comment


        • #5
          You can download this, then look at the "using variable" chapter, even if it's in english...
          ftp://ftp.wilcoxassoc.com/docs/v2011...manual_pdf.zip

          You can do a lot of assignments, calculations, coordinates retrieval, statements...

          ASSIGN/V1=5 just gives "5" to V1 value
          ASSIGN/V2=ARRAY(1,3,5,7) creates an array of 4 values in which ASSIGN/V3=V2[2] gives the second value of V2 (here 3)

          If you want to create an array of odd numbers, you can do it in a loop like :
          ASSIGN/V1=1
          ASSIGN/V2=1
          DO/
          ASSIGN/V3[V2]=V1
          ASSIGN/V1=V1+2
          ASSIGN/V2=V2+1
          UNTIL/V2>100

          This array could be used to choose only one hit out of two in a feature :
          ASSIGN/V1=1
          ASSIGN/V2=CIRC1.NUMHITS/2
          WHILE/V1<V2
          ASSIGN/ODD_PT=CIRC1.HIT[V3[V1]].XYZ......................................here V3 is the previous array
          ASSIGN/ODD_V=CIRC1.HIT[V3[V1]].IJK
          F1 =GENERIC/POINT,DEPENDENT,CARTESIAN,$
          NOM/XYZ,<ODD_PT.X,ODD_PT.Y,ODD_PT.Z>,$
          MEAS/XYZ,<ODD_PT.X,ODD_PT.Y,ODD_PT.Z>,$
          NOM/IJK,<ODD_V.I,ODD_V.J,ODD_V.K>,$
          MEAS/IJK,<ODD_V.I,ODD_V.J,ODD_V.K>
          ASSIGN/V1=V1+1
          END WHILE



          Just remember that you can do a lot of things with assignments, and it's very funny, like those examples that I give and which are totally unusefull !

          Comment


          • #6
            Thank you very much for your interest.
            Yeah, I'm starting to get some stuff.
            Could you please share your favorite scripts and tricks with me?

            Comment


            • #7
              Click on the little arrow at the right of "search", then click on "advanced search", type "Assign", add a name (dph51, vpt.se, ninjabadger...) and look at the results.
              You can search also in the "code sample" area.

              For me, one of my first code here was the t value calculation on scans :
              ASSIGN/T_VAL=DOT(SCN1.HIT[1..SCN1.NUMHITS].XYZ-SCN1.HIT[1..SCN1.NUMHITS].TXYZ,SCN1.HIT[1..SCN1.NUMHITS].TIJK).

              Some other examples here :


              https://www.pcdmisforum.com/forum/pc...of-dot-product
              https://www.pcdmisforum.com/forum/pc...xamples-of-use
              https://www.pcdmisforum.com/forum/pc...rmation-matrix
              https://www.pcdmisforum.com/forum/pc...-and-variables

              Comment


              • #8
                My fav (and I'm not taking credit for) is:
                Code:
                ASSIGN/V1 = SCN1.HIT[MAXINDEX(SCN1.HIT[1...SCN1.NUMHITS].Z)]
                Pulls MAX or MIN point from whatever scan in whatever axis you'd like.
                PcDmis 2015.1 SP10 CAD++
                Global 7-10-7 DC800S

                Comment


                • Ahmet Konur
                  Ahmet Konur commented
                  Editing a comment
                  Does it say the maximum measurement on the [Z] axis where you scan?

                • Kp61dude!
                  Kp61dude! commented
                  Editing a comment
                  Yes. It pulls the point. So V1 is point type therefore you could build a generic point from...
                  Code:
                  V1.TX, V1.TY, V1.TZ
                  V1.X, V1.Y, V1.Z
                  You may replace the .Z with X or Y, too.
                  Also, you can change MAXINDEX to MININDEX.

              • #9
                Definitely download the Core manual for the version you are using. I have the one for 2019 R1 and it has all of that in there. There are also some very good examples on the forum that I didn't even know was possible. Whenever I run across one that could be helpful to me, I screenshot it and print it then it goes into my personal binder for reference when I need it. I actually have entire sections of the Core manual printed and in the binder as well so I don't have to search for it on our network.
                Remembering my beautiful wife Taz who's life was taken from me on 6-13-2020.

                Comment


                • #10
                  ^ Good advice. Keep a notebook.

                  B&S CHAMELEON/PCDMIS CAD++ V2011

                  There are no bugs, only "UNDOCUMENTED ENHANCEMENTS!"

                  sigpic

                  Comment


                  • A-machine-insp
                    A-machine-insp commented
                    Editing a comment
                    And if I ever leave this job (unlikely), it'll go with me.

                Related Topics

                Collapse

                Working...
                X