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.
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.
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...
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.
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.
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 !!!
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