Пример #1
0
      public virtual bool SDODownload(UInt16 index, byte subIndex, byte[] data)
      {
         SDODownload download = new SDODownload(index, subIndex, data, 0, data.Length);

         this.pendingAction = download;
         this.ScheduleAction(this.pendingAction);

         this.commEvent.Reset();
         bool actionResult = this.commEvent.WaitOne(500);

         return (actionResult);
      }
      public bool SetDrillServoErrorLimit(UInt16 errorLimit)
      {
         bool result = false;

         if (Modes.repair == this.mode)
         {
            SDODownload download = new SDODownload(0x2344, 0, 2, errorLimit);
            result = this.ExchangeCommAction(download);
         }

         return (result);
      }
      public bool SetDrillServoPulsesPerUnit(UInt32 pulsesPerUnit)
      {
         bool result = false;

         if (Modes.repair == this.mode)
         {
            SDODownload download = new SDODownload(0x2345, 0, 4, pulsesPerUnit);
            result = this.ExchangeCommAction(download);
         }

         return (result);
      }
      public bool SetDrillServoTravelVelocity(UInt32 travelVelocity)
      {
         bool result = false;

         if (Modes.repair == this.mode)
         {
            SDODownload download = new SDODownload(0x2343, 0, 4, travelVelocity);
            result = this.ExchangeCommAction(download);
         }

         return (result);
      }
      public bool SetDrillServoHomingBackoffCount(UInt32 backoffCount)
      {
         bool result = false;

         if (Modes.repair == this.mode)
         {
            SDODownload download = new SDODownload(0x2342, 0, 4, backoffCount);
            result = this.ExchangeCommAction(download);
         }

         return (result);
      }
      public bool SetDrillServoDerivativeControlConstant(UInt32 derivativeControlConstant)
      {
         bool result = false;

         if (Modes.repair == this.mode)
         {
            SDODownload download = new SDODownload(0x233F, 0, 4, derivativeControlConstant);
            result = this.ExchangeCommAction(download);
         }

         return (result);
      }
      public bool SetDrillServoProportionalControlConstant(UInt32 proportionalControlConstant)
      {
         bool result = false;

         if (Modes.repair == this.mode)
         {
            SDODownload download = new SDODownload(0x233D, 0, 4, proportionalControlConstant);
            result = this.ExchangeCommAction(download);
         }

         return (result);
      }
      public bool SetDrillServoAcceleration(UInt32 acceleration)
      {
         bool result = false;

         if (Modes.repair == this.mode)
         {
            SDODownload download = new SDODownload(0x2340, 0, 4, acceleration);
            result = this.ExchangeCommAction(download);
         }

         return (result);
      }