Jump to content

Para files


---
 Share

Recommended Posts

What is the correct location to save PCM .para files? Must they be
a .para? I see in one program we have that was written by Zeiss has
a parameter file that is .txt?
Link to comment
Share on other sites

Correct location is really wherever you deem to be a protected, accessible location for the program. As long as the program can pull from that location (no read/write restrictions preventing this), and as long as no one can access them to modify them, then the location can be anywhere.

As far as type, either .para or .txt will work. Calypso can read both as a parameter file. The pro of using .txt files is that Calypso automatically looks for .txt files when you try to "open" a PCM file in the parameter windows. I am not aware of any cons against either.
Link to comment
Share on other sites

1, Instead of runPCMFile try using readPCMFile.

2, if you've got a short list of changing parameters, try using an If statement instead of a parafile to set your variables.

Itll look something like this, you should be able to edit it from here to suit your needs.

clearCAD()
itemSelected = inquireList("Is this part","Ø_.1247","Ø_.0934")

if itemSelected=="Ø_.1247" then
loadCad(getActualInspectionDir()+"\"+"Ø_.1247.cad")
TAB= 0.009
endif

if itemSelected=="Ø_.0934" then
loadCad(getActualInspectionDir()+"\"+"Ø_.0934.cad")
TAB= 0.010
endif
Link to comment
Share on other sites

I just realized another issue. Because I have two sizes, I had two programs, so In my Post settings I have one line of code that sends data from whichever program is being run. Now that I'm using one program for both, how do I get Calypso (PCM) to sent
the data do two different locations based on the chosen part number (size)?
Link to comment
Share on other sites

Easy, in your parafile (or If Statement) set a variable with your partnumber in it
PN="Ø_.1247"

then in your output, youll have a line like
filePath = "X:\CMM\REPORTS\CUSTOMER\PART_FAMILY\"+PN+"\"

Additionally you can now use a text element named "Part Number" and put it at the top of your report and you can have the current part number show on your report.
You may need to use formatL(PN) because your part number will probably be a numeric value and text boxes dont like that. (its a quirk)

fgdjkfgdjhkf.JPG

Link to comment
Share on other sites

  • 2 weeks later...
The Presetting's (I've got this part ironed out), its the post settings and were I want the data to go based on the part size I choose in the presetting's that's giving me trouble.

LN = getRecordHead("order")

clearCAD()
dir = getActualInspectionDir()

Part_Size = inquireList("Which size part would you like to run?", "Diameter_.1247", "Diameter_.0934")
selectCase Part_Size
case "Diameter_.1247"
readPCMFile(dir + "\Tang_.1247.PARA")
loadCADFile(dir+"\.1247.sab")
case "Diameter_.0934"
readPCMFile(dir + "\Tang_.0934.PARA")
loadCADFile(dir+"\.0934.sab")

endSelect

My Postsettings

rotateReference()

//Dims to Excel
filePath = "T:\DMR\CMM Data\Medtronic\Diameter_.0934 (feature 200)\"
ext = ".csv"

//N1 = getRecordHead ("M964812AXXX_Rev. C")
//dirPath = filePath + N1 + (" ") +date()+" "+time()+ ext
Lot = getRecordHead("order")
partnum=getRecordHead("partnbinc")
dirPath=filePath+Lot+("_")+partnum+ext
display(dirPath)
if fileExists(dirPath) == true
deleteFile(dirPath)
endif


//#1
DIM200_1 = getActual("200a").actual
//#2
DIM200_2 = getActual("200b").actual

addToFile(dirPath,date())
addToFile(dirPath,time())
addToFile(dirPath,("T:\DMR\CMM Data\Medtronic\Tang Flat Profile_.0934 (feature 200)"))
addToFile(dirPath,("Lot Number : "),LN)
addToFile(dirPath,("200a : "),DIM200_1)
addToFile(dirPath,("200b : "),DIM200_2)

Robert, thank you for the help with this, but I must be missing some small detail?
Link to comment
Share on other sites

Well for starters you have your N1 and dirpath lines turned off by the "//", so calypso isnt even looking at them (they are probably greyed out).

Secondly, im not sure what you're doing with your N1 line, i use
N1 = getRecordHead ("planid")
N2 = getRecordHead ("lotid")
to get part number (planid) and a user input (lotid) for my file saving, but your line N1 = getRecordHead ("M964812AXXX_Rev. C") may be causing issues because M964812AXXX_Rev. C is probably not a retrievable field in your VPHEAD.GRA header.
Link to comment
Share on other sites

The Post settings are from an existing program that Zeiss wrote for us.
I have not altered the "N1" line at all, so I'm not sure why it would be turned off (//)?

All I really did was make some minor changes to the presetting's so the program and
model would change. Based on what you stated here, I'll try and figure it out, thanks again.
Link to comment
Share on other sites

Guys,

The N1 lines are greyed out, and not being used. These are not causing any issues from what I can see. The coding redefined "dirPath" again.

If you want them to dump into separate locations, you need to do as Roberto suggested earlier, make each part number a variable.
It would look something like this:

LN = getRecordHead("order")

clearCAD()
dir = getActualInspectionDir()

Part_Size = inquireList("Which size part would you like to run?", "Diameter_.1247", "Diameter_.0934")
selectCase Part_Size
case "Diameter_.1247"
readPCMFile(dir + "\Tang_.1247.PARA")
loadCADFile(dir+"\.1247.sab")
FP="Diameter_.1247 (feature 200)"
case "Diameter_.0934"
readPCMFile(dir + "\Tang_.0934.PARA")
loadCADFile(dir+"\.0934.sab")
FP="Diameter_.0934 (feature 200)"
endSelect

My Postsettings

rotateReference()

//Dims to Excel
filePath = "T:\DMR\CMM Data\Medtronic\"+FP+"\"
ext = ".csv"

//N1 = getRecordHead ("M964812AXXX_Rev. C")
//dirPath = filePath + N1 + (" ") +date()+" "+time()+ ext
Lot = getRecordHead("order")
partnum=getRecordHead("partnbinc")
dirPath=filePath+Lot+("_")+partnum+ext
display(dirPath)
if fileExists(dirPath) == true
deleteFile(dirPath)
endif


//#1
DIM200_1 = getActual("200a").actual
//#2
DIM200_2 = getActual("200b").actual

addToFile(dirPath,date())
addToFile(dirPath,time())
addToFile(dirPath,("T:\DMR\CMM Data\Medtronic\Tang Flat Profile_.0934 (feature 200)"))
addToFile(dirPath,("Lot Number : "),LN)
addToFile(dirPath,("200a : "),DIM200_1)
addToFile(dirPath,("200b : "),DIM200_2)

The text in red is the changes I made that should allow what you are asking. It is untested though.

Keith
Link to comment
Share on other sites

Thank you Keith. I did try what Roberto suggested, but it didn't work. I must have missed
some small detail. I made the changes/additions that you suggested, and it works now.

The Text element worked well Roberto, thanks.

Many thanks!
Link to comment
Share on other sites

I appreciate all the help. I've got it doing what it needs to do with one exception.
When the program is near the end and ready to spit out the report, I get the
following error(s). Any idea what's causing this?
150_ee458609fd05e3ace812969aad075cec.png
150_1ba348e8a33f13cdddf353dc754fd2f7.png
Link to comment
Share on other sites

getActual("200a").actual will work well for something like profile deviation, but if you're trying to get a size or location/distance you may need to use getActual("200a").diameter, or radius, or x, or y.
Link to comment
Share on other sites

They are line profile deviations. I should add that I am not "physically" running the program
I'm executing it from "Plan - Subsequent Evaluation", so there is no actual variable data.
Is that why I'm getting the error?
Link to comment
Share on other sites

 Share

×
×
  • Create New...