Jump to content
Private Messaging is activated - check "How to" on how to disable it ×

Can you use a formula to select a feature for a characteristic?


---
 Share

Recommended Posts

I want to select a feature based on an "IF" statement for a characteristic. When you right click in the selection box, "Formula" is an option.

Is this possible?

Feature as Formula.png

Link to comment
Share on other sites

Yes, this is possible. I typically use that for parts, that are drilled, and grinded later. I use Mini-Plans for each production step.

 

for example:

MrkmGrp=getRunID()

selectCase MrkmGrp
    case "Komplett"
        vMeBeA="ZyBeA"
        vMeD6="ZyD6"
        vMeGeradheit="GeGeradheit"
    case "ohne_Bezug_B"
        vMeBeA="ZyBeAa"
        vMeD6="ZyD6a"
        vMeGeradheit="GeGeradheit_a"
    case "Schleifen"
        vMeBeA="ZyBeA"
        vMeD6="ZyD6"
        vMeGeradheit="GeGeradheit"
    case "Geradh_Koax"
        vMeBeA="ZyBeA"
        vMeD6="ZyD6"
        vMeGeradheit="GeGeradheit"
endSelect

Edited
Link to comment
Share on other sites

A warning, depending on how you do you it, you do this you might not actually create the dependency between the Characteristic and the Feature. Right click and check "References for..." you'll see nothing.  This may cause problems when you go to actually run it.

I've done this with a looped characteristic and had the feature name with syntax like "Circle Plate Hole " +LOOP1. Which allows it to index with the loop, was really nice because I had 60 individual Position Characteristics that shared a DRF but needed to rotate the coordinate system around the part. Doing that meant I could have 1 looped characteristic where the Feature and the Coordinate system rotation were controlled by the Loop counter. However, because the Feature name was done the way I did it, there was no real dependency, so if you tried to run just those positions, it wouldn't work. You could either use PCM to force "All Characteristics" similar to this example below (This prevents All Characteristics, but easily modified to only allow it)

//Forces the program to run from a Mini-Plan Only
if (getStartSetting("featureListName") == "All Characteristics") then 
     message("    Please Select the Probe Systems you want to run, and then choose "+qm()+"Current Selection"+qm()+cr()+"                This program is not meant to be ran on "+qm()+"All Characteristics"+qm())
    cncBreak()
endif

 

Or do something like recall all the features you want into a single feature, in my case it was a big circle, then in the presettings of your characteristic with the formula just do a simple getActual("RECALLED FEATURE NAME").comment and that will force all of them to run every time the characteristic with the formula is selected.

 

 

Link to comment
Share on other sites

  • 4 weeks later...

Please sign in to view this username.

 Do you know if it is possible to define your own custom Loop? I have a case where it's a pattern of 65, but 22 are omitted. On the feature side, this is easy, but is this possible on the characteristic side for the LOOP1 parameter?

Link to comment
Share on other sites

Every method I have tested requires the loop to be complete, and have a static step width...

 

Entering the thought experiment stage:

However... it occurs to me that you *might* be able to have multiple loops like this and still have it work? Haven't tried this... I'm not sure if the LOOP1 counter counts the loop value... or index number from the total... if that makes sense?

 

If it counts value, this should work:

image.png.c2856eb3629d576a00cc24ab6f0846b1.png

 

hopefully your 22 omissions are in batches... But even if they aren't, and this works, it's still less work.

You could potentially just pull the rotation value from the name of the characteristics...but that's more complicated PCM code and requires a Characteristics for each circle.


 

Link to comment
Share on other sites

The problem lies in the fact that for the feature name part of it, you would just want the standard counting of 1-43 for the LOOP1, but when I'm rotating the alignment via the Special option, I cannot use LOOP1 as the value actually has to be different. In that case I would need a custom defined LOOP where 

1=1

2=2

3=3

4=5

5=7

6=8

7=10

etc....

Where the value on the left is the index count 1-43, but the value on the right is the actual value. I'm not certain this is possible or if it is, if it is worth it. I'm greatly appreciative for being able to use the LOOP1 function as much as I can. 

Link to comment
Share on other sites

Sometimes I question life and wonder if I made the wrong choices to lead me to where I am currently. 

Eric, that worked beautifully, and was way simpler than I thought it would be. Thank you, thank you, thank you. 

Link to comment
Share on other sites

 Share

×
×
  • Create New...