public Pump(IDriverEx driver, IDDK ddk, Config.Pump config, string id) : base(driver, ddk, typeof(Pump).Name, id, config.Name) { Log.TaskBegin(Id); try { m_Properties = new PumpProperties(m_DDK, m_Device); m_Properties.PressureLowerLimit.OnSetProperty += OnPropertyPressureLowerLimitSet; m_Properties.PressureUpperLimit.OnSetProperty += OnPropertyPressureUpperLimitSet; // Properties of the flow handler: // m_FlowHandler.FlowNominalProperty - Flow.Nominal // m_FlowHandler.FlowValueProperty - Flow.Value // m_FlowHandler.ComponentProperties[i] (4 eluent component) - %A.Equate, %B.Equate, %C.Equate, %D.Equate // %A.Valuue, %B.Valuue; %C.Valuue; %D.Valuue ITypeDouble flowType = m_DDK.CreateDouble(0, 10, 3); flowType.Unit = UnitConversionEx.PhysUnitName(UnitConversion.PhysUnitEnum.PhysUnit_MilliLiterPerMin); // ml/min m_FlowHandler = m_Device.CreateFlowHandler(flowType, 4, 2); m_FlowHandler.FlowNominalProperty.OnPreflightSetProperty += OnPropertyFlowNominalSetPreflight; m_FlowHandler.FlowNominalProperty.OnSetProperty += OnPropertyFlowNominalSet; m_FlowHandler.FlowNominalProperty.OnSetRamp += OnPropertyFlowNominalSetRamp; //m_FlowHandler.FlowNominalProperty.RampSyntax = true; // m_FlowHandler.FlowNominalProperty.IsRampSyntax is already True m_FlowHandler.FlowNominalProperty.Update(0); //m_FlowHandler.FlowValueProperty.RampSyntax = true; // m_FlowHandler.FlowValueProperty.IsRampSyntax is already True m_FlowHandler.FlowValueProperty.Update(0); m_EluentPercentA = 100; m_FlowHandler.ComponentProperties[0].Update(m_EluentPercentA); // Partial flow of this component, expressed in percent of the total flow. m_FlowHandler.EquateProperties[i].HelpText = "User-selectable designation of this solvent component." m_FlowHandler.ComponentProperties[1].Update(m_EluentPercentB); m_FlowHandler.ComponentProperties[2].Update(m_EluentPercentC); m_FlowHandler.ComponentProperties[3].Update(m_EluentPercentD); m_FlowHandler.EquateProperties[0].Update("Water"); m_FlowHandler.ComponentProperties[1].OnSetProperty += OnPropertyFlowHandler_ComponentProperty_2_Set; m_FlowHandler.ComponentProperties[2].OnSetProperty += OnPropertyFlowHandler_ComponentProperty_3_Set; m_FlowHandler.ComponentProperties[3].OnSetProperty += OnPropertyFlowHandler_ComponentProperty_4_Set; double pressureSignalMin = m_Properties.PressureLowerLimit.Value.GetValueOrDefault(); double pressureSignalMax = m_Properties.PressureUpperLimit.Value.GetValueOrDefault(); int pressureSignalDigits = 3; string pressureUnitName = m_Properties.PressureValue.DataType.Unit; UnitConversion.PhysUnitEnum pressureUnit = UnitConversionEx.PhysUnitFindName(pressureUnitName); m_ChannelPressure = new PumpChannelPressure(driver, ddk, m_Device, "Channel_Pressure_Id", "Channel_Pressure_Name", pressureSignalMin, pressureSignalMax, pressureSignalDigits, pressureUnit); m_Device.OnBatchPreflightBegin += OnDeviceBatchPreflightBegin; m_Device.OnBatchPreflightSample += OnDeviceBatchPreflightSample; m_Device.OnBatchPreflightEnd += OnDeviceBatchPreflightEnd; m_Device.OnPreflightBegin += OnDevicePreflightBegin; m_Device.OnPreflightLatch += OnDevicePreflightLatch; m_Device.OnPreflightSync += OnDevicePreflightSync; m_Device.OnPreflightBroadcast += OnDevicePreflightBroadcast; m_Device.OnPreflightEnd += OnDevicePreflightEnd; m_Device.OnTransferPreflightToRun += OnDeviceTransferPreflightToRun; m_Device.OnLatch += OnDeviceLatch; m_Device.OnSync += OnDeviceSync; // See these in the AutoSampler m_Device.OnSequenceStart += OnDeviceSequenceStart; m_Device.OnSequenceChange += OnDeviceSequenceChange; m_Device.OnSequenceEnd += OnDeviceSequenceEnd; m_Device.OnBroadcast += OnDeviceBroadcast; Log.TaskEnd(Id); } catch (Exception ex) { Log.TaskEnd(Id, ex); throw; } }
public Pump(IDriverEx driver, IDDK ddk, Config.Pump config, string id) : base(driver, ddk, typeof(Pump).Name, id, config.Name) { }