36#ifndef SinilinkPowerSupply_h
37#define SinilinkPowerSupply_h
59 virtual double GetPowerVoltageActual(
int chan)
override;
60 virtual double GetPowerVoltageNominal(
int chan)
override;
61 virtual double GetPowerCurrentActual(
int chan)
override;
62 virtual double GetPowerCurrentNominal(
int chan)
override;
63 virtual bool GetPowerChannelActive(
int chan)
override;
66 virtual void SetPowerVoltage(
int chan,
double volts)
override;
67 virtual void SetPowerCurrent(
int chan,
double amps)
override;
68 virtual void SetPowerChannelActive(
int chan,
bool on)
override;
69 virtual bool IsPowerConstantCurrent(
int chan)
override;
73 enum Registers : uint8_t
75 REGISTER_MODEL = 0x16,
76 REGISTER_SERIAL = 0x19,
77 REGISTER_FIRMWARE = 0x17,
79 REGISTER_TEMP_C = 0x0D,
80 REGISTER_TEMP_F = 0x0E,
82 REGISTER_V_SET = 0x00,
83 REGISTER_I_SET = 0x01,
84 REGISTER_V_OUT = 0x02,
85 REGISTER_I_OUT = 0x03,
88 REGISTER_V_INPUT = 0x05,
90 REGISTER_ERROR = 0x10,
93 REGISTER_ON_OFF = 0x12
Base class for instruments using Modbus communication protocol.
Definition: ModbusInstrument.h:44
An SCPI-based power supply.
Definition: SCPIPowerSupply.h:38
Abstraction of a transport layer for moving SCPI data between endpoints.
Definition: SCPITransport.h:47
Implementation for Sinilink PSUs such as XY-S3580, XY6020L.
Definition: SinilinkPowerSupply.h:46
static std::string GetDriverNameInternal()
Return the constant driver name "SiniLink".
Definition: SinilinkPowerSupply.cpp:85
virtual bool SupportsIndividualOutputSwitching() override
Determines if the power supply supports switching individual output channels.
Definition: SinilinkPowerSupply.cpp:98
virtual uint32_t GetInstrumentTypesForChannel(size_t i) const override
Returns a bitfield describing the set of instrument types that a given channel supports.
Definition: SinilinkPowerSupply.cpp:90
SinilinkPowerSupply(SCPITransport *transport)
Initialize the driver.
Definition: SinilinkPowerSupply.cpp:53
virtual bool SupportsVoltageCurrentControl(int chan) override
Determines if the power supply supports voltage/current control for the given channel.
Definition: SinilinkPowerSupply.cpp:103