Jump to content

PCM IF/THEN


---
 Share

Recommended Posts

I need the operator to be prompted with two choices. One; Is the a set-up part?" Two; Is this approved for production?"
Based on each question the resultant data would then be sent to one file for a set-up and a different file for production.
I'm assuming it would and "If - Then" type formula?
Link to comment
Share on other sites

I don't really understand what the question is. But you wish to do something along this line?
if inquireList("It this..","Production","Set-up") == "Set-up"
	pathForResult="c:\..."
else
	pathForResult="d:\..."
endif
Link to comment
Share on other sites

Depending on what your "variable data" is, you have what you need. If you instantly wish to write to file.

You can use:
addToFile("path",variable)
Link to comment
Share on other sites

Aha, then I see, so you need to change the output directory you have set in "Name for output files"..

That's doable. But I suggets you copy the files to the correct location after creation. (Less confusing and more understandable how it works.)

As usual there's several ways. One of many is to add this to your inspection_end_pcm.txt.
if inquireList("It this..","Production","Set-up") == "Set-up"
	copyFile("...\results\whatever.pdf","\Setup\theresults.pdf")
else
	copyFile("...\results\whatever.pdf","\Production\theresults.pdf")
endif
I've heard that that file might be executed with a delay, never used it my self so I cant tell. But try it.
Link to comment
Share on other sites

Is this what it would look like

Presetting's

if inquireList("It this..","Production","Set-up") == "Set-up"


Post settings

copyFile("...\results\whatever.pdf","\Setup\theresults.pdf")
else
copyFile("...\results\whatever.pdf","\Production\theresults.pdf")
endif
Link to comment
Share on other sites

No, don't use pre- or post-settings. It's a .txt-file that you place in your measument plan folder, (or the inspection folder if you wish to apply on ALL plans.) Name it "inspection_end_pcm.txt" and paste all of it there. Lean back, open a beer ans donate a dollar for kids cancer research.
Link to comment
Share on other sites

 Share

×
×
  • Create New...