Jump to content

Stylus position in specific base alignment


---
 Share

Recommended Posts

Please, please, please tell me there is some way to access or calculate the position of the current stylus in a coordinate system other than the CMM's. I can't comprehend why I have both "positionCMM" and "positionRS" but don't have a "getPositionRS", but alas, I simply cannot find a way to do this. I've skimmed all 10 pages of the PCM forum, and the closest thing I found was mention of the "displayPositionCMM" command, but that makes a popup for user input and I just want to know where it is at the moment the PCM runs.

I'm trying to reduce awkward movement related to clearance planes during the probing of the Base Alignment features without going full "move-to" points yet. All I want to do is raise the stylus to a minimum height above the stored LOS alignment in my AutoRun setup, but only if it's not already at least that high. For the immediate future this program will only run on DuraMaxes and the fixture will be, like, +/-1inch in Z depending on the machine, so I could get away with hard coding a machine system Z value for now. Of course, that doesn't help when I will need to make the program work on a Contura, so I would really like to figure out how to make this work "properly".

I got excited that I might figure it out myself when I found the Mimir tool in another PCM post, but nothing I could find seemed to work. At least seeing Eric's hack of a minigame in PCM was amusing...
Link to comment
Share on other sites

getProbe().probeVector // add .x or .y or .z to get COORDINATES of sphere separately
getProbe().shaftDirection // add .x or .y or .z to get VECTOR of shaft separately
getProbe().technology //full list of probe info
getProbe().displayString // full list
getProbe().vectorMountToSensor // Offset sensor center-sensor mount point

These should help you on your way...
Link to comment
Share on other sites

Please sign in to view this quote.


I know I said I wanted the stylus position, but I want it in the Base Alignment coordinates. I figured I would need the getProbe() command, but the problem is that the only command I can find to read the current position (master probe or current stylus) is the getPositionCMM() command, which always returns the current position in the "CMM System" coordinates.

I think the attached image should help explain what it is I'm asking for: 4332_865e79f269d9e1593d4e718e021f8f91.png
Link to comment
Share on other sites

I do not know of a way to report the location of a stylus in an alignment system so you may have to construct the location based on some math. I'll give you a few tools to see if you can find your way, I would suspect that these will get you there... You may have to get position of REF Sphere in CMMSYS, then get position of stylus (which is relative to MP/REF SPHERE and do the math of that vs the location of the baseSystem()

(I also cannot seem to imagine why you would need this so if you could satisfy my curiosity, your request may have another solution that is more efficient)

These "baseSystem() commands are "use at your own risk". I merely pulled them from some old "science project" notes and am not clear on their origins. They are not officially supported PCM commands.

baseSystem().machine.machineControl.sphereNormalObject.spherePosition.x
baseSystem().machine.machineControl.sphereNormalObject.spherePosition.y
baseSystem().machine.machineControl.sphereNormalObject.spherePosition.z

getProbe().probeVector // add .x or .y or .z to get COORDINATES of sphere separately
getProbe().shaftDirection // add .x or .y or .z to get VECTOR of shaft separately

baseSystem().machine.machineProbeVector
getProbe().diffVectorToRefProbe

baseSystem().x/.y/.z/.rot/.euler1/..... Access to baseSystem data
Link to comment
Share on other sites

Oh I'm absolutely sure there's a more "correct" way to handle this, but I need to get something working ASAP before I can spend more time on this development. Classic situation I know...

For the same reason I can't explain the issue in proper detail but I can give a little more info. I have a part family that only differs by part height in the Z axis. I'm using my start alignment to recall saved pallet location alignments, and I'm using the base alignment to get a rough alignment (z pos and rotation can vary a bit due to part being fixtured in a collet) using features that have PCM'd z positions. The issue is this: if I want my z clearance plane to be +10mm and my saved pallet alignment is based on my shortest part which------

... dang. I think I just solved the problem. I just need to update the saved pallet alignments to be based off the tallest part. That way the CP +Z will start off at its highest possible location in relation to the CMM system. Then as soon as the PCM base alignment features finish measuring the Base Alignment will update and "bring the CP down" to the correct height. I can't believe I didn't think of that yet...

Thanks for making me explain the problem so I could finally solve it 🤣 To finish the explanation, while measuring the base alignment features, if the feature's coordinates have been updated by PCM to be outside the saved Clearance Planes, the probe moves in a very annoying way to the feature's CD position. In this example, if the saved alignment sets Z 0 to the top of my shortest part with a CP +Z height of 10mm (we'll say Z -250 in CMMSYS) and I want to measure my longest part that is 100mm taller, then when I run the program, if the probe is below -250 in the CMMSYS Z, it will first move up in Z that height and then immediately try to move in X and Y to the CD approach point even though it still needs to move up further in Z due to the feature's position getting moved 90mm above the saved CP +Z height. Obviously, this will result in a crash, hence the desire to hard code a safety Z move. I tried using PCM to define the CP +Z, which worked, but then it would be stuck at 100mm too high in the above example as soon as the base alignment calculated. If there's a way to update the 6 source Clearance Plane values after the Base Alignment has finished, then I couldn't figure it out.
Link to comment
Share on other sites

Please sign in to view this quote.

Yes, but I need that variable to change while running the program. Unless I was missing something, when I set CP +Z to the variable X and I change the value of X later in the program, CP +Z does not update. It seemed like X was calculated at the beginning of the program and used to set CP +Z and then CP +Z was fixed to that value for the entire program.

If it is possible to change the value of CP +Z after the base alignment has finished, then I would love an example because that would also be a solution to my original problem.
Link to comment
Share on other sites

 Share

×
×
  • Create New...