123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- using Aitex.Core.RT.Fsm;
- using System;
- using System.Collections.Generic;
- using System.Diagnostics;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Venus_Core;
- using Venus_RT.Devices;
- namespace Venus_RT.Modules.TM.VenusEntity
- {
- public class SETMEntity : Entity, IModuleEntity
- {
- public enum STATE
- {
- Unknown,
- Init,
- Initializing,
- InitializingRB,
- Idle,
- Error,
- Pumping,
- Venting,
- Purging,
- Leakchecking,
- Picking,
- Placing,
- Swaping,
- PMPicking,
- PMPlacing,
- PMSwaping,
- Aligning,
- Mapping,
- Extending,
- Retracting,
- Swapping,
- Gotoing,
- ControllingPressure
- }
- public enum MSG
- {
- Home,
- RobotHome,
- Online,
- Offline,
- Pump,
- Vent,
- Purge,
- CyclePurge,
- LeakCheck,
- Pick,
- Place,
- Swap,
- DoublePick,
- DoublePlace,
- DoubleSwap,
- PMPick,
- PMPlace,
- PMSwap,
- Extend,
- Retract,
- TMCycle,
- ControlPressure,
- Error,
- Abort,
- AbortControlPressure
- }
- public bool IsIdle
- {
- get { return fsm.State == (int)STATE.Idle; }
- }
- public bool IsError
- {
- get { return fsm.State == (int)STATE.Error; }
- }
- public bool IsInit
- {
- get { return fsm.State == (int)STATE.Unknown || fsm.State == (int)STATE.Init; }
- }
- public bool IsBusy
- {
- get { return !IsInit && !IsError && !IsIdle; }
- }
- public RState RobotStatus
- {
- get
- {
- if (_robot.Status != RState.Running)
- {
- if (_robotWatch.ElapsedMilliseconds < 100)
- return RState.Running;
- else
- return _robot.Status;
- }
- else
- return RState.Running;
- }
- }
- private readonly ITransferRobot _robot;
- private readonly Stopwatch _robotWatch;
- public SETMEntity()
- {
- }
- public bool Check(int msg, out string reason, params object[] args)
- {
- throw new NotImplementedException();
- }
- public bool CheckAcked(int msg)
- {
- throw new NotImplementedException();
- }
- public int Invoke(string function, params object[] args)
- {
- throw new NotImplementedException();
- }
- }
- }
|