Exemplo n.º 1
0
        //[DataRow(EnumMachineID.MID_DRAWER_01_02)]
        public void SystemBootupInitial(/*EnumMachineID machineID*/)
        {
            // DataRow
            EnumMachineID machineID = EnumMachineID.MID_DRAWER_01_02;
            var           machine   = MacMsCabinet.GetMacMsCabinetDrawer(machineID, DicStateMachines);

            machine.SystemBootupInitial();
        }
Exemplo n.º 2
0
        /*
         * private static List<MacMcCabinetDrawer> MachineControls = null;
         * public static Dictionary<EnumMachineID, MacMsCabinetDrawer> _dicStateMachines = null;
         * public readonly static object _getStateMachineLockObj = new object();
         * public static Dictionary<EnumMachineID, MacMsCabinetDrawer> DicStateMachines
         * {
         *  get
         *  {
         *
         *      if (_dicStateMachines==null)
         *      {
         *          lock (_getStateMachineLockObj)
         *          {
         *              if (_dicStateMachines == null)
         *              {
         *
         *                  var DrawerMachineIdRange = EnumMachineID.MID_DRAWER_01_01.GetDrawerStateMachineIDRange();
         *
         *                  var MachineMgr = new MacMachineMgr();
         *                  MachineMgr.MvCfInit();
         *                  MachineControls = new List<MacMcCabinetDrawer>();
         *                  _dicStateMachines = new Dictionary<EnumMachineID, MacMsCabinetDrawer>();
         *                  for (var i = (int)DrawerMachineIdRange.StartID; i <= (int)DrawerMachineIdRange.EndID; i++)
         *                  {
         *                      var machineId = ((EnumMachineID)i);
         *                      try
         *                      {
         *                          var control = MachineMgr.CtrlMachines[machineId.ToString()] as MacMcCabinetDrawer;
         *                          MachineControls.Add(control);
         *                          _dicStateMachines.Add(machineId, control.StateMachine);
         *                      }
         *                      catch (Exception ex)
         *                      {
         *
         *                      }
         *                  }
         *              }
         *          }
         *      }
         *      return _dicStateMachines;
         *  }
         *
         * }
         */

        /// <summary>取得指定的 State Machine</summary>
        /// <param name="machineId"></param>
        /// <param name="dicStateMachines"></param>
        /// <returns></returns>
        public static MacMsCabinetDrawer GetMacMsCabinetDrawer(EnumMachineID machineId, Dictionary <EnumMachineID, MacMsCabinetDrawer> dicStateMachines)
        {
            if (dicStateMachines == null)
            {
                return(null);
            }
            var rtn = dicStateMachines[machineId];

            return(rtn);
        }
Exemplo n.º 3
0
        //[DataRow(EnumMachineID.MID_DRAWER_01_01, EnumMachineID.MID_DRAWER_01_02)]
        public void CreateInstance(/*EnumMachineID machineID1, EnumMachineID machineID2*/)
        {
            // DataRow
            EnumMachineID machineID1 = EnumMachineID.MID_DRAWER_01_01, machineID2 = EnumMachineID.MID_DRAWER_01_02;

            var machine1 = MacMsCabinet.GetMacMsCabinetDrawer(machineID1, DicStateMachines);
            var machine2 = MacMsCabinet.GetMacMsCabinetDrawer(machineID2, DicStateMachines);



            Repeat();
        }
Exemplo n.º 4
0
        public void MoveTrayToHomeWaitingLoadInstruction()
        {
            // DataRow
            EnumMachineID machineID = EnumMachineID.MID_DRAWER_01_01;

            var machine = MacMsCabinet.GetMacMsCabinetDrawer(machineID, DicStateMachines);


            machine.MoveTrayToHomeWaitingLoadInstruction();

            Repeat();
        }
Exemplo n.º 5
0
        public void Unload_MoveTrayToHome()
        {
            // DataRow
            EnumMachineID machineID = EnumMachineID.MID_DRAWER_01_01;

            var machine = MacMsCabinet.GetMacMsCabinetDrawer(machineID, DicStateMachines);


            machine.Unload_MoveTrayToHome();

            Repeat();
        }
Exemplo n.º 6
0
        //[DataRow(EnumMachineID.MID_DRAWER_01_02)]
        public void Load_MoveTrayToOut(/*EnumMachineID machineID*/)
        {
            // DataRow
            EnumMachineID machineID = EnumMachineID.MID_DRAWER_01_02;

            var machine = MacMsCabinet.GetMacMsCabinetDrawer(machineID, DicStateMachines);



            machine.Load_MoveTrayToOut();
            Repeat();
        }
Exemplo n.º 7
0
 public DrawerStateMachineIDRange(EnumMachineID start, EnumMachineID end)
 {
     _startID = start;
     _endID   = end;
 }
Exemplo n.º 8
0
        /// <summary>取得 Drawer State Machine ID 的 範圍</summary>
        /// <param name="inst">任何一個 EnumMachineID 的成員 </param>
        /// <returns>
        /// DrawerStateMachineIDRange
        /// </returns>
        public static DrawerStateMachineIDRange GetDrawerStateMachineIDRange(this EnumMachineID inst)
        {
            var rtnV = new DrawerStateMachineIDRange(EnumMachineID.MID_DRAWER_01_01, EnumMachineID.MID_DRAWER_01_04);

            return(rtnV);
        }