12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using System.Text;
- using System.Xml;
- using Aitex.Core.Common.DeviceData;
- using Aitex.Core.RT.DataCenter;
- using Aitex.Core.RT.Device;
- using Aitex.Core.RT.Event;
- using Aitex.Core.RT.IOCore;
- using Aitex.Core.RT.Log;
- using Aitex.Core.RT.OperationCenter;
- using Aitex.Core.RT.SCCore;
- using Aitex.Core.RT.Tolerance;
- using Aitex.Core.Util;
- using MECF.Framework.Common.Communications;
- using MECF.Framework.Common.DataCenter;
- using MECF.Framework.Common.Device.Bases;
- using MECF.Framework.Common.Equipment;
- using VirgoCommon;
- using VirgoRT.Devices.IODevices;
- namespace VirgoRT.Devices
- {
- class KashiyamaPump : PumpBase
- {
- public override bool IsRunning => _pumpCtrl.IsRunning;
- public override bool IsError => _pumpCtrl.IsError;
- private readonly IoPumpCtrl _pumpCtrl;
- public override AITPumpData DeviceData
- {
- get
- {
- AITPumpData deviceData = new AITPumpData
- {
- DeviceName = Name,
- DeviceModule = Module,
- DeviceSchematicId = DeviceID,
- DisplayName = Display,
- IsError = false,
- IsWarning = false,
- IsOn = IsRunning,
- IsDryPumpEnable = true,
- IsN2PressureEnable = false,
- IsWaterFlowEnable = false,
- };
- return deviceData;
- }
- }
- public KashiyamaPump(ModuleName mod) : base(mod.ToString(), VirgoDevice.MainPump.ToString(), "Kashiyama Pump", "")
- {
- _pumpCtrl = DEVICE.GetDevice<IoPumpCtrl>($"{Module}.{VirgoDevice.PumpCtrl}");
- }
- public override bool Initialize()
- {
- base.Initialize();
- _pumpCtrl.Initialize();
- return true;
- }
- public override void SetPumpOnOff(bool isOn)
- {
- if (isOn)
- _pumpCtrl.StartPump();
- else
- _pumpCtrl.StopPump();
- }
- }
- }
|