[Ma...] Posted September 22, 2023 Share Posted September 22, 2023 Hey everyone, I'm new to PCM and I'm working to export measurement results to text files. For the most part, the script I've picked up and modified seems to work just fine. However, there's one issue I can't seem to get past, and I was wondering if anyone here has any ideas how I can go about resolving it. For context, the following PCM code below is written in a text file, report_end_pcm.txt, that is dropped into the C:\Users\Public\Documents\Zeiss\CALYPSO 6.8\workarea\inspections directory in every offline machine, which to my understanding is executed after a measurement plan(s) has completed. (We have a similar process for online machines.) What the PCM script is supposed to do, in a nutshell, is grab the names and data points and write them each in its own line in a text file that will be saved to a central location on a network drive, which results in the following output below. addToFile("\\alb-fs-11\PLM\CMMRawOutput\" + getRecordHead("planid") + ".txt", "PlanID,GroupName,PointName,Actual,Lower,Upper,Nominal") filename="\\alb-fs-11\PLM\CMMRawOutput\" + getRecordHead("planid") + ".txt" for i = 1 to getCFNames().size addToFile(filename, getRecordHead("planid") + "," + getCFGroupname(getParameterNamed(getCFNames(), i)) + "," + getParameterNamed(getCFNames(), i) + "," + formatL(getActual(getParameterNamed(getCFNames(), i)).actual) + "," + formatL(getNominal(getParameterNamed(getCFNames(), i)).tolerance.lowerTolerance) + "," + formatL(getNominal(getParameterNamed(getCFNames(), i)).tolerance.upperTolerance) + "," + formatL(getNominal(getParameterNamed(getCFNames(), i)).tolerance.nominal)) next i The issue I'm coming up against in the measurement plans I've tested on so far is many of their characteristics don't have an actual value to report out. As a result, the program will display the following warning dialog to the user and log "9999" for the actual value for a given line in the text file for however many times it comes up in a given measurement plan. (By the way, process engineering is willing to overlook the "9999" value that is being output, so no issues there.) Something to note here is that while it doesn't disrupt the program nor the measurement plan itself, it'll be annoying to have the user click OK for every time it comes up and I'd rather not set off false alarms, if at all possible. One possible idea I had was to maybe include an "if" statement that checks if an actual value is null, and if it is, then to either leave it blank for populate it with "9999" for the actual column in the text file, but I can't seem to find anything in the help file docs that does what I'm wanting to do or similar. But I'm open to other solutions if anyone has any. Link to comment Share on other sites More sharing options...
[Je...] Posted September 23, 2023 Share Posted September 23, 2023 Maybe I am missing something but how is this better or more efficient than exporting the _chr.txt and _fet.txt files native from CALYPSO options? What is your end goal here that using the _chr.txt files doesn't achieve? Link to comment Share on other sites More sharing options...
[Ri...] Posted September 25, 2023 Share Posted September 25, 2023 Since the Profile is not reporting a value (9999), "mask" and "mark" the characteristic. You're reporting the Min/Max for the profile? I believe this should work, I finished a recent job where we used "getCFNames(Group Name)" (Similar to your PCM) and had similar errors. The PCM "getCFGroupname" or "getCFNames(Group Name)", doesn't play well with Profile under certain conditions (I.e., reporting "Bilateral -two results" in a Profile) and most selection other than "Bilateral". The same PCM will also have issues with Best-Fit Tue Positions. These two links discuss some issues I went thru. I was able to resolve all the issues. viewtopic.php?t=11489 viewtopic.php?p=50267&hilit=getCFNames#p50267 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