| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- using System;
- using APS7100TestTool.Models;
- namespace APS7100TestTool.Controllers
- {
- /// <summary>
- /// 可编程电源控制器接口
- /// </summary>
- public interface IPowerSupplyController
- {
- #region 设备信息
-
- DeviceType DeviceType { get; }
- DeviceInfo DeviceInfo { get; }
- #endregion
- #region 基本操作
- /// <summary>
- /// 获取设备识别信息
- /// </summary>
- string GetIdentification();
- /// <summary>
- /// 重置设备
- /// </summary>
- void Reset();
- /// <summary>
- /// 清除状态
- /// </summary>
- void ClearStatus();
- #endregion
- #region 输出控制
- /// <summary>
- /// 设置输出开关
- /// </summary>
- void SetOutput(bool enable);
- /// <summary>
- /// 获取输出状态
- /// </summary>
- bool GetOutputState();
- #endregion
- #region 电压控制
- /// <summary>
- /// 设置输出电压
- /// </summary>
- void SetVoltage(double voltage);
- /// <summary>
- /// 获取电压设定值
- /// </summary>
- double GetVoltage();
- #endregion
- #region 电流控制
- /// <summary>
- /// 设置电流(DC电源)或电流限值(AC电源)
- /// </summary>
- void SetCurrent(double current);
- /// <summary>
- /// 获取电流设定值
- /// </summary>
- double GetCurrent();
- #endregion
- #region 测量
- /// <summary>
- /// 测量实际输出电压
- /// </summary>
- double MeasureVoltage();
- /// <summary>
- /// 测量实际输出电流
- /// </summary>
- double MeasureCurrent();
- /// <summary>
- /// 测量输出功率
- /// </summary>
- double MeasurePower();
- #endregion
- #region 可选功能(AC电源独有)
- /// <summary>
- /// 设置频率(仅AC电源)
- /// </summary>
- void SetFrequency(double frequency);
- /// <summary>
- /// 获取频率设定值(仅AC电源)
- /// </summary>
- double GetFrequency();
- /// <summary>
- /// 测量频率(仅AC电源)
- /// </summary>
- double MeasureFrequency();
- /// <summary>
- /// 测量功率因数(仅AC电源)
- /// </summary>
- double MeasurePowerFactor();
- /// <summary>
- /// 设置波形(仅AC电源)
- /// </summary>
- void SetWaveform(Waveform waveform);
- /// <summary>
- /// 获取当前波形(仅AC电源)
- /// </summary>
- Waveform GetWaveform();
- /// <summary>
- /// 设置电压量程(仅AC电源)
- /// </summary>
- void SetVoltageRange(VoltageRange range);
- /// <summary>
- /// 获取电压量程(仅AC电源)
- /// </summary>
- VoltageRange GetVoltageRange();
- #endregion
- #region 远程控制模式
- /// <summary>
- /// 进入远程控制模式
- /// </summary>
- void SetRemoteMode();
- /// <summary>
- /// 返回本地控制模式
- /// </summary>
- void SetLocalMode();
- /// <summary>
- /// 锁定/解锁前面板按键
- /// </summary>
- /// <param name="locked">true: 锁定前面板, false: 解锁前面板</param>
- void SetPanelLock(bool locked);
- /// <summary>
- /// 查询当前是否为远程模式
- /// </summary>
- bool IsRemoteMode();
- #endregion
- #region 自定义命令
- /// <summary>
- /// 发送自定义 SCPI 命令
- /// </summary>
- void SendCustomCommand(string command);
- /// <summary>
- /// 发送自定义 SCPI 查询
- /// </summary>
- string SendCustomQuery(string command);
- #endregion
- }
- }
|