Jump to content

Preferred method


---
 Share

Recommended Posts

I have created several family of parts programs, using .separate para files with all the variables. My colleague did not use separate para files, but instead put all the variables in the presetting's. Clearly both methods work, but is there some any substantial benefit from using one method over the other?
Link to comment
Share on other sites

Some may say it's easier to edit external files, but... And depending on how much variables you have etc. It can be really messy if kept in pre-settings.
The only down side with external files is that you "can't" run the program on a cmm without the pcm license. Which might, or might not be a problem.


I try to keep "program specific" stuff in the program. And generic stuff on external files as functions.
Link to comment
Share on other sites

So am I to understand that if I get a PCM program from someone else, and it has
the variables in the presetting's, I can run it on a machine without a PCM license?
Link to comment
Share on other sites

  • 1 year later...
Is there another way to get variables from an external file without PCM?

Currently, I'm trying to set a pallet measurement where the worker can type the part number of each part at the very beginning. The corresponding part number should be read at the beginning of each single measurement.
It is working fine with PCM (using the readPCMFile function) but I should get it work on a CMM without PCM...
Does anyone have an idea? ???
Link to comment
Share on other sites

  • 2 weeks later...
I was able to use the readListFile(filename) function. I created the program with the offline station which has a PCM license and ran the program on a CMM that does not have a license. The following is in the Presettings.

diameter1 = 25
diameter2 = 10

drawingNumber = inquireList("Run","variant1","variant2")

if drawingNumber == "" then
	endInspection()
	cncBreak()
endif

selectCase drawingNumber

	case "variant1"

		theList = readListFile("family\variant1.txt")
		diameter1 = getParameterNamed(theList, 1)
		diameter2 = getParameterNamed(theList, 2)

	case "variant2"

		theList = readListFile("family\variant2.txt")
		diameter1 = getParameterNamed(theList, 1)
		diameter2 = getParameterNamed(theList, 2)
 
endSelect

redrawCAD()
Link to comment
Share on other sites

Please sign in to view this quote.

Here is a similar way but without the selectCase.
diameter1 = 25
diameter2 = 10

drawingNumber = inquireList("Run","variant1","variant2")

if drawingNumber == "" then
	endInspection()
	cncBreak()
endif

theList = readListFile("family\" +drawingNumber)
diameter1 = val(theList.first)
diameter2 = val(theList.second)

redrawCAD()
Link to comment
Share on other sites

Hi Walter and Henrik,

thank you both for your answers! I really appreciate your support. 😃
in the meantime, I have also adopted this solution with readListFile. For a simple case like here, where we just want to define variables, it is easy to get rid of the PCM.
Link to comment
Share on other sites

 Share

×
×
  • Create New...