Example #1
0
        public void SetRouteAvailable(RouteStatuses value)
        {
            if (value == RouteStatuses.Available)
            {
                conveyor.TransportSection.Route.Motor.Start();
            }
            else
            {
                conveyor.TransportSection.Route.Motor.Stop();
            }

            if (conveyor.ThisRouteStatus != null)
            {
                conveyor.ThisRouteStatus.Available = value;
            }
        }
Example #2
0
 private void SetMergeSectionRouteStatus(RouteStatuses routeStatus)
 {
     //if the conveyor becomes blocked, and the offset timer is running, then stop it and restart when the conveyor clears
     if (routeStatus == RouteStatuses.Blocked && OffSetTimer.Running)
     {
         OffSetTimer.Stop();
         OffSetTimer.UserData = true; //User data used to define if offset timer was running when the conveyor becomes blocked
     }
     else
     {
         if (OffSetTimer.UserData is bool && (bool)OffSetTimer.UserData)
         {
             OffSetTimer.UserData = false;
             OffSetTimer.Start();
         }
     }
     //if the sorter becomes blocked and a load is diverting on to it, then stop it, but remember it was running when the sorter starts again
     mergeSection.RouteAvailable = routeStatus;
     if (routeStatus != RouteStatuses.Blocked)
     {
         mergeRouteStatus = routeStatus;
     }
 }
Example #3
0
 public RouteStatusChangedEventArgs(RouteStatuses available)
 {
     _available = available;
 }