bump.
I have been using solid cam for Mill and am now trying to setup for Turn. Everything seems to be working fine except for the output of the feed for turning.
if I go into the tool data for a turning operation and select Feed Units "Inch/Min" It will output an F0 for the feed. See output of gcode below.
G98 G96
G0 X2.157 Z0.078
X2.127
G1 X1.971 F0
Z-0.674
X2.157
G98 G96 S1500
G1 Z-0.596 F0
G0 Z0.102
X2.109
G1 X1.951
Z-0.69
G0 X2.195
Z0.078
X2.157
If I select the Feed Units "Inch/Rev? it will output the correct feed units specified in the feed normal and feed finish dialog box. See below.
G99 G96
G0 X2.157 Z0.078
X2.127
G1 X1.971 F0.05
Z-0.674
X2.157
G99 G96 S1500
G1 Z-0.596 F0.025
G0 Z0.102
X2.109
G1 X1.951
Z-0.69
G0 X2.195
Z0.078
X2.157
When I turn on the tracing it is outputing the feed command from the @line in the post processor which is as follows. This is a Generic FanucOT post which I have only made minor changes to but have not changed any of this section.
@line
if ben2
if work_type eq ROUGH
gcode = 1
{nb, ['G'gcode]}
if process_type eq LONG then
{' X'xpos}
else
{' Z'zpos}
endif
ben2 = false
else
gcode = 1
{nb, ['G'gcode]}
{[' X'xpos], [' Z'zpos]}
endif
else
gcode = 1
{nb, ['G'gcode]}
{[' X'xpos], [' Z'zpos]}
endif
if prev_command eq '@turn_proc' then
change(feed) = TRUE
endif
if feed_unit eq css
if m_feed_flag eq 1
{' F'feed }
m_feed_flag = 0
else
{[' F'feed] }
endif
else
if m_feed_flag eq 1
{' F'feed:'5.0(p)'}
m_feed_flag = 0
else
{[' F'feed:'5.0(p)']}
endif
endif
endp
Not sure what Ben2 is or the m_feed flag is and what this is exactly trying to do but any help would be greatly appreciated.
bump.
Have you searched through your GPP file file for the variables ben2 and m_feed_flag to see what sets them? If you can't find anything that sets them, try inserting a line to set them to a value and see what difference it makes. I must confess I am at a loss as to what ben2 does and I am surprised that the post works as the "if ben2" statement has no decision logic in it (though on reflection it could be just a logic check meaning "if ben2 equals true do the below").
What changes in the Trace when you set the feed to in/min? This will give you a clue as to what code needs to created in the GPP file to set the options you need.
Why do you want to program in in/min? In my experience, lathes are generally programmed with the feed given in feed per rev (because of the constant surface speed) whilst milling is programmed in feed per min. Does your machine handle feed per rev? In Fanuc I think it is just an M code (M94 or M95 I think) to change from feed per min to feed per rev.
The easiest way to find out what Ben2 and m_feed_flag are used for is as Bob pointed out - use a text editor and 'find next' to locate all instances of these parameters in the gpp file.
For example, if you search for Ben2, you'll find it's a logical statement (True/False) as defined in @init_post, and is set to true in @turning (turning cycle call). Then when the @line code is called after @turning, the first move is only initiated in X or Z depending on whether it's a 'LONG' or 'FACE' operation. After that, ben2 is set to false, so normal output resumes until another @turning is called.
m_feed_flag is a numeric statement, which is set to 1 in @feed_spin. This is used to force the feedrate after every @feed_spin. If m_feed_flag is 0, the feed is only output if it's changed - that's what the [] brackets mean - only output if value is deemed to have changed, which can be seen as a T (true) or F (false) in the trace against the value. In reality, m_feed_flag could have been a LOGICAL statement, but there's always more than one way to skin a cat...(that sounds so wrong)
Hope that helps.
To answer your specific question on feed/min and feed/rev, are you using CSS? If you are, then I recommend you use feed/rev, as that value remains the same throughout the rev range, whereas feed/min changes every time the rpm changes. When you use feed/rev, the controller automatically increases feed/min to match rpm.
Hope that makes sense!?