[Br...] Posted September 21, 2022 Share Posted September 21, 2022 I'm trying to figure out how to use PCM to read in curve nominals into my program, I have 4 curves going in the XY plane, but I need the curves to move along the Z axis depending on the height of the part. My part lengths are 1 inch, 2 inch 3.5 inch and 6 inch. I already have para files to select the correct height for the part, But how can create this para to have the curves move along the Z axis. I have 4 para files for the Z height, for the 4 different lengths of the part. The variable I'm using is Z_offset=vector(0,0,-25.0) How can I incorporate the nominal curve files I have for the different lengths? Link to comment Share on other sites More sharing options...
[Mi...] Posted September 21, 2022 Share Posted September 21, 2022 You can try this: Write in the pre-settings of your plan: zValue = 0 if getRunID() == "type1inch" zValue = 1 endif if getRunID() == "type2inch" zValue = 2 endif Now create a new coordinate system. In this coordinate system you can set a parameter for the z-value (right-click, formula, enter there zValue). Select this coordinate-system in the curve-feature. Define the different types by using the miniplan-feature, type1inch, type2inch... Select the type at the CNC-start window. In this case you dont need to work with *.para-files. Link to comment Share on other sites More sharing options...
[Br...] Posted September 21, 2022 Author Share Posted September 21, 2022 That works very well, thank you for the good suggestion. Link to comment Share on other sites More sharing options...
[Je...] Posted September 22, 2022 Share Posted September 22, 2022 As stated above, you could use mini-plans to create your variable value but there are less labor intensive ways. You could also do it with an inquireList(). Use PCM to create an inquireList() in your Pre-Settings to populate a dialogue that forces you to select the part type within the program once it is executed. repeat part_type = "" part_type = inquireList("Part Type","1","2","3","4","5","6") until val(part_type) <> "" if part_type == "1" then z_offset = 1 endif if part_type == "2" then z_offset = 2.5 endif etc. You could also use the selectCase method instead of multiple if/endif statements 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