[Ma...] Posted 14 hours ago Share Posted 14 hours ago Hello guys and girls, thanks in advance for your assistance. I have been out of the CMM world for a while now and need some help. Is there a way (formula or other means) to run the CMM on a loop based on a time interval? I would like to fixture a part and measure at timed intervals to obtain the cooling effects on the part. Link to comment Share on other sites More sharing options...
[Ri...] Posted 13 hours ago Share Posted 13 hours ago If you have PCM. interval_s = 1800 // 30 minutes repeats = 6 for n = 1 to repeats // -- your features/characteristics for this cycle -- if n < repeats then wait(interval_s) endif next 1 Link to comment Share on other sites More sharing options...
[Ma...] Posted 13 hours ago Author Share Posted 13 hours ago No PCM, but thanks. Link to comment Share on other sites More sharing options...
[Cl...] Posted 13 hours ago Share Posted 13 hours ago If you want to loop it for an hour. You could create a simple program that runs for 6-minutes and just loop it 10x. Link to comment Share on other sites More sharing options...
[Lu...] Posted 8 hours ago Share Posted 8 hours ago there are probably better ideas out there, but a non-pcm way to do this i think would be to copy your features as many times as you want the program to run, and at the end of each "run" put in a programmable stop, then use a macro that whenever you want to check the part, would press the ok button on the programmable stop, which would continue the program. many macros also have a loop function where you can decide how many times to press the button you tell it to press. Link to comment Share on other sites More sharing options...
[Dr...] Posted 4 hours ago Share Posted 4 hours ago Without PCM, I'd recommend externalizing this from Calypso. Though a loop or programmable stop can get the job done, it might rely on assumptions that would no longer be apt if the inspection program changes. Turning off a loop/programmable stop can also be clunky. Batch files are a great tool for this kind of thing. If your inspection plan folder contains a batch file called “inspection_end.bat”, the file will, fittingly, be executed automatically at the end of an inspection run. As a simple example, open Notepad and type the following: TIMEOUT /T 30 then save this file in your inspection plan folder as “inspection_end.bat”, making sure that the file is not called “inspection_end.bat.txt”. Go ahead and run your inspection program. It’ll execute once (including outputting results), then the Command Prompt will pop up with a 30 second countdown. Upon reaching zero, the Command Prompt will go away, and presuming your inspection program has a loop, the next run will proceed. If your program is a consistent and known length, this short snippet is all that’s needed to pad out the interval between runs. If you want the program to execute, say, on every tenth minute (at 6:10, 6:20, 6:30…) regardless of run time, it’s more challenging, but nothing that some vibe coding & tweaking can’t solve. By the way, “REM” refers to comments in batch, and the @echo off command hides some Command Prompt ugliness; neither affects how the code works. @echo off :CheckTime REM Replace leading space in %TIME% with a zero for consistent comparison SET "CurrentTime=%TIME: =0%" REM Extract the minutes (characters 4 and 5 of the formatted time string HH:MM:SS.CC) SET "Minutes=%CurrentTime:~3,2%" REM Check if the minutes are divisible by 10 (00, 10, 20, 30, 40, 50) IF "%Minutes%"=="00" GOTO Continue IF "%Minutes%"=="10" GOTO Continue IF "%Minutes%"=="20" GOTO Continue IF "%Minutes%"=="30" GOTO Continue IF "%Minutes%"=="40" GOTO Continue IF "%Minutes%"=="50" GOTO Continue REM If the minute is not divisible by ten, wait for 1 second and loop again TIMEOUT /T 1 > nul GOTO CheckTime :Continue This code wouldn’t work for a program under 1 minute in length or longer than 10 minutes, but I think you can see what’s going on. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in