public override CNCMessage GetSpindelSetRPMMessage(double RPM, string Direction) { CNCMessage spindelmessage = new CNCMessage(); string dir = Direction.Trim().ToLower(); if (RPM < 0) { return(spindelmessage); } if (dir != "clockwise" && dir != "counterclockwise") { return(spindelmessage); } if (dir == "clockwise") { spindelmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.RTC_SetSpindleSpeedClockWise)); spindelmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.GRBL_WriteValue, "S", RPM.ToString())); } else if (dir == "counterclockwise") { spindelmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.RTC_SetSpindleSpeedCounterClockWise)); spindelmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.GRBL_WriteValue, "S", RPM.ToString())); } return(spindelmessage); }
/// <summary> /// Gets a GRBL Message for moving the tool by ... Millimeters in X direction /// </summary> /// <returns></returns> public override CNCMessage GetMoveByXMessage(double XMillimieter, double Feed) { CNCMessage rmessage = new CNCMessage(); rmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.GRBL_WriteValue, "X", XMillimieter.ToString())); rmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.GRBL_WriteValue, "F", Feed.ToString())); return(rmessage); }
public override CNCMessage GetJogByZMessage(double ZMillimieter, double Feed) { CNCMessage rmessage = new CNCMessage(); rmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.GRBL_RunJoggingMogion)); rmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.GRBL_WriteValue, "Z", ZMillimieter.ToString())); rmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.GRBL_WriteValue, "F", Feed.ToString())); return(rmessage); }
public override CNCMessage GetRelativeJogByZMessage(double ZMillimeter, double Feed) { CNCMessage rmessage = new CNCMessage(); rmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.GRBL_RunJoggingMogion)); rmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.G_SetUnitToMillimeter_G21)); rmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.G_RelativeMotion_G91)); rmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.GRBL_WriteValue, "Z", ZMillimeter.ToString())); rmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.GRBL_WriteValue, "F", Feed.ToString())); return(rmessage); }
/// <summary> /// Gets a GRBL Message for Z /// </summary> /// <returns>CNCMessage</returns> public override CNCMessage GetCurrentZMessage() { CNCMessage rmessage = new CNCMessage(); rmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.RTC_StatusReportQuery)); return(rmessage); }
public override CNCMessage GetKillAlarmMessage() { CNCMessage rmessage = new CNCMessage(); rmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.GRBL_KillAlarmLock)); return(rmessage); }
public override CNCMessage GetSoftResetMessage() { CNCMessage rmessage = new CNCMessage(); rmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.RTC_SoftReset)); return(rmessage); }
/// <summary> /// Gets a GRBL Message for Feed. /// This is the message who will returned /// [GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0 S0] /// </summary> /// <returns>CNCMessage</returns> public override CNCMessage GetCurrentFeedMessage() { CNCMessage rmessage = new CNCMessage(); rmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.GRBL_ViewGCODEParserState)); return(rmessage); }
/// <summary> /// Gets a GRBL Message for setting the feed of the CNC Controller /// </summary> /// <returns></returns> public override CNCMessage GetSetFeedMessage(double Feed) { CNCMessage rmessage = new CNCMessage(); rmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.GRBL_WriteSetting, "F", Feed.ToString())); return(rmessage); }
public override CNCMessage GetHomingMessage() { CNCMessage homingmessage = new CNCMessage(); homingmessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.GRBL_RunHomincCycle)); return(homingmessage); }
public override CNCMessage GetSetZeroMessage() { CNCMessage zeromessage = new CNCMessage(); zeromessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.G_SetOffset_G10)); zeromessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.P_Tool1)); zeromessage.AppendCommand(CommandDict.GetCommand(GRBLCommand.L20)); zeromessage.AppendCommand("X0 "); zeromessage.AppendCommand("Y0 "); zeromessage.AppendCommand("Z0"); return(zeromessage); }