Basically, I have a cylindrical part in a rotary table. I take a few hits with a touch probe to align, and make some measurements for some notches.
After this I switch to the camera
The rotation of the part is dependent on the rotation vector of a specific hole.
Due to the leveling features available to me, this hole is either on one side or the other of the part.
Using the camera, I measure the location. If the hole is not there (using OnError) it rotates 180° and tries again.
If all goes well it continues measuring and dimensions everything.
--------------------------------------------------
The question I have pertains specifically to the relationship between the notches and the holes;
I start measuring the notches at Rotab Angle 0. But what if the hole is reversed, at 180?
Now the notches and holes that share the same name (notch_XXX_45, hole_xxx_45) are 180° apart!
Hole_xxx_0 and Notch_xxx_180 are at the same angle!
Essentially I want to add in some tidbits to fix that.
I originally had the program where I would measure some stuff on the part with a probe, then switch to the camera to measure the holes,
then switch
back to the probe to measure the notches from the hole alignment, keeping everything together.
Personally I do not like this, I would rather switch probes as little as possible.
We have a rack, so it is not a
huge deal, but I
did spend all day reworking the program to only change once...
Regardless, I was looking for some ideas on how I would go about this
I have all of the necessary features using a naming convention like above.
I would assume I could get the feature name, get all the characters (from right to left) up to the first underscore (which would give me the degree of rotation of that feature)
[I like that idea]
Then if the number is >= 180, subtract 180, or if its <= 135, add 180 to the name.
This would theoretically "flip" the numbers in the name and report them correctly.
To put it together:
If the hole is at 0, it will output hole 0 and notch 0 instead of hole 0 and notch 180
If the hole is at 180, it will output hole 180 and notch 180, instead of hole 180 and notch 0
--------------------------------------------------------------------------------------------------------
Is this possible?
So I have proceded to change pretty much everything to variables.
I created variables for the feature names, and changed every feature to these variables (IF(IS_180==0,"<Hole is at 0>","<Hole is at 180>")
I created variables for the alignments (because if a hole at 45 is actually at 225, but the alignment is for 45...)
I have the names of the alignments their static names.
I RECALL the alignments using their corresponding variables
And it doesn't work. Once I run the program it runs fine, but upon completion it hangs and does not let me interact.
If I move the CMM I can see the Probe Readout window changing its numbers, but I can't click anything or type.
Strangely, if I, for example, hit CTRL+F, I can access the Vector Point dialog box. ALT+F3 is still search, but I cant actually click or do anything, even close PC-DMIS!
If I open up Task Manager and end the process, it prompts me with the "End Now?" BS Windows does, saying "We are unable to close this program because it is waiting for a response from you". If I click cancel I am able to continue
This happens when I try to print the report. Thoughts?
So I have proceded to change pretty much everything to variables.
I created variables for the feature names, and changed every feature to these variables (IF(IS_180==0,"<Hole is at 0>","<Hole is at 180>")
I created variables for the alignments (because if a hole at 45 is actually at 225, but the alignment is for 45...)
I have the names of the alignments their static names.
I RECALL the alignments using their corresponding variables
And it doesn't work. Once I run the program it runs fine, but upon completion it hangs and does not let me interact.
If I move the CMM I can see the Probe Readout window changing its numbers, but I can't click anything or type.
Strangely, if I, for example, hit CTRL+F, I can access the Vector Point dialog box. ALT+F3 is still search, but I cant actually click or do anything, even close PC-DMIS!
If I open up Task Manager and end the process, it prompts me with the "End Now?" BS Windows does, saying "We are unable to close this program because it is waiting for a response from you". If I click cancel I am able to continue
This happens when I try to print the report. Thoughts?