hexagon logo

Learning expressions

Does anybody know if Hexagon offers a (more or less) programming class to learn to use expressions? I've been wanting to get started on these, and reading through the core files. I can think of several ways at least that they can be used here. Locally there is a metrology shop that offers a four hour course, but I took Java in college and as I recall programming isn't something you pick up in four hours.
  • X+5=6; X is a variable.


    haha ok lemme rephrase, what would be considered a variable when it comes to programming?

    i have a part, i have a drawing with tolerances. where would a variable come into play?


    in other words:
    you are programming. at what point would you, Nano, think to yourself, "oh here's a variable, i need to use an expression and an assignment for this particular case".
  • One of the bigger parts we have here (about 120" long) the customer wants us to run it datum A down. Datum A consists of 7 target points so we made 7 posts for the datum A to lay on. They are at different heights too. After posts are installed CMM checks the heights and then informs the operator how they measure in Z. So the Z axis measurement is pulled out of the feature as a variable and then compared to nominal. This way the operator can shim the posts if needed to make the datum A flat.

    PL05       =FEAT/CONTACT/PLANE/DEFAULT,CARTESIAN,TRIANGLE
                THEO/<11,-0.2,0>,<0,0,1>
                ACTL/<11,-0.1998,-0.0005>,<0.0000518,-0.0002234,1>
                TARG/<11,-0.2,0>,<0,0,1>
                ANGLE VEC=<-1,0,0>,RADIAL
                REPORT VEC=<0,0,1>
                SHOW FEATURE PARAMETERS=NO
                SHOW CONTACT PARAMETERS=NO
    $$ NO,
                ****************************************
                ASSIGN/VA5=PL05.Z
    $$ NO,
                ****************************************
    ASK_P5     =COMMENT/YESNO,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
                "Z NOM= 0.00"
                "THE POST IS AT AT"
                "Z ACT ="+ "  " + VA5
                ADJUST AND PRESS NO 
                OR IF OK PRESS YES
    $$ NO,
                ****************************************
                IF/ASK_P5.INPUT=="YES"
                GOTO/NEXT_A6
                END_IF/
                IF/ASK_P5.INPUT=="NO"
                GOTO/POST_A5
                END_IF/
  • ok ok i follow you here.

    is it not possible to measure surface A directly instead of the posts?
  • ok ok i follow you here.

    is it not possible to measure surface A directly instead of the posts?


    No. The datum is in Z- about 2" recessed into the part. And than the posts are in the way too. Stuck out tongue closed eyes
  • No. The datum is in Z- about 2" recessed into the part. And than the posts are in the way too. Stuck out tongue closed eyes


    sounds horrible. hahaha


    So the Z axis measurement is pulled out of the feature as a variable and then compared to nominal


    why is the measurement viewed as a variable and not actually where the part is sitting on?
  • sounds horrible. hahaha




    why is the measurement viewed as a variable and not actually where the part is sitting on?


    The posts get shimed so the part sits flat
  • The posts get shimed so the part sits flat


    i still wasnt exactly sure why this was a variable but it occurred to me over the weekend.

    you guys setup your posts.
    take hits on the posts.
    test part on the posts and see where it isn't contacting the primary datum.
    add shims.
    input value of shims to variable expression in order to calculate where the datum is?
  • i still wasnt exactly sure why this was a variable but it occurred to me over the weekend.

    you guys setup your posts.
    take hits on the posts.
    test part on the posts and see where it isn't contacting the primary datum.
    add shims.
    input value of shims to variable expression in order to calculate where the datum is?


    Why are you making it so complicated?
    Measure the posts, check the difference to nominal, shim to nominal, remeasure the posts, make sure they all measure ±.001 from nominal, load part with datum A contacting the post (the part is large and flimsy so it will lay on the posts), pick up datums B and C which are on the part, measure the part.
  • why are you making it so complicated?
    Measure the posts, check the difference to nominal, shim to nominal, remeasure the posts, make sure they all measure ±.001 from nominal, load part with datum a contacting the post (the part is large and flimsy so it will lay on the posts), pick up datums b and c which are on the part, measure the part.


    aahhh i see.
  • Just a quick update to this thread.

    Hexagon UK now offer 1 day modular training courses instead of the traditional level 2. There are currently 6 courses and we are adding more as time allows. You can currently choose from the courses listed below - each one is delivered in 1 day at a Hexagon office or we can come on site to deliver if necessary.

    1) Advanced Alignments
    2) Advanced Autofeatures and CAD Controls)
    3) Advanced Reporting
    4) Flow Control and Logic
    5) Scanning
    6) - Using Laser Scanners and working with Pointclouds - for portable arms
    - Using Laser Scanners and working with Pointclouds - for CMM

    The Flow control and logic course was written by myself (with a little help from another Hexagon AE) and covers using MARKED SETS, VARIABLE ASSIGNMENTS, LOOPS, CONTROL PAIRS (IF/END_IF etc), FILE_IO amongst other things.