1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- using Aitex.Common.Util;
- using Aitex.Core.RT.Device;
- using Aitex.Core.RT.Device.Unit;
- using Aitex.Core.RT.SCCore;
- using Aitex.Core.Util;
- using Aitex.Sorter.Common;
- using MECF.Framework.Common.Equipment;
- using MECF.Framework.Common.IOCore;
- using MECF.Framework.RT.Core.IoProviders;
- using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.FFUs.AAF;
- using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robots.HongHu;
- using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robots.Rorze;
- using MECF.Framework.RT.EquipmentLibrary.HardwareUnits.Robots.SUNWAY;
- using static JetMainframe.TMs.TMModule;
- namespace JetMainframe
- {
- public class JetMainframeDeviceManager : Singleton<JetMainframeDeviceManager>
- {
- private DeviceController _controller;
- private DeviceManagerBase _device;
- public JetMainframeDeviceManager()
- {
- _controller = new DeviceController();
- _device = new DeviceManagerBase(true);
- }
- public void Initialize()
- {
- string ioProviderPathFile = PathManager.GetCfgDir() + "JetMainframe//IoProviderConfig.xml";
- IoProviderManager.Instance.Initialize(ioProviderPathFile, "System", "io");
- IoManager.Instance.Initialize(PathManager.GetCfgDir() + "JetMainframe//interlockMainFrame.xml");
- _device.Initialize(PathManager.GetCfgDir() + "JetMainframe//DeviceModelMainframe.xml", "JetMainframe", ModuleName.System,
- "System");
- if(SC.GetTMRobotType() == (int)TMRobotType.Rorze751)
- {
- _device.AddCustomDevice(new RorzeRobot751("TM", "TMRobot", "TM", null, null));
- }
- else if(SC.GetTMRobotType() == (int)TMRobotType.SUNWAYSPaceTRan)
- {
- _device.AddCustomDevice(new SPaceTRanRobot("TM", "TMRobot", "TM", null, null));
- }
- else
- {
- var ioSensors = new IoSensor[] { DEVICE.GetDevice<IoSensor>($"System.SensorTMRBReady"),
- DEVICE.GetDevice<IoSensor>($"System.SensorLowArmHasWafer"),
- DEVICE.GetDevice<IoSensor>($"System.SensorUpArmHasWafer") };
- _device.AddCustomDevice(new HHADRRobot21("TM", "TMRobot", "TM", ioSensors, null));
- }
- _device.AddCustomDevice(new FfuAAF("TM", "FFU", "TM"));
- _controller.Start(_device);
- }
- public void Reset()
- {
- _controller.Reset();
- }
- public void Terminate()
- {
- _controller.Terminate();
- }
- }
- }
|