Adding Expanded Turning to a .62 post: Difference between revisions

From Compost Wiki
Jump to navigation Jump to search
Danm (talk | contribs)
Add note for Unconditional Spindle Commands checkbox.
Danm (talk | contribs)
No edit summary
Line 33: Line 33:


doSpeed:
doSpeed:
IF MillingOp?
IF NOT OpIsToolOriented?
IF NOT OpIsToolOriented?
ToolSpeed
ToolSpeed
END
END
 
ELSE {implies TurningOp OR UtilityOp}
IF NOT OpIsPartOriented?
IF NOT OpIsPartOriented?
PartSpeed
PartSpeed
END
END
END
RETURN
RETURN


doCalcRPM1:
doCalcRPM1:
Output('S', CalcRPM1#)
' S' Output('S', CalcRPM1#)
RETURN
RETURN


doCalcRPM2:
doCalcRPM2:
Output('S', CalcRPM2#)
' S' Output('S', CalcRPM2#)
RETURN
RETURN


doSpinOn:
doSpinOn:
IF MillingOp?
IF NOT OpIsToolOriented?
IF NOT OpIsToolOriented?
ToolSpindleOn
ToolSpindleOn
END
END
 
ELSE {implies TurningOp OR UtilityOp}
IF NOT OpIsPartOriented?
IF NOT OpIsPartOriented?
PartSpindleOn
PartSpindleOn
END
END
END
RETURN
RETURN
Line 72: Line 68:


doOpSpinOff: {current Op SpinOff}
doOpSpinOff: {current Op SpinOff}
IF MillingOp?
IF NOT OpIsToolOriented?
IF NOT OpIsToolOriented?
ToolSpindleOff
ToolSpindleOff
END
END
 
ELSE {implies TurningOp OR UtilityOp}
IF NOT OpIsPartOriented?
IF NOT OpIsPartOriented?
PartSpindleOff
PartSpindleOff
END
END
END
RETURN
RETURN


doSpinOff: {previous Op SpinOff}
doSpinOff: {previous Op SpinOff}
IF LASTOperation MillingOp?
IF NOT LASTOperation OpIsToolOriented?
IF NOT LASTOperation OpIsToolOriented?
LASTOperation ToolSpindleOff
LASTOperation ToolSpindleOff
END
END
 
ELSE {implies LastOperation TurningOp OR LastOperation UtilityOp}
IF NOT LASTOperation OpIsPartOriented?
IF NOT LASTOperation OpIsPartOriented?
LASTOperation PartSpindleOff
LASTOperation PartSpindleOff
END
END
END
RETURN
RETURN

Revision as of 23:36, 2 August 2019

Replace spindle control subs

List of subs to replace

  1. doInverseSpinOn
  2. doSpeed
  3. doCalcRPM1
  4. doCalcRPM2
  5. doSpinOn
  6. ckSpinOn
  7. doOpSpinOff
  8. doSpinOff
  9. ckSpindleDirection
  10. ckTapSpindleDirection
  11. ckWorkPieceSpindle
  12. doSpeedC
  13. millSpindleOn

New code for these subs

doInverseSpinOn:
	IF TurningOp?
		IF SpindleForward?
			'M4' {Reverse}
		ELSEIF SpindleReverse?
			'M3' {Forward}
		END
	ELSE {implies MillingOp}
		IF SpindleForward?
			'M54' {Reverse}
		ELSEIF SpindleReverse?
			'M53' {Forward}
		END
	END
RETURN

doSpeed:
	IF NOT OpIsToolOriented?
		ToolSpeed
	END

	IF NOT OpIsPartOriented?
		PartSpeed
	END
RETURN

doCalcRPM1:
	' S' Output('S', CalcRPM1#)
RETURN

doCalcRPM2:
	' S' Output('S', CalcRPM2#)
RETURN

doSpinOn:
	IF NOT OpIsToolOriented?
		ToolSpindleOn
	END

	IF NOT OpIsPartOriented?
		PartSpindleOn
	END
RETURN

ckSpinOn:
	IF (LASTOperation OpIsToolOriented? AND NOT OpIsToolOriented?) OR
	(LASTOperation OpIsPartOriented? AND NOT OpIsPartOriented?)
		doSpinOn
	END
RETURN

doOpSpinOff: {current Op SpinOff}
	IF NOT OpIsToolOriented?
		ToolSpindleOff
	END

	IF NOT OpIsPartOriented?
		PartSpindleOff
	END
RETURN

doSpinOff: {previous Op SpinOff}
	IF NOT LASTOperation OpIsToolOriented?
		LASTOperation ToolSpindleOff
	END

	IF NOT LASTOperation OpIsPartOriented?
		LASTOperation PartSpindleOff
	END
RETURN

ckSpindleDirection:
	IF PartSpindleDirChanged? OR ToolSpindleDirChanged?
		SeqLabC doSpinOff EOL
	END
RETURN

ckTapSpindleDirection:
	IF ToolBAxisAvail?
		IF Milling? AND ABCToolPath?	{if 5-axis Milling or Drilling}
			IF (PartSpindleDirChanged? OR ToolSpindleDirChanged?) AND Tap?
				SeqLabC doOpSpinOff EOL
				SeqLabC doSpeed doSpinOn EOL
			END
		END
	END
RETURN

ckWorkPieceSpindle:	{Part Spindle Off before MillingOp}
	IF OpIsPartOriented? AND NOT LASTOperation OpIsPartOriented?
		LASTOperation PartSpindleOff
	END
RETURN

doSpeedC:
	IF (TurningOp? AND NOT OpIsPartOriented?) AND (PartSpindleRPMChanged? OR PartSpindleSFPMChanged?)
		doSpeed
	ELSEIF (NOT OpIsToolOriented?) AND ToolSpindleRPMChanged? {implies MillingOp}
		doSpeed
	END
RETURN

millSpindleOn:
	IF NOT OpIsToolOriented?
		SeqLabC CSSOff constantRPM doSpeed doSpinOn EOL
	END
RETURN

Modify the following subs:

  1. In tpRapidFeat:
    • Add doMoveCC to ELSE {implies Position} section
  2. In tpLineFeat:
    • Add doMoveCC to ELSE {implies Position} section
  3. In doQuadrantArc:
    • Add doMoveCC to ELSE { Non-Interpolated } -> ELSE section
  4. In millCore:
    • Change final
      ELSE
      IF Drilling?
      to:
      ELSEIF Drilling?
    • Remove extra END that you now have.
    • And new final ELSE at the bottom of the sub:
      ELSE
      toolpath

In the Form:

  1. Form->Program Options->Options tab
    • Check "Broaching"
    • Check "Expanded Turning"
    • Leave "Flat Eccentric Turning" set to "No Support."
  2. Form->Toolgroups and Part Stations->Spindle Options tab
    • "Unconditional Spindle Commands" must be turned on