Jump to content

Empty feature


---
 Share

Recommended Posts

Is it possible to detect by PCM when a feature is empty(no results)?: 1375_4d8a69dbc4a39563c69b3845a9c60773.png

Currently I’m doing it generating characteristics and then comparing the getActual("Characteristic").actual with the nominal value, but this is not functional in many cases
Link to comment
Share on other sites

Well it should never be empty if its set up right, so once it is up and running it should never be empty again.
Unless its a feature that doesn't run every cycle due to a miniplan.

am i missing something?
Link to comment
Share on other sites

If I had to guess, he is trying to clean up his programs. Some of mine are littered with features I never ended up using.
Link to comment
Share on other sites

So i like using code len() because in this case the statement will be either True or False, True=4 characters, False=5 characters, so depending on the answer of isParameterDefined is yes or no then the answer will be eithet 4 or 5 characters long, and you can write your if statement to react to 4 or 5.
You need a characteristic tho, but you can mask it so it doesnt show up in your report.
Play around with that, see if it works.

xoxo=isParameterDefined("#10 Distance,actual")
Length=len("xoxo")
if Length == 4 then
//Do Something
message("Hey yo, TB3N is looking good")
endif
if Length == 5 then
//Do Something
message("Hey yo, TB3N is F'dup")
endif
Link to comment
Share on other sites

.isErrorResult is the correct boolean message. But you can't send it to a double. Thats just not how it works...

Here is a simple example showing you how to correctly use that boolean function:
for i = 1 to baseSystem().machine.inspection.protocol.protDictionary.keys.size
	if getParameterNamed(baseSystem().machine.inspection.protocol.protDictionary,i).value.isErrorResult
		display(getParameterNamed(baseSystem().machine.inspection.protocol.protDictionary,i).key)
	endif
next i
Note, this will not give you features, it will give you characteristics.

With features, errors usually have a error level below 0. Eg. -1 to -5.
Link to comment
Share on other sites

 Share

×
×
  • Create New...