public static bool GetSpindle(CNCMachine machine, CNCSpindle cncSpindle) { if (machine == null) { return(false); } return(GetSpindle(GetCNCStation(machine.MachineIP.ToString()), cncSpindle)); }
public static bool GetSpindle(SyntecRemoteCNC cnc, CNCSpindle cncSpindle) { if (cnc != null) { float ovFeed = 0f; float ovSpindle = 0f; float actFeed = 0f; int actSpindle = 0; short num5 = cnc.READ_spindle(out ovFeed, out ovSpindle, out actFeed, out actSpindle); if (num5 == 0) { cncSpindle.OvFeed = ovFeed; cncSpindle.OvSpindle = ovSpindle; cncSpindle.ActFeed = actFeed; cncSpindle.ActSpindle = actSpindle; return(true); } cncSpindle.ErrMsg = cnc.Host + ": " + num5.ToString(); } return(false); }