コード例 #1
0
ファイル: SampleFunctionScript.cs プロジェクト: NMGRL/qtegra
    //InsertScript: Scripts\Noble Gas\SampleFunctionIncludeScript.cs
    public static void Main()
    {
        Instrument = ArgusMC;
        m_restoreMeasurementInfo = ArgusMC.MeasurementInfo;

        InitializeIncludeScript();

        //RunGetCupConfigurationInfosExample();
        //RunGetTuneSettingNamesExample();
        //RunGetSetMagnetPositionExample();
        //RunGetSetHVExample();
        //RunSetTuneSettingsExample();
        //RunGetSetAllDetectorParametersExample();
        //RunIONGaugeOnOffExample();
        //RunSetMassExample();

        //-------------------------------------------------------------------------------------------------------------------------------------------------------------
        // Scan example section, please only enable one function in these section.
        // If the boolean parameter in the follwing functions are set to true then all counter cups in measurements are activated; otherwise deactivated.
        //-------------------------------------------------------------------------------------------------------------------------------------------------------------
        //RunMonitorScanWithCupConfigurationExample(true);
        //RunMonitorScanWithCupConfigurationAndMassExample(true);
        //RunSweepScanWithCupConfigurationExample(true);
        //RunSweepScanUseSelectedCupConfigurationExample(true);
        //RunSingleScanWithCupConfigurationExample(true);
        //RunSingleScanUseSelectedCupConfigurationExample(true);

        //RunChangeIntegrationTimeForMonitorScanExample();
    }
コード例 #2
0
    //InsertScript: Scripts\Noble Gas\SampleFunctionIncludeScript.cs

    public static void Main()
    {
        Instrument = ArgusMC;
        m_restoreMeasurementInfo = ArgusMC.MeasurementInfo;

        InitializeIncludeScript();

        //RunGetCupConfigurationInfosExample();
        //RunGetTuneSettingNamesExample();
        //RunGetSetMagnetPositionExample();
        //RunGetSetHVExample();
        //RunSetTuneSettingsExample();
        //RunGetSetAllDetectorParametersExample();
        //RunIONGaugeOnOffExample();
        //RunSetMassExample();

        //-------------------------------------------------------------------------------------------------------------------------------------------------------------
        // Scan example section, please only enable one function in these section.
        // If the boolean parameter in the follwing functions are set to true then all counter cups in measurements are activated; otherwise deactivated.
        //-------------------------------------------------------------------------------------------------------------------------------------------------------------
        //RunMonitorScanWithCupConfigurationExample(true);
        //RunMonitorScanWithCupConfigurationAndMassExample(true);
        //RunSweepScanWithCupConfigurationExample(true);
        //RunSweepScanUseSelectedCupConfigurationExample(true);
        //RunSingleScanWithCupConfigurationExample(true);
        //RunSingleScanUseSelectedCupConfigurationExample(true);

        //RunChangeIntegrationTimeForMonitorScanExample();
    }
コード例 #3
0
    public static string SetIntegrationTime(double t)
    {
        //t in ms
        string result="OK";
        IRMSBaseMeasurementInfo nMI= new IRMSBaseMeasurementInfo(Instrument.MeasurementInfo);
        nMI.IntegrationTime = t*1000;
        if (!Instrument.ScanTransitionController.StartMonitoring (nMI))
        {
            Logger.Log(LogLevel.UserError, "Could not start the modified monitor");
            result=String.Format("Error: could not set integration time to {0}",t);
        }

        return result;
    }
コード例 #4
0
//	private static bool UpdateMonitorScan(bool enable)
//	{
//        IRMSBaseCupConfigurationData config = Instrument.CupConfigurationDataList.GetActiveCupConfiguration();
//        IRMSBaseMeasurementInfo monitor_measurement_info = new IRMSBaseMeasurementInfo(
//            Instrument.MeasurementInfo.ScanType,
//            Instrument.MeasurementInfo.IntegrationTime,
//            Instrument.MeasurementInfo.SettlingTime,
//            config.CollectorItemList.GetMasterCollectorItem().Mass.Value,
//            config.CollectorItemList,
//            config.MassCalibration
//        );
//        success = Instrument.ScanTransitionController.StartMonitoring(monitor_measurement_info);
//        success = Instrument.ScanTransitionController.StartMonitoring(monitor_measurement_info);
//        if (!success) Logger.Log(LogLevel.UserError, "Failed to update monitoring.");
//        else if (enable) Logger.Log(LogLevel.UserInfo, "Monitoring has been updated.");
//        return success;
//	}

	private static bool RunMonitorScan (double? mass)
	{
		IRMSBaseCupConfigurationData cupData = Instrument.CupConfigurationDataList.GetActiveCupConfiguration();
		IRMSBaseMeasurementInfo newMeasurementInfo =
			new IRMSBaseMeasurementInfo(
				Instrument.MeasurementInfo.ScanType,
				Instrument.MeasurementInfo.IntegrationTime,
				Instrument.MeasurementInfo.SettlingTime,
				(mass.HasValue) ? mass.Value : cupData.CollectorItemList.GetMasterCollectorItem().Mass.Value,
				cupData.CollectorItemList,
				cupData.MassCalibration
				);
		Instrument.ScanTransitionController.StartMonitoring(newMeasurementInfo);
		return true;
	}
コード例 #5
0
//============================================================================================
//    EOCommands
//============================================================================================

	private static bool PrepareEnvironment()
    {
        m_restoreMeasurementInfo=Instrument.MeasurementInfo;
        return Instrument.ScanTransitionController.InitializeScriptScan(m_restoreMeasurementInfo);
    }
コード例 #6
0
ファイル: RemoteControlServer.cs プロジェクト: NMGRL/qtegra
 private static bool RunMonitorScan(double? mass)
 {
     IRMSBaseCupConfigurationData cupData = Instrument.CupConfigurationDataList.GetActiveCupConfiguration();
     IRMSBaseMeasurementInfo newMeasurementInfo =
         new IRMSBaseMeasurementInfo(
             Instrument.MeasurementInfo.ScanType,
             Instrument.MeasurementInfo.IntegrationTime,
             Instrument.MeasurementInfo.SettlingTime,
             (mass.HasValue) ? mass.Value : cupData.CollectorItemList.GetMasterCollectorItem().Mass.Value,
             cupData.CollectorItemList,
             cupData.MassCalibration
             );
     Instrument.ScanTransitionController.StartMonitoring(newMeasurementInfo);
     return true;
 }
コード例 #7
0
ファイル: RemoteControlServer.cs プロジェクト: NMGRL/qtegra
 //============================================================================================
 //    EOCommands
 //============================================================================================
 private static bool PrepareEnvironment()
 {
     m_restoreMeasurementInfo=Instrument.MeasurementInfo;
     return Instrument.ScanTransitionController.InitializeScriptScan(m_restoreMeasurementInfo);
 }
コード例 #8
0
ファイル: RemoteControlServer.cs プロジェクト: NMGRL/qtegra
    public static string SetIntegrationTime(double t)
    {
        //t in ms
        string result="OK";
        IRMSBaseMeasurementInfo nMI= new IRMSBaseMeasurementInfo(Instrument.MeasurementInfo);
        nMI.IntegrationTime = t*1000;
        if (!Instrument.ScanTransitionController.StartMonitoring (nMI))
        {
            Logger.Log(LogLevel.UserError, "Could not start the modified monitor");
            result=String.Format("Error: could not set integration time to {0}",t);
        }

        return result;
    }