How do you keep ur programs neat and tidy?

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

  • How do you keep ur programs neat and tidy?

    Hey all
    Maybe this thread belongs in "tips and tricks", but ill have a shot at it here.

    As i mentioned in the title, how do you keeps ur programs neat and tidy so other CMM programmers can go into the programs and adjust e.t.c?

    Do you use groups? Do you do $$ comments explaining stuff?
    Do you sort out the code for alignment, measurment routine and evaluation etc?

    Do you have a system for how you name the elements?

    Me i try to group the Manual alignment, CNC-alignment, measurment code and evaluation.
    I also try to name the elements after the drawing, such at Ø15±0.2 etc

    How do you guys keep the programs clean?
    Post some pictures of code if you'd like.
    All answers are welcome.

  • #2
    I myself create folders with the customer first, then subfolders under that with part numbers, I have several different 6DXXXXX Part numbers, so there is a folder for multiple 6D part numbers, and the same with other part numbers. I showed a few programs in the 6DXXXXX folder
    Capture.JPGCapture1.JPG

    I am not going to show customer folder as to protect their identity or interest.
    (In Memory of my Loving wife, "Ronda" who I lost March 7, 2016. I love you baby.)
    They say "Nobody's Perfect." I must be Nobody.

    Comment


    • #3
      I have a tendency to be pretty sporadic in my programs. I'll use all kinds of different ideas and methods but eventually i will find a flow and then start modeling the programs to fit. Usually i will go back and put all the changes back in but it becomes a pain in the you know what after a while.

      The more efficient you become at writing programs the more you'll do it and the harder it will be to keep up with the older ones.

      Groups work well to keep it aesthetically nice but keep in mind PC-DMIS will not return anything inside of the group if you use the search function (Alt+F3).

      as far as naming, NEVER use special characters. only ALPHANUMERIC and underscores (if you need to add spaces). No slashes, dashes, pluses, parenthesis, etc. numbers, letters, and underscores.
      Ex-Hex

      Comment


      • pcdmisstudent
        pcdmisstudent commented
        Editing a comment
        Oh ****.
        Pretty much all our programs made the past 7 years has Ø ± _- () etc in their names...
        But we havent had any problem with it so far

      • anthony.alfaro
        anthony.alfaro commented
        Editing a comment
        This is common. Lots of people do it but it's never recommended.

        the reason being is that since PC-DMIS is capable of performing math functions you risk PC-DMIS trying to solve some math problem that doesn't actually exist. People have reported having spaces or characters in their names has caused some weird stuff. Though, never documented (to my knowledge) it's generally understood. At least, it should be.

      • jigarmy@gmail.com
        [email protected] commented
        Editing a comment
        earlier i was using naming like 'PNT_0.25_1', and what happens when you use this kind of naming is PCDMIS makes the feature unusable randomly.
        instead if i use PNT025_1 it works smoothly

    • #4
      I mistook your question. I use different colors in the editor so I can plainly see my auto features, alignments, constructed features, tips and angles, etc.

      Capture2.jpg

      so I can weed thru any issues or changes
      Last edited by KIRBSTER269; 10-21-2019, 09:58 AM.
      (In Memory of my Loving wife, "Ronda" who I lost March 7, 2016. I love you baby.)
      They say "Nobody's Perfect." I must be Nobody.

      Comment


      • pcdmisstudent
        pcdmisstudent commented
        Editing a comment
        Thats a nice touch, i never realised you could change the color of specific elements.
        I'll also implement that.

      • Schlag
        Schlag commented
        Editing a comment
        I have done this for years. It makes a huge difference looking thru a bunch of code. If everything is the same color its just 1 big blob but when you break it up it makes it so much easier to see a clearplane or movepoint in the wrong place or whatever it may be.

      • jigarmy@gmail.com
        [email protected] commented
        Editing a comment
        can you guys guide through the steps to change the colours?

    • #5
      /\ samsies. I use different colored fonts for my probe changes and alignments.
      i also bubble all my drawings so I can find particular features when i'm looking back at data.
      cir1, cir2, cir3...….. gets really confusing really fast.
      Che Guevara is a communist scumbag.

      Comment


      • #6
        Capture3.jpg

        I'm calibrating right now, as soon as It's done I'll add more pictures to show you and anyone else that want to do this

        Once you get the popup window here, UNCHECK Enable background highlighting.

        Capture.JPG

        Then highlight like my example shows alignments, (you can even specify different alignments to be different colors, by hitting the little plus sign) continuing on click the edit button, choose your color and hit apply.

        Capture1.JPG

        updated pcdmisstudent
        Last edited by KIRBSTER269; 10-21-2019, 10:53 AM.
        (In Memory of my Loving wife, "Ronda" who I lost March 7, 2016. I love you baby.)
        They say "Nobody's Perfect." I must be Nobody.

        Comment


        • Smallsvillanova
          Smallsvillanova commented
          Editing a comment
          KIRBSTER269 maybe im just blind but I've looked through and cannot find the one to change the tip rotation color. Do you think you could point me in the right direction?

        • KIRBSTER269
          KIRBSTER269 commented
          Editing a comment
          Smallsvillanova Parameter/Set Active Tip <<<<<<I believe the second one, there is 2

        • Smallsvillanova
          Smallsvillanova commented
          Editing a comment
          KIRBSTER269 That worked, you're the man! Thank you

      • #7
        Starting with a program seed will help with your consistency as well rather than starting from scratch everytime. All you prep functions will be in the same order. Not that its necessary but once aging its alot easir to find something missing when the order / format is the same all the time. Create a METRIC and INCH program with all the prep functions all inserted and make them read only. Then when you have a new part program to start, simply open the program, save as xxxxxxx, import your CAD and start programming.

        Comment


        • pcdmisstudent
          pcdmisstudent commented
          Editing a comment
          Hey thats an interesting idea.
          But what do you acctually mean by a program seed?

          Ive been thinkin about making a template for my programs so (as you said), you can just open the program, save as xxxx and start programming.
          But what does ur program seed include?
          could you post the code?

        • Schlag
          Schlag commented
          Editing a comment
          SEED / TEMPLATE same thing...

      • #8
        Header Group:
        1. Comment with create data
        2. Sub Call: If running offline true, create .txt file with information passed from main routine
        3. Sub Call: read .txt file, either flowed down from PLC or created on step#2 if offline
        4. Sub Call: parse string from .txt into 8 variables used throughout routine.
        5. variables for date time
        6. Sub Call: create report header out of report comments from passed down info in .txt file
        7. CMM report formatting
        8. Sub Call: generic speeds and motions (if needed they can be edited In a single place and would affect all routines)
        9. mode switch DCC/MANUAL
        10. loadprobe and tip
        11. external alignment call
        12. Sub Call: script to write part name, rev number, ser number up on top from various variables and parsing file name (needed for DP stuff)
        13. Sub Call: turn on stats

        Part Routine (first op):
        1. super rough alignment
        2. rough alignment
        3. faster speeds and feeds
        4. fine alignment
        5. all of geometry
        6. all constructions
        7. all alignments
        8. Sub Call: export feature info to text file
        9. all dimensions with alignment recalls as needed

        Part Routine (second op):
        1. super rough alignment
        2. rough alignment
        3. faster speeds and feeds
        4. fine alignment
        5. all of geometry
        6. all constructions
        7. all alignments
        8. Sub Call: import features, create generic features in sub routine from text file info, consume txt file, reference features in main routine with SUBCALL:FEATURENAME eg "CS1:CIR1"
        9. all dimensions with alignment recalls as needed

        Tail Group:
        1. Sub Call: stats transfer for DP
        2. Sub Call: pull last load probe command and save to .txt
        3. Sub Call: call part program (txt file from step#2 consumed)
        4. Sub Call: create folders, 3 directories, 2 if network is down
        - Output, 3 letter acronym from part#, 10 letter part#, WO#, OP 1/2
        - If network is down create same folders locally to later transfer to network once it's up again
        5. Sub Call: add NG if part is out of tolerance
        6. Sub Call: if re-run append a instance number "_n" to file name, re-run an infinite number of times
        7. Sub Call: print report
        8.Sub Call: copy report to 2 more locations (if network is up)
        9. Sub Call: trigger CSV data generator executable

        This has sped up revision rolls, and/or editing. Requires disciplined folks though. One lazy programmer (in a non beneficial developer way) ruins it all and it's back to spaghetti code!!!!

        Can't say I'm the father of this as it's mostly copied over from other styles used in various developer roles that I've had the opportunity to venture in. Like PLC structured text, Fanuc robotics, SQL, VB.NET, VBA, VB SCRIPT, C#, C , C++, LUA, PC-DMIS, etc...

        Want to learn? check out the gran master jedi here: https://www.pcdmisforum.com/forum/pc...p-2010-express had the opportunity to listen to his story over a phone conversation, wow what a heck of a developer!!!

        here's another nice one to pay attention to structure: https://www.youtube.com/channel/UCAM...deHAsmG50wqL1g

        Nice place to document what a 'normal' part routine looks like If I ever lose all information on how/what is in my template.
        I will use this data stored on 'cloud' to re-generate.

        Most if not all parts we manufacture in the process I'm involved in gets made in 3 operations 2 of them are inspected on the CMM.
        Last edited by Kp61dude!; 10-21-2019, 05:42 PM.
        PcDmis 2015.1 SP10 CAD++
        Global 7-10-7 DC800S

        Comment


        • pcdmisstudent
          pcdmisstudent commented
          Editing a comment
          Nice!
          That pcdmis link just takes me to the front page btw.
          and also, Whats a sub call? and why do you measure part in two operations?

        • Kp61dude!
          Kp61dude! commented
          Editing a comment
          pcdmisstudent oops, I've fixed my post.

      • #9
        Nothing to fancy but most of the generic stuff is there and ready to change as needed

        PART NAME :
        REV NUMBER :
        SER NUMBER :
        STATS COUNT : 1

        STARTUP =ALIGNMENT/START,RECALL:USE_PART_SETUP,LIST=YES
        ALIGNMENT/END
        STATS/ON,DATAPAGE,$
        DIRECTORY=,$
        READ=0,WRITE=0,MEMPAGES=0,FEATURE NAME,CONTROLCALC ON,$
        STATS/END
        FORMAT/TEXT,OPTIONS,ID,HEADINGS,SYMBOLS, ;NOM,TOL,MEAS,DEV,OUTTOL, ,
        $$ NO,
        .
        .
        PROGRAMER :CHAD O
        .
        PROVEOUT DATE :
        PROVEOUT SIGNOFF :
        .
        .
        PROGRAM NOTES / REVISIONS :
        .
        .
        C1 =COMMENT/INPUT,YES,FULL SCREEN=NO,
        'MO #'
        C2 =COMMENT/INPUT,YES,FULL SCREEN=NO,
        'EMPLOYEE #'
        C3 =COMMENT/INPUT,YES,FULL SCREEN=NO,
        'WORK CENTER #'
        C4 =COMMENT/INPUT,YES,FULL SCREEN=NO,
        'WORK OFFSET #'
        C5 =COMMENT/INPUT,YES,FULL SCREEN=NO,
        'JOB STATUS'
        C6 =COMMENT/INPUT,YES,FULL SCREEN=NO,
        'INSPECTION GAGE #'
        TRACEFIELD/NO_DISPLAY,LIMIT=15 ; MO # : C1.INPUT
        TRACEFIELD/NO_DISPLAY,LIMIT=15 ; EMPLOYEE # : C2.INPUT
        TRACEFIELD/NO_DISPLAY,LIMIT=15 ; WORK CENTER # : C3.INPUT
        TRACEFIELD/NO_DISPLAY,LIMIT=15 ; OFFSET # : C4.INPUT
        TRACEFIELD/NO_DISPLAY,LIMIT=15 ; JOB STATUS : C5.INPUT
        TRACEFIELD/NO_DISPLAY,LIMIT=15 ; INSPECTION GAGE # : C6.INPUT
        COMMENT/OPER,NO,FULL SCREEN=YES,AUTO-CONTINUE=NO,
        .
        .
        .
        .
        NEW PROGRAM !!!
        .
        .
        MIT ONLY !!
        .
        .
        .
        .
        MODE/MANUAL
        WORKPLANE/ZPLUS
        MOVESPEED/ 100
        LOADPROBE/GLOBAL_PROBE9
        TIP/T1A0B0, SHANKIJK=0, 0, 1, ANGLE=0
        TOUCHSPEED/ 5
        FASTPROBEMODE/ON
        PREHIT/0.2
        RETRACT/0.2
        CHECK/0.1,1
        FLY/ON
        DISPLAYPRECISION/6
        COMMENT/OPER,NO,FULL SCREEN=NO,AUTO-CONTINUE=NO,
        .
        .
        .
        START PROGRAM HERE !!
        .
        .
        .
        MODE/DCC
        CLEARP/ZPLUS,16,ZPLUS,16,ON
        MOVE/CLEARPLANE
        STATS/TRANSFER,DIRECTORY=C:\SPCDATA
        ROUTINE/END

        Comment


        • Schlag
          Schlag commented
          Editing a comment
          How far "passed" the probe will drive trying to to take a point before it errors out

        • jigarmy@gmail.com
          [email protected] commented
          Editing a comment
          what's 0.1 does and 1 does?

        • Schlag
          Schlag commented
          Editing a comment
          Look at the help file for check distance.

      • #10
        There is nothing 'neat and tidy' about sheet metal w/ fixture programs. All the moves & tips changes to get in and around all the clamps and swing gates and hand-apply templates. But, I do what I can.
        sigpic
        Originally posted by AndersI
        I've got one from September 2006 (bug ticket) which has finally been fixed in 2013.

        Comment


        • #11
          I think I know how I could do it, but I don't do it !!!!
          My planes are PLi, my circles CEi and my alignments REFi, my assignments Vi...
          It's totally unreadable for my co-worker...

          I believe that I gave here a part of what you have to not to do !!!

          Comment


          • KIRBSTER269
            KIRBSTER269 commented
            Editing a comment
            I figured yours would be something like 000000101110000000011100000100010001. since you are like a super computer

        Related Topics

        Collapse

        Working...
        X