[Ri...] Posted February 17 Share Posted February 17 Good morning, Please remember that I'm not a PCM expert, so please do not rip me if this is a basic question - lol. Can you please explain this PCM behavior to me and why it does this? I just have a simple message() command on the pre-settings of the first feature, and a simple message() command on the post-settings of the last feature. So why does it run the message commands twice? Link to comment Share on other sites More sharing options...
[Je...] Posted February 17 Share Posted February 17 (edited) are these features part of a looped base-system? Edited February 17 Link to comment Share on other sites More sharing options...
[Ri...] Posted February 17 Author Share Posted February 17 (edited) Nope. Is this just a Simulation "bug" maybe? Edited February 17 Link to comment Share on other sites More sharing options...
[Mi...] Posted February 18 Share Posted February 18 (edited) Looped base alignment was my first guess too. Accidentally having it in the program Pre and post settings as well as the first and last feature would be my next (done that, wasted a lot of time before I checked that). #### Actually. I think the answer is, Base Alignment features are calculated twice. This is why you can use them for measurement. I've run into this using something like a getActual().z to check that the part is loaded correctly. The pre and post settings execute once immediately upon measuring, when the feature initially calculates. If this is a plane that should be controlling say X, A1 and A2. This first calculation will be relative to the saved base alignment, and the values won't be 0 like they likely should be. Then, all of it calculates again, when the Base Alignment computes as literally every single value is changed when the Base Alignment coordinate system gets calculated. At this point all the appropriate values will be 0. Quick proof of concept: Choose a feature that controls a translation DoF in the Base Alignment. I'll say X. In the Post settings of the feature put display(getActual().x) Increase the decimals to at least 4-5. Run the program on a real machine, let it at least fully finish the Base Alignment. Take note of the value that showed up in the display box. Double click the feature and look at X, it'll be different, likely 0 if it's controlling that DoF. You can also interrupt the Base Alignment with the stop light immediately after the feature, if you do this, the X value should match what shows in the display box So if you want to have a Base Alignment feature STOP running for any reason, you need to incorporate a cncBreak() or it will always want to finish the base alignment. Hopefully that works to show it, but I've run into that double calculation issue basically where the PCM code reacts to the first calculation. Was a big head scratcher because I would open the feature and the values wouldn't match. It wasn't until I made it write them all to a file and saw that everything updated it clicked. Edited February 18 Link to comment Share on other sites More sharing options...
[No...] Posted February 19 Share Posted February 19 I always suspected something like this but couldn't quite grasp what was happening. I wonder however why Zeiss never implemented a check for this "inbetween" state of the BA and prevented the code from triggering early. Or even made it an option which behavior you prefer. Link to comment Share on other sites More sharing options...
[Ri...] Posted February 25 Share Posted February 25 Do you have to have the message at the start of the program during the Base Alignment? What happens if you created an alignment for that feature, does it still prompt twice? Link to comment Share on other sites More sharing options...
[Ma...] Posted February 25 Share Posted February 25 I don't know if you know it, but you can have formulas at safety cube. I am missing what author needs. If that PCM is on features of base alignment, then it possibly can call twice. I once tried to have formula on characteristic. I wanted to have calculation of nominal because of part was machined by 5mm everytime, so i needed to have height calculated with measured height. I needed one dummy characteristic, which gave me result which was then used for calculation on main height char. Link to comment Share on other sites More sharing options...
[Ri...] Posted February 25 Share Posted February 25 Please sign in to view this quote. We have programs that utilize PCM and para files, the safety cube is updated per part, and they vary in size quite a bit. The beginning of every program has a feature search, it finds a plane for the X axis and a diameter for Y,Z axis. Parts in this case vary from Ø1.25 OD to over Ø4.x OD and the ID is always a different size, length is from about 1.50 inches to over 6 inches. Parts are placed in a V-block type fixture (fixed height). We even check to make sure the part is perpendicular to the fixture, if it's out by >.005", then it stops the program so the part can be loaded properly. Link to comment Share on other sites More sharing options...
[Ma...] Posted February 25 Share Posted February 25 Please sign in to view this username. I know what is PCM used for - just don't know Richard Sho. want to achieve. If is safety cube modified by PCM via some selection, then OK - this is not a way to use those messages. But you can place into safety cube formula like "-50+(0*ord(confirm("aaa"))" - this way you have some dialog and still fixed number 🙂 I am glad i don't need to have such parts where i need to control parallelism with machine or better - with vector of probe - but i had one test where i wanted to get how close i am regarding probe vector. Link to comment Share on other sites More sharing options...
[Je...] Posted February 28 Share Posted February 28 Please sign in to view this quote. In recent versions of CALYPSO, there is/was a bug for feature calculation for features in Base Alignment may iterate several times (3x) based on the requirement of the alignment (even without a loop). This is a known issue but I am unaware of its current status (it may have been resolved in Service Pack already). Make sure you are on the most current SP and I advise using a counter condition if this is a place you need to have something occur only a single time. Setting variables should be fine but things like n=n+1 might get wonky Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in