|
@@ -32,13 +32,16 @@ namespace FurnaceRT.Equipments.CarrierRobots
|
|
|
{
|
|
|
private List<AlarmEventItem> _triggeredAlarmList = new List<AlarmEventItem>();
|
|
|
private int _alarmNumber;
|
|
|
+ public IoTrigger TrigActionCommand => _trigActionCommand;
|
|
|
public RobotBaseDevice CarrierRobotDevice { get; set; }
|
|
|
public IoBufferMotor BufferDevice { get; set; }
|
|
|
private IoTrigger _trigAlarmReset;
|
|
|
+ private IoTrigger _trigActionCommand;
|
|
|
private IoAlarmSignal _alarmSignaRobotAlarm;
|
|
|
private R_TRIG _alarmSignaRobotAlarmTrig = new R_TRIG();
|
|
|
public IoDoor DoorDevice { get; set; }
|
|
|
public IoAlarmSignal AlarmSignaFOUPRobotTPStatusWarning { get; set; }
|
|
|
+ private Dictionary<string, int> _actionCommand;
|
|
|
|
|
|
public void InitDevice()
|
|
|
{
|
|
@@ -48,10 +51,38 @@ namespace FurnaceRT.Equipments.CarrierRobots
|
|
|
AlarmSignaFOUPRobotTPStatusWarning = DEVICE.GetDevice<IoAlarmSignal>($"PM1.AlarmSignaFOUPRobotTPStatusWarning");
|
|
|
_alarmSignaRobotAlarm = DEVICE.GetDevice<IoAlarmSignal>($"PM1.AlarmSignaFOUPRobotAlarm");
|
|
|
_trigAlarmReset = DEVICE.GetDevice<IoTrigger>($"PM1.TrigFOUPRobotAlarmReset");
|
|
|
+ _trigActionCommand = DEVICE.GetDevice<IoTrigger>($"PM1.TrigFOUPRobotActionCommand");
|
|
|
CarrierManager.Instance.SubscribeLocation(Module, 1, SC.GetValue<int>("System.CassetteSlotCount"));
|
|
|
WaferManager.Instance.SubscribeLocation(Module, SC.GetValue<int>("System.CassetteSlotCount"));
|
|
|
this.OnDeviceAlarmStateChanged += OnModuleDeviceAlarmStateChanged;
|
|
|
CarrierRobotDevice.OnDeviceAlarmStateChanged += OnModuleDeviceAlarmStateChanged;
|
|
|
+ _actionCommand = new Dictionary<string, int>()
|
|
|
+ {
|
|
|
+ {"C01.Pick",1 },
|
|
|
+ {"C01.Place",2 },
|
|
|
+ {"C02.Pick",3 },
|
|
|
+ {"C02.Place",4 },
|
|
|
+ {"C03.Pick",5 },
|
|
|
+ {"C03.Place",6 },
|
|
|
+ {"C04.Pick",7 },
|
|
|
+ {"C04.Place",8 },
|
|
|
+ {"C05.Pick",9 },
|
|
|
+ {"C05.Place",10 },
|
|
|
+ {"C06.Pick",11 },
|
|
|
+ {"C06.Place",12 },
|
|
|
+ {"C07.Pick",13 },
|
|
|
+ {"C07.Place",14 },
|
|
|
+ {"C08.Pick",15 },
|
|
|
+ {"C08.Place",16 },
|
|
|
+ {"C09.Pick",17 },
|
|
|
+ {"C09.Place",18 },
|
|
|
+ {"C10.Pick",19 },
|
|
|
+ {"C10.Place",20 },
|
|
|
+ {"C11.Pick",21 },
|
|
|
+ {"C11.Place",22 },
|
|
|
+ {"C12.Pick",23 },
|
|
|
+ {"C12.Place",24 },
|
|
|
+ };
|
|
|
}
|
|
|
public void OnModuleDeviceAlarmStateChanged(string deviceId, AlarmEventItem alarmItem)
|
|
|
{
|
|
@@ -142,5 +173,29 @@ namespace FurnaceRT.Equipments.CarrierRobots
|
|
|
int.TryParse(module.Replace("Stocker", ""), out int target);
|
|
|
return (int)(BufferDevice.ServoMovePositionSet + 0.00001) == target && BufferDevice.TargetPositionFb == target;
|
|
|
}
|
|
|
+ public void SetRobotActionCommand(ModuleName traget, EnumTransferType transferType)
|
|
|
+ {
|
|
|
+ if (!CarrierRobotDevice.ModuleAssociateStationDic.ContainsKey(traget.ToString()))
|
|
|
+ return;
|
|
|
+
|
|
|
+ var station = CarrierRobotDevice.ModuleAssociateStationDic[traget.ToString()];
|
|
|
+ if(!_actionCommand.ContainsKey($"{station}.{transferType}"))
|
|
|
+ return;
|
|
|
+ _trigActionCommand.SetAOTrigger(_actionCommand[$"{station}.{transferType}"], out _);
|
|
|
+ }
|
|
|
+ public bool CheckRobotActionCommand(ModuleName traget, EnumTransferType transferType)
|
|
|
+ {
|
|
|
+ if (!CarrierRobotDevice.ModuleAssociateStationDic.ContainsKey(traget.ToString()))
|
|
|
+ return false;
|
|
|
+
|
|
|
+ var station = CarrierRobotDevice.ModuleAssociateStationDic[traget.ToString()];
|
|
|
+ if (!_actionCommand.ContainsKey($"{station}.{transferType}"))
|
|
|
+ return false;
|
|
|
+ return Math.Abs( _trigActionCommand.AIValue - _actionCommand[$"{station}.{transferType}"]) < 0.001;
|
|
|
+ }
|
|
|
+ public void ResetRobotActionCommand()
|
|
|
+ {
|
|
|
+ _trigActionCommand?.SetAOTrigger(0, out _);
|
|
|
+ }
|
|
|
}
|
|
|
}
|