I need to run 50 parts one at a time before the data file dumps to our ERP system through an external batch file. anyone have experience? was thinking we can do a manual entry of part # and have the program only move ahead to the external Batch file when the number 50 is entered, otherwise have it loop back to measure the next part. any help with code to do this would be great.
add a counter to my program
Collapse
X
-
Are the operators typically going to be doing 50 parts at a time? If so you can just do a loop that pauses after each part and says "Load Part #X" where X is a variable that bumps up each loop with an assign/X=X+1 line. Then you can do everything in an array such as Dim1[X], Dim2[X], Dim3[X].
-
So the machine will be closing out of the program and reopening it to pick up where the operator left off? In that case, yes definitely something like a manual number entry. To achieve what I think you're looking for, I'd do a manual part number entry at the beginning of the program and then loop the entire measurement routine. To break out of it, right before the end of the loop maybe try something like IF_GOTO/PARTNO == 50, GOTO = L1 where L1 is a label just after the loop end. This way it'll loop continuously until it sees that part #50 has been measured and then run the rest of the program.
- Likes 1
Comment
-
Have you tried "STATS ON" command? It will automatically number each run for you.sigpic
Originally posted by AndersII've got one from September 2006 (bug ticket) which has finally been fixed in 2013.
- Likes 1
Comment
-
I believe I have posted code in the custom code section as of how to save stuff to file and also reading from file. Include a counter in your program that saves the number to file at the end of your program and include code to read that value from file at the beginning of it.
Or, follow Matts advice regarding the STAT.PC-DMIS CAD++ 2o23.1
Comment
Related Topics
Collapse
-
by spsayeskiWhen running a loop to run multiple parts, how can you
1. Set up tracefields for serial number and fixture numbers for each part
2. have...-
Channel: PC-DMIS for CMMs
11-03-2013, 06:25 AM -
-
by DeWain HodgeI was asked a question but one of our new inspectors when we were discussing looping. Say you have five parts you want to setup and measures all five....
-
Channel: PC-DMIS for CMMs
09-15-2016, 03:37 PM -
-
by angerjiGood afternoon everyone,
This should be an easy question with hopefully an even easier solution, but with the day ive had today I'm done...-
Channel: PC-DMIS for CMMs
02-26-2020, 03:49 PM -
-
by JamesMannesLooping a program is a way of running parts on a dedicated fixture that holds multiple parts.
This explanation was given to me by craiger_ny...-
Channel: PC-DMIS Code Samples
04-07-2007, 07:24 PM -
-
by louisdI'm trying to optimize path of a routine that measures anywhere from 1 to 4 parts set on a fixture (variable QTY.INPUT). Fixture positions are spaced...
-
Channel: PC-DMIS for CMMs
10-10-2018, 04:49 PM -
Comment