/// <summary> /// As the accumilation conveyor length is not set conventually it is set via positions, outfeedsection /// infeedsection and AccPitch. We have to wait until all these are set. So we need this method to place /// transition points. /// </summary> public void ConvLocationConfiguration(string level) { Leaving.OnEnter += Leaving_OnEnter; RouteStatus nextRouteStatus = new RouteStatus() { Available = RouteStatuses.Available }; NextRouteStatus = nextRouteStatus; Leaving.Distance = Length; foreach (AccumulationSensor sensor in sensors) { //The accumilation conveyor PEC last (wrt the load travel direction) position is called "0", this is position 2 for the multishuttle. //The accumilation conveyor PEC second from last position (wrt the load travel direction) is called "1", this is position 1 for the multishuttle. int convPosName; if (int.TryParse(sensor.sensor.Name, out convPosName) && convPosName == 0) { LocationB = sensor.sensor; LocationB.LocName = string.Format("{0}{1}{2}{3}{4}", AisleNumber.ToString().PadLeft(2, '0'), (char)Side, level, (char)ConveyorTypes.Pick, "B"); ParentMultiShuttle.ConveyorLocations.Add(LocationB); sensor.sensor.OnEnter += sensor_OnEnterB; //sensor.sensor.OnLeave += sensor_OnLeave2; //sensor.sensor.leaving.Edge = ActionPoint.Edges.Leading; //sensor.sensor.leaving.Distance = sensor.sensor.leaving.Distance + 0.02f;//ParentMultiShuttle.workarround; //Workaround for a load switiching to another conveyor whilst blocking a sensor, hopfully Xcelgo will fix this } else if (int.TryParse(sensor.sensor.Name, out convPosName) && convPosName == 1) { LocationA = sensor.sensor; LocationA.LocName = string.Format("{0}{1}{2}{3}{4}", AisleNumber.ToString().PadLeft(2, '0'), (char)Side, level, (char)ConveyorTypes.Pick, "A"); ParentMultiShuttle.ConveyorLocations.Add(sensor.sensor); sensor.sensor.OnEnter += sensor_OnEnterA; } } LocationB.Visible = false; }
/// <summary> /// As the accumilation conveyor length is not set conventually it is set via positions, outfeedsection /// infeedsection and AccPitch. We have to wait until all these are set. So we need this method to place /// transition points. /// </summary> public void ConvLocationConfiguration(string level) { foreach (AccumulationSensor sensor in sensors) { int convPosName; if (int.TryParse(sensor.sensor.Name, out convPosName) && convPosName == 0) { sensor.sensor.OnEnter += sensor_OnEnter1; sensor.sensor.OnLeave += sensor_OnLeave; Location1 = sensor.sensor; Location1.LocName = string.Format("{0}{1}{2}{3}{4}", AisleNumber.ToString().PadLeft(2, '0'), (char)Side, level, (char)ConveyorTypes.Drop, "B"); ParentMultishuttle.ConveyorLocations.Add(Location1); } else if (int.TryParse(sensor.sensor.Name, out convPosName) && convPosName == 1) { sensor.sensor.OnEnter += sensor_OnEnter2; sensor.sensor.OnLeave += sensor_OnLeave; Location2 = sensor.sensor; Location2.LocName = string.Format("{0}{1}{2}{3}{4}", AisleNumber.ToString().PadLeft(2, '0'), (char)Side, level, (char)ConveyorTypes.Drop, "A"); ParentMultishuttle.ConveyorLocations.Add(Location2); } } }