Jump to content

Marking output files for pass/fail?


---
 Share

Recommended Posts

This may be a PiWeb solution, but is there a method where I can have the output Pdf files from Calypso annotate the filename with some arbitrary character based on whether the run exceeded limits, such that a failed part would be obvious in the results folder? Large CNC machine shop here, many CMM runs per shift, and I'd like to find the failed part results quickly vs. reviewing each output file...
Link to comment
Share on other sites

First of all, i don't use Pi Web so i may be going at this completely wrong......

If you have PCM you can an If statement in your post script to set a variable for in tolerance vs. out of tolerance.
in this case i set the variable "Status" to "In tolerance", then if something checks out the variable will change to "out of tolerance".
inspection Tolerance State for each run is either "in tolerance" which is 11 characters or "out of tolerance" which is 14 characters.

Status ="In Tol"
Len=len(inspectionToleranceState())
if Len == 14 then
Status ="Out of Tol"
endif

of course if you don't like that in your file name you can change the Status to be i for in & o for out, or figure out an arbitrary character that you prefer for each
Link to comment
Share on other sites

Similar to what Roberto stated, here are the lines of code I use to accomplish this:
//Get PASS/FAIL tag
TolStateStr=inspectionToleranceState()
selectCase TolStateStr
  case "outOfTolerance"
  TolStateID="FAIL"
endSelect
selectCase TolStateStr
  case "inTolerance"
  TolStateID="PASS"
endSelect
selectCase TolStateStr
  case "outOfLimit"
  TolStateID="PASS"
endSelect
selectCase TolStateStr
  case "notDefined"
  TolStateID="Not Defined"
endSelect
selectCase TolStateStr
  case "noResults"
  TolStateID="Uncalculated Results"
endSelect
I then add the variable "TolStateID" to the end of my PDF naming convention.

Cheers,

Keith
Link to comment
Share on other sites

 Share

×
×
  • Create New...