Beispiel #1
0
        public StatusManager(DataAccess dataAccess, EventLoggerAccess logger)
        {
            Logger     = logger;
            _Statuses  = new StatusElements();
            DataAccess = dataAccess;

            _StatusLock = new object();

            ReadTagConfig();

            DataAccess.TagUpdate            += new PLCTagUpdateHandler(PLCTagUpdate);
            DataAccess.DisplayUpdateRequest += new DashboardUpdateRequestHandler(DashboardUpdateRequest);
        }
Beispiel #2
0
        public StatusManager (DataAccess dataAccess, EventLoggerAccess logger)
        {
            Logger = logger;
            _Statuses = new StatusElements();
            DataAccess = dataAccess;
            
            _StatusLock = new object();

            ReadTagConfig();

            DataAccess.TagUpdate += new PLCTagUpdateHandler(PLCTagUpdate);
            DataAccess.DisplayUpdateRequest += new DashboardUpdateRequestHandler(DashboardUpdateRequest);
        }
Beispiel #3
0
 public StatusManager(DataAccess dataAccess, EventLoggerAccess eventLogger)
 {
     if (/*invalid?*/ eventLogger == null)
     {
         throw new ArgumentNullException(ClassName + " EventLoggerAccess reference argument (eventLogger) must not be null");
     }
     Logger = eventLogger;
     if (/*invalid?*/ dataAccess == null)
     {
         throw new ArgumentNullException(ClassName + " DataAccess reference argument (dataAccess) must not be null");
     }
     DataAccessReference = dataAccess;
     _statusElements     = new StatusElements();
     ReadTagConfig();
     DataAccessReference.OpcTagUpdateHandlers += new PLCTagUpdateHandler(PLCTagUpdate);
     DataAccessReference.DisplayUpdateRequest += new DashboardUpdateRequestHandler(DashboardUpdateRequest);
 }
Beispiel #4
0
        private void InitializeLinacTags()
        {
            _Statuses = new StatusElements();
            int emptyVal = int.MinValue;
            StatusElement statusElement = new StatusElement(_GD_Cathode_V_Set, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_GD_CathodVoltageMonitor, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_GD_FilamentVMonitor, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_GD_FilamentIMon, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_GD_Grid_A_V_Mon, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_GD_Grid_B_V_Mon, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_GD_Grid_Bias_Mon, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_GD_Beam_I_Mon, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_GD_State_Mon, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_MD_HVPSVoltage, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_MD_Filament_I_Mon, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_MD_Filament_V_Mon, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_Mod_State_Mon, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_Magnetron_I_Mon, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_Sol_I_Mon, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_Sol_V_Mon, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);


            statusElement = new StatusElement(_Steering_X_I_Mon, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_Steering_Y_I_Mon, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_IONPUMP_1_CURRENT, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_IONPUMP_2_CURRENT, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_IONPUMP_3_CURRENT, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_IONPUMP_1_VOLTAGE, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_IONPUMP_2_VOLTAGE, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_IONPUMP_3_VOLTAGE, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            //statusElement = new StatusElement(_TCU_TEMPERATURE, emptyVal, TagTypes.Information);
            //_Statuses.Add(statusElement);
            statusElement = new StatusElement(_REFLECTED_POWER, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_FORWARD_POWER, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_AFC_PV, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);
            statusElement = new StatusElement(_Stepper_PV, emptyVal, TagTypes.Information);
            _Statuses.Add(statusElement);

            Dictionary<int, string> valueMapping = new Dictionary<int, string>();
            valueMapping.Add(0, "Clear");
            valueMapping.Add(1, "Error");

            statusElement = new StatusElement(_MAGNETRON_CURRENT_STATUS, 0, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_REFLECTED_RF_POWER_STATUS, 0, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_WAVEGUIDE_ARC_STATUS, 0, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_SF6_PRESSURE_STATUS, 0, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_ENCLOSURE_PANELS_STATUS, 0, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_ACCELERATOR_VACUUM_STATUS, 0, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_MAGNETRON_VACUUM_STATUS, 0, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_SOLENOID_CURRENT_STATUS, 0, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_ACCELERATOR_FLOW_STATUS, 0, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_COOLANT_TEMPERATURE_STATUS, 0, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_ENCLOSURE_TEMPERATURE_STATUS, 0, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_GUN_DRIVER_INTERLOCK_STATUS, 0, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_MODULATOR_INTERLOCK_STATUS, 0, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_CUSTOMER_INTERLOCK1_STATUS, 0, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_CUSTOMER_INTERLOCK2_STATUS, 0, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_MODULATOR_COMMUNICATION_ERROR_STATUS, 0, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(_AFC_STEPPER_MOTOR_OUT_OF_BOUND_STATUS, 0, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            statusElement = new StatusElement(LINAC_ETHERNET_DISCONNECTED, 1, TagTypes.Status, valueMapping);
            _Statuses.Add(statusElement);

            ReadTagConfig();
        }
Beispiel #5
0
 public StatusManager(DataAccess dataAccess, EventLoggerAccess eventLogger)
 {
     if (/*invalid?*/ eventLogger == null)
         throw new ArgumentNullException(ClassName + " EventLoggerAccess reference argument (eventLogger) must not be null");
     Logger = eventLogger;
     if (/*invalid?*/ dataAccess == null)
         throw new ArgumentNullException(ClassName + " DataAccess reference argument (dataAccess) must not be null");
     DataAccessReference = dataAccess;
     _statusElements = new StatusElements();
     ReadTagConfig();
     DataAccessReference.OpcTagUpdateHandlers += new PLCTagUpdateHandler(PLCTagUpdate);
     DataAccessReference.DisplayUpdateRequest += new DashboardUpdateRequestHandler(DashboardUpdateRequest);
 }