/// <summary> /// Setzt den Motorencontroller zurück /// </summary> public override void Reset() { lock (syncObj) { Thread.Sleep(20); IOPortEx.Write(_ioAddress, RESET); Thread.Sleep(20); IOPortEx.Write(_ioAddress, DEFINE_HOME); // Define Home Thread.Sleep(50); SetPID(100, 20, 1000, 1000, 1); // SetPID(1500, 200, 8000, 1000, 1); WriteCmd(DEFINE_HOME); // Reset Tick-Counter } }
/// <summary> /// Sendet eine 16 Bit Zahl als Daten an den LM629 /// </summary> /// <param name="val"></param> private void WriteShort(int val) { WaitReady(); IOPortEx.Write(_ioAddress + 1, (val >> 8) & 0xFF); IOPortEx.Write(_ioAddress + 1, val & 0xFF); }
/// <summary> /// Sendet einen Befehl an den LM629 /// </summary> /// <param name="cmd"></param> private void WriteCmd(byte cmd) { WaitReady(); IOPortEx.Write(_ioAddress, cmd); }