Jump to content

PCM Parafiles


---
 Share

Recommended Posts

We just got our PCM license, and will not be sending myself, or our other programmer to the class for a while. In the mean time, we need to write a program for a family of parts (Geometry is the same, sizes change) Is there anyone out there that would be willing to share a step by step as to how to set this kind of program up using PCM?
Link to comment
Share on other sites

what is it thats changing from part to part? is it planes lines & circles, or are you adjusting the height on curves or free form scans?
If its planes & lines you can use a pop up box "select part number" and adjust the thickness according to an operator input.
Its really not that difficult, but nothing about PCM is easy when you first get going.

It'll go in the presettings and look something like this

itemSelected = inquireList("Is this part","XXXX01","XXXX02","XXXX03")

if itemSelected=="XXXX01" then
Offset =0.0
endif
if itemSelected=="XXXX02" then
Offset =1.0
endif
if itemSelected=="XXXX03" then
Offset =2.0
endif

Then the variable "Offset" will be added into your Z height for your Planes & Lines as a formula "10.0+Offset" (10.0 being whatever the measurement actually is for your thinnest part)

(Personal Note: you can use PCM to do many things, but PCM is not forgiving at all when it comes to fixing syntax errors. for instance the most common PCM command "getActual" will give you fits if its typed in "GetActual" or "getactual", and nowhere will a box appear that says "you typed it wrong". it'll just give you an unreadable error and you won't know that the source of all your lifes problems is capitalization.)
Link to comment
Share on other sites

FYI "Presettings & Postsetings" are terms you'll learn pretty fast.
If a feature or characteristic is highlighted, clicking the peach "P" icon will open the dialog box for the Pre & Post of that thing.
In a feature or characteristic something that is placed into the presettings will execute before the feature is run, something that is placed into the postsettings will execute after the feature is run.
If no feature or characteristic is highlighted, clicking the peach "P" icon will open the dialog box for the Pre & Post of the program, meaning something put in the Pre will execute at the program start and something put in the Post will execute at the end of the run.

Does that make sense?

presettings.JPG

Link to comment
Share on other sites

Ok, loading cad models can be done, but its pretty advanced stuffs.
First you need to establish a part number by way of parafile or operator input or whatever means.

Next you need to load each individual model in and transform it where it needs to be.
then save it (CAD>cad file>Save) as a .SAT in your program folder, delete it and do the same for the next models.
then in the presettings you add the commands to "clearCAD()" to delete any cad models from the screen and "loadCAD()" to load the correct cad model for the program being run.
I like the command "getActualInspectionDir()" because whatever the location of your program file is in, itll go to that location to look for a file.
What that means is that in the future if you move your file location as seems to happen every time i update my calypso to a new rev, the code will adjust to its new location without going corrupt.

clearcad.JPG

Link to comment
Share on other sites

 Share

×
×
  • Create New...