New here... Cheers! Hoping I can get some help... The post being developed below is based on the Samsung Mill/Turn post processor, version 44095, Dated 2023-10-26 14:11:06. It is my understanding that Samsung originally produced these machines, then spun them off to Smart / Dynamic.
I have made a bunch of modifications to this post, to output things as I'd like them, all good so far for main spindle turning (milling not tested yet). The specific issue I have is that the Z values for the sub spindle turning cycles are negated... i.e. the Z sign is flipped.
I have tried multiple work-arounds, all including not using the writeBlock(gMotion...., zOutput.format(initialPosition.z)); code. However, I decided to go back and writeln the actual value of initialPosition.z, to check if the actual variable value is the correct sign. Sure enough, the variable is correct. So the issue lies in outputting the value via writeBlock using the zOutput.format. For example:
The code above first uses a writeln to output the initialPosition.z variable as is. It then rounds the same to 4 decimal places, and uses writeln to output that value. Then, the actual code writeBlock-s the variable using zOutput.format. This outputs the following code... The values are output with the sign after the G97 line using writeln, but the value is output after those as a positive Z value.
So, what I want to do is simply output the variable with the correct sign, as doing other trickery causes other issues further down in the output code. Hopefully someone can enlighten me as to why this isn't working. One thing that puzzles me is that the xOutput.format is defined exactly the same as the zOutput.format (I believe), but the X outputs negative numbers correctly (when the tool is below the center line).
Files are attached... The post, the output nc file, and the native Fusion file. Simple ops... Face & profile, on both the main and sub spindles.
Thanks in advance!
Solved! Go to Solution.
Solved by seth.madore. Go to Solution.
I think you're going to need to change this line (#1640)
zFormat.setScale(activate ? 1 : 1);
It's currently set to "-1 : 1" and changing to what I show above does yield a negative Z value.
This does change the I/K results though, so further modification might be needed
I'll run this by a post developer and see if they have any counsel
Follow-up:
We would also want to change the following line in onOpen to disable the reversing of axes on the sub-spindle. reverseAxes = getProperty("reverseAxes", false); // change 'true' to 'false'
zFormat.setScale(activate ? scaleValue : 1);
Can't find what you're looking for? Ask the community or share your knowledge.