Esempio n. 1
0
 public void SetPortToolSpeed(Port port, CSpeed speed)
 {
     //Check port
     if ((int)port >= NumPorts || (int)port < 0)
     {
         if (UserErrorEvent != null)
         {
             UserErrorEvent(UUID, new Cerror(Cerror.cErrorCodes.PORT_NOT_IN_RANGE, "Port not in range."));
         }
     }
     else
     {
         m_Frames_02.WriteSpeed(System.Convert.ToUInt16((ushort)(speed.ToMillimetersPerSecond() * 10)));
         m_Frames_02.ReadSpeed();
     }
 }
Esempio n. 2
0
        public CSpeed GetPortToolSpeed(Port port)
        {
            CSpeed speed = new CSpeed();

            //Check port
            if ((int)port >= NumPorts || (int)port < 0)
            {
                if (UserErrorEvent != null)
                {
                    UserErrorEvent(UUID, new Cerror(Cerror.cErrorCodes.PORT_NOT_IN_RANGE, "Port not in range."));
                }
            }
            else
            {
                speed = m_PortData[(int)port].ToolStatus.Speed;
            }

            return(speed);
        }